Use host_address_to_string in compile_cplus_instance::enter_scope
[external/binutils.git] / gdb / ChangeLog
1 2018-08-30  Keith Seitz  <keiths@redhat.com>
2
3         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4         Use "%s" and host_address_to_string instead of "%p" in printf.
5
6 2018-08-29  Keith Seitz  <keiths@redhat.com>
7
8         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
9         and compile-cplus-types.c.
10         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
11         * c-lang.c (cplus_language_defn): Set C++ compile functions.
12         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
13         Declare.
14         * compile/compile-c-support.c: Include compile-cplus.h.
15         (load_libcompile): Templatize.
16         (get_compile_context): "New" function.
17         (c_get_compile_context): Use get_compile_context.
18         (cplus_get_compile_context): New function.
19         (cplus_push_user_expression, cplus_pop_user_expression)
20         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
21         (cplus_compute_program): Define new structs/functions.
22         * compile/compile-cplus-symmbols.c: New file.
23         * compile/compile-cplus-types.c: New file.
24         * compile/compile-cplus.h: New file.
25         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
26         Declare.
27         * compile/compile-object-load.c (get_out_value_type): Use
28         strncmp_iw when comparing symbol names.
29         (compile_object_load): Add mst_bss and mst_data.
30         * compile/compile.c (_initialize_compile): Remove
31         -Wno-implicit-function-declaration from `compile_args'.
32         * compile/gcc-cp-plugin.h: New file.
33         * NEWS: Mention C++ compile support and new debug options.
34
35 2018-08-29  Keith Seitz  <keiths@redhat.com>
36
37         * linespec.c (collect_info::add_symbol): Make virtual.
38         (struct symbol_searcher_collect_info): New struct.
39         (symbol_searcher::find_all_symbols): New method.
40         * symtab.h (class symbol_searcher): New class.
41
42 2018-08-29  Keith Seitz  <keiths@redhat.com>
43
44         * linespec.c (struct linespec) <function_symbols, label_symbols>:
45         Change to vector of block_symbol.  Update all users.
46         (struct collect_info) <symbols>: Likewise.
47         (collect_info::add_symbol): Take block_symbol as argument.
48         Update all callers.
49         (decode_compound_collector) <m_symbols>: Change type to vector
50         of block_symbol.  Update all users.
51         (decode_compound_collector::operator ()): Change parameter type
52         to block_symbol.
53         (find_method, find_function_symbols, find_linespec_symbols)
54         (find_label_symbols_in_block, find_label_symbols): Change symbol
55         vectors to block_symbol vectors.
56         * symtab.h (symbol_found_callback_ftype): Change parameter type to
57         block_symbol.
58
59 2018-08-29  Keith Seitz  <keiths@redhat.com>
60
61         * linespec.c (symbolp): Remove typedef and VEC definitions.
62         (bound_minimal_symbol_d): Likewise.
63
64 2018-08-29  Keith Seitz  <keiths@redhat.com>
65
66         * linespec.c (decode_compound_collector::decode_compound_collector):
67         Remove initialization for `m_symtabs'.
68         (decode_compound_collector::release_symbols): Change return type
69         to std::vector.  Update all callers.
70         (class decode_compound_collector) <m_symbols>: Change type to
71         std::vector.
72         (lookup_prefix_sym): Change return type to std::vector.  Update all
73         callers.
74         (compare_symbols): Remove.
75         (std_compare_symbols): Rename to `compare_symbols'.
76         (find_method): Change `sym_classes' parameter to std::vector.
77         Update all callers.  Use std::sort to sort sym_classes.
78         (find_linespec_symbols): Remove cleanup.
79
80 2018-08-29  Keith Seitz  <keiths@redhat.com>
81
82         * linespec.c (struct linespec) <minimal_symbols>: Change type to
83         std::vector.  Update all users.
84         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
85         (struct collect_info) <minimal_symbols>: Likewise.
86         (compare_msymbols): Return bool.  Change parameters to const
87         bound_minimal_symbol references.
88         (find_method, find_function_symbols, find_linespec_symbols): Change
89         `minsyms' parameter to std::vector.  Update all callers.
90
91 2018-08-29  Keith Seitz  <keiths@redhat.com>
92
93         * linespec.c (struct linespec) <label_symbols>: Change type to
94         std::vector.  Update all users.
95         (find_label_symbols_in_block): Change `result' parameter to
96         std::vector.  Update all callers.
97         (find_label_symbols): Return std::vector.  Update all callers.
98
99 2018-08-29  Keith Seitz  <keiths@redhat.com>
100
101         * linespec.c (struct linespec) <function_symbols>: Change type to
102         std::vector.  Update all users.
103         (struct collect_info) <function_symbols>: Likewise.
104         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
105         (std_compare_symbols): New function.
106         (find_method, find_function_symbols, find_linespec_symbols)
107         (find_label_symbols_in_block): Change `symbols' parameter to
108         std::vector.  Update all callers.
109         (find_label_symbols): Likewise for `function_symbols' and
110         `label_funcs_ret'.
111
112 2018-08-29  Keith Seitz  <keiths@redhat.com>
113
114         * linespec.c (symtab_vector_up): Define.
115         (struct linespec) <file_symtabs>: Change type to std::vector *.
116         Update all uses.
117         (struct collect_info) <file_symtabs>: Likewise.
118         (collect_symtabs_from_filename): Return symtab_vector_up.
119         Update all callers.
120         (decode_objc): Remove cleanup.
121         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
122         (symtab_collector::release_symtabs): Return symtab_vector_up.
123         Update all callers.
124         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
125         Update all users.
126         (collect_symtabs_from_filename, symtabs_from_filename): Return
127         symtab_vector_up.  Update all callers.
128
129 2018-08-29  Tom Tromey  <tom@tromey.com>
130
131         * csky-tdep.c (csky_analyze_prologue): Use
132         core_addr_to_string_nz.
133
134 2018-08-29  Tom Tromey  <tom@tromey.com>
135
136         * windows-nat.c (struct xlate_exception) <them>: Change type to
137         DWORD.
138         (xlate): Fix formatting.  Remove last entry.
139         (struct xlate_exception, xlate): Comment out.
140         (windows_nat_target::resume): Use ranged for.
141
142 2018-08-29  Jim Wilson  <jimw@sifive.com>
143
144         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
145         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
146         of NT_PRFPREG.
147         (riscv_linux_nat_target::store_registers): Likewise.
148
149 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
150
151         PR gdb/23555
152         PR gdb/23558
153         * gnulib/aclocal.m4: Regenerate.
154         * gnulib/config.in: Regenerate.
155         * gnulib/configure: Regenerate.
156         * gnulib/import/Makefile.am: Update.
157         * gnulib/import/Makefile.in: Update.
158         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
159         * gnulib/import/_Noreturn.h: ... this.
160         * gnulib/import/alloca.in.h: Update.
161         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
162         * gnulib/import/arg-nonnull.h: ... this.
163         * gnulib/import/assure.h: Update.
164         * gnulib/import/at-func.c: Update.
165         * gnulib/import/basename-lgpl.c: Update.
166         * gnulib/import/extra/snippet/c++defs.h: Rename to...
167         * gnulib/import/c++defs.h: ... this.
168         * gnulib/import/canonicalize-lgpl.c: Update.
169         * gnulib/import/cdefs.h: Update.
170         * gnulib/import/chdir-long.c: Update.
171         * gnulib/import/chdir-long.h: Update.
172         * gnulib/import/cloexec.c: Update.
173         * gnulib/import/cloexec.h: Update.
174         * gnulib/import/close.c: Update.
175         * gnulib/import/closedir.c: Update.
176         * gnulib/import/config.charset: Update.
177         * gnulib/import/dirent-private.h: Update.
178         * gnulib/import/dirent.in.h: Update.
179         * gnulib/import/dirfd.c: Update.
180         * gnulib/import/dirname-lgpl.c: Update.
181         * gnulib/import/dirname.h: Update.
182         * gnulib/import/dosname.h: Update.
183         * gnulib/import/dup-safer-flag.c: Update.
184         * gnulib/import/dup-safer.c: Update.
185         * gnulib/import/dup.c: Update.
186         * gnulib/import/dup2.c: Update.
187         * gnulib/import/errno.in.h: Update.
188         * gnulib/import/error.c: Update.
189         * gnulib/import/error.h: Update.
190         * gnulib/import/exitfail.c: Update.
191         * gnulib/import/exitfail.h: Update.
192         * gnulib/import/extra/update-copyright: Update.
193         * gnulib/import/fchdir.c: Update.
194         * gnulib/import/fcntl.c: Update.
195         * gnulib/import/fcntl.in.h: Update.
196         * gnulib/import/fd-hook.c: Update.
197         * gnulib/import/fd-hook.h: Update.
198         * gnulib/import/fd-safer-flag.c: Update.
199         * gnulib/import/fd-safer.c: Update.
200         * gnulib/import/fdopendir.c: Update.
201         * gnulib/import/filename.h: Update.
202         * gnulib/import/filenamecat-lgpl.c: Update.
203         * gnulib/import/filenamecat.h: Update.
204         * gnulib/import/flexmember.h: Update.
205         * gnulib/import/float+.h: Update.
206         * gnulib/import/float.c: Update.
207         * gnulib/import/float.in.h: Update.
208         * gnulib/import/fnmatch.c: Update.
209         * gnulib/import/fnmatch.in.h: Update.
210         * gnulib/import/fnmatch_loop.c: Update.
211         * gnulib/import/fpucw.h: Update.
212         * gnulib/import/frexp.c: Update.
213         * gnulib/import/frexpl.c: Update.
214         * gnulib/import/fstat.c: Update.
215         * gnulib/import/fstatat.c: Update.
216         * gnulib/import/getcwd-lgpl.c: Update.
217         * gnulib/import/getcwd.c: Update.
218         * gnulib/import/getdtablesize.c: Update.
219         * gnulib/import/getlogin_r.c: Update.
220         * gnulib/import/getprogname.c: Update.
221         * gnulib/import/getprogname.h: Update.
222         * gnulib/import/gettext.h: Update.
223         * gnulib/import/gettimeofday.c: Update.
224         * gnulib/import/glob-libc.h: Update.
225         * gnulib/import/glob.c: Update.
226         * gnulib/import/glob.in.h: Update.
227         * gnulib/import/glob_internal.h: Update.
228         * gnulib/import/glob_pattern_p.c: Update.
229         * gnulib/import/globfree.c: Update.
230         * gnulib/import/hard-locale.c: Update.
231         * gnulib/import/hard-locale.h: Update.
232         * gnulib/import/intprops.h: Update.
233         * gnulib/import/inttypes.in.h: Update.
234         * gnulib/import/isnan.c: Update.
235         * gnulib/import/isnand-nolibm.h: Update.
236         * gnulib/import/isnand.c: Update.
237         * gnulib/import/isnanl-nolibm.h: Update.
238         * gnulib/import/isnanl.c: Update.
239         * gnulib/import/itold.c: Update.
240         * gnulib/import/libc-config.h: Update.
241         * gnulib/import/limits.in.h: Update.
242         * gnulib/import/localcharset.c: Update.
243         * gnulib/import/localcharset.h: Update.
244         * gnulib/import/localtime-buffer.c: Update.
245         * gnulib/import/localtime-buffer.h: Update.
246         * gnulib/import/lstat.c: Update.
247         * gnulib/import/m4/00gnulib.m4: Update.
248         * gnulib/import/m4/__inline.m4: Update.
249         * gnulib/import/m4/absolute-header.m4: Update.
250         * gnulib/import/m4/alloca.m4: Update.
251         * gnulib/import/m4/builtin-expect.m4: Update.
252         * gnulib/import/m4/canonicalize.m4: Update.
253         * gnulib/import/m4/chdir-long.m4: Update.
254         * gnulib/import/m4/close.m4: Update.
255         * gnulib/import/m4/closedir.m4: Update.
256         * gnulib/import/m4/configmake.m4: Update.
257         * gnulib/import/m4/d-ino.m4: Update.
258         * gnulib/import/m4/d-type.m4: Update.
259         * gnulib/import/m4/dirent_h.m4: Update.
260         * gnulib/import/m4/dirfd.m4: Update.
261         * gnulib/import/m4/dirname.m4: Update.
262         * gnulib/import/m4/double-slash-root.m4: Update.
263         * gnulib/import/m4/dup.m4: Update.
264         * gnulib/import/m4/dup2.m4: Update.
265         * gnulib/import/m4/eealloc.m4: Update.
266         * gnulib/import/m4/environ.m4: Update.
267         * gnulib/import/m4/errno_h.m4: Update.
268         * gnulib/import/m4/error.m4: Update.
269         * gnulib/import/m4/exponentd.m4: Update.
270         * gnulib/import/m4/exponentl.m4: Update.
271         * gnulib/import/m4/extensions.m4: Update.
272         * gnulib/import/m4/extern-inline.m4: Update.
273         * gnulib/import/m4/fchdir.m4: Update.
274         * gnulib/import/m4/fcntl-o.m4: Update.
275         * gnulib/import/m4/fcntl.m4: Update.
276         * gnulib/import/m4/fcntl_h.m4: Update.
277         * gnulib/import/m4/fdopendir.m4: Update.
278         * gnulib/import/m4/filenamecat.m4: Update.
279         * gnulib/import/m4/flexmember.m4: Update.
280         * gnulib/import/m4/float_h.m4: Update.
281         * gnulib/import/m4/fnmatch.m4: Update.
282         * gnulib/import/m4/fnmatch_h.m4: Update.
283         * gnulib/import/m4/fpieee.m4: Update.
284         * gnulib/import/m4/frexp.m4: Update.
285         * gnulib/import/m4/frexpl.m4: Update.
286         * gnulib/import/m4/fstat.m4: Update.
287         * gnulib/import/m4/fstatat.m4: Update.
288         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
289         * gnulib/import/m4/getcwd-path-max.m4: Update.
290         * gnulib/import/m4/getcwd.m4: Update.
291         * gnulib/import/m4/getdtablesize.m4: Update.
292         * gnulib/import/m4/getlogin.m4: Update.
293         * gnulib/import/m4/getlogin_r.m4: Update.
294         * gnulib/import/m4/getpagesize.m4: Update.
295         * gnulib/import/m4/getprogname.m4: Update.
296         * gnulib/import/m4/gettimeofday.m4: Update.
297         * gnulib/import/m4/glibc21.m4: Update.
298         * gnulib/import/m4/glob.m4: Update.
299         * gnulib/import/m4/glob_h.m4: Update.
300         * gnulib/import/m4/gnulib-cache.m4: Update.
301         * gnulib/import/m4/gnulib-common.m4: Update.
302         * gnulib/import/m4/gnulib-comp.m4: Update.
303         * gnulib/import/m4/gnulib-tool.m4: Update.
304         * gnulib/import/m4/hard-locale.m4: Update.
305         * gnulib/import/m4/include_next.m4: Update.
306         * gnulib/import/m4/inttypes-pri.m4: Update.
307         * gnulib/import/m4/inttypes.m4: Update.
308         * gnulib/import/m4/isnand.m4: Update.
309         * gnulib/import/m4/isnanl.m4: Update.
310         * gnulib/import/m4/largefile.m4: Update.
311         * gnulib/import/m4/limits-h.m4: Update.
312         * gnulib/import/m4/localcharset.m4: Update.
313         * gnulib/import/m4/locale-fr.m4: Update.
314         * gnulib/import/m4/locale-ja.m4: Update.
315         * gnulib/import/m4/locale-zh.m4: Update.
316         * gnulib/import/m4/localtime-buffer.m4: Update.
317         * gnulib/import/m4/longlong.m4: Update.
318         * gnulib/import/m4/lstat.m4: Update.
319         * gnulib/import/m4/malloc.m4: Update.
320         * gnulib/import/m4/malloca.m4: Update.
321         * gnulib/import/m4/math_h.m4: Update.
322         * gnulib/import/m4/mbrtowc.m4: Update.
323         * gnulib/import/m4/mbsinit.m4: Update.
324         * gnulib/import/m4/mbsrtowcs.m4: Update.
325         * gnulib/import/m4/mbstate_t.m4: Update.
326         * gnulib/import/m4/memchr.m4: Update.
327         * gnulib/import/m4/memmem.m4: Update.
328         * gnulib/import/m4/mempcpy.m4: Update.
329         * gnulib/import/m4/memrchr.m4: Update.
330         * gnulib/import/m4/mkdir.m4: Update.
331         * gnulib/import/m4/mkstemp.m4: Update.
332         * gnulib/import/m4/mmap-anon.m4: Update.
333         * gnulib/import/m4/mode_t.m4: Update.
334         * gnulib/import/m4/msvc-inval.m4: Update.
335         * gnulib/import/m4/msvc-nothrow.m4: Update.
336         * gnulib/import/m4/multiarch.m4: Update.
337         * gnulib/import/m4/nocrash.m4: Update.
338         * gnulib/import/m4/off_t.m4: Update.
339         * gnulib/import/m4/onceonly.m4: Update.
340         * gnulib/import/m4/open-cloexec.m4: Update.
341         * gnulib/import/m4/open.m4: Update.
342         * gnulib/import/m4/openat.m4: Update.
343         * gnulib/import/m4/opendir.m4: Update.
344         * gnulib/import/m4/pathmax.m4: Update.
345         * gnulib/import/m4/rawmemchr.m4: Update.
346         * gnulib/import/m4/readdir.m4: Update.
347         * gnulib/import/m4/readlink.m4: Update.
348         * gnulib/import/m4/realloc.m4: Update.
349         * gnulib/import/m4/rename.m4: Update.
350         * gnulib/import/m4/rewinddir.m4: Update.
351         * gnulib/import/m4/rmdir.m4: Update.
352         * gnulib/import/m4/save-cwd.m4: Update.
353         * gnulib/import/m4/secure_getenv.m4: Update.
354         * gnulib/import/m4/setenv.m4: Update.
355         * gnulib/import/m4/signal_h.m4: Update.
356         * gnulib/import/m4/ssize_t.m4: Update.
357         * gnulib/import/m4/stat-time.m4: Update.
358         * gnulib/import/m4/stat.m4: Update.
359         * gnulib/import/m4/std-gnu11.m4: Update.
360         * gnulib/import/m4/stdbool.m4: Update.
361         * gnulib/import/m4/stddef_h.m4: Update.
362         * gnulib/import/m4/stdint.m4: Update.
363         * gnulib/import/m4/stdio_h.m4: Update.
364         * gnulib/import/m4/stdlib_h.m4: Update.
365         * gnulib/import/m4/strchrnul.m4: Update.
366         * gnulib/import/m4/strdup.m4: Update.
367         * gnulib/import/m4/strerror.m4: Update.
368         * gnulib/import/m4/string_h.m4: Update.
369         * gnulib/import/m4/strstr.m4: Update.
370         * gnulib/import/m4/strtok_r.m4: Update.
371         * gnulib/import/m4/sys_socket_h.m4: Update.
372         * gnulib/import/m4/sys_stat_h.m4: Update.
373         * gnulib/import/m4/sys_time_h.m4: Update.
374         * gnulib/import/m4/sys_types_h.m4: Update.
375         * gnulib/import/m4/tempname.m4: Update.
376         * gnulib/import/m4/time_h.m4: Update.
377         * gnulib/import/m4/unistd-safer.m4: Update.
378         * gnulib/import/m4/unistd_h.m4: Update.
379         * gnulib/import/m4/warn-on-use.m4: Update.
380         * gnulib/import/m4/wchar_h.m4: Update.
381         * gnulib/import/m4/wchar_t.m4: Update.
382         * gnulib/import/m4/wctype_h.m4: Update.
383         * gnulib/import/m4/wint_t.m4: Update.
384         * gnulib/import/malloc.c: Update.
385         * gnulib/import/malloc/scratch_buffer.h: Update.
386         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
387         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
388         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
389         * gnulib/import/malloca.c: Update.
390         * gnulib/import/malloca.h: Update.
391         * gnulib/import/malloca.valgrind: Update.
392         * gnulib/import/math.in.h: Update.
393         * gnulib/import/mbrtowc.c: Update.
394         * gnulib/import/mbsinit.c: Update.
395         * gnulib/import/mbsrtowcs-impl.h: Update.
396         * gnulib/import/mbsrtowcs-state.c: Update.
397         * gnulib/import/mbsrtowcs.c: Update.
398         * gnulib/import/memchr.c: Update.
399         * gnulib/import/memmem.c: Update.
400         * gnulib/import/mempcpy.c: Update.
401         * gnulib/import/memrchr.c: Update.
402         * gnulib/import/mkdir.c: Update.
403         * gnulib/import/mkstemp.c: Update.
404         * gnulib/import/msvc-inval.c: Update.
405         * gnulib/import/msvc-inval.h: Update.
406         * gnulib/import/msvc-nothrow.c: Update.
407         * gnulib/import/msvc-nothrow.h: Update.
408         * gnulib/import/open.c: Update.
409         * gnulib/import/openat-die.c: Update.
410         * gnulib/import/openat-priv.h: Update.
411         * gnulib/import/openat-proc.c: Update.
412         * gnulib/import/openat.c: Update.
413         * gnulib/import/openat.h: Update.
414         * gnulib/import/opendir.c: Update.
415         * gnulib/import/pathmax.h: Update.
416         * gnulib/import/pipe-safer.c: Update.
417         * gnulib/import/rawmemchr.c: Update.
418         * gnulib/import/readdir.c: Update.
419         * gnulib/import/readlink.c: Update.
420         * gnulib/import/realloc.c: Update.
421         * gnulib/import/ref-add.sin: Update.
422         * gnulib/import/ref-del.sin: Update.
423         * gnulib/import/rename.c: Update.
424         * gnulib/import/rewinddir.c: Update.
425         * gnulib/import/rmdir.c: Update.
426         * gnulib/import/same-inode.h: Update.
427         * gnulib/import/save-cwd.c: Update.
428         * gnulib/import/save-cwd.h: Update.
429         * gnulib/import/scratch_buffer.h: Update.
430         * gnulib/import/secure_getenv.c: Update.
431         * gnulib/import/setenv.c: Update.
432         * gnulib/import/signal.in.h: Update.
433         * gnulib/import/stat-time.c: Update.
434         * gnulib/import/stat-time.h: Update.
435         * gnulib/import/stat-w32.c: Update.
436         * gnulib/import/stat-w32.h: Update.
437         * gnulib/import/stat.c: Update.
438         * gnulib/import/stdbool.in.h: Update.
439         * gnulib/import/stddef.in.h: Update.
440         * gnulib/import/stdint.in.h: Update.
441         * gnulib/import/stdio.in.h: Update.
442         * gnulib/import/stdlib.in.h: Update.
443         * gnulib/import/str-two-way.h: Update.
444         * gnulib/import/strchrnul.c: Update.
445         * gnulib/import/strdup.c: Update.
446         * gnulib/import/streq.h: Update.
447         * gnulib/import/strerror-override.c: Update.
448         * gnulib/import/strerror-override.h: Update.
449         * gnulib/import/strerror.c: Update.
450         * gnulib/import/string.in.h: Update.
451         * gnulib/import/stripslash.c: Update.
452         * gnulib/import/strnlen1.c: Update.
453         * gnulib/import/strnlen1.h: Update.
454         * gnulib/import/strstr.c: Update.
455         * gnulib/import/strtok_r.c: Update.
456         * gnulib/import/sys_stat.in.h: Update.
457         * gnulib/import/sys_time.in.h: Update.
458         * gnulib/import/sys_types.in.h: Update.
459         * gnulib/import/tempname.c: Update.
460         * gnulib/import/tempname.h: Update.
461         * gnulib/import/time.in.h: Update.
462         * gnulib/import/unistd--.h: Update.
463         * gnulib/import/unistd-safer.h: Update.
464         * gnulib/import/unistd.in.h: Update.
465         * gnulib/import/unsetenv.c: Update.
466         * gnulib/import/verify.h: Update.
467         * gnulib/import/extra/snippet/warn-on-use.h: Update.
468         * gnulib/import/wchar.in.h: Update.
469         * gnulib/import/wctype.in.h: Update.
470         * gnulib/import/xalloc-oversized.h: Update.
471         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
472         "53e2c179f26a890fa6685af4b6c1397ee370433b".
473
474 2018-08-16  Gary Benson <gbenson@redhat.com>
475
476         PR gdb/13000:
477         * gdb/main.c (captured_main_1): Exit with nonzero status
478         in batch mode if the last command to be executed failed.
479         * NEWS: Mention the above.
480
481 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
482
483         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
484         end of warning message.
485
486 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
487
488         PR gdb/22943:
489         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
490         (aarch64_extract_return_value): Use
491         aapcs_is_vfp_call_or_return_candidate.
492         (aarch64_return_in_memory): Likewise.
493         (aarch64_store_return_value): Likewise.
494
495 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
496
497         * aarch64-tdep.c
498         (aapcs_is_vfp_call_or_return_candidate): Make static
499         (pass_in_v_or_stack): Remove function.
500         (pass_in_v_vfp_candidate): New function.
501         (aarch64_push_dummy_call): Check for float register candidates.
502
503 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
504
505         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
506         (aapcs_is_vfp_call_or_return_candidate_1): New function.
507         (aapcs_is_vfp_call_or_return_candidate): Likewise.
508
509 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
510
511         PR build/23399
512         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
513         (struct ipa_sym_addresses): Rename to...
514         (struct ipa_sym_addresses_common): ... this.
515         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
516
517 2018-08-28  Tom Tromey  <tom@tromey.com>
518
519         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
520         (token_fifo): Now a std::vector.
521         (yylex, c_parse): Update.
522         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
523         (token_fifo): Now a std::vector.
524         (yylex, d_parse): Update.
525         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
526         (token_fifo): Now a std::vector.
527         (yylex, go_parse): Update.
528
529 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
530
531         * parser-defs.h (struct type_stack) <elements>: Change type to
532         std::vector<union type_stack_elt>.
533         <depth, size>: Remove.
534         * parse.c (parse_exp_in_context_1): Adjust.
535         (type_stack_reserve): Remove.
536         (check_type_stack_depth): Remove.
537         (insert_into_type_stack): Adjust to std::vector.
538         (insert_type): Likewise.
539         (push_type): Likewise.
540         (push_type_int): Likewise.
541         (insert_type_address_space): Likewise.
542         (pop_type): Likewise.
543         (pop_type_int): Likewise.
544         (pop_typelist): Likewise.
545         (pop_type_stack): Likewise.
546         (append_type_stack): Likewise.
547         (push_type_stack): Likewise.
548         (get_type_stack): Likewise.
549         (type_stack_cleanup): Likewise.
550         (push_typelist): Likewise.
551         (follow_types): Likewise.
552         (_initialize_parse): Likewise.
553
554 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
555
556         * NEWS: Mention csky target.
557
558 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
559             Hafiz Abid Qadeer  <abidh@codesourcery.com>
560             Don Breazeal  <donb@codesourcery.com>
561
562         * csky-linux-tdep.c: New file.
563         * csky-tdep.c: Likewise.
564         * csky-tdep.h: Likewise.
565         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
566         csky-tdep.o.
567         (HFILES_NO_SRCDIR): Add csky-tdep.h.
568         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
569         * configure.tgt: Add csky support.
570
571 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
572
573         * python/py-framefilter.c (py_print_frame): Print frame architecture
574         when printing on an MI output.
575
576 2018-08-27  Tom Tromey  <tom@tromey.com>
577
578         PR build/23087:
579         * configure: Rebuild.
580         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
581
582 2018-08-27  Tom Tromey  <tom@tromey.com>
583
584         * aarch64-linux-tdep.c
585         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
586         casts to int.
587
588 2018-08-27  Tom Tromey  <tom@tromey.com>
589
590         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
591         unsigned.
592         (ppc64_standard_linkage1, ppc64_standard_linkage2)
593         (ppc64_standard_linkage3, ppc64_standard_linkage4)
594         (ppc64_standard_linkage5, ppc64_standard_linkage6)
595         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
596         unsigned.
597
598 2018-08-27  Tom Tromey  <tom@tromey.com>
599
600         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
601         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
602
603 2018-08-27  Tom Tromey  <tom@tromey.com>
604
605         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
606         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
607         ULONGEST_MAX.
608         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
609         ULONGEST_MAX.
610         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
611         ULONGEST_MAX.
612         * sparc-linux-tdep.c (sparc32_linux_sigframe)
613         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
614         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
615         ULONGEST_MAX.
616         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
617         (ppc64_linux_sigaction_tramp_frame)
618         (ppc32_linux_sighandler_tramp_frame)
619         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
620         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
621         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
622         * mn10300-linux-tdep.c (am33_linux_sigframe)
623         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
624         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
625         * mips-linux-tdep.c (mips_linux_o32_sigframe)
626         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
627         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
628         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
629         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
630         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
631         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
632         * microblaze-linux-tdep.c
633         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
634         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
635         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
636         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
637         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
638         * common/common-types.h (ULONGEST_MAX): New define.
639         (CORE_ADDR_MAX): Fix formatting.
640         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
641         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
642         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
643         (arm_linux_rt_sigreturn_tramp_frame)
644         (arm_eabi_linux_sigreturn_tramp_frame)
645         (arm_eabi_linux_rt_sigreturn_tramp_frame)
646         (thumb2_eabi_linux_sigreturn_tramp_frame)
647         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
648         (arm_linux_restart_syscall_tramp_frame)
649         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
650         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
651         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
652         ULONGEST_MAX.
653         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
654
655 2018-08-27  Tom Tromey  <tom@tromey.com>
656
657         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
658         CORE_ADDR_MAX.
659         * mips-tdep.c (mips_deal_with_atomic_sequence)
660         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
661         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
662         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
663         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
664         CORE_ADDR_MAX.
665         * aarch64-tdep.c (aarch64_software_single_step): Use
666         CORE_ADDR_MAX.
667
668 2018-08-27  Tom Tromey  <tom@tromey.com>
669
670         * linespec.c (complete_linespec_component): Add cast to "char".
671         * completer.c (completion_tracker::build_completion_result): Add
672         cast to "char".
673
674 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
675
676         * solist.h (struct solist, struct target_so_ops): Fix
677         indentation.
678
679 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
680
681         * ada-tasks.c (ada_task_info_s): Remove typedef.
682         (DEF_VEC_O(ada_task_info_s)): Remove.
683         (struct ada_tasks_inferior_data): Initialize fields.
684         <task_list>: Make an std::vector.
685         (get_ada_tasks_inferior_data): Allocate with new.
686         (ada_get_task_number): Adjust.
687         (get_task_number_from_id): Likewise.
688         (valid_task_id): Likewise.
689         (ada_get_task_info_from_ptid): Likewise.
690         (iterate_over_live_ada_tasks): Likewise.
691         (add_ada_task): Likewise.
692         (read_known_tasks): Likewise.
693         (ada_build_task_list): Likewise.
694         (print_ada_task_info): Likewise.
695         (info_task): Likewise.
696         (task_command_1): Likewise.
697
698 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
699
700         * ada-lang.c (add_angle_brackets): Return std::string.
701
702 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
703
704         * python/py-threadevent.c (py_get_event_thread): Initialize
705         pythread.
706
707 2018-08-24  Pedro Alves  <palves@redhat.com>
708
709         * python/py-bpevent.c (create_breakpoint_event_object): Use
710         copy-initialization.
711         * python/py-continueevent.c (emit_continue_event): Use
712         copy-initialization.
713         * python/py-exitedevent.c (create_exited_event_object): Return a
714         gdbpy_ref<>.
715         (emit_exited_event): Use copy-initialization.
716         * python/py-inferior.c (python_new_inferior)
717         (python_inferior_deleted, add_thread_object): Use
718         copy-initialization.
719         * python/py-infevents.c (create_inferior_call_event_object)
720         (create_register_changed_event_object)
721         (create_memory_changed_event_object): Return a gdbpy_ref<>.
722         (emit_inferior_call_event, emit_memory_changed_event)
723         (emit_register_changed_event): Use copy-initialization.
724         * python/py-newobjfileevent.c (create_new_objfile_event_object):
725         Return a gdbpy_ref<>.
726         (emit_new_objfile_event): Use copy-initialization.
727         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
728         (emit_clear_objfiles_event): Use copy-initialization.
729         * python/py-signalevent.c (create_signal_event_object): Use
730         copy-initialization.
731         * python/py-threadevent.c (create_thread_event_object): Use
732         copy-initialization.
733
734 2018-08-24  Pedro Alves  <palves@redhat.com>
735             Simon Marchi  <simon.marchi@ericsson.com>
736
737         PR gdb/23379
738         * python/py-continueevent.c: Include "gdbthread.h".
739         (create_continue_event_object): Add intro comment.  Add 'ptid'
740         parameter.  Use it to find thread to pass to
741         create_thread_event_object.
742         (emit_continue_event): Pass PTID down to
743         create_continue_event_object.
744         * python/py-event.h (py_get_event_thread): Declare.
745         (create_thread_event_object): Remove default from 'thread'
746         parameter.
747         * python/py-stopevent.c (create_stop_event_object): Use
748         py_get_event_thread.
749         * python/py-threadevent.c (get_event_thread): Rename to ...
750         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
751         and use it to find the thread.
752         (create_thread_event_object): Assert that THREAD isn't null.
753         Don't find the event thread here.
754
755 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
756
757         * block.h (blockrange, blockranges): New struct declarations.
758         (struct block): Add new field named `ranges'.
759         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
760         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
761         macros for accessing ranges in struct block.
762         (make_blockranges): New declaration.
763         block.c (make_blockranges): New function.
764         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
765         for block.
766         * symtab.h (find_pc_partial_function): Add new parameter `block'.
767         * blockframe.c (cache_pc_function_block): New static global.
768         (clear_pc_function_cache): Clear cache_pc_function_block.
769         (find_pc_partial_function): Move comment to symtab.h.  Add
770         support for non-contiguous blocks.
771         * cli/cli-cmds.c (block.h): Include.
772         (print_disassembly): Handle printing of non-contiguous blocks.
773         (disassemble_current_function): Likewise.
774         (disassemble_command): Likewise.
775
776         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
777         BLOCK_START.
778         * blockframe.c (get_pc_function_start): Likewise.
779         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
780         (gcc_symbol_address): Likewise.
781         * compile/compile-object-run.c (compile_object_run): Likewise.
782         * compile/compile.c (get_expr_block_and_pc): Likewise.
783         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
784         (func_addr_to_tail_call_list): Likewise.
785         * findvar.c (default_read_var_value): Likewise.
786         * inline-frame.c (inline_frame_this_id): Likewise.
787         (skip-inline_frames): Likewise.
788         * infcmd.c (until_next_command): Likewise.
789         * linespec.c (convert_linespec_to_sals): Likewise.
790         * parse.c (parse_exp_in_context_1): Likewise.
791         * printcmd.c (build_address_symbolic): likewise.
792         (info_address_command): Likewise.
793         symtab.c (find_function_start_sal): Likewise.
794         (skip_prologue_sal): Likewise.
795         (find_function_alias_target): Likewise.
796         (find_gnu_ifunc): Likewise.
797         * stack.c (find_frame_funname): Likewise.
798         * symtab.c (fixup_symbol_section): Likewise.
799         (find_function_start_sal): Likewise.
800         (skip_prologue_sal): Likewsie.
801         (find_function_alias_target): Likewise.
802         (find_gnu_ifunc): Likewise.
803         * tracepoint.c (info_scope_command): Likewise.
804         * value.c (value_fn_field): Likewise.
805
806         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
807         in place of find_pc_partial_function.
808         * blockframe.c (find_function_entry_range_from_pc): New function.
809         * symtab.h (find_function_entry_range_from_pc): Declare and document.
810         * objfiles.c (objfile_relocate1): Relocate start and end addresses
811         for each range in a block.
812
813
814 2018-08-23  Xavier Roirand  <roirand@adacore.com>
815
816         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
817         incrementation.
818
819 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
820
821         * solib-svr4.c (read_program_headers_from_bfd): Return
822         gdb::optional<gdb::byte_vector>.
823         (svr4_exec_displacement): Adjust.
824
825 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
826
827         * solib-svr4.c (read_program_header): Return
828         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
829         (find_program_interpreter): Return
830         gdb::optional<gdb::byte_vector>.
831         (scan_dyntag_auxv): Adjust.
832         (enable_break): Adjust.
833         (svr4_exec_displacement): Adjust.
834
835 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
836
837         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
838         * inf-child.c (inf_child_target::terminal_save_inferior): New.
839
840 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
841
842         * guile/scm-string.c (gdbscm_scm_from_printf): Use
843         string_vprintf.
844         * guile/scm-utils.c (gdbscm_printf): Likewise.
845         * serial.c (serial_printf): Likewise.
846         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
847
848 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
849
850         * stack.c (print_frame): Print frame architecture when printing on
851         an MI output.
852         * NEWS: Mention new "arch" attribute in frame output.
853
854 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
855
856         * arch/aarch64.h (aarch64_regnum): Update comment.
857
858 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
859
860         * NEWS: Add SVE to 8.2 section.
861
862 2018-08-21  Pedro Alves  <palves@redhat.com>
863
864         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
865         out from gdbscm_parse_function_args.
866         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
867         gdbscm_parse_function_args_1.
868
869 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
870
871         PR gdb/17816
872         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
873         operator.
874
875 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
876
877         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
878
879 2018-08-19  Michael Spang  <spang@google.com>
880
881         PR gdb/11786
882         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
883         for PT_TLS segments.
884
885 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
886
887         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
888         dwarf_variable_value.
889         * dwarf2-frame.c (class dwarf_expr_executor):
890         Add override for dwarf_variable_value.
891         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
892         (class symbol_needs_eval_context): Likewise.
893         (indirect_synthetic_pointer): Add forward declaration.
894         (sect_variable_value): New function.
895         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
896         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
897         for DW_OP_GNU_variable_value.
898
899 2018-08-16  Tom Tromey  <tom@tromey.com>
900
901         * top.c (read_command_file): Update.
902         (command_line_input): Remove "repeat" argument.
903         * ada-lang.c (get_selections): Update.
904         * linespec.c (decode_line_2): Update.
905         * defs.h (command_line_input): Remove argument.
906         * cli/cli-script.c (read_next_line): Update.
907         * python/py-gdb-readline.c: Update.
908
909 2018-08-17  Tom Tromey  <tom@tromey.com>
910
911         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
912         command_line_input.
913
914 2018-08-15  Tom Tromey  <tom@tromey.com>
915
916         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
917
918 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
919
920         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
921         If used, use find_pc_partial_function to find address range
922         to disassemble.
923         * mi/mi-main.c (mi_cmd_list_features): Report
924         "data-disassemble-a-option" feature.
925         * NEWS: Mention new -data-disassemble option -a.
926
927 2018-08-13  Tom Tromey  <tom@tromey.com>
928
929         * common/common-defs.h (_FORTIFY_SOURCE): Define.
930
931 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
932
933         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
934         (aarch64_linux_collect_sve_regset): Likewise.
935         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
936         * regcache.h (regcache_map_entry_size): New function.
937
938 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
939
940         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
941         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
942         (SVE_HEADER_VL_LENGTH): Likewise.
943         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
944         (SVE_HEADER_FLAGS_LENGTH): Likewise.
945         (SVE_HEADER_RESERVED_LENGTH): Likewise.
946         (SVE_HEADER_SIZE_OFFSET): Likewise.
947         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
948         (SVE_HEADER_VL_OFFSET): Likewise.
949         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
950         (SVE_HEADER_FLAGS_OFFSET): Likewise.
951         (SVE_HEADER_RESERVED_OFFSET): Likewise.
952         (SVE_HEADER_SIZE): Likewise.
953         (aarch64_linux_core_read_vq): Add function.
954         (aarch64_linux_core_read_description): Check for SVE section.
955
956 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
957
958         * aarch64-fbsd-tdep.c
959         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
960         collect_size.
961         * aarch64-linux-tdep.c
962         (aarch64_linux_iterate_over_regset_sections): Likewise.
963         * alpha-linux-tdep.c
964         (alpha_linux_iterate_over_regset_sections):
965         * alpha-nbsd-tdep.c
966         (alphanbsd_iterate_over_regset_sections): Likewise.
967         * amd64-fbsd-tdep.c
968         (amd64fbsd_iterate_over_regset_sections): Likewise.
969         * amd64-linux-tdep.c
970         (amd64_linux_iterate_over_regset_sections): Likewise.
971         * arm-bsd-tdep.c
972         (armbsd_iterate_over_regset_sections): Likewise.
973         * arm-fbsd-tdep.c
974         (arm_fbsd_iterate_over_regset_sections): Likewise.
975         * arm-linux-tdep.c
976         (arm_linux_iterate_over_regset_sections): Likewise.
977         * corelow.c (get_core_registers_cb): Likewise.
978         (core_target::fetch_registers): Likewise.
979         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
980         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
981         * gdbarch.h (void): Regenerate.
982         * gdbarch.sh: Add supply_size and collect_size.
983         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
984         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
985         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
986         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
987         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
988         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
989         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
990         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
991         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
992         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
993         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
994         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
995         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
996         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
997         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
998         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
999         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1000         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1001         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1002         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1003         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1004         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1005         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1006         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1007         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1008         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1009         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1010         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1011         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1012         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1013
1014 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1015
1016         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1017         with string_printf.
1018
1019 2018-08-10  Keith Seitz  <keiths@redhat.com>
1020
1021         * compile/compile-c-support.c (add_code_header, add_code_footer):
1022         Move into policy class.
1023         (c_push_user_expression, pop_user_expression_nop)
1024         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1025         (compile_program): New host class.
1026         (c_compile_program): New typedef.
1027         (c_compute_porgram): Use c_compile_program.
1028
1029 2018-08-10  Keith Seitz  <keiths@redhat.com>
1030
1031         * compile/compile-internal.h (compile_instance::~compile_instance):
1032         Remove calls to htab_delete.
1033         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1034         * compile.c (compile_instance::compile_instance): Initialize
1035         htab unique pointers.
1036         (compile_instance::get_cached_type, compile_instance::insert_type)
1037         (compile_instance::error_symbol_once): Update for unique_ptr.
1038
1039 2018-08-10  Keith Seitz  <keiths@redhat.com>
1040
1041         * compile/compile-c-symbols.c (struct symbol_error)
1042         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1043         (compile_instance::insert_symbol_error)
1044         (compile_instance::error_symbol_once): Move to ...
1045         * compile/compile.c: ... here.
1046
1047 2018-08-10  Keith Seitz  <keiths@redhat.com>
1048
1049         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1050         instead of `new_compile_instance'.
1051         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1052         Update description.
1053         If the symbol error map is not initialized, create it.
1054         (generate_c_for_for_one_symbol): Do not check/initialize
1055         the symbol error map.
1056         * compile/compile-c-types.c (compile_c_instance): Make a class.
1057         Update all callers.
1058         (compile_instance::compile_instance): Initialize the type cache.
1059         (get_cached_type): New function.
1060         (insert_type): Update description.
1061         (compile_c_instance::m_default_cflags): Define.
1062         (convert_type): Update description.  Use get_cached_type.
1063         (delete_instance): Moved to destructor.
1064         (new_compile_instance): Moved to constructor.
1065         * compile/compile-c.h (compile_c_instance): Make class inheriting
1066         from compile_instance.
1067         <base>: Remove field.
1068         <type_map, symbol_err_map>: Move to base class.
1069         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1070         * compile/compile-internal.h (compile_instance): Make class.
1071         <type_map_t, symbol_err_map_t>: Define.
1072         <fe>: Rename to `m_gcc_fe'.
1073         <scope, block, gcc_target_options>: Add `m_' prefix.
1074         <m_type_map, m_symbol_err_map>: New fields, moved from
1075         compile_c_instance.
1076         <destroy>: Remove.
1077         (convert_type, new_compile_instance): Remove.
1078         * compile/compile.c (cleanup_compile_instance): Remove.
1079         (compile_to_object): Use unique_ptr to eliminate cleanups.
1080         (compile_instance::set_print_callback, compile_instance::version)
1081         (compile_instance::set_verbose)
1082         (compile_instance::set_driver_filename)
1083         (compile_instance::set_triplet_regexp)
1084         (compile_instance::set_arguments)
1085         (compile_instance::set_source_file)
1086         (compile_instance::compile): Define.
1087
1088 2018-08-10  Keith Seitz  <keiths@redhat.com>
1089
1090         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1091         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1092         gcc-c-fe.def to define C plugin.
1093         (delete_instance): Delete `c_plugin'.
1094         (new_compile_instance): Initialize `c_plugin'.
1095         * compile/compile-c.h: Include gcc_c_plugin.h.
1096         (struct compile_c_instance) <c_plugin>: New member.
1097         * gcc-c-plugin.h: New file.
1098         Update all callers with API change.
1099
1100 2018-08-10  Keith Seitz  <keiths@redhat.com>
1101
1102         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1103         (HFILES_NO_SRCDIR): ... to here.
1104         Add compile-internal.h and compile-c.h.
1105         * compile/compile-c-support.c: Include compile-c.h.
1106         * compile/compile-c-symbols.c: Include compile-c.h.
1107         (generate_c_for_variable_locations): Update comment.
1108         * compile/compile-c-types.c: Include compile-c.h.
1109         * compile/compile-c.h: New file -- moved C language declarations
1110         from other files here.
1111         * compile/compile-internal.h: Do not include hashtab.h or
1112         common/enum-flags.h.
1113         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1114         (gcc_convert_symbol, gcc_symbol_address)
1115         (generate_c_for_variable_locations, c_get_mode_for_size)
1116         (c_get_range_decl_name): Definitions moved to compile-c.h.
1117         * compile/compile-loc2c.c: Include compile-c.h.
1118
1119 2018-08-10  Keith Seitz  <keiths@redhat.com>
1120
1121         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1122         (c_symbol_substitution_name): ... this.
1123         Update all callers.
1124
1125 2018-08-10  Keith Seitz  <keiths@redhat.com>
1126
1127         * compile/compile-c-support.c (c_compute_program): Use
1128         unique_xmalloc_ptr to eliminate cleanup.
1129         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1130         Return a unique_xmalloc_ptr and eliminate cleanup.
1131         * compile/compile-internal.h (generate_c_for_variable_locations):
1132         Return unique_xmalloc_ptr and update description.
1133
1134 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1135
1136         * corelow.c (core_target::get_core_register_section): Rename
1137         min_size to section_min_size.
1138
1139 2018-08-09  Jim Wilson  <jimw@sifive.com>
1140
1141         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1142         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1143         * NEWS: Mention new GNU/Linux RISC-V target.
1144         * configure.host: Add riscv*-*-linux*.
1145         * configure.nat: Add riscv*.
1146         * configure.tgt: Add riscv*-*-linux*.
1147         * riscv-linux-nat.c: New file.
1148         * riscv-linux-tdep.c: New file.
1149
1150 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1151
1152         * infrun.c (resume): Make static, add forward declaration.
1153         (proceed): Update header comment.
1154         * infrun.h (resume): Delete declaration.
1155
1156 2018-08-09  Tom Tromey  <tom@tromey.com>
1157
1158         * riscv-tdep.h: Minor formatting fixes.
1159
1160 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1161
1162         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1163         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1164         (test_mkdir_recursive): Likewise.
1165         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1166
1167 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1168
1169         * valarith.c (value_subscripted_rvalue): If an array is not in
1170         memory, and we don't know the upper bound, then we can't know that
1171         the requested element exists or not.
1172
1173 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1174
1175         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1176         (target_options_to_string): Add comment.
1177
1178 2018-08-08  Tom Tromey  <tom@tromey.com>
1179
1180         * unittests/scoped_mmap-selftests.c: Check result of "write".
1181
1182 2018-08-08  Jim Wilson  <jimw@sifive.com>
1183
1184         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1185         (decode_register_index_short): New.
1186         (decode_j_type_insn, decode_cj_type_insn): New.
1187         (decode_b_type_insn, decode_cb_type_insn): New.
1188         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1189         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1190         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1191         is_c_sw_insn instead of is_sw_insn.
1192         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1193         (riscv_software_single_step): New.
1194         * riscv-tdep.h (riscv_software_single_step): Declare.
1195
1196         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1197         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1198
1199 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1200
1201         PR gdb/18050:
1202         * target.c (dispose_inferior): Don't dispose of inferiors that are
1203         already killed.
1204
1205 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1206
1207         * remote.c (remote_target::download_tracepoint): Change char* to
1208         const char*.
1209
1210 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1211
1212         * target.h (target_options_to_string): Return an std::string.
1213         * target.c (str_comma_list_concat_elem): Return void, use
1214         std::string.
1215         (do_option): Likewise.
1216         (target_options_to_string): Return an std::string.
1217         * linux-nat.c (linux_nat_target::wait): Adjust.
1218         * target-debug.h (target_debug_print_options): Adjust.
1219
1220 2018-08-07  Tom Tromey  <tom@tromey.com>
1221
1222         * Makefile.in (CPPFLAGS): New variable.
1223         (INTERNAL_CPPFLAGS): Use it.
1224
1225 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1226
1227         * NEWS: Mention the index cache.
1228
1229 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1230
1231         * common/pathstuff.h (get_standard_cache_dir): New.
1232         * common/pathstuff.c (get_standard_cache_dir): New.
1233         * build-id.h (build_id_to_string): New.
1234         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1235         DEBUG_STR_SUFFIX): Move to here.
1236         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1237         DEBUG_STR_SUFFIX): Move from there.
1238         (write_psymtabs_to_index): Make non-static, add basename
1239         parameter.  Write to temporary files, rename when done.
1240         (save_gdb_index_command): Adjust call to
1241         write_psymtabs_to_index.
1242         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1243         field.
1244         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1245         (get_gdb_index_contents_from_cache): New.
1246         (get_gdb_index_contents_from_cache_dwz): New.
1247         (dwarf2_initialize_objfile): Read index from cache.
1248         (dwarf2_build_psymtabs): Save to index.
1249         * dwarf-index-cache.h: New file.
1250         * dwarf-index-cache.c: New file.
1251         * dwarf-index-write.h: New file.
1252
1253 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1254
1255         * gnulib/aclocal.m4: Re-generate.
1256         * gnulib/config.in: Re-generate.
1257         * gnulib/configure: Re-generate.
1258         * gnulib/import/Makefile.am: Re-generate.
1259         * gnulib/import/Makefile.in: Re-generate.
1260         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1261         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1262         * gnulib/import/m4/mkdir.m4: New file.
1263         * gnulib/import/mkdir.c: New file.
1264         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1265         module.
1266
1267 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1268
1269         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1270         * common/scoped_mmap.c: New file.
1271         * common/scoped_mmap.h (destroy): New method.
1272         (~scoped_mmap, reset): Use destroy.
1273         (scoped_mmap): New move constructor.
1274         (mmap_file): New declaration.
1275         * unittests/scoped_mmap-selftests.c (test_normal,
1276         test_invalid_filename, run_tests): New functions.
1277         (_initialize_scoped_mmap_selftests): Register selftest.
1278
1279 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1280
1281         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1282         (read_gdb_index_from_buffer): ... this.  Remove section
1283         parameter, add buffer parameter.
1284         (get_gdb_index_contents_ftype,
1285         get_gdb_index_contents_dwz_ftype): New typedefs.
1286         (dwarf2_read_gdb_index): Add callback parameters to get the
1287         index contents.
1288         (get_gdb_index_contents_from_section): New.
1289         (dwarf2_initialize_objfile): Update call to
1290         dwarf2_read_gdb_index.
1291
1292 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1293
1294         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1295         (gdb_open_cloexec): Likewise.
1296         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1297         (commandline_from_pid): Likewise.
1298         (linux_xfer_osdata_threads): Likewise.
1299         (linux_xfer_osdata_fds): Likewise.
1300         * ada-lang.c (is_package_name): Likewise.
1301         * auxv.c (procfs_xfer_auxv): Likewise.
1302         * breakpoint.c (print_one_breakpoint_location): Use
1303         uiout::field_fmt.
1304         (print_one_catch_solib): Use string_printf.
1305         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1306         (add_pe_forwarded_sym): Likewise.
1307         * dwarf2read.c (create_type_unit_group): Likewise.
1308         (build_error_marker_type): Likewise.
1309         * infcall.c (get_function_name): Likewise.
1310         * valprint.c (print_converted_chars_to_obstack): Likewise.
1311         * xtensa-tdep.c (xtensa_register_type): Likewise.
1312
1313 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1314
1315         * remote.c (remote_target::download_tracepoint): Fix format
1316         string errors.
1317
1318 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1319
1320         * tracefile.c: Include common/byte-vector.h.
1321         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1322         with trace_regblock_size if needed.  Update uses of buf.
1323
1324 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1325
1326         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1327         std::vector<unsigned char>.
1328         * tracepoint.c (collection_list::collection_list): Remove
1329         m_regs_mask initializer from initializer list.  Resize
1330         m_regs_mask using the largest remote register number.
1331         (collection_list::add_remote_register): Remove size check on
1332         m_regs_mask.  Use at to access element.
1333         (collection_list::stringify): Change type of temp_buf to
1334         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1335         stringify the register mask.  Use pack_hex_byte for the register
1336         mask.
1337
1338 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1339
1340         * tracepoint.h (class collection_list) <add_register>: Remove.
1341         <add_remote_register, add_ax_registers, add_local_register>:
1342         Declare.
1343         <add_memrange>: Add scope parameter.
1344         * tracepoint.c (encode_actions_1): Likewise.
1345         (collection_list::add_register): Rename to ...
1346         (collection_list::add_remote_register): ... this.  Update
1347         comment.
1348         (collection_list::add_ax_registers, add_local_register): New
1349         methods.
1350         (collection_list::add_memrange): Add scope parameter.  Call
1351         add_local_register instead of add_register.
1352         (finalize_tracepoint_aexpr): New function.
1353         (collection_list::collect_symbol): Update calls to add_memrange.
1354         Call add_local_register instead of add_register.  Call
1355         add_ax_registers.  Call finalize_tracepoint_aexpr.
1356         (encode_actions_1): Get remote regnos for $reg action.  Call
1357         add_remote_register, add_ax_registers, and add_local_register.
1358         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1359         (validate_actionline): Call finalize_tracepoint_aexpr.
1360
1361 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1362
1363         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1364         Replace array buf with gdb::char_vector buf, of size
1365         get_remote_packet_size ().  Replace references to buf and
1366         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1367         and xsnprintf with snprintf.  Raise errors if the buffer is too
1368         small.
1369
1370 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1371
1372         * remote.c (remote_target::download_tracepoint): Fix the has_more
1373         predicate in the QTDP action list iteration.
1374
1375 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1376
1377         * remote.c (remote_target::download_tracepoint): Fix indentation
1378         in for block.
1379
1380 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1381
1382         * proc-api.c (_initialize_proc_api): Remove c, unused.
1383         * procfs.c (procfs_init_inferior): Remove signals, unused.
1384         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1385         unused.
1386
1387 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1388             Andrew Burgess  <andrew.burgess@embecosm.com>
1389
1390         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1391         'W_STOPCODE (0)' as this could be ambiguous.
1392
1393 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1394
1395         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1396         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1397         "ai_socktype").
1398
1399 2018-08-02  Tom Tromey  <tom@tromey.com>
1400
1401         PR symtab/16842.
1402         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1403         symbols.
1404         (process_structure_scope): Likewise.
1405
1406 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1407
1408         PR gdb/22629:
1409         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1410         kill inferior.
1411
1412 2018-08-02  Tom Tromey  <tom@tromey.com>
1413
1414         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1415         (darwin_suspend_inferior, darwin_resume_inferior)
1416         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1417         (darwin_check_new_threads): Check result of get_darwin_inferior.
1418
1419 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1420
1421         GDB 8.1.1 released.
1422
1423 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1424
1425         * varobj.c (varobj_get_path_expr_parent): Report an error if
1426         parent is a dynamic varobj.
1427
1428 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1429
1430         * gnulib/aclocal.m4: Re-generate.
1431         * gnulib/config.in: Re-generate.
1432         * gnulib/configure: Re-generate.
1433         * gnulib/import/Makefile.in: Re-generate.
1434         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1435         * gnulib/import/m4/onceonly.m4: Re-generate.
1436
1437 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1438
1439         * target-descriptions.c (struct xml_test_tdesc): New.
1440         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1441         (record_xml_tdesc): Update.
1442         (maintenance_check_xml_descriptions): Update.
1443         * target-descriptions.h (record_xml_tdesc): Update comment.
1444
1445 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1446
1447         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1448         checking array bounds are defined.
1449
1450 2018-07-30  Tom Tromey  <tom@tromey.com>
1451
1452         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1453         irreflexivity violation.
1454
1455 2018-07-30  Tom Tromey  <tom@tromey.com>
1456
1457         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1458         * value.c (unpack_long): Remove lint code.
1459         * valops.c (value_ind): Remove lint code.
1460         * valarith.c (value_x_binop, value_x_unop, value_equal)
1461         (value_pos): Remove lint code.
1462
1463 2018-07-28  Tom de Vries  <tdevries@suse.de>
1464
1465         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1466         with undefined upper bound as <optimized out>.
1467
1468 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1469
1470         * gcore.in: Rename variable "name" to "prefix".  Expand
1471         "usage" text.
1472
1473 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1474
1475         * windows-nat.c (windows_nat_target::create_inferior): Update to
1476         call close() in global namespace.
1477
1478 2018-07-26  Tom Tromey  <tom@tromey.com>
1479
1480         * dwarf-index-write.c (add_address_entry): Don't add objfile
1481         offsets.
1482         * dbxread.c (find_stab_function): Rename from
1483         find_stab_function_addr.  Return a bound_minimal_symbol.
1484         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1485         Don't add objfile offsets.
1486         (end_psymtab): Use raw_text_low, raw_text_high,
1487         MSYMBOL_VALUE_RAW_ADDRESS.
1488         (read_ofile_symtab): Update.
1489         (process_one_symbol): Update.
1490         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1491         offsets.
1492         (dw2_relocate): Remove.
1493         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1494         searching addrmap.
1495         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1496         Update.
1497         (process_psymtab_comp_unit_reader, add_partial_symbol)
1498         (add_partial_subprogram, dwarf2_ranges_read): Update.
1499         (load_partial_dies): Update.
1500         (add_address_entry): Don't add objfile offsets.
1501         (dwarf2_build_include_psymtabs): Update.
1502         (create_addrmap_from_aranges): Don't add objfile offsets.
1503         (dw2_find_pc_sect_compunit_symtab): Update.
1504         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1505         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1506         Update.
1507         (parse_partial_symbols): Don't add objfile offsets.  Use
1508         raw_text_low, raw_text_high.  Update.
1509         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1510         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1511         or call 'relocate' quick function.  Clear psymbol_map.
1512         * psympriv.h (struct partial_symbol) <address>: Add section
1513         offset.
1514         <set_unrelocated_address>: Rename from set_address.
1515         <raw_text_low, raw_text_high>: New methods.
1516         <text_low, text_high>: Add objfile parameter.
1517         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1518         set_unrelocated_address.
1519         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1520         (find_pc_psymbol): Update.
1521         (fixup_psymbol_section, relocate_psymtabs): Remove.
1522         (dump_psymtab, psym_functions): Update.
1523         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1524         parameter.
1525         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1526         (start_psymtab_common): Update.
1527         * symfile-debug.c (debug_qf_relocate): Remove.
1528         (debug_sym_quick_functions): Update.
1529         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1530         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1531         Update.
1532
1533 2018-07-26  Tom Tromey  <tromey@redhat.com>
1534
1535         * dbxread.c (end_psymtab): Use text_high_valid and
1536         text_low_valid.
1537         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1538         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1539         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1540         Update comment.
1541         <text_low_valid, text_high_valid>: New fields.
1542         <set_text_low, set_text_high>: Update.
1543         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1544
1545 2018-07-26  Tom Tromey  <tom@tromey.com>
1546
1547         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1548         Update.
1549         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1550         textlow and texthigh fields.
1551         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1552         Update.
1553         * mdebugread.c (parse_lines, parse_partial_symbols)
1554         (psymtab_to_symtab_1): Update.
1555         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1556         Rename fields.  Update comment.  Now private.
1557         <text_low, text_high, set_text_low, set_text_high>: New methods.
1558         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1559         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1560         (start_psymtab_common, maintenance_info_psymtabs)
1561         (maintenance_check_psymtabs): Update.
1562         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1563         texthigh fields.
1564         (scan_xcoff_symtab): Update.
1565
1566 2018-07-26  Tom Tromey  <tromey@redhat.com>
1567
1568         * psympriv.h (struct partial_symbol) <unrelocated_address,
1569         address, set_address>: New methods.
1570         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1571         (fixup_psymbol_section, relocate_psymtabs): Update.
1572         (print_partial_symbols): Add 'objfile' parameter.  Update.
1573         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1574         Update.
1575
1576 2018-07-26  Tom Tromey  <tom@tromey.com>
1577
1578         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1579         (debug_names::write_psymbols): Update.
1580         * psympriv.h (struct partial_symbol): Derive from
1581         general_symbol_info.
1582         <obj_section>: New method.
1583         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1584         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1585         (find_pc_sect_psymbol, fixup_psymbol_section)
1586         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1587         (print_partial_symbols, recursively_search_psymtabs)
1588         (compare_psymbols, psymbol_hash, psymbol_compare)
1589         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1590         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1591
1592 2018-07-26  Tom Tromey  <tromey@redhat.com>
1593
1594         * dbxread.c (end_psymtab): Remove dead code.
1595
1596 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1597
1598         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1599         DWARF unwinders are disabled.
1600         * dwarf2-frame.c: Add dwarf2read.h include.
1601         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1602         disabled.
1603         (dwarf2_frame_unwinders_enabled_p): Define.
1604         (show_dwarf_unwinders_enabled_p): New function.
1605         (_initialize_dwarf2_frame): Register switch to control DWARF
1606         unwinder use.
1607         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1608         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1609         (show_dwarf_cmdlist): Remove static keyword.
1610         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1611         (show_dwarf_cmdlist): Declare.
1612         * NEWS: Document new feature.
1613
1614 2018-07-26  Tom de Vries  <tdevries@suse.de>
1615
1616         PR breakpoints/23366
1617         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1618
1619 2018-07-26  Tom de Vries  <tdevries@suse.de>
1620
1621         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1622         DW_AT_count can't be translated to a dynamic prop.
1623
1624 2018-07-25  Tom de Vries  <tdevries@suse.de>
1625
1626         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1627         try/catch.
1628
1629 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1630
1631         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1632
1633 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1634
1635         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1636
1637 2018-07-24  Keith Seitz  <keiths@redhat.comt
1638
1639         PR symtab/23010
1640         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1641         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1642         instead of add_symbol_to_list.
1643         (read_file_scope): Call prepare_one_comp_unit before reading
1644         any other DIEs.
1645
1646 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1647
1648         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1649
1650 2018-07-24  Tom Tromey  <tom@tromey.com>
1651
1652         * utils.c (malloc, realloc, free): Don't declare.
1653         * configure, config.in: Rebuild.
1654         * configure.ac: Don't check for declarations of free, malloc, or
1655         realloc.
1656
1657 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1658
1659         * aarch64-linux-nat.c
1660         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1661         variable.
1662         * arm-linux-nat.c (fetch_regs): Likewise.
1663         (store_regs): Likewise.
1664         (fetch_vfp_regs): Likewise.
1665         (store_vfp_regs): Likewise.
1666         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1667         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1668         (arm_linux_nat_target::insert_watchpoint): Likewise.
1669         (arm_linux_nat_target::remove_watchpoint): Likewise.
1670         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1671         Likewise.
1672         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1673         Likewise.
1674         * ppc-linux-nat.c (fetch_register): Likewise.
1675         (fetch_all_gp_regs): Likewise.
1676         (fetch_ppc_registers): Likewise.
1677         (store_all_gp_regs): Likewise.
1678         (store_ppc_registers): Likewise.
1679         (hwdebug_insert_point): Likewise.
1680         (can_use_watchpoint_cond_accel): Likewise.
1681         * remote-sim.c (gdb_os_write_stdout): Likewise.
1682
1683 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1684             Tom Tromey  <tom@tromey.com>
1685
1686         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1687         test for it.
1688         * configure: Rebuild.
1689
1690 2018-07-22  Tom Tromey  <tom@tromey.com>
1691
1692         * regformats/regdat.sh: Define xmltarget_${name} inside
1693         #ifndef IN_PROCESS_AGENT.
1694
1695 2018-07-22  Tom Tromey  <tom@tromey.com>
1696
1697         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1698
1699 2018-07-22  Tom Tromey  <tom@tromey.com>
1700
1701         * symfile.c (reread_symbols): Notify iter, not objfile.
1702
1703 2018-07-22  Tom Tromey  <tom@tromey.com>
1704
1705         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1706         Use arch_ops.
1707         (ravenscar_thread_target::prepare_to_store): Likewise.
1708
1709 2018-07-22  Tom Tromey  <tom@tromey.com>
1710
1711         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1712         unused variable.  Call value_fetch_lazy when needed.
1713         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1714         Remove unused variable.  Call value_fetch_lazy when needed.
1715
1716 2018-07-22  Tom Tromey  <tom@tromey.com>
1717
1718         * m32c-tdep.c (mark_dma): Return void.
1719         (make_regs): Remove unused declarations.
1720
1721 2018-07-22  Tom Tromey  <tom@tromey.com>
1722
1723         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1724         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1725         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1726         bkscm_get_valid_block_smob_arg_unsafe for effect.
1727
1728 2018-07-22  Tom Tromey  <tom@tromey.com>
1729
1730         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1731         value_type.
1732
1733 2018-07-22  Tom Tromey  <tom@tromey.com>
1734
1735         * windows-nat.c (saved_context): Conditionally define.
1736         * remote.c (remote_target::remote_btrace_maybe_reopen):
1737         Conditionally declare "warned".
1738         * inflow.c (sigquit_ours): Conditionally define.
1739         (new_tty): Move "tty" declaration inside #if.
1740         * guile/guile.c (guile_datadir): Conditionally define.
1741         * charset.c (set_be_le_names): Move some declarations inside #if.
1742         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1743         #if.
1744         (parse_xml_btrace_conf): Likewise.
1745
1746 2018-07-22  Tom Tromey  <tom@tromey.com>
1747
1748         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1749
1750 2018-07-22  Tom Tromey  <tom@tromey.com>
1751
1752         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1753         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1754         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1755         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1756         * stack.c (frame_apply_level_command): Remove unused variable.
1757         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1758         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1759         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1760         unused variable.
1761         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1762         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1763         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1764         variable.
1765         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1766         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1767         variable.
1768         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1769         Remove unused variable.
1770         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1771         variable.
1772         * common/tdesc.c (print_xml_feature::visit): Remove unused
1773         variable.
1774         * compile/compile-object-load.c (store_regs): Remove unused
1775         variables.
1776         * complaints.c (clear_complaints): Remove unused variable.
1777         * corelow.c (core_target_open): Remove unused variable.
1778         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1779         variable.
1780         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1781         variable.
1782         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1783         variable.
1784         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1785         variable.
1786         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1787         variable.
1788         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1789         variable.
1790         * ia64-tdep.c (examine_prologue): Remove unused variable.
1791         * infcall.c (run_inferior_call): Remove unused variable.
1792         * inferior.c (exit_inferior): Remove unused variable.
1793         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1794         * linespec.c (decode_line_2): Remove unused variable.
1795         * linux-nat.c (super_close): Remove.
1796         * linux-tdep.c (linux_info_proc): Remove unused variable.
1797         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1798         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1799         Remove unused variable.
1800         * parse.c (find_minsym_type_and_address): Remove unused variable.
1801         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1802         variable.
1803         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1804         variable.
1805         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1806         variables.
1807         * record-btrace.c (record_btrace_target::store_registers): Remove
1808         unused variable.
1809         (cmd_show_record_btrace_cpu): Remove unused variable.
1810         * riscv-tdep.c (riscv_register_reggroup_p)
1811         (riscv_push_dummy_call, riscv_return_value): Remove unused
1812         variable.
1813         * rust-exp.y (literal): Remove unused variable.
1814         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1815         unused variable.
1816         <STRUCTOP_ANONYMOUS>: Likewise.
1817         * s390-linux-tdep.c (s390_linux_init_abi_31)
1818         (s390_linux_init_abi_64): Remove unused variable.
1819         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1820         (file_select_thread, net_windows_open, _initialize_ser_windows):
1821         Remove unused variables.
1822         * symtab.c (find_pc_sect_line): Remove unused variable.
1823         * target-memory.c (compute_garbled_blocks): Remove unused
1824         variable.
1825         (target_write_memory_blocks): Remove unused variable.
1826         * target.c (target_stack::unpush): Remove unused variables.
1827         * tracepoint.c (start_tracing, all_tracepoint_actions)
1828         (merge_uploaded_trace_state_variables)
1829         (print_one_static_tracepoint_marker): Remove unused variable.
1830         * unittests/basic_string_view/element_access/char/1.cc (test01):
1831         Remove unused variable.
1832         * windows-nat.c (windows_continue, windows_add_all_dlls)
1833         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1834         Remove unused variables.
1835
1836 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1837
1838         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1839         attr_profile in HAVE_ELF.
1840         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1841         HAVE_ELF.
1842
1843 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1844
1845         * frame.c (frame_register_unwind): Change parameter name.
1846         (frame_unwind_register): Likewise.
1847         (frame_unwind_register_value): Likewise.
1848         (frame_unwind_register_signed): Likewise.
1849         (frame_unwind_register_unsigned): Likewise.
1850         * frame.h (frame_register_unwind): Likewise.
1851         (frame_unwind_register): Likewise.
1852         (frame_unwind_register_value): Likewise.
1853         (frame_unwind_register_signed): Likewise.
1854         (frame_unwind_register_unsigned): Likewise.
1855         (frame_unwind_arch): Likewise.
1856
1857 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1858
1859         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1860         ISA maintenance.
1861
1862 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1863
1864         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1865         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1866         hand.
1867
1868 2018-07-20  Keith Seitz  <keiths@redhat.com>
1869
1870         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1871         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1872         m_compunit_symtab, m_language>: Add "m_" prefix.
1873         Update all uses.
1874         * buildsym.c: Update all uses.
1875
1876 2018-07-20  Tom Tromey  <tom@tromey.com>
1877
1878         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1879         * buildsym.h (record_line_ftype): Remove typedef.
1880
1881 2018-07-20  Tom Tromey  <tom@tromey.com>
1882
1883         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1884         (end_expandable_symtab): Likewise.
1885         (end_symtab_get_static_block): Likewise.
1886         (end_symtab_from_static_block): Likewise.
1887         * buildsym-legacy.c (augment_type_symtab): Remove.
1888         (end_expandable_symtab): Remove.
1889         (end_symtab_get_static_block): Remove.
1890         (end_symtab_from_static_block): Remove.
1891
1892 2018-07-20  Tom Tromey  <tom@tromey.com>
1893
1894         * dwarf2read.c: Include buildsym.h.
1895         (struct dwarf2_cu) <builder>: New method.
1896         (fixup_go_packaging): Update.
1897         (process_full_comp_unit, process_full_type_unit): Update.  Don't
1898         use scoped_free_pendings.
1899         (using_directives): Add "cu" parameter, remove "language".
1900         (read_import_statement, setup_type_unit_groups, )
1901         (read_func_scope, read_lexical_block_scope)
1902         (dwarf2_record_block_ranges, read_namespace): Update.
1903         (lnp_state_machine::lnp_state_machine): Add cu parameter.
1904         (lnp_state_machine::handle_end_sequence): Update.
1905         (class lnp_state_machine) <m_cu>: New member.
1906         <m_record_line_callback>: Remove.
1907         <m_currently_recording_lines>: New member.
1908         (lnp_state_machine::handle_set_file): Update.
1909         (noop_record_line): Remove.
1910         (dwarf_record_line_p): Add cu parameter.
1911         (dwarf_record_line_1, dwarf_finish_line): Likewise.
1912         (lnp_state_machine::record_line)
1913         (lnp_state_machine::lnp_state_machine)
1914         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1915         (dwarf_decode_lines): Update.
1916         (dwarf2_start_subfile): Add cu parameter.
1917         (dwarf2_start_symtab, new_symbol): Update.
1918         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1919         Remove dwarf2_per_objfile parameter.
1920         (dwarf_decode_macros): Update.
1921
1922 2018-07-20  Tom Tromey  <tom@tromey.com>
1923
1924         * stabsread.c (define_symbol): Update.
1925         * buildsym-legacy.h (get_buildsym_compunit): Declare.
1926         * dwarf2read.c (new_symbol): Update.
1927         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1928         * cp-namespace.c: Include buildsym.h.
1929         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1930         * buildsym-legacy.c (get_buildsym_compunit): New function.
1931
1932 2018-07-20  Tom Tromey  <tom@tromey.com>
1933
1934         * xcoffread.c: Include buildsym-legacy.h.
1935         * windows-nat.c: Include buildsym-legacy.h.
1936         * stabsread.c: Include buildsym-legacy.h.
1937         * mdebugread.c: Include buildsym-legacy.h.
1938         * buildsym-legacy.h: New file.
1939         * buildsym-legacy.c: New file, from buildsym.c.
1940         * go32-nat.c: Include buildsym-legacy.h.
1941         * dwarf2read.c: Include buildsym-legacy.h.
1942         * dbxread.c: Include buildsym-legacy.h.
1943         * cp-namespace.c: Include buildsym-legacy.h.
1944         * coffread.c: Include buildsym-legacy.h.
1945         * buildsym.h: Move some contents to buildsym-legacy.h.
1946         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
1947         buildsym-legacy.c.
1948         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1949
1950 2018-07-20  Tom Tromey  <tom@tromey.com>
1951
1952         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1953         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1954         (buildsym_compunit::buildsym_compunit)
1955         (buildsym_compunit::~buildsym_compunit)
1956         (buildsym_compunit::get_macro_table): Define.
1957
1958 2018-07-20  Tom Tromey  <tom@tromey.com>
1959
1960         * buildsym.c (reset_symtab_globals): Remove.
1961         (buildsym_compunit::end_symtab_from_static_block): Update.
1962         (buildsym_compunit::augment_type_symtab): Update.
1963         (end_symtab_from_static_block): Call free_buildsym_compunit.
1964         (augment_type_symtab, end_symtab, end_expandable_symtab):
1965         Likewise.
1966
1967 2018-07-20  Tom Tromey  <tom@tromey.com>
1968
1969         * arch-utils.c: Do not include buildsym.h.
1970         * mipsread.c: Do not include buildsym.h.
1971         * machoread.c: Do not include buildsym.h.
1972         * elfread.c: Do not include buildsym.h.
1973
1974 2018-07-20  Tom Tromey  <tom@tromey.com>
1975
1976         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1977         initialization.
1978         (buildsym_compunit): Add new constructor.
1979         (struct buildsym_compunit) <get_last_source_file, finish_block,
1980         record_block_range, start_subfile, patch_subfile_names,
1981         push_subfile, pop_subfile, record_line, get_compunit_symtab,
1982         set_last_source_start_addr, get_last_source_start_addr,
1983         get_local_using_directives, set_local_using_directives,
1984         get_global_using_directives, outermost_context_p,
1985         get_current_context_stack, get_context_stack_depth,
1986         get_current_subfile, get_local_symbols, get_file_symbols,
1987         get_global_symbols, record_debugformat, record_producer,
1988         push_context, pop_context, end_symtab_get_static_block,
1989         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1990         New public methods.
1991         <record_pending_block, finish_block_internal, make_blockvector,
1992         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1993         private methods.
1994         Update all users.
1995
1996 2018-05-22  Tom Tromey  <tom@tromey.com>
1997
1998         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1999         parameter.
2000         (finish_block_internal): Update.
2001
2002 2018-07-20  Tom Tromey  <tom@tromey.com>
2003
2004         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2005         parameter.
2006         (finish_block_internal): Update.
2007
2008 2018-07-20  Tom Tromey  <tom@tromey.com>
2009
2010         * buildsym.h (EXTERN): Don't define or undef.
2011         * buildsym.c (EXTERN): Don't define.
2012
2013 2018-07-20  Tom Tromey  <tom@tromey.com>
2014
2015         * buildsym.c: Remove TODO comment.
2016
2017 2018-07-20  Tom Tromey  <tom@tromey.com>
2018
2019         * coffread.c (coff_symtab_read): Update.
2020         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2021         (xcoff_new_init): Update.
2022         * mipsread.c (mipscoff_new_init): Update.
2023         * mdebugread.c (mdebug_build_psymtabs): Update.
2024         * elfread.c (elf_new_init): Update.
2025         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2026         Update.
2027         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2028         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2029         (stabsect_build_psymtabs): Update.
2030         * buildsym.h (buildsym_init): Don't declare.
2031         * buildsym.c: Update comment.
2032         (prepare_for_building): Remove.
2033         (start_symtab, restart_symtab): Update.
2034         (reset_symtab_globals): Update comment.
2035         (buildsym_init): Remove.
2036
2037 2018-07-20  Tom Tromey  <tom@tromey.com>
2038
2039         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2040         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2041         (read_enum_type, common_block_start, common_block_end)
2042         (cleanup_undefined_types_1, finish_global_stabs): Update.
2043         * mdebugread.c (psymtab_to_symtab_1): Update.
2044         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2045         (read_lexical_block_scope, new_symbol): Update.
2046         * dbxread.c (process_one_symbol): Update.
2047         * coffread.c (coff_symtab_read, process_coff_symbol)
2048         (coff_read_enum_type): Update.
2049         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2050         declare.
2051         (get_local_symbols, get_file_symbols, get_global_symbols): New
2052         functions.
2053         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2054         m_global_symbols.
2055         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2056         (~scoped_free_pendings): Update.
2057         (finish_block, prepare_for_building, reset_symtab_globals)
2058         (end_symtab_get_static_block, end_symtab_with_blockvector)
2059         (augment_type_symtab, push_context): Update.
2060         (get_local_symbols, get_file_symbols, get_global_symbols): New
2061         functions.
2062         (buildsym_init): Update.
2063
2064 2018-07-20  Tom Tromey  <tom@tromey.com>
2065
2066         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2067         (process_full_type_unit): Likewise.
2068         (dwarf2_start_symtab): Set list_in_scope.
2069
2070 2018-07-20  Tom Tromey  <tom@tromey.com>
2071
2072         * dwarf2read.c (process_psymtab_comp_unit_reader)
2073         (build_type_psymtabs_reader): Do not set list_in_scope.
2074
2075 2018-07-20  Tom Tromey  <tom@tromey.com>
2076
2077         * buildsym.c (free_pendings): Remove.
2078         (add_symbol_to_list, scoped_free_pendings)
2079         (finish_block_internal, buildsym_init): Update.
2080
2081 2018-07-20  Tom Tromey  <tom@tromey.com>
2082
2083         * xcoffread.c (read_xcoff_symtab): Update.
2084         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2085         Update.
2086         * dbxread.c (process_one_symbol): Update.
2087         * coffread.c (coff_symtab_read): Update.
2088         * buildsym.h (finish_block): Update.
2089         * buildsym.c (finish_block): Remove "listhead" argument.
2090         (end_symtab_get_static_block): Update.
2091
2092 2018-07-20  Tom Tromey  <tom@tromey.com>
2093
2094         * buildsym.h (class scoped_free_pendings): Remove constructor.
2095         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2096         method.
2097         <m_pending_block_obstack, m_pending_blocks>: New members.
2098         (pending_block_obstack, pending_blocks): Remove.
2099         (scoped_free_pendings::scoped_free_pendings): Default.
2100         (~scoped_free_pendings): Update.
2101         (free_pending_blocks): Remove.
2102         (finish_block_internal, record_pending_block, make_blockvector)
2103         (end_symtab_get_static_block, augment_type_symtab, push_context)
2104         (buildsym_init): Update.
2105
2106 2018-07-20  Tom Tromey  <tom@tromey.com>
2107
2108         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2109         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2110         members.
2111         (pending_addrmap, pending_addrmap_obstack)
2112         (pending_addrmap_interesting): Remove.
2113         (scoped_free_pendings, record_block_range, make_blockvector)
2114         (prepare_for_building, reset_symtab_globals, buildsym_init):
2115         Update.
2116
2117 2018-07-20  Tom Tromey  <tom@tromey.com>
2118
2119         * xcoffread.c (process_linenos): Update.
2120         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2121         * mdebugread.c (psymtab_to_symtab_1): Update.
2122         * dwarf2read.c (setup_type_unit_groups)
2123         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2124         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2125         * dbxread.c (process_one_symbol): Update.
2126         * coffread.c (coff_symtab_read, enter_linenos)
2127         (process_coff_symbol): Update.
2128         * buildsym.h (current_subfile): Don't declare.
2129         (get_current_subfile): Declare.
2130         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2131         member.
2132         (start_subfile, free_buildsym_compunit, push_subfile)
2133         (prepare_for_building, start_symtab): Update.
2134         (get_current_subfile): New function.
2135
2136 2018-07-20  Tom Tromey  <tom@tromey.com>
2137
2138         * coffread.c (coff_symtab_read): Update.
2139         * xcoffread.c (read_xcoff_symtab): Update.
2140         * dwarf2read.c (new_symbol): Update.
2141         (read_func_scope, read_lexical_block_scope): Update.
2142         * dbxread.c (process_one_symbol): Update.
2143         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2144         (outermost_context_p): Remove macro.
2145         (outermost_context_p, get_current_context_stack)
2146         (get_context_stack_depth): Declare.
2147         (pop_context): Return struct context_stack.
2148         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2149         member.
2150         (context_stack_size): Remove.
2151         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2152         (prepare_for_building, end_symtab_get_static_block)
2153         (augment_type_symtab, push_context): Update.
2154         (pop_context): Return struct context_stack.
2155         (outermost_context_p, get_current_context_stack)
2156         (get_context_stack_depth): New functions.
2157         (buildsym_init): Update.
2158
2159 2018-07-20  Tom Tromey  <tom@tromey.com>
2160
2161         * rust-exp.y: Now a pure parser.  Update all rules.
2162         (%union): Move earlier.
2163         (current_parser, work_obstack): Remove globals.
2164         (rust_parser, ~rust_parser): Update.
2165         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2166         lex_character, lex_number, lex_string, lex_identifier,
2167         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2168         convert_name, convert_params_to_expression,
2169         convert_ast_to_expression, ast_basic_type, ast_operation,
2170         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2171         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2172         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2173         ast_array_type, ast_slice_type, ast_reference_type,
2174         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2175         (rust_parse): Update.
2176         (rustyyerror, rustyylex): Add parser parameter.
2177         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2178         (rust_lex_stringish_test, rust_lex_test_sequence)
2179         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2180         (rust_lex_test_push_back, rust_lex_tests): Update.
2181
2182 2018-07-19  Pedro Alves  <palves@redhat.com>
2183
2184         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2185         gdb::unique_xmalloc_ptr.
2186         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2187         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2188         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2189         copy-initialization.
2190         * guile/scm-pretty-print.c (ppscm_print_children): Use
2191         gdb::unique_xmalloc_ptr instead of cleanups.
2192         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2193         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2194         gdb::unique_xmalloc_ptr.
2195         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2196         Adjust to use gdb::unique_xmalloc_ptr.
2197         * guile/scm-utils.c (extract_arg): Adjust.
2198         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2199         gdb::unique_xmalloc_ptr instead of a cleanup.
2200
2201 2018-07-19  Tom Tromey  <tom@tromey.com>
2202
2203         * utils.c (do_value_free_to_mark)
2204         (make_cleanup_value_free_to_mark): Remove.
2205         * utils.h (make_cleanup_value_free_to_mark): Remove.
2206
2207 2018-07-19  Pedro Alves  <palves@redhat.com>
2208
2209         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2210         forwarding reference.
2211
2212 2018-07-18  Pedro Alves  <palves@redhat.com>
2213
2214         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2215         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2216         cleanup.
2217
2218 2018-07-18  Pedro Alves  <palves@redhat.com>
2219
2220         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2221         exceptions.
2222         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2223         (gdbscm_wrap): New.
2224         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2225         directly instead of a cleanup.
2226         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2227         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2228         (vlscm_binop_gdbthrow): New, factored out from ...
2229         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2230         (vlscm_rich_compare): Use gdbscm_wrap.
2231         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2232         instead of a cleanup.
2233         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2234         cleanup.
2235         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2236         Use xfree directly instead of a cleanup.
2237         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2238         Adjust to use gdbscm_wrap and scoped_value_mark.
2239         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2240         (gdbscm_value_address, gdbscm_value_dereference)
2241         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2242         scoped_value_mark.
2243         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2244         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2245         scoped_value_mark.
2246         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2247         gdbscm_wrap and scoped_value_mark.
2248         (gdbscm_value_to_string): Use xfree directly instead of a
2249         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2250         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2251         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2252         scoped_value_mark.
2253         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2254         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2255         scoped_value_mark.
2256         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2257         gdbscm_wrap.
2258
2259 2018-07-18  Tom de Vries  <tdevries@suse.de>
2260
2261         * findvar.c (default_read_var_value): Also resolve dynamic type for
2262         LOC_OPTIMIZED_OUT vars.
2263
2264 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2265
2266         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2267         decoding.
2268
2269 2018-07-17  Tom Tromey  <tom@tromey.com>
2270
2271         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2272         (compute_enum_list, pascm_set_param_value_x)
2273         (gdbscm_parameter_value): Update.
2274         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2275         (gdbscm_scm_to_host_string): Update.
2276         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2277         Update.
2278         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2279         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2280         * guile/scm-string.c (gdbscm_scm_to_string): Return
2281         unique_xmalloc_ptr.
2282         (gdbscm_scm_to_host_string): Likewise.
2283
2284 2018-07-17  Tom Tromey  <tom@tromey.com>
2285
2286         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2287         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2288         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2289         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2290         unique_xmalloc_ptr.
2291
2292 2018-07-17  Tom Tromey  <tom@tromey.com>
2293
2294         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2295         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2296         Update.
2297         * guile/scm-cmd.c (cmdscm_function): Update.
2298         * guile/scm-pretty-print.c
2299         (ppscm_print_exception_unless_memory_error): Update.
2300         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2301         Return unique_xmalloc_ptr.
2302
2303 2018-07-17  Tom Tromey  <tom@tromey.com>
2304
2305         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2306         Use string_printf.
2307
2308 2018-07-17  Jim Wilson  <jimw@sifive.com>
2309
2310         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2311         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2312         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2313         unecessary braces after EF_RISCV_RVC test.  Delete call to
2314         set_gdbarch_decr_pc_after_break.
2315
2316         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2317         RISCV_LAST_FP_REGNUM + 1.
2318         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2319
2320 2018-07-17  Tom Tromey  <tom@tromey.com>
2321
2322         * configure.ac: Remove --disable-gdbcli.
2323         * configure: Rebuild.
2324         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2325         (SUBDIR_CLI_CFLAGS): Remove.
2326         (SFILES): Use SUBDIR_CLI_SRCS.
2327         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2328
2329 2018-07-17  Tom Tromey  <tom@tromey.com>
2330
2331         PR gdb/18624:
2332         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2333
2334 2018-07-16  Jim Wilson  <jimw@sifive.com>
2335
2336         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2337
2338 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2339
2340         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2341         variable.
2342         (libunwind_frame_sniffer): Likewise.
2343         (libunwind_frame_prev_register): Likewise.
2344         (libunwind_sigtramp_frame_sniffer): Likewise.
2345         * ia64-tdep.c (ia64_access_reg): Likewise.
2346         (ia64_access_rse_reg): Likewise.
2347         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2348         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2349
2350 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2351
2352         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2353
2354 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2355
2356         * remote-sim.c (gdbsim_target::close,
2357         gdbsim_target::mourn_inferior): Remove unused variables.
2358
2359 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2360
2361         * ia64-tdep.c (ktab_buf): New global.
2362         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2363         (get_kernel_table): Adjust.
2364
2365 2018-07-16  Tom Tromey  <tom@tromey.com>
2366
2367         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2368         * dwarf2read.c (using_directives, new_symbol): Use
2369         outermost_context_p.
2370         * dbxread.c (process_one_symbol): Use outermost_context_p.
2371         * coffread.c (coff_symtab_read): Use outermost_context_p.
2372
2373 2018-07-16  Tom Tromey  <tom@tromey.com>
2374
2375         * dwarf2read.c (using_directives, read_func_scope)
2376         (read_lexical_block_scope): Update.
2377         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2378         * buildsym.h (local_using_directives, global_using_directives):
2379         Don't declare.
2380         (get_local_using_directives, set_local_using_directives)
2381         (get_global_using_directives): Declare.
2382         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2383         m_global_using_directives>: New members.
2384         (finish_block_internal, prepare_for_building)
2385         (reset_symtab_globals, end_symtab_get_static_block)
2386         (push_context): Update.
2387         (get_local_using_directives, set_local_using_directives)
2388         (get_global_using_directives): New functions.
2389         (buildsym_init): Update.
2390
2391 2018-07-16  Tom Tromey  <tom@tromey.com>
2392
2393         * xcoffread.c (xcoff_initial_scan): Don't call
2394         free_pending_blocks.
2395         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2396         * buildsym.h (class scoped_free_pendings): Add constructor.
2397         (free_pending_blocks): Don't declare.
2398         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2399         (free_pending_blocks): Now static.
2400
2401 2018-07-16  Tom Tromey  <tom@tromey.com>
2402
2403         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2404         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2405         member.
2406         (struct subfile_stack): Remove.
2407         (subfile_stack): Remove.
2408         (push_subfile, pop_subfile, buildsym_init): Update.
2409
2410 2018-07-16  Tom Tromey  <tom@tromey.com>
2411
2412         * buildsym.c (push_subfile): Use gdb_assert.
2413         (pop_subfile): Use gdb_assert.
2414
2415 2018-07-16  Tom Tromey  <tom@tromey.com>
2416
2417         * buildsym.h (merge_symbol_lists): Remove.
2418         * buildsym.c (merge_symbol_lists): Remove.
2419
2420 2018-07-16  Tom Tromey  <tom@tromey.com>
2421
2422         * stabsread.c (scan_file_globals): Update comment.
2423         * stabsread.h (scan_file_globals): Move from buildsym.h.
2424         * buildsym.h (scan_file_globals): Move to stabsread.h.
2425
2426 2018-07-16  Tom Tromey  <tom@tromey.com>
2427
2428         * xcoffread.c (xcoff_new_init): Update.
2429         * mipsread.c (mipscoff_new_init): Update.
2430         * mdebugread.c (mdebug_build_psymtabs): Update.
2431         * elfread.c (elf_new_init): Update.
2432         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2433         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2434         * buildsym.h (buildsym_new_init): Don't declare.
2435         * buildsym.c (buildsym_new_init): Remove.
2436
2437 2018-07-16  Tom Tromey  <tom@tromey.com>
2438
2439         * stabsread.h (within_function): Move from buildsym.h.
2440         * stabsread.c (start_stabs): Clear within_function.
2441         * coffread.c (coff_start_symtab): Clear within_function.
2442         * buildsym.h (within_function): Move to stabsread.h.
2443         * buildsym.c (prepare_for_building): Update.
2444
2445 2018-07-16  Tom Tromey  <tom@tromey.com>
2446
2447         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2448         * dwarf2read.c (dwarf2_start_symtab): Don't set
2449         processing_gcc_compilation.
2450         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2451
2452 2018-07-16  Tom Tromey  <tom@tromey.com>
2453
2454         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2455         (next_symbol_text_func): Move from buildsym.h.
2456         * stabsread.c (hashname): Move from buildsym.c.
2457         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2458         (next_symbol_text_func, hashname): Move to stabsread.h.
2459         * buildsym.c: Don't include bcache.h
2460         (hashname): Move to stasbread.c.
2461
2462 2018-07-16  Tom Tromey  <tom@tromey.com>
2463
2464         * buildsym.h (context_stack_size): Don't declare.
2465         * buildsym.c (context_stack_size): New global.
2466
2467 2018-07-16  Tom Tromey  <tom@tromey.com>
2468
2469         * dbxread.c (processing_acc_compilation): New global.
2470         * buildsym.h (processing_acc_compilation): Don't declare.
2471
2472 2018-07-16  Tom Tromey  <tom@tromey.com>
2473
2474         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2475         * dbxread.c (read_ofile_symtab): Update.
2476         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2477         * buildsym.h (last_source_start_addr): Remove.
2478         (set_last_source_start_addr, get_last_source_start_addr):
2479         Declare.
2480         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2481         parameter.
2482         (struct buildsym_compunit) <m_last_source_start_addr>: New
2483         member.
2484         (prepare_for_building): Remove start_addr parameter.
2485         (start_symtab, restart_symtab, end_symtab_get_static_block)
2486         (end_symtab_with_blockvector): Update.
2487         (set_last_source_start_addr, get_last_source_start_addr): New
2488         functions.
2489
2490 2018-07-16  Tom Tromey  <tom@tromey.com>
2491
2492         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2493         member.
2494         (have_line_numbers): Remove.
2495         (record_line, prepare_for_building, end_symtab_get_static_block)
2496         (augment_type_symtab): Update.
2497
2498 2018-07-16  Tom Tromey  <tom@tromey.com>
2499
2500         * buildsym.c (~buildsym_compunit): Free the macro table.
2501         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2502         methods.
2503         <m_pending_macros>: New member.
2504         (pending_macros): Remove.
2505         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2506         (reset_symtab_globals, end_symtab_get_static_block)
2507         (end_symtab_with_blockvector, augment_type_symtab)
2508         (buildsym_init): Update.
2509
2510 2018-07-16  Tom Tromey  <tom@tromey.com>
2511
2512         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2513         parameter.
2514         (buildsym_compunit::set_last_source_file): New method.
2515         <m_last_source_file>: New member.
2516         (prepare_for_building): Remove "name" parameter.
2517         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2518         (last_source_file): Remove.
2519         (set_last_source_file, get_last_source_file): Update.
2520
2521 2018-07-16  Tom Tromey  <tom@tromey.com>
2522
2523         * buildsym.c (prepare_for_building): Add assert.
2524
2525 2018-07-16  Tom Tromey  <tom@tromey.com>
2526
2527         * buildsym.c (~buildsym_compunit): Update.
2528         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2529         (start_subfile, patch_subfile_names)
2530         (end_symtab_with_blockvector): Update.
2531
2532 2018-07-16  Tom Tromey  <tom@tromey.com>
2533
2534         * buildsym.c (struct buildsym_compunit): Add constructor,
2535         destructor, initializers.
2536         (start_buildsym_compunit): Remove.
2537         (free_buildsym_compunit): Use "delete".
2538         (start_symtab, restart_symtab): Use "new".
2539
2540 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2541
2542         * symfile.c (set_objfile_default_section_offset): Remove struct
2543         keyword.
2544
2545 2018-07-14  Stafford Horne  <shorne@gmail.com>
2546
2547         * (Responsible Maintainers): Add myself as or1k maintainer.
2548
2549 2018-07-13  Tom Tromey  <tom@tromey.com>
2550
2551         * symfile.c (set_objfile_default_section_offset): Use extra braces
2552         around initializer.
2553
2554 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2555
2556         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2557         non-branching basr.
2558
2559 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2560
2561         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2562         unittests/cli-utils-selftests.c
2563         * unittests/cli-utils-selftests.c: New file.
2564
2565 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2566
2567         * NEWS: Mention new commands. Mention change to 'thread apply'.
2568
2569 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2570
2571         * thread.c (thr_try_catch_cmd): New function.
2572         (thread_apply_all_command): Handle qcs flags.
2573         (thread_apply_command): Handle qcs flags.
2574         (taas_command): New function.
2575         (tfaas_command): New function.
2576         (_initialize_thread): Update to setup the new commands 'taas
2577         and 'tfaas'. Change doc string for 'thread apply'.
2578
2579 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2580
2581         * stack.c: (trailing_outermost_frame): New function, mostly
2582         extracted from backtrace_command_1.
2583         (leading_innermost_frame): New function.
2584         (backtrace_command_1): Update to call trailing_outermost_frame.
2585         (frame_apply_command_count): New function.
2586         (frame_apply_level_command): New function.
2587         (frame_apply_all_command): New function.
2588         (frame_apply_command): New function.
2589         (faas_command): New function.
2590         (frame_cmd_list): New variable.
2591         (_initialize_stack): Update to setup the new commands 'frame apply'
2592         and 'faas'.
2593
2594 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2595
2596         * cli-utils.c (number_or_range_parser::get_number): Only handle
2597         numbers or convenience var as numbers.
2598         (parse_flags): New function.
2599         (parse_flags_qcs): New function.
2600         (number_or_range_parser::finished): Ensure parsing end is detected
2601         before end of string.
2602         * cli-utils.h (parse_flags): New function.
2603         (parse_flags_qcs): New function.
2604         (number_or_range_parser): Remove m_finished bool.
2605         (number_or_range_parser::skip_range): Set m_in_range to false.
2606
2607 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2608
2609         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2610         on Windows.
2611
2612 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2613             Jan Kratochvil  <jan.kratochvil@redhat.com>
2614             Paul Fertser  <fercerpav@gmail.com>
2615             Tsutomu Seki  <sekiriki@gmail.com>
2616             Pedro Alves  <palves@redhat.com>
2617
2618         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2619         'unittests/parse-connection-spec-selftests.c'.
2620         (COMMON_SFILES): Add 'common/netstuff.c'.
2621         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2622         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2623         * common/netstuff.c: New file.
2624         * common/netstuff.h: New file.
2625         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2626         (wait_for_connect): Update comment.  New parameter
2627         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2628         Use 'sock' directly instead of 'scb->fd'.
2629         (try_connect): New function, with code from 'net_open'.
2630         (net_open): Rewrite main loop to deal with multiple
2631         sockets/addresses.  Handle IPv6-style hostnames; implement
2632         support for IPv6 connections.
2633         * unittests/parse-connection-spec-selftests.c: New file.
2634
2635 2018-07-11  Pedro Alves  <palves@redhat.com>
2636
2637         PR gdb/23377
2638         * remote.c (remote_target::remote_detach_pid): Call
2639         set_current_process.
2640
2641 2018-07-11  Pedro Alves  <palves@redhat.com>
2642
2643         * h8300-tdep.c (h8300_gdbarch_init): Remove
2644         set_gdbarch_ecoff_reg_to_regnum calls.
2645
2646 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2647
2648         PR c++/23373
2649         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2650         offsets/sizes for static members of a class/struct.
2651
2652 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2653
2654         * target-descriptions.c (tdesc_register_bitsize): Rename.
2655         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2656         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2657         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2658
2659 2018-07-10  Tom Tromey  <tom@tromey.com>
2660
2661         * breakpoint.c (moribund_locations): Now static and a
2662         std::vector.
2663         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2664         (build_bpstat_chain, update_global_location_list)
2665         (breakpoint_retire_moribund): Update.
2666         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2667         VEC.
2668
2669 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2670
2671         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2672         (riscv_register_reggroup_p): Use new function, remove unneeded
2673         parenthesis.
2674         (riscv_push_dummy_call): Extend assert to compare against xlen or
2675         flen based on register type.
2676
2677 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2678
2679         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2680
2681 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2682
2683         * remote.c (show_hardware_watchpoint_limit): New function.
2684         (show_hardware_watchpoint_length_limit): New function.
2685         (show_hardware_breakpoint_limit): New function.
2686         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2687         where appropriate, update help text.
2688
2689 2018-07-09  Tom Tromey  <tom@tromey.com>
2690
2691         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2692         (CLIBS): Don't mention NAT_CLIBS.
2693
2694 2018-07-09  Tom Tromey  <tom@tromey.com>
2695
2696         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2697         (LIBGDB_OBS, clean mostlyclean): Update.
2698         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2699
2700 2018-07-09  Tom Tromey  <tom@tromey.com>
2701
2702         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2703         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2704         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2705
2706 2018-07-09  Tom Tromey  <tom@tromey.com>
2707
2708         * Makefile.in (ALLDEPFILES): Remove exec.c.
2709         (COMMON_OBS): Remove exec.o.
2710         (COMMON_SFILES): Add exec.c.
2711
2712 2018-07-09  Tom Tromey  <tom@tromey.com>
2713
2714         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2715
2716 2018-07-09  Tom Tromey  <tom@tromey.com>
2717
2718         * Makefile.in (clean mostlyclean): Remove stamp-version.
2719         (version.c): Depend on stamp-version.
2720         (stamp-version): New rule, from version.c rule.
2721
2722 2018-07-09  Tom Tromey  <tom@tromey.com>
2723
2724         * Makefile.in (init.c): Depend on stamp-init.
2725         (stamp-init): New rule, from init.c rule.
2726         (clean mostlyclean): Remove stamp-init.
2727
2728 2018-07-09  Tom Tromey  <tom@tromey.com>
2729
2730         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2731         SUBDIR_GCC_COMPILE_SRCS.
2732
2733 2018-07-09  Tom Tromey  <tom@tromey.com>
2734
2735         * Makefile.in (init.c): Remove some unused sed rules.
2736
2737 2018-07-09  Tom Tromey  <tom@tromey.com>
2738
2739         * Makefile.in (TSOBS): Remove.
2740         (INIT_FILES): Update.
2741         (LIBGDB_OBS): Update.
2742         (COMMON_SFILES): Add inflow.c.
2743         (SFILES): Remove inflow.c.
2744
2745 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2746
2747         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2748
2749 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2750
2751         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2752         get_saveloc_name, is_signal_frame_name, step_name,
2753         init_remote_name, create_addr_space_name,
2754         destroy_addr_space_name, search_unwind_table_name,
2755         find_dyn_list_name): Constify.
2756
2757 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2758
2759         * darwin-nat.c (darwin_pthread_kill): New function.
2760         (darwin_resume_thread): Use darwin_pthread_kill.
2761
2762 2018-07-05  Tom de Vries  <tdevries@suse.de>
2763
2764         * macroexp.c (macro_buffer) <operator=>: New member function.
2765
2766 2018-07-04  Tom Tromey  <tom@tromey.com>
2767
2768         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2769
2770 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2771
2772         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2773         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2774         * maint.c: Likewise.
2775         * top.c: Likewise.
2776
2777 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2778
2779         * NEWS: Create a new section for the next release branch.
2780         Rename the section of the current branch, now that it has
2781         been cut.
2782
2783 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2784
2785         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2786         * version.in: Bump version to 8.2.50.DATE-git.
2787
2788 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2789             Pedro Alves  <palves@redhat.com>
2790
2791         * linux-nat.c (linux_init_ptrace): Rename to ...
2792         (linux_init_ptrace_procfs): ... this.  Call
2793         linux_proc_init_warnings.
2794         (linux_nat_target::post_attach)
2795         (linux_nat_target::post_startup_inferior): Adjust.
2796         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2797         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2798
2799 2018-07-04  Tom de Vries  <tdevries@suse.de>
2800
2801         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2802         check ...
2803         (read_comp_unit_head): ... here.
2804
2805 2018-07-03  Tom Tromey  <tom@tromey.com>
2806
2807         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2808         (stop_tracing, tstatus_command)
2809         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2810         (print_one_static_tracepoint_marker): Update.
2811         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2812         std::vector.
2813         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2814         VEC.
2815         (all_tracepoints, static_tracepoints_here): Return std::vector.
2816
2817 2018-07-03  Tom Tromey  <tom@tromey.com>
2818
2819         * common/ptid.c (ptid_equal): Remove.
2820         * common/ptid.h (ptid_equal): Don't declare.
2821         * ada-tasks.c: Update.
2822         * breakpoint.c: Update.
2823         * common/agent.c: Update.
2824         * corelow.c: Update.
2825         * darwin-nat-info.c: Update.
2826         * darwin-nat.c: Update.
2827         * dcache.c: Update.
2828         * dtrace-probe.c: Update.
2829         * dummy-frame.c: Update.
2830         * fbsd-nat.c: Update.
2831         * frame.c: Update.
2832         * gdbthread.h: Update.
2833         * gnu-nat.c: Update.
2834         * go32-nat.c: Update.
2835         * inf-loop.c: Update.
2836         * inf-ptrace.c: Update.
2837         * infcall.c: Update.
2838         * infcmd.c: Update.
2839         * inflow.c: Update.
2840         * infrun.c: Update.
2841         * linux-fork.c: Update.
2842         * linux-nat.c: Update.
2843         * linux-thread-db.c: Update.
2844         * mi/mi-cmd-var.c: Update.
2845         * mi/mi-interp.c: Update.
2846         * mi/mi-main.c: Update.
2847         * nto-procfs.c: Update.
2848         * ppc-linux-tdep.c: Update.
2849         * procfs.c: Update.
2850         * python/py-inferior.c: Update.
2851         * python/py-record-btrace.c: Update.
2852         * python/py-record.c: Update.
2853         * ravenscar-thread.c: Update.
2854         * regcache.c: Update.
2855         * remote-sim.c: Update.
2856         * remote.c: Update.
2857         * sol-thread.c: Update.
2858         * solib.c: Update.
2859         * target.c: Update.
2860         * tui/tui-stack.c: Update.
2861         * varobj.c: Update.
2862         * windows-nat.c: Update.
2863         * windows-tdep.c: Update.
2864
2865 2018-07-03  Tom Tromey  <tom@tromey.com>
2866
2867         * common/ptid.c (ptid_match): Remove.
2868         * common/ptid.h (ptid_match): Don't declare.
2869         * fbsd-nat.c: Update.
2870         * infcmd.c: Update.
2871         * infrun.c: Update.
2872         * linux-nat.c: Update.
2873         * record-btrace.c: Update.
2874         * regcache.c: Update.
2875         * remote.c: Update.
2876
2877 2018-07-03  Tom Tromey  <tom@tromey.com>
2878
2879         * common/ptid.c (ptid_tid_p): Remove.
2880         * common/ptid.h (ptid_tid_p): Don't declare.
2881         * sol-thread.c: Update.
2882
2883 2018-07-03  Tom Tromey  <tom@tromey.com>
2884
2885         * common/ptid.c (ptid_lwp_p): Remove.
2886         * common/ptid.h (ptid_lwp_p): Don't declare.
2887         * fbsd-nat.c: Update.
2888         * linux-nat.c: Update.
2889         * nat/linux-procfs.c: Update.
2890         * nat/x86-linux-dregs.c: Update.
2891         * sol-thread.c: Update.
2892
2893 2018-07-03  Tom Tromey  <tom@tromey.com>
2894
2895         * common/ptid.c (ptid_is_pid): Remove.
2896         * common/ptid.h (ptid_is_pid): Don't declare.
2897         * infrun.c: Update.
2898         * linux-nat.c: Update.
2899         * mi/mi-interp.c: Update.
2900         * remote.c: Update.
2901         * thread.c: Update.
2902
2903 2018-07-03  Tom Tromey  <tom@tromey.com>
2904
2905         * common/ptid.c (ptid_get_tid): Remove.
2906         * common/ptid.h (ptid_get_tid): Don't declare.
2907         * ada-tasks.c: Update.
2908         * aix-thread.c: Update.
2909         * bsd-uthread.c: Update.
2910         * darwin-nat.c: Update.
2911         * fbsd-nat.c: Update.
2912         * i386-darwin-nat.c: Update.
2913         * infrun.c: Update.
2914         * linux-tdep.c: Update.
2915         * nto-procfs.c: Update.
2916         * ppc-ravenscar-thread.c: Update.
2917         * python/py-infthread.c: Update.
2918         * ravenscar-thread.c: Update.
2919         * sol-thread.c: Update.
2920         * sparc-ravenscar-thread.c: Update.
2921         * windows-nat.c: Update.
2922
2923 2018-07-03  Tom Tromey  <tom@tromey.com>
2924
2925         * common/ptid.c (ptid_get_lwp): Remove.
2926         * common/ptid.h (ptid_get_lwp): Don't declare.
2927         * aarch64-linux-nat.c: Update.
2928         * ada-tasks.c: Update.
2929         * aix-thread.c: Update.
2930         * amd64-linux-nat.c: Update.
2931         * arm-linux-nat.c: Update.
2932         * corelow.c: Update.
2933         * fbsd-nat.c: Update.
2934         * fbsd-tdep.c: Update.
2935         * gnu-nat.c: Update.
2936         * i386-cygwin-tdep.c: Update.
2937         * i386-gnu-nat.c: Update.
2938         * i386-linux-nat.c: Update.
2939         * ia64-linux-nat.c: Update.
2940         * inf-ptrace.c: Update.
2941         * infrun.c: Update.
2942         * linux-fork.c: Update.
2943         * linux-nat.c: Update.
2944         * linux-tdep.c: Update.
2945         * linux-thread-db.c: Update.
2946         * mips-linux-nat.c: Update.
2947         * nat/aarch64-linux-hw-point.c: Update.
2948         * nat/aarch64-linux.c: Update.
2949         * nat/linux-btrace.c: Update.
2950         * nat/linux-osdata.c: Update.
2951         * nat/linux-procfs.c: Update.
2952         * nat/x86-linux-dregs.c: Update.
2953         * obsd-nat.c: Update.
2954         * ppc-fbsd-nat.c: Update.
2955         * ppc-linux-nat.c: Update.
2956         * procfs.c: Update.
2957         * python/py-infthread.c: Update.
2958         * ravenscar-thread.c: Update.
2959         * remote.c: Update.
2960         * s390-linux-nat.c: Update.
2961         * sol-thread.c: Update.
2962         * sol2-tdep.c: Update.
2963         * spu-linux-nat.c: Update.
2964         * x86-linux-nat.c: Update.
2965         * xtensa-linux-nat.c: Update.
2966
2967 2018-07-03  Tom Tromey  <tom@tromey.com>
2968
2969         * common/ptid.c (ptid_get_pid): Remove.
2970         * common/ptid.h (ptid_get_pid): Don't declare.
2971         * aarch64-linux-nat.c: Update.
2972         * ada-lang.c: Update.
2973         * aix-thread.c: Update.
2974         * alpha-bsd-nat.c: Update.
2975         * amd64-fbsd-nat.c: Update.
2976         * amd64-linux-nat.c: Update.
2977         * arm-linux-nat.c: Update.
2978         * arm-nbsd-nat.c: Update.
2979         * auxv.c: Update.
2980         * break-catch-syscall.c: Update.
2981         * breakpoint.c: Update.
2982         * bsd-uthread.c: Update.
2983         * corelow.c: Update.
2984         * ctf.c: Update.
2985         * darwin-nat.c: Update.
2986         * fbsd-nat.c: Update.
2987         * fbsd-tdep.c: Update.
2988         * gcore.c: Update.
2989         * gnu-nat.c: Update.
2990         * hppa-nbsd-nat.c: Update.
2991         * hppa-obsd-nat.c: Update.
2992         * i386-fbsd-nat.c: Update.
2993         * ia64-linux-nat.c: Update.
2994         * inf-ptrace.c: Update.
2995         * infcmd.c: Update.
2996         * inferior.c: Update.
2997         * inferior.h: Update.
2998         * inflow.c: Update.
2999         * infrun.c: Update.
3000         * linux-fork.c: Update.
3001         * linux-nat.c: Update.
3002         * linux-tdep.c: Update.
3003         * linux-thread-db.c: Update.
3004         * m68k-bsd-nat.c: Update.
3005         * mi/mi-interp.c: Update.
3006         * mi/mi-main.c: Update.
3007         * mips-linux-nat.c: Update.
3008         * mips-nbsd-nat.c: Update.
3009         * mips64-obsd-nat.c: Update.
3010         * nat/aarch64-linux-hw-point.c: Update.
3011         * nat/aarch64-linux.c: Update.
3012         * nat/linux-btrace.c: Update.
3013         * nat/linux-osdata.c: Update.
3014         * nat/linux-procfs.c: Update.
3015         * nat/x86-linux-dregs.c: Update.
3016         * nto-procfs.c: Update.
3017         * obsd-nat.c: Update.
3018         * ppc-linux-nat.c: Update.
3019         * ppc-nbsd-nat.c: Update.
3020         * ppc-obsd-nat.c: Update.
3021         * proc-service.c: Update.
3022         * procfs.c: Update.
3023         * python/py-inferior.c: Update.
3024         * python/py-infthread.c: Update.
3025         * ravenscar-thread.c: Update.
3026         * record.c: Update.
3027         * remote-sim.c: Update.
3028         * remote.c: Update.
3029         * rs6000-nat.c: Update.
3030         * s390-linux-nat.c: Update.
3031         * sh-nbsd-nat.c: Update.
3032         * sol-thread.c: Update.
3033         * sparc-nat.c: Update.
3034         * sparc64-tdep.c: Update.
3035         * spu-linux-nat.c: Update.
3036         * spu-tdep.c: Update.
3037         * target-debug.h: Update.
3038         * target.c: Update.
3039         * thread.c: Update.
3040         * tid-parse.c: Update.
3041         * tracefile-tfile.c: Update.
3042         * vax-bsd-nat.c: Update.
3043         * windows-nat.c: Update.
3044         * x86-linux-nat.c: Update.
3045         * x86-nat.c: Update.
3046
3047 2018-07-03  Tom Tromey  <tom@tromey.com>
3048
3049         * common/ptid.c (pid_to_ptid): Remove.
3050         * common/ptid.h (pid_to_ptid): Don't declare.
3051         * aix-thread.c: Update.
3052         * arm-linux-nat.c: Update.
3053         * common/ptid.c: Update.
3054         * common/ptid.h: Update.
3055         * corelow.c: Update.
3056         * ctf.c: Update.
3057         * darwin-nat.c: Update.
3058         * fbsd-nat.c: Update.
3059         * fork-child.c: Update.
3060         * gnu-nat.c: Update.
3061         * go32-nat.c: Update.
3062         * inf-ptrace.c: Update.
3063         * infcmd.c: Update.
3064         * inferior.c: Update.
3065         * infrun.c: Update.
3066         * linux-fork.c: Update.
3067         * linux-nat.c: Update.
3068         * nat/aarch64-linux-hw-point.c: Update.
3069         * nat/fork-inferior.c: Update.
3070         * nat/x86-linux-dregs.c: Update.
3071         * nto-procfs.c: Update.
3072         * obsd-nat.c: Update.
3073         * procfs.c: Update.
3074         * progspace.c: Update.
3075         * remote.c: Update.
3076         * rs6000-nat.c: Update.
3077         * s390-linux-nat.c: Update.
3078         * sol-thread.c: Update.
3079         * spu-linux-nat.c: Update.
3080         * target.c: Update.
3081         * top.c: Update.
3082         * tracefile-tfile.c: Update.
3083         * windows-nat.c: Update.
3084
3085 2018-07-03  Tom Tromey  <tom@tromey.com>
3086
3087         * common/ptid.h (ptid_build): Don't declare.
3088         * common/ptid.c (ptid_build): Remove.
3089         * aix-thread.c: Update.
3090         * bsd-kvm.c: Update.
3091         * bsd-uthread.c: Update.
3092         * common/agent.c: Update.
3093         * common/ptid.c: Update.
3094         * common/ptid.h: Update.
3095         * corelow.c: Update.
3096         * darwin-nat.c: Update.
3097         * fbsd-nat.c: Update.
3098         * gnu-nat.c: Update.
3099         * linux-fork.c: Update.
3100         * linux-nat.c: Update.
3101         * linux-thread-db.c: Update.
3102         * nat/linux-osdata.c: Update.
3103         * nat/linux-procfs.c: Update.
3104         * nto-procfs.c: Update.
3105         * obsd-nat.c: Update.
3106         * proc-service.c: Update.
3107         * procfs.c: Update.
3108         * ravenscar-thread.c: Update.
3109         * remote-sim.c: Update.
3110         * remote.c: Update.
3111         * sol-thread.c: Update.
3112         * target.c: Update.
3113         * windows-nat.c: Update.
3114
3115 2018-07-03  Tom Tromey  <tom@tromey.com>
3116
3117         * infrun.c (follow_exec): Use exit_inferior_silent.
3118         * inferior.c (exit_inferior_num_silent): Remove.
3119         * inferior.h (exit_inferior_num_silent): Don't declare.
3120
3121 2018-07-03  Tom Tromey  <tom@tromey.com>
3122
3123         PR cli/23340:
3124         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3125         inferior_ptid on error.
3126
3127 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3128             Simon Marchi  <simon.marchi@polymtl.ca>
3129
3130         PR tdep/8282
3131         * disasm.h (gdb_disassembler): Add
3132         `m_disassembler_options_holder'. member
3133         * disasm.c (get_all_disassembler_options): New function.
3134         (gdb_disassembler::gdb_disassembler): Use it.
3135         (gdb_buffered_insn_length_init_dis): Likewise.
3136         (gdb_buffered_insn_length): Adjust accordingly.
3137         (set_disassembler_options): Handle options with arguments.
3138         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3139         line if showing options with descriptions.
3140         (disassembler_options_completer): Adapt to using the
3141         `disasm_options_and_args_t' structure.
3142         * mips-tdep.c (mips_disassembler_options): New variable.
3143         (mips_disassembler_options_o32): Likewise.
3144         (mips_disassembler_options_n32): Likewise.
3145         (mips_disassembler_options_n64): Likewise.
3146         (gdb_print_insn_mips): Don't set `disassembler_options'.
3147         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3148         functions.
3149         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3150         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3151         `gdbarch_disassembler_options_implicit' and
3152         `gdbarch_valid_disassembler_options'.
3153         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3154         `disasm_options_and_args_t' structure.
3155         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3156         method.
3157         (valid_disassembler_options): Switch from `disasm_options_t' to
3158         the `disasm_options_and_args_t' structure.
3159         * NEWS: Document `set disassembler-options' support for the MIPS
3160         target.
3161         * gdbarch.h: Regenerate.
3162         * gdbarch.c: Regenerate.
3163
3164 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3165
3166         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3167
3168 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3169
3170         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3171         parameter in call to amd64_target_description.
3172         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3173         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3174         (amd64fbsd_init_abi): Likewise.
3175         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3176         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3177         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3178         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3179
3180 2018-06-29  Pedro Alves  <palves@redhat.com>
3181
3182         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3183         "segments" parameter.
3184         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3185         (_initialize_amd64_tdep): Update call to
3186         amd64_create_target_description.
3187         (amd64_target_description): Add "segments" parameter.  Adjust
3188         the implementation to use it.
3189         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3190         call to amd64_create_target_description.
3191         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3192         * gdb/arch/amd64.h (amd64_create_target_description): Add
3193         "segments" register.
3194         * gdb/arch/amd64.c (amd64_create_target_description): Add
3195         "segments" parameter.  Call create_feature_i386_64bit_segments
3196         only if SEGMENTS is true.
3197         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3198         call to amd64_create_target_description.
3199
3200 2018-06-29  Pedro Alves  <palves@redhat.com>
3201
3202         * thread.c (thread_target_id_str): New, factored out from ...
3203         (print_thread_info_1): ... here.  Use it to compute the max
3204         "Target Id" column width.
3205
3206 2018-06-29  Pedro Alves  <palves@redhat.com>
3207
3208         * remote.c (remote_target::extra_thread_info): Delete
3209         'display_buf' and 'n' locals.  from the cache, regardless of
3210         packet mechanims is in use.  Use cache for qThreadExtra and qP
3211         methods too.
3212
3213 2018-06-29  Pedro Alves  <palves@redhat.com>
3214
3215         * blockframe.c (find_pc_sect_containing_function): New function.
3216         * breakpoint.c (print_breakpoint_location): Don't call
3217         find_pc_sect_function.
3218         * linespec.c (create_sals_line_offset): Record the location's
3219         symbol in the sal.
3220         * linespec.c (convert_address_location_to_sals): Fill in sal's
3221         symbol with find_pc_sect_containing_function.
3222         * symtab.c (find_function_start_sal): Rename to ...
3223         (find_function_start_sal_1): ... this.
3224         (find_function_start_sal): Reimplement as wrapper around
3225         find_function_start_sal_1, and use
3226         find_pc_sect_containing_function to fill in the sal's symbol.
3227         (find_function_start_sal(symbol*, bool)): Adjust.
3228         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3229         comments.
3230         (find_pc_sect_containing_function): Declare.
3231
3232 2018-06-29  Pedro Alves  <palves@redhat.com>
3233
3234         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3235         true if the the location has no symbol.
3236
3237 2018-06-28  Tom Tromey  <tom@tromey.com>
3238
3239         * NEWS: Mention --enable-codesign.
3240         * silent-rules.mk (ECHO_SIGN): New variable.
3241         * configure.ac: Add --enable-codesign.
3242         * configure: Rebuild.
3243         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3244         (gdb$(EXEEXT)): Optionally invoke codesign.
3245
3246 2018-06-28  Pedro Alves  <palves@redhat.com>
3247
3248         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3249         comments.
3250         (switch_to_thread_no_regs): Adjust comment.
3251         * infcmd.c (stop_pc): Delete.
3252         (post_create_inferior, info_program_command): Replace references
3253         to stop_pc with references to thread_info->suspend.stop_pc.
3254         * inferior.h (stop_pc): Delete declaration.
3255         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3256         (handle_inferior_event_1, handle_signal_stop)
3257         (process_event_stop_test, keep_going_stepped_thread)
3258         (handle_step_into_function, handle_step_into_function_backward)
3259         (print_stop_location): Replace references to stop_pc with
3260         references to thread_info->suspend.stop_pc.
3261         (struct infcall_suspend_state) <stop_pc>: Delete field.
3262         (save_infcall_suspend_state, restore_infcall_suspend_state):
3263         Remove references to inf_stat->stop_pc.
3264         * linux-fork.c (fork_load_infrun_state): Likewise.
3265         * record-btrace.c (record_btrace_set_replay): Likewise.
3266         * record-full.c (record_full_goto_entry): Likewise.
3267         * remote.c (print_one_stopped_thread): Likewise.
3268         * target.c (target_resume): Extend comment.
3269         * thread.c (set_executing_thread): New.
3270         (set_executing): Use it.
3271         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3272         Remove references to stop_pc.
3273
3274 2018-06-28  Pedro Alves  <palves@redhat.com>
3275
3276         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3277         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3278
3279 2018-06-28  Tom Tromey  <tom@tromey.com>
3280
3281         * coffread.c (coff_symfile_finish): Update.
3282         * xcoffread.c (xcoff_symfile_finish): Update.
3283         * elfread.c (elf_symfile_finish): Update.
3284         * symfile.h (dwarf2_free_objfile): Don't declare.
3285         * dwarf2read.c (_initialize_dwarf2_read): Use
3286         register_objfile_data_with_cleanup.
3287         (dwarf2_free_objfile): Now static.  Change signature.
3288
3289 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3290
3291         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3292         option "-o" to add-symbol-file-load to add an offset to each
3293         section's load address.
3294         * symfile.c (set_objfile_default_section_offset): New function.
3295
3296 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3297
3298         * symfile.c (add_symbol_file_command): Make sure that sections
3299         with the same name are sorted in the same order.
3300
3301 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3302
3303         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3304         require the second argument.  If omitted, load sections at the
3305         addresses specified in the file.
3306
3307 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3308
3309         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3310         (_initialize_symfile): Add option "-o" to symbol-file to add an
3311         offset to each section of the symbol file.
3312
3313 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3314
3315         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3316
3317 2018-06-27  Tom Tromey  <tom@tromey.com>
3318
3319         * stack.c (_initialize_stack): Update "func" help text.
3320
3321 2018-06-27  Tom Tromey  <tom@tromey.com>
3322
3323         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3324         std::vector.
3325         (unwind_infopy_str, pyuw_create_unwind_info)
3326         (unwind_infopy_add_saved_register, pyuw_sniffer)
3327         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3328         Update.
3329         (struct saved_reg): Add constructor.
3330         <value>: Now a gdbpy_ref<>.
3331
3332 2018-06-27  Tom Tromey  <tom@tromey.com>
3333
3334         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3335
3336 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3337
3338         * gdb-gdb.py.in: Format using autopep8.
3339
3340 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3341
3342         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3343         (type_lookup_function): Recognize CORE_ADDR values.
3344
3345 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3346
3347         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3348         print tag_name.
3349
3350 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3351
3352         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3353         <__lt__>: Add.
3354
3355 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3356
3357         * gdb-gdb.py: Move to...
3358         * gdb-gdb.py.in: ... here.
3359         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3360         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3361         dependencies.
3362         (distclean): Remove gdb-gdb.py when cleaning.
3363         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3364         * configure: Re-generate.
3365
3366 2018-06-27  Pedro Alves  <palves@redhat.com>
3367
3368         * proc-service.c (get_ps_regcache): New.
3369         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3370         (ps_lsetfpregs): Use it.
3371
3372 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3373
3374         PR gdb/21695
3375         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3376         (dwarf_decode_lines_1): Adjust.
3377
3378 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3379
3380         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3381         override.
3382         <info_proc>: Likewise.
3383
3384 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3385
3386         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3387         to windows_fetch_one_register, and only handle the case of
3388         fetching one register.  Move the code that reloads the context
3389         and iterates over all registers if R is negative to...
3390         (windows_nat_target::fetch_registers): ... here.
3391         (do_windows_store_inferior_registers): Rename to
3392         windows_store_one_register, and only handle the case of storing
3393         one register.  Move the code that handles the case where r is
3394         negative to...
3395         (windows_nat_target::store_registers) ... here.
3396
3397 2018-06-26  Tom Tromey  <tom@tromey.com>
3398
3399         PR rust/22574:
3400         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3401         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3402         Update.
3403         (rust_internal_print_type): Add podata parameter.
3404         (rust_print_type): Update.
3405
3406 2018-06-26  Tom Tromey  <tom@tromey.com>
3407
3408         * typeprint.h (struct print_offset_data) <update, finish,
3409         maybe_print_hole>: New methods.
3410         <indentation>: New constant.
3411         * typeprint.c (print_offset_data::indentation): Define.
3412         (print_offset_data::maybe_print_hole, print_offset_data::update)
3413         (print_offset_data::finish): Move from c-typeprint.c and rename.
3414         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3415         (print_spaces_filtered_with_print_options): Update.
3416         (c_print_type_union_field_offset, maybe_print_hole)
3417         (c_print_type_struct_field_offset): Move to typeprint.c and
3418         rename.
3419         (c_type_print_base_struct_union): Update.
3420
3421 2018-06-25  Pedro Alves  <palves@redhat.com>
3422
3423         * gdbthread.h (thread_info_ref, delete_thread)
3424         (delete_thread_silent, first_thread_of_inferior)
3425         (any_thread_of_inferior, switch_to_thread)
3426         (enable_thread_stack_temporaries)
3427         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3428         (get_last_thread_stack_temporary)
3429         (value_in_thread_stack_temporaries, can_access_registers_thread):
3430         Spell out "struct thread_info" instead of just "thread_info".
3431         * inferior.h (notice_new_inferior): Likewise.
3432
3433 2018-06-25  Pedro Alves  <palves@redhat.com>
3434
3435         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3436         pass thread_info pointer to delete_thread.
3437         (windows_nat_target::detach): Pass inferior pointer to
3438         detach_inferior.
3439         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3440         delete_thread.
3441         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3442         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3443         and pass a thread_info pointer to delete_thread.
3444         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3445         pass thread_info pointer to delete_thread.
3446         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3447         delete_thread_silent call.
3448         * procfs.c (procfs_target::detach): Pass inferior pointer to
3449         detach_inferior.
3450         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3451         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3452         delete_thread_silent call.
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         delete_inferior.
3457
3458 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3459
3460         * regcache.c (readable_regcache::read_part): Fix asserts.
3461         (reg_buffer::raw_collect_part): New function.
3462         (regcache::write_part): Fix asserts.
3463         (reg_buffer::raw_supply_part): New function.
3464         (regcache::transfer_regset_register): New helper function.
3465         (regcache::transfer_regset): Call new functions.
3466         (regcache_supply_regset): Use gdb_byte*.
3467         (regcache::supply_regset): Likewise.
3468         (regcache_collect_regset): Likewise.
3469         (regcache::collect_regset): Likewise.
3470         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3471         (reg_buffer::raw_supply_part): Likewise.
3472         (regcache::transfer_regset_register): Likewise.
3473         (regcache::transfer_regset): Use gdb_byte*.
3474
3475 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3476
3477         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3478
3479 2018-06-21  Pedro Alves  <palves@redhat.com>
3480
3481         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3482         instead of a ptid_t.  All callers adjusted.
3483         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3484         adjusted.
3485         (print_ada_task_info, display_current_task_id, task_command_1):
3486         Adjust.
3487         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3488         inferior_thread.
3489         (breakpoint_kind): Adjust.
3490         (remove_breakpoints_pid): Rename to ...
3491         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3492         pointer.  All callers adjusted.
3493         (bpstat_clear_actions): Use inferior_thread.
3494         (get_bpstat_thread): New.
3495         (bpstat_do_actions): Use it.
3496         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3497         to take a thread_info pointer.  All callers adjusted.
3498         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3499         (breakpoint_re_set_thread): Use inferior_thread.
3500         * breakpoint.h (struct inferior): Forward declare.
3501         (bpstat_stop_status): Update.
3502         (remove_breakpoints_pid): Delete.
3503         (remove_breakpoints_inf): New.
3504         * bsd-uthread.c (bsd_uthread_target::wait)
3505         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3506         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3507         (maint_btrace_packet_history_cmd)
3508         (maint_btrace_clear_packet_history_cmd): Adjust.
3509         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3510         inferior_thread.
3511         * cli/cli-interp.c: Include "inferior.h".
3512         * common/refcounted-object.h (struct
3513         refcounted_object_ref_policy): New.
3514         * compile/compile-object-load.c: Include gdbthread.h.
3515         (store_regs): Use inferior_thread.
3516         * corelow.c (core_target::close): Use current_inferior.
3517         (core_target_open): Adjust to use first_thread_of_inferior and use
3518         the current inferior.
3519         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3520         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3521         <thread>: ... this new field.  All references adjusted.
3522         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3523         Take a thread_info pointer instead of a ptid_t.
3524         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3525         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3526         thread_info pointer instead of a ptid_t.
3527         * elfread.c: Include "inferior.h".
3528         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3529         Use inferior_thread.
3530         * eval.c (evaluate_subexp): Likewise.
3531         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3532         inferior_thread.
3533         * gdb_proc_service.h (struct thread_info): Forward declare.
3534         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3535         <thread>: ... this new field.  All references adjusted.
3536         * gdbarch.h, gdbarch.c: Regenerate.
3537         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3538         'thread' parameter.  All implementations and callers adjusted.
3539         * gdbthread.h (thread_info) <set_running>: New method.
3540         (delete_thread, delete_thread_silent): Take a thread_info pointer
3541         instead of a ptid.
3542         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3543         (first_thread_of_process): Delete, replaced by ...
3544         (first_thread_of_inferior): ... this new function.  All callers
3545         adjusted.
3546         (any_live_thread_of_process): Delete, replaced by ...
3547         (any_live_thread_of_inferior): ... this new function.  All callers
3548         adjusted.
3549         (switch_to_thread, switch_to_no_thread): Declare.
3550         (is_executing): Delete.
3551         (enable_thread_stack_temporaries): Update comment.
3552         <enable_thread_stack_temporaries>: Take a thread_info pointer
3553         instead of a ptid_t.  Incref the thread.
3554         <~enable_thread_stack_temporaries>: Decref the thread.
3555         <m_ptid>: Delete
3556         <m_thr>: New.
3557         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3558         (get_last_thread_stack_temporary)
3559         (value_in_thread_stack_temporaries, can_access_registers_thread):
3560         Take a thread_info pointer instead of a ptid_t.  All callers
3561         adjusted.
3562         * infcall.c (get_call_return_value): Use inferior_thread.
3563         (run_inferior_call): Work with thread pointers instead of ptid_t.
3564         (call_function_by_hand_dummy): Work with thread pointers instead
3565         of ptid_t.  Use thread_info_ref.
3566         * infcmd.c (proceed_thread_callback): Access thread's state
3567         directly.
3568         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3569         access thread's state directly.
3570         (continue_command): Use inferior_thread.
3571         (info_program_command): Use find_thread_ptid and access thread
3572         state directly.
3573         (proceed_after_attach_callback): Use thread state directly.
3574         (notice_new_inferior): Take a thread_info pointer instead of a
3575         ptid_t.  All callers adjusted.
3576         (exit_inferior): Take an inferior pointer instead of a pid.  All
3577         callers adjusted.
3578         (exit_inferior_silent): New.
3579         (detach_inferior): Delete.
3580         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3581         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3582         (detach_inferior_command, kill_inferior_command): Use
3583         find_inferior_id instead of valid_gdb_inferior_id and
3584         gdb_inferior_id_to_pid.
3585         (inferior_command): Use inferior and thread pointers.
3586         * inferior.h (struct thread_info): Forward declare.
3587         (notice_new_inferior): Take a thread_info pointer instead of a
3588         ptid_t.  All callers adjusted.
3589         (detach_inferior): Delete declaration.
3590         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3591         instead of a pid.  All callers adjusted.
3592         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3593         (valid_gdb_inferior_id): Delete.
3594         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3595         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3596         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3597         ...
3598         <inf>: ... this new field.
3599         <step_ptid>: Delete, replaced by ...
3600         <step_thread>: ... this new field.
3601         (get_displaced_stepping_state): Take an inferior pointer instead
3602         of a pid.  All callers adjusted.
3603         (displaced_step_in_progress_any_inferior): Adjust.
3604         (displaced_step_in_progress_thread): Take a thread pointer instead
3605         of a ptid_t.  All callers adjusted.
3606         (displaced_step_in_progress, add_displaced_stepping_state): Take
3607         an inferior pointer instead of a pid.  All callers adjusted.
3608         (get_displaced_step_closure_by_addr): Adjust.
3609         (remove_displaced_stepping_state): Take an inferior pointer
3610         instead of a pid.  All callers adjusted.
3611         (displaced_step_prepare_throw, displaced_step_prepare)
3612         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3613         All callers adjusted.
3614         (start_step_over): Adjust.
3615         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3616         displaced step queue.
3617         (do_target_resume): Adjust.
3618         (fetch_inferior_event): Use inferior_thread.
3619         (context_switch, get_inferior_stop_soon): Take an
3620         execution_control_state pointer instead of a ptid_t.  All callers
3621         adjusted.
3622         (switch_to_thread_cleanup): Delete.
3623         (stop_all_threads): Use scoped_restore_current_thread.
3624         * inline-frame.c: Include "gdbthread.h".
3625         (inline_state) <inline_state>: Take a thread pointer instead of a
3626         ptid_t.  All callers adjusted.
3627         <ptid>: Delete, replaced by ...
3628         <thread>: ... this new field.
3629         (find_inline_frame_state): Take a thread pointer instead of a
3630         ptid_t.  All callers adjusted.
3631         (skip_inline_frames, step_into_inline_frame)
3632         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3633         pointer instead of a ptid_t.  All callers adjusted.
3634         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3635         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3636         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3637         pointers directly.
3638         * linux-nat.c (get_detach_signal): Likewise.
3639         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3640         (thread_db_notice_clone): Adjust.
3641         (thread_db_find_new_threads_silently)
3642         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3643         a thread pointer instead of a ptid_t.  All callers adjusted.
3644         * mi/mi-cmd-var.c: Include "inferior.h".
3645         (mi_cmd_var_update_iter): Update to use thread pointers.
3646         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3647         inferior directly.
3648         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3649         out to ...
3650         (mi_output_running): ... this new function.
3651         (mi_on_resume_1): Adjust to use it.
3652         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3653         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3654         directly.
3655         (interrupt_thread_callback): : Adjust to use thread and inferior
3656         pointers.
3657         * proc-service.c: Include "gdbthread.h".
3658         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3659         * progspace-and-thread.c: Include "inferior.h".
3660         * progspace.c: Include "inferior.h".
3661         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3662         hold a reference to an inferior_object.
3663         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3664         inferior_thread.
3665         * python/py-inferior.c (struct inferior_object): Give the type a
3666         tag name instead of a typedef.
3667         (python_on_normal_stop): No need to check if the current thread is
3668         listed.
3669         (inferior_to_inferior_object): Change return type to
3670         inferior_object.  All callers adjusted.
3671         (find_thread_object): Delete, bits factored out to ...
3672         (thread_to_thread_object): ... this new function.
3673         * python/py-infthread.c (create_thread_object): Use
3674         inferior_to_inferior_object.
3675         (thpy_is_stopped): Use thread pointer directly.
3676         (gdbpy_selected_thread): Use inferior_thread.
3677         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3678         field, replaced with ...
3679         <thread>: ... this new field.  All users adjusted.
3680         (btpy_insn_or_gap_new): Drop const.
3681         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3682         callers adjusted.
3683         * python/py-record.c: Include "gdbthread.h".
3684         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3685         a ptid_t.  All callers adjusted.
3686         (gdbpy_current_recording): Use inferior_thread.
3687         * python/py-record.h (recpy_record_object) <ptid>: Delete
3688         field, replaced with ...
3689         <thread>: ... this new field.  All users adjusted.
3690         (recpy_element_object) <ptid>: Delete
3691         field, replaced with ...
3692         <thread>: ... this new field.  All users adjusted.
3693         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3694         a ptid_t.  All callers adjusted.
3695         * python/py-threadevent.c: Include "gdbthread.h".
3696         (get_event_thread): Use thread_to_thread_object.
3697         * python/python-internal.h (struct inferior_object): Forward
3698         declare.
3699         (find_thread_object, find_inferior_object): Delete declarations.
3700         (thread_to_thread_object, inferior_to_inferior_object): New
3701         declarations.
3702         * record-btrace.c: Include "inferior.h".
3703         (require_btrace_thread): Use inferior_thread.
3704         (record_btrace_frame_sniffer)
3705         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3706         (get_thread_current_frame): Use scoped_restore_current_thread and
3707         switch_to_thread.
3708         (get_thread_current_frame): Use thread pointer directly.
3709         (record_btrace_replay_at_breakpoint): Use thread's inferior
3710         pointer directly.
3711         * record-full.c: Include "inferior.h".
3712         * regcache.c: Include "gdbthread.h".
3713         (get_thread_arch_regcache): Use the inferior's address space
3714         directly.
3715         (get_thread_regcache, registers_changed_thread): New.
3716         * regcache.h (get_thread_regcache(thread_info *thread)): New
3717         overload.
3718         (registers_changed_thread): New.
3719         (remote_target) <remote_detach_1>: Swap order of parameters.
3720         (remote_add_thread): <remote_add_thread>: Return the new thread.
3721         (get_remote_thread_info(ptid_t)): New overload.
3722         (remote_target::remote_notice_new_inferior): Use thread pointers
3723         directly.
3724         (remote_target::process_initial_stop_replies): Use
3725         thread_info::set_running.
3726         (remote_target::remote_detach_1, remote_target::detach)
3727         (extended_remote_target::detach): Adjust.
3728         * stack.c (frame_show_address): Use inferior_thread.
3729         * target-debug.h (target_debug_print_thread_info_pp): New.
3730         * target-delegates.c: Regenerate.
3731         * target.c (default_thread_address_space): Delete.
3732         (memory_xfer_partial_1): Use current_inferior.
3733         (target_detach): Use current_inferior.
3734         (target_thread_address_space): Delete.
3735         (generic_mourn_inferior): Use current_inferior.
3736         * target.h (struct target_ops) <thread_address_space>: Delete.
3737         (target_thread_address_space): Delete.
3738         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3739         pointers directly.
3740         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3741         thread pointer instead of a ptid_t.  Adjust all callers.
3742         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3743         (first_thread_of_process): Delete, replaced by ...
3744         (first_thread_of_inferior): ... this new function.  All callers
3745         adjusted.
3746         (any_thread_of_process): Rename to ...
3747         (any_thread_of_inferior): ... this, and take an inferior pointer.
3748         (any_live_thread_of_process): Rename to ...
3749         (any_live_thread_of_inferior): ... this, and take an inferior
3750         pointer.
3751         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3752         (value_in_thread_stack_temporaries)
3753         (get_last_thread_stack_temporary): Take a thread pointer instead
3754         of a ptid_t.  Adjust all callers.
3755         (thread_info::set_running): New.
3756         (validate_registers_access): Use inferior_thread.
3757         (can_access_registers_ptid): Rename to ...
3758         (can_access_registers_thread): ... this, and take a thread
3759         pointer.
3760         (print_thread_info_1): Adjust to compare thread pointers instead
3761         of ptids.
3762         (switch_to_no_thread, switch_to_thread): Make extern.
3763         (scoped_restore_current_thread::~scoped_restore_current_thread):
3764         Use m_thread pointer directly.
3765         (scoped_restore_current_thread::scoped_restore_current_thread):
3766         Use inferior_thread.
3767         (thread_command): Use thread pointer directly.
3768         (thread_num_make_value_helper): Use inferior_thread.
3769         * top.c (execute_command): Use inferior_thread.
3770         * tui/tui-interp.c: Include "inferior.h".
3771         * varobj.c (varobj_create): Use inferior_thread.
3772         (value_of_root_1): Use find_thread_global_id instead of
3773         global_thread_id_to_ptid.
3774
3775 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3776
3777         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3778         possible.
3779         (regcache::write_part): Likewise.
3780         (readable_regcache::cooked_read_part): Update comment.
3781         (readable_regcache::cooked_write_part): Likewise.
3782         * regcache.h: (readable_regcache::read_part): Likewise.
3783         (regcache::write_part): Likewise.
3784
3785 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3786             Dirk Schubert  <dirk.schubert@arm.com>
3787
3788         * aarch64-linux-nat.c (post_attach): New.
3789         (aarch64_linux_nat_target::post_attach): Override post_attach to
3790         record the number of hardware debug registers.
3791
3792 2018-06-20  Tom Tromey  <tom@tromey.com>
3793
3794         * python/py-param.c (add_setshow_generic): Make parameters const.
3795         (parmpy_init): Update.
3796
3797 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3798
3799         * regcache.h (regcache_cooked_read_ftype): Rename to...
3800         (register_read_ftype): ...this, change type to function_view.
3801         (class reg_buffer) <save>: Remove src parameter.
3802         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3803         parameter non-const in first overload.  Remove src parameter in
3804         second overload.
3805         * regcache.c (do_cooked_read): Remove.
3806         (readonly_detached_regcache::readonly_detached_regcache): Make
3807         parameter non-const, adjust call to other constructor.
3808         (reg_buffer::save): Remove src parameter.
3809         * frame.c (do_frame_register_read): Remove.
3810         (frame_save_as_regcache): Use lambda function.
3811         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3812         parameter to ppu2spu_data *.
3813         (ppu2spu_sniffer): Use lambda function.
3814
3815 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3816
3817         * record-full.c (record_full_target::insert_breakpoint): Remove
3818         "struct" keyword, add const.
3819
3820 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3821
3822         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3823         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3824         * configure.ac: Remove AC_PREREQ, add missing quoting.
3825         * gnulib/configure.ac: Modernize usage of
3826         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3827         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3828         (AUTOMAKE_VERSION): Bump to 1.15.1.
3829         * configure: Re-generate.
3830         * config.in: Re-generate.
3831         * aclocal.m4: Re-generate.
3832         * gnulib/aclocal.m4: Re-generate.
3833         * gnulib/config.in: Re-generate.
3834         * gnulib/configure: Re-generate.
3835         * gnulib/import/Makefile.in: Re-generate.
3836
3837 2018-06-19  Pedro Alves  <palves@redhat.com>
3838
3839         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3840         (lookup_minimal_symbol_by_pc_section): ... here with
3841         gdb_assert_not_reached added.
3842
3843 2018-06-19  Pedro Alves  <palves@redhat.com>
3844
3845         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3846         parameter with a block parameter.  Compare location's block symbol
3847         with the frame's block instead of addresses.
3848         (skip_inline_frames): Pass the current block instead of the
3849         frame's address.  Break out as soon as we determine the frame
3850         should not be skipped.
3851
3852 2018-06-18  Tom Tromey  <tom@tromey.com>
3853
3854         * solib-aix.c (solib_aix_get_section_offsets): Return
3855         unique_xmalloc_ptr.
3856         (solib_aix_solib_create_inferior_hook): Update.
3857
3858 2018-06-18  Tom Tromey  <tom@tromey.com>
3859
3860         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3861
3862 2018-06-18  Tom Tromey  <tom@tromey.com>
3863
3864         * solib-frv.c (frv_relocate_main_executable): Use
3865         unique_xmalloc_ptr.
3866         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3867         unique_xmalloc_ptr.
3868
3869 2018-06-18  Tom Tromey  <tom@tromey.com>
3870
3871         * objfiles.h (inhibit_section_map_updates): Update.
3872         (resume_section_map_updates, resume_section_map_updates_cleanup):
3873         Remove.
3874         * solib-svr4.c (svr4_handle_solib_event): Update.
3875         * objfiles.c (inhibit_section_map_updates): Return
3876         scoped_restore_tmpl<int>.
3877         (resume_section_map_updates, resume_section_map_updates_cleanup):
3878         Remove.
3879
3880 2018-06-18  Tom Tromey  <tom@tromey.com>
3881
3882         * valprint.h (read_string): Update.
3883         * valprint.c (read_string): Change type of "buffer".
3884         (val_print_string): Update.
3885         * python/py-value.c (valpy_string): Update.
3886         * language.h (struct language_defn) <la_get_string>: Change
3887         type of "buffer".
3888         (default_get_string, c_get_string): Update.
3889         * language.c (default_get_string): Change type of "buffer".
3890         * guile/scm-value.c (gdbscm_value_to_string): Update.
3891         * c-lang.c (c_get_string): Change type of "buffer".
3892
3893 2018-06-18  Tom Tromey  <tom@tromey.com>
3894
3895         * ser-mingw.c (struct pipe_state_destroyer): New.
3896         (pipe_state_up): New typedef.
3897         (cleanup_pipe_state): Remove.
3898         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
3899
3900 2018-06-18  Tom Tromey  <tom@tromey.com>
3901
3902         * rust-lang.h (rust_yyerror): Don't declare.
3903         * rust-lang.c (rust_language_defn): Update.
3904         * rust-exp.y (yyerror): Now static.
3905         * parse.c (parse_exp_in_context_1): Update.
3906         * p-lang.h (p_yyerror): Don't declare.
3907         * p-lang.c (p_language_defn): Update.
3908         * p-exp.y (yyerror): Now static.
3909         * opencl-lang.c (opencl_language_defn): Update.
3910         * objc-lang.c (objc_language_defn): Update.
3911         * m2-lang.h (m2_yyerror): Don't declare.
3912         * m2-lang.c (m2_language_defn): Update.
3913         * m2-exp.y (yyerror): Now static.
3914         * language.h (struct language_defn) <la_error>: Remove.
3915         * language.c (unk_lang_error): Remove.
3916         (unknown_language_defn, auto_language_defn): Remove.
3917         * go-lang.h (go_yyerror): Don't declare.
3918         * go-lang.c (go_language_defn): Update.
3919         * go-exp.y (yyerror): Now static.
3920         * f-lang.h (f_yyerror): Don't declare.
3921         * f-lang.c (f_language_defn): Update.
3922         * f-exp.y (yyerror): Now static.
3923         * d-lang.h (d_yyerror): Don't declare.
3924         * d-lang.c (d_language_defn): Update.
3925         * d-exp.y (yyerror): Now static.
3926         * c-lang.h (c_yyerror): Don't declare.
3927         * c-lang.c (c_language_defn, cplus_language_defn)
3928         (asm_language_defn, minimal_language_defn): Update.
3929         * c-exp.y (yyerror): Now static.
3930         * ada-lang.h (ada_yyerror): Don't declare.
3931         * ada-lang.c (ada_language_defn): Update.
3932         * ada-exp.y (yyerror): Now static.
3933
3934 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3935
3936         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3937         (store_sveregs_to_thread): Likewise.
3938         (aarch64_linux_fetch_inferior_registers): Check for SVE.
3939         (aarch64_linux_store_inferior_registers): Likewise.
3940         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3941         function.
3942         (aarch64_sve_regs_copy_to_regcache): Likewise.
3943         (aarch64_sve_regs_copy_from_regcache): Likewise.
3944         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3945         declaration.
3946         (aarch64_sve_regs_copy_to_regcache): Likewise.
3947         (aarch64_sve_regs_copy_from_regcache): Likewise.
3948         (sve_context): Structure from Linux headers.
3949         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3950         (SVE_SIG_ZREG_SIZE): Likewise.
3951         (SVE_SIG_PREG_SIZE): Likewise.
3952         (SVE_SIG_FFR_SIZE): Likewise.
3953         (SVE_SIG_REGS_OFFSET): Likewise.
3954         (SVE_SIG_ZREGS_OFFSET): Likewise.
3955         (SVE_SIG_ZREG_OFFSET): Likewise.
3956         (SVE_SIG_ZREGS_SIZE): Likewise.
3957         (SVE_SIG_PREGS_OFFSET): Likewise.
3958         (SVE_SIG_PREG_OFFSET): Likewise.
3959         (SVE_SIG_PREGS_SIZE): Likewise.
3960         (SVE_SIG_FFR_OFFSET): Likewise.
3961         (SVE_SIG_REGS_SIZE): Likewise.
3962         (SVE_SIG_CONTEXT_SIZE): Likewise.
3963         (SVE_PT_REGS_MASK): Likewise.
3964         (SVE_PT_REGS_FPSIMD): Likewise.
3965         (SVE_PT_REGS_SVE): Likewise.
3966         (SVE_PT_VL_INHERIT): Likewise.
3967         (SVE_PT_VL_ONEXEC): Likewise.
3968         (SVE_PT_REGS_OFFSET): Likewise.
3969         (SVE_PT_FPSIMD_OFFSET): Likewise.
3970         (SVE_PT_FPSIMD_SIZE): Likewise.
3971         (SVE_PT_SVE_ZREG_SIZE): Likewise.
3972         (SVE_PT_SVE_PREG_SIZE): Likewise.
3973         (SVE_PT_SVE_FFR_SIZE): Likewise.
3974         (SVE_PT_SVE_FPSR_SIZE): Likewise.
3975         (SVE_PT_SVE_FPCR_SIZE): Likewise.
3976         (__SVE_SIG_TO_PT): Likewise.
3977         (SVE_PT_SVE_OFFSET): Likewise.
3978         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3979         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3980         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3981         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3982         (SVE_PT_SVE_PREG_OFFSET): Likewise.
3983         (SVE_PT_SVE_PREGS_SIZE): Likewise.
3984         (SVE_PT_SVE_FFR_OFFSET): Likewise.
3985         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3986         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3987         (SVE_PT_SVE_SIZE): Likewise.
3988         (SVE_PT_SIZE): Likewise.
3989         (HAS_SVE_STATE): New define.
3990
3991 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3992
3993         * nat/aarch64-sve-linux-sigcontext.h: New file.
3994         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3995         new files.
3996         (SVE_VQ_MIN): Likewise.
3997         (SVE_VQ_MAX): Likewise.
3998         (SVE_VL_MIN): Likewise.
3999         (SVE_VL_MAX): Likewise.
4000         (SVE_NUM_ZREGS): Likewise.
4001         (SVE_NUM_PREGS): Likewise.
4002         (sve_vl_valid): Likewise.
4003         (struct user_sve_header): Likewise.
4004
4005 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4006             Richard Bunt <Richard.Bunt@arm.com>
4007
4008         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4009         was requested by GDB.
4010
4011 2018-06-15  Tom de Vries  <tdevries@suse.de>
4012
4013         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4014
4015 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4016
4017         * gnulib/update-gnulib.sh: Print expected versions of
4018         autoconf/aclocal.
4019
4020 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4021
4022         * arch-utils.c (default_type_align): Use type_length_units.
4023         * gdbtypes.c (type_align): Use type_length_units.
4024
4025 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4026
4027         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4028         of 'define' command.
4029
4030 2018-06-14  Tom de Vries  <tdevries@suse.de>
4031
4032         PR cli/22573
4033         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4034         get_no_prettyformat_print_options.
4035
4036 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4037
4038         * sparc-nat.h: Include target.h.
4039         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4040         <fetch_registers>: Remove this argument in function call.
4041         <store_registers>: Remove this argument in function call, remove
4042         extra semicolon.
4043         <low_forget_process>: Call sparc64_forget_process instead of
4044         sparc_forget_process.
4045
4046 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4047
4048         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4049         (procfs_target::make_corefile_notes): Adjust to new
4050         target_read_alloc return type.
4051
4052 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4053             Stephen Roberts  <stephen.roberts@arm.com>
4054
4055         PR gdb/22882
4056         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4057         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4058         Move should_notify_stop local into more inner scope.
4059
4060 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4061             Stephen Roberts  <stephen.roberts@arm.com>
4062
4063         PR gdb/22882
4064         * infrun.c (resume_1): Add call to mark_async_event_handler.
4065
4066 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4067
4068         * infrun.c (do_target_wait): Change old version of $pc printed.
4069
4070 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4071
4072         * dwarf2read.c (read_index_from_section): Rename to...
4073         (read_gdb_index_from_section): ... this, update all callers.
4074         (dwarf2_read_index): Rename to...
4075         (dwarf2_read_gdb_index): ... this, update all callers.
4076
4077 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4078
4079         * gdb/hppa-linux-nat.c
4080         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4081         hppa_linux_nat_target::fetch_registers.
4082
4083 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4084
4085         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4086         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4087         (AARCH64_DWARF_SVE_FFR): Likewise.
4088         (AARCH64_DWARF_SVE_P0): Likewise.
4089         (AARCH64_DWARF_SVE_Z0): Likewise.
4090
4091 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4092
4093         * common/common-regcache.h (raw_compare): New function.
4094         * regcache.c (regcache::raw_compare): Likewise.
4095         * regcache.h (regcache::raw_compare): New declaration.
4096
4097 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4098
4099         * common/common-regcache.h (reg_buffer_common): New structure.
4100         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4101         (reg_buffer::raw_supply): Likewise.
4102         (reg_buffer::raw_supply_integer): Likewise.
4103         (reg_buffer::raw_supply_zeroed): Likewise.
4104         (reg_buffer::raw_collect): Likewise.
4105         (reg_buffer::raw_collect_integer): Likewise.
4106         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4107         (reg_buffer::raw_supply): Likewise.
4108         (reg_buffer::raw_supply_integer): Likewise.
4109         (reg_buffer::raw_supply_zeroed): Likewise.
4110         (reg_buffer::raw_collect): Likewise.
4111         (reg_buffer::raw_collect_integer): Likewise.
4112
4113 2018-06-10  Tom Tromey  <tom@tromey.com>
4114
4115         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4116         (class remote_state) <stop_reply_queue>: Now std::vector.
4117         (remote_state::~remote_state)
4118         (remote_target::stop_reply_queue_length): Update.
4119         (struct queue_iter_param, remove_child_of_pending_fork)
4120         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4121         (check_pending_event_prevents_wildcard_vcont_callback)
4122         (remove_stop_reply_for_inferior)
4123         (remove_stop_reply_of_remote_state)
4124         (remote_notif_remove_once_on_match)
4125         (stop_reply_match_ptid_and_ws)
4126         (remote_kill_child_of_pending_fork): Remove.
4127         (remote_target::remove_new_fork_children)
4128         (remote_target::check_pending_events_prevent_wildcard_vcont)
4129         (remote_target::discard_pending_stop_replies)
4130         (remote_target::discard_pending_stop_replies_in_queue)
4131         (remote_target::remote_notif_remove_queued_reply)
4132         (remote_target::queued_stop_reply)
4133         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4134         (remote_target::wait, remote_target::kill_new_fork_children)
4135         (remote_target::async): Update.
4136
4137 2018-06-10  Tom Tromey  <tom@tromey.com>
4138
4139         * record-full.c (record_full_arch_list_cleanups): Remove.
4140         (record_full_message): Use try/catch.
4141         (record_full_wait_cleanups): Remove.
4142         (record_full_wait_1): Use try/catch.
4143         (record_full_restore): Likewise.
4144
4145 2018-06-10  Tom Tromey  <tom@tromey.com>
4146
4147         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4148         declare VEC.  Add constructor.
4149         <in_target_beneath>: Now bool.
4150         (record_full_breakpoints): Now a std::vector, static.
4151         (record_full_sync_record_breakpoints)
4152         (record_full_init_record_breakpoints)
4153         (record_full_target::insert_breakpoint)
4154         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4155
4156 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4157
4158         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4159         * serial.c (serial_interface_lookup): Remove struct keyword.
4160
4161 2018-06-10  Tom Tromey  <tom@tromey.com>
4162
4163         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4164         method.
4165         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4166         a method.
4167         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4168         method.
4169         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4170         "beneath" as a method.
4171         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4172         Use "beneath" as a method.
4173
4174 2018-06-10  Tom Tromey  <tom@tromey.com>
4175
4176         * tracefile.c (struct trace_file_writer_deleter): New.
4177         <operator()>: Rename from trace_file_writer_xfree.
4178         (trace_file_writer_up): New typedef.
4179         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4180
4181 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4182
4183         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4184         <m_registers, m_register_status>: Change type to
4185         std::unique_ptr.
4186         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4187         XCNEWVEC.
4188
4189 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4190
4191         * common/common-regcache.h (enum register_status): Add
4192         underlying type "signed char".
4193         * regcache.h (reg_buffer) <m_register_status>: Change type to
4194         register_status *.
4195         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4196         register_status instead of signed char.
4197         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4198         (reg_buffer::get_register_status): Remove cast.
4199         (readable_regcache::raw_read): Remove cast.
4200         (readable_regcache::cooked_read): Remove cast.
4201
4202 2018-06-09  Tom Tromey  <tom@tromey.com>
4203
4204         * source.c (reverse_search_command, forward_search_command): Use
4205         scoped_fd.
4206
4207 2018-06-09  Tom Tromey  <tom@tromey.com>
4208
4209         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4210         (serial_ops_list): Now static, std::vector.
4211         (serial_interface_lookup, serial_add_interface): Update.
4212
4213 2018-06-09  Tom Tromey  <tom@tromey.com>
4214
4215         * dwarf2read.c (process_cu_includes): Update.
4216         (process_full_comp_unit): Update.
4217         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4218         std::vector.
4219
4220 2018-06-08  Paul Koning  <paul_koning@dell.com>
4221
4222         PR gdb/23252
4223
4224         * python/python.c (do_start_initialization):
4225         Avoid call to internal Python API.
4226         (init__gdb_module): New function.
4227
4228 2018-06-08  Gary Benson <gbenson@redhat.com>
4229
4230         * linux-thread-db.c (valprint.h): New include.
4231         (struct check_thread_db_info): New structure.
4232         (check_thread_db_on_load, tdb_testinfo): New static globals.
4233         (check_thread_db, check_thread_db_callback): New functions.
4234         (try_thread_db_load_1): Run integrity checks if requested.
4235         (maintenance_check_libthread_db): New function.
4236         (_initialize_thread_db): Register "maint check libthread-db"
4237         and "maint set/show check-libthread-db".
4238         * NEWS: Mention the above new commands.
4239
4240 2018-06-08  Tom Tromey  <tom@tromey.com>
4241
4242         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4243         now a method.
4244
4245 2018-06-08  Tom Tromey  <tom@tromey.com>
4246
4247         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4248
4249 2018-06-08  Tom Tromey  <tom@tromey.com>
4250
4251         * common/btrace-common.h (struct btrace_data): Add constructor,
4252         destructor, move assignment operator.
4253         <empty, clear, fini>: New methods.
4254         <format>: Initialize.
4255         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4256         (btrace_data_empty): Don't declare.
4257         * common/btrace-common.c (btrace_data_init): Remove.
4258         (btrace_data::fini): Rename from btrace_data_fini.
4259         (btrace_data::empty): Rename from btrace_data_empty.
4260         (btrace_data::clear): Rename from btrace_data_clear.  Return
4261         bool.
4262         * btrace.h (make_cleanup_btrace_data): Don't declare.
4263         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4264         (parse_xml_btrace): Update.
4265         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4266         (maint_btrace_clear_packet_history_cmd): Update.
4267
4268 2018-06-07  Pedro Alves  <palves@redhat.com>
4269
4270         * target.h (target_ops) <beneath>: Now a method.  All references
4271         updated.
4272         (class target_stack): New.
4273         * target.c (g_target_stack): New.
4274         (g_current_top_target): Delete.
4275         (current_top_target): Get the top target out of g_target_stack.
4276         (target_stack::push, target_stack::unpush): New.
4277         (push_target, unpush_target): Reimplement.
4278         (target_is_pushed): Reimplement in terms of g_target_stack.
4279         (target_ops::beneath, target_stack::find_beneath): New.
4280
4281 2018-06-07  Pedro Alves  <palves@redhat.com>
4282
4283         * target.h (find_target_beneath): Delete declaration.
4284         * target.c (find_target_beneath): Delete definition.
4285         * aix-thread.c: All callers of find_target_beneath adjusted to
4286         call target_ops::beneath instead.
4287         * bsd-uthread.c: Likewise.
4288         * linux-thread-db.c: Likewise.
4289         * ravenscar-thread.c: Likewise.
4290         * sol-thread.c: Likewise.
4291         * spu-multiarch.c: Likewise.
4292
4293 2018-06-07  Pedro Alves  <palves@redhat.com>
4294
4295         * target.h (target_ops) <beneath>: Now a method.  All references
4296         updated.
4297         (target_ops) <m_beneath>: New.
4298         * target.c (target_ops::beneath): New.
4299         * corelow.c: Adjust all references to target_ops::beneath.
4300         * linux-thread-db.c: Likewise.
4301         * make-target-delegates: Likewise.
4302         * record-btrace.c: Likewise.
4303         * record-full.c: Likewise.
4304         * remote.c: Likewise.
4305         * target.c: Likewise.
4306         * target-delegates.c: Regenerate.
4307
4308 2018-06-07  Pedro Alves  <palves@redhat.com>
4309
4310         * target.h (target_stack): Delete.
4311         (current_top_target): Declare function.
4312         * target.c (target_stack): Delete.
4313         (g_current_top_target): New.
4314         (current_top_target): New function.
4315         * auxv.c: Use current_top_target instead of target_stack
4316         throughout.
4317         * avr-tdep.c: Likewise.
4318         * breakpoint.c: Likewise.
4319         * corefile.c: Likewise.
4320         * elfread.c: Likewise.
4321         * eval.c: Likewise.
4322         * exceptions.c: Likewise.
4323         * frame.c: Likewise.
4324         * gdbarch-selftests.c: Likewise.
4325         * gnu-v3-abi.c: Likewise.
4326         * ia64-tdep.c: Likewise.
4327         * ia64-vms-tdep.c: Likewise.
4328         * infcall.c: Likewise.
4329         * infcmd.c: Likewise.
4330         * infrun.c: Likewise.
4331         * linespec.c: Likewise.
4332         * linux-tdep.c: Likewise.
4333         * minsyms.c: Likewise.
4334         * ppc-linux-nat.c: Likewise.
4335         * ppc-linux-tdep.c: Likewise.
4336         * procfs.c: Likewise.
4337         * regcache.c: Likewise.
4338         * remote.c: Likewise.
4339         * rs6000-tdep.c: Likewise.
4340         * s390-linux-nat.c: Likewise.
4341         * s390-tdep.c: Likewise.
4342         * solib-aix.c: Likewise.
4343         * solib-darwin.c: Likewise.
4344         * solib-dsbt.c: Likewise.
4345         * solib-spu.c: Likewise.
4346         * solib-svr4.c: Likewise.
4347         * solib-target.c: Likewise.
4348         * sparc-tdep.c: Likewise.
4349         * sparc64-tdep.c: Likewise.
4350         * spu-tdep.c: Likewise.
4351         * symfile.c: Likewise.
4352         * symtab.c: Likewise.
4353         * target-descriptions.c: Likewise.
4354         * target-memory.c: Likewise.
4355         * target.c: Likewise.
4356         * target.h: Likewise.
4357         * tracefile-tfile.c: Likewise.
4358         * tracepoint.c: Likewise.
4359         * valops.c: Likewise.
4360         * valprint.c: Likewise.
4361         * value.c: Likewise.
4362         * windows-tdep.c: Likewise.
4363         * mi/mi-main.c: Likewise.
4364
4365 2018-06-07  Tom Tromey  <tom@tromey.com>
4366
4367         * valprint.h (build_address_symbolic): Declare.
4368         * printcmd.c (print_address_symbolic): Update.
4369         (build_address_symbolic): Change "name" and "filename" to
4370         std::string.
4371         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4372         Update.
4373         * defs.h (build_address_symbolic): Remove declaration.
4374
4375 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4376
4377         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4378         (aarch64_vnv_type): Add function.
4379         (aarch64_pseudo_register_name): Add V regs for SVE.
4380         (aarch64_pseudo_register_type): Likewise.
4381         (aarch64_pseudo_register_reggroup_p): Likewise.
4382         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4383         (aarch64_pseudo_read_value): Add V regs for SVE.
4384         (aarch64_pseudo_write_2): Use V0 offset for SVE
4385         (aarch64_pseudo_write): Add V regs for SVE.
4386         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4387
4388 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4389
4390         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4391         (sve_vl_from_vq): Likewise.
4392
4393 2018-06-05  Tom Tromey  <tom@tromey.com>
4394
4395         * cli/cli-cmds.c (show_version): Update.
4396         * top.c (print_gdb_version): Add "interactive" parameter.
4397         Update.
4398         * main.c (captured_main_1): Update.
4399         * top.h (print_gdb_version): Add "interactive" parameter and a
4400         comment.
4401
4402 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4403
4404         * common/enum-flags.h: Add trailing semicolon to example in
4405         comment.
4406
4407 2018-06-05  Tom Tromey  <tom@tromey.com>
4408
4409         PR cli/12326:
4410         * NEWS: Add entry about pager.
4411         * utils.c (pagination_disabled_for_command): New global.
4412         (prompt_for_continue): Allow "c" response to prompt.
4413         (reinitialize_more_filter): Clear
4414         pagination_disabled_for_command.
4415         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4416
4417 2018-06-04  Tom Tromey  <tom@tromey.com>
4418
4419         * ada-lang.h (ada_lookup_symbol_list): Update.
4420         * ada-lang.c (resolve_subexp): Update.
4421         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4422         parameter.
4423         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4424         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4425         results parameter to std::vector.
4426         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4427         Update.
4428         * ada-exp.y (block_lookup): Update.
4429         (select_possible_type_sym): Change type of syms.  Remove nsyms
4430         parameter.
4431         (write_var_or_type, write_name_assoc): Update.
4432
4433 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4434
4435         * windows-nat.c (windows_nat_target::xfer_partial): Return
4436         TARGET_XFER_E_IO if we need to delegate to the target beneath
4437         but BENEATH is NULL.
4438
4439 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4440
4441         * Makefile.in (config.status): Add configure.nat as a
4442         dependency.
4443
4444 2018-06-04  Tom Tromey  <tom@tromey.com>
4445
4446         * cp-name-parser.y (cpname_state): Add method declarations.
4447         (HANDLE_QUAL): Update.
4448         (cpname_state::d_grab, cpname_state::fill_comp)
4449         (cpname_state::make_operator, cpname_state::make_dtor)
4450         (cpname_state::make_builtin_type, cpname_state::make_name)
4451         (cpname_state::d_qualify, cpname_state::d_int_type)
4452         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4453         (%union): Move earlier.
4454
4455 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4456
4457         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4458
4459 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4460
4461         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4462         (aarch64_pseudo_write_1): Likewise.
4463         (aarch64_pseudo_read_value): Use helper.
4464         (aarch64_pseudo_write): Likewise.
4465
4466 2018-06-04  Pedro Alves  <palves@redhat.com>
4467
4468         * darwin-nat.c (darwin_ops): Delete.
4469         (darwin_attach_pid): Use get_native_target.
4470
4471 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4472
4473         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4474         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4475
4476 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4477
4478         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4479         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4480         (aarch64_gdbarch_init): Check for SVE.
4481         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4482
4483 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4484
4485         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4486         * aarch64-tdep.h (aarch64_read_description): Likewise.
4487         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4488         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4489         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4490         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4491         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4492
4493 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4494
4495         * value.c (value_fetch_lazy_bitfield): New.
4496         (value_fetch_lazy_memory): New.
4497         (value_fetch_lazy_register): New.
4498         (value_fetch_lazy): Factor out to smaller functions.
4499
4500 2018-06-01  Tom Tromey  <tom@tromey.com>
4501
4502         * cp-name-parser.y (backslashable, represented): Now const.
4503
4504 2018-06-01  Tom Tromey  <tom@tromey.com>
4505
4506         * cp-name-parser.y: Include parser-defs.h.
4507         (parser_fprintf): Remove declaration.
4508
4509 2018-06-01  Tom Tromey  <tom@tromey.com>
4510
4511         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4512         %parse-param.
4513         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4514         (global_result): Remove globals.
4515         (struct cpname_state): New.
4516         (yyparse): Don't declare.
4517         (yylex, yyerror): Move declarations after %union.
4518         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4519         (make_name): Add state parameter.
4520         Update all callers.
4521         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4522         parameter.
4523         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4524         Update.
4525         (yylex): Add lvalp, state parameters.
4526         (yyerror): Add state parameter.
4527         (cp_demangled_name_to_comp): Update.
4528
4529 2018-06-01  Tom Tromey  <tom@tromey.com>
4530
4531         * cp-name-parser.y (parser_fprintf): Declare.
4532         (GDB_YY_REMAP_PREFIX): Define.
4533         Include yy-remap.h.  Don't redefine yy* identifiers.
4534
4535 2018-06-01  Tom Tromey  <tom@tromey.com>
4536
4537         * python/py-type.c (typy_legacy_template_argument): Update.
4538         * cp-support.h (cp_demangled_name_to_comp): Update.
4539         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4540         parameter to be a "std::string *".
4541         (main): Update.
4542
4543 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4544
4545         * ada-lex.l: Include "diagnostics.h" instead of
4546         "common/diagnostics.h".
4547         * unittests/environ-selftests.c: Likewise.
4548         * common/diagnostics.h: Moved to ../include.
4549
4550 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4551
4552         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4553         to language_mode_manual while calling breakpoint_re_set_one.
4554
4555 2018-06-01  Tom Tromey  <tom@tromey.com>
4556
4557         * valops.c (value_cast_structs, destructor_name_p): Update.
4558         * symtab.c (gdb_mangle_name): Update.
4559         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4560         Update.
4561         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4562         (pascal_object_print_value_fields, pascal_object_print_value):
4563         Update.
4564         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4565         * linespec.c (find_methods): Update.
4566         * gdbtypes.h (type_name_no_tag): Remove.
4567         (type_name_or_error): Rename from type_name_no_tag_or_error.
4568         * gdbtypes.c (type_name_no_tag): Remove.
4569         (type_name_or_error): Rename from type_name_no_tag_or_error.
4570         (lookup_struct_elt_type, check_typedef): Update.
4571         * expprint.c (print_subexp_standard): Update.
4572         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4573         * d-namespace.c (d_lookup_nested_symbol): Update.
4574         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4575         (cp_print_class_member): Update.
4576         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4577         * completer.c (add_struct_fields): Update.
4578         * c-typeprint.c (cp_type_print_derivation_info)
4579         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4580         Update.
4581         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4582         (ada_prefer_type, ada_is_exception_sym): Update.
4583
4584 2018-06-01  Tom Tromey  <tom@tromey.com>
4585
4586         * valops.c (enum_constant_from_type, value_namespace_elt)
4587         (value_maybe_namespace_elt): Update.
4588         * valarith.c (find_size_for_pointer_math): Update.
4589         * target-descriptions.c (make_gdb_type): Update.
4590         * symmisc.c (print_symbol): Update.
4591         * stabsread.c (define_symbol, read_type)
4592         (complain_about_struct_wipeout, add_undefined_type)
4593         (cleanup_undefined_types_1): Update.
4594         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4595         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4596         (rust_internal_print_type, rust_composite_type)
4597         (rust_evaluate_funcall, rust_evaluate_subexp)
4598         (rust_inclusive_range_type_p): Update.
4599         * python/py-type.c (typy_get_tag): Update.
4600         * p-typeprint.c (pascal_type_print_base): Update.
4601         * mdebugread.c (parse_symbol, parse_type): Update.
4602         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4603         Update.
4604         * guile/scm-type.c (gdbscm_type_tag): Update.
4605         * go-lang.c (sixg_string_p): Update.
4606         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4607         Update.
4608         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4609         (TYPE_TAG_NAME): Remove.
4610         * gdbtypes.c (type_name_no_tag): Simplify.
4611         (check_typedef, check_types_equal, recursive_dump_type)
4612         (copy_type_recursive, arch_composite_type): Update.
4613         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4614         in summary mode when needed.
4615         * eval.c (evaluate_funcall): Update.
4616         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4617         (process_structure_scope, read_enumeration_type)
4618         (read_namespace_type, read_module_type, determine_prefix): Update.
4619         * cp-support.c (inspect_type): Update.
4620         * coffread.c (process_coff_symbol, decode_base_type): Update.
4621         * c-varobj.c (c_is_path_expr_parent): Update.
4622         * c-typeprint.c (c_type_print_base_struct_union): Update.
4623         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4624         summary when using C language.
4625         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4626         (gen_maybe_namespace_elt): Update.
4627         * ada-lang.c (ada_type_name): Simplify.
4628         (empty_record, ada_template_to_fixed_record_type_1)
4629         (template_to_static_fixed_type)
4630         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4631
4632 2018-06-01  Tom Tromey  <tom@tromey.com>
4633
4634         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4635         c_print_type.
4636         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4637         (c_print_type): Update.
4638         (c_print_type): New overload.
4639         (c_type_print_varspec_prefix, c_type_print_args)
4640         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4641         (c_type_print_base_struct_union, c_type_print_base_1)
4642         (cp_type_print_method_args): Add "language" parameter.
4643         (c_type_print_base): Update.
4644         * c-lang.h (c_print_type): Add new overload.
4645
4646 2018-06-01  Tom Tromey  <tom@tromey.com>
4647
4648         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4649         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4650
4651 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4652
4653         * aarch64-tdep.c (aarch64_sve_register_names): New const
4654         var.
4655         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4656         (AARCH64_SVE_Z_REGS_NUM): New define.
4657         (AARCH64_SVE_P_REGS_NUM): Likewise.
4658         (AARCH64_SVE_NUM_REGS): Likewise.
4659
4660 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4661
4662         * nat/linux-ptrace.h [__alpha__]
4663         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4664         definitions.
4665
4666 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4667
4668         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4669         the endianness selected.
4670         * NEWS: Document `set endian auto' mode operation update.
4671
4672 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4673
4674         * Makefile.in: Add new header.
4675         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4676         (sve_vl_from_vg): Likewise.
4677         (sve_vq_from_vl): Likewise.
4678         (sve_vl_from_vq): Likewise.
4679         (sve_vq_from_vg): Likewise.
4680         (sve_vg_from_vq): Likewise.
4681         * configure.nat: Add new c file.
4682         * nat/aarch64-sve-linux-ptrace.c: New file.
4683         * nat/aarch64-sve-linux-ptrace.h: New file.
4684
4685 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4686
4687         * aarch64-linux-nat.c (aarch64_linux_read_description):
4688         Add parmeter zero.
4689         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4690         Likewise.
4691         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4692         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4693         (aarch64_gdbarch_init): Add parmeter zero.
4694         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4695         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4696         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4697         parmeter.
4698         * doc/gdb.texinfo: Describe SVE feature
4699         * features/aarch64-sve.c: New file.
4700
4701 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4702
4703         PR gdb/23210
4704         * gdbarch.sh (significant_addr_bit): Default to zero when
4705         not set by target architecture.
4706         * gdbarch.c: Re-generated.
4707         * utils.c (address_significant): Update.
4708
4709 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4710
4711         * stack.c (func_command): Remove trailing newline in call to error.
4712
4713 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4714
4715         * regcache.h (regcache_raw_collect): Remove, update callers to
4716         use regcache::raw_collect.
4717         * regcache.c (regcache_raw_collect): Remove.
4718
4719 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4720
4721         * regcache.h (regcache_raw_supply): Remove, update callers to
4722         use detached_regcache::raw_supply.
4723         * regcache.c (regcache_raw_supply): Remove.
4724
4725 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4726
4727         * regcache.h (regcache_cooked_write_part): Remove, update
4728         callers to use regcache::cooked_write_part.
4729         * regcache.c (regcache_cooked_write_part): Remove.
4730
4731 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4732
4733         * regcache.h (regcache_cooked_read_part): Remove, update callers
4734         to use readable_regcache::cooked_read_part.
4735         * regcache.c (regcache_cooked_read_part): Remove.
4736
4737 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4738
4739         * regcache.h (regcache_cooked_read_value): Remove, update
4740         callers to use readable_regcache::cooked_read_value.
4741         * regcache.c (regcache_cooked_read_value): Remove.
4742
4743 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4744
4745         * regcache.h (regcache_cooked_write): Remove, update callers to
4746         use regcache::cooked_write.
4747         * regcache.c (regcache_cooked_write): Remove.
4748
4749 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4750
4751         * regcache.h (regcache_invalidate): Remove, update callers to
4752         use detached_regcache::invalidate instead.
4753         * regcache.c (regcache_invalidate): Remove.
4754
4755 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4756
4757         * regcache.h (regcache_raw_write_part): Remove, update callers
4758         to use regcache::raw_write_part instead.
4759         * regcache.c (regcache_raw_write_part): Remove.
4760
4761 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4762
4763         * regcache.h (regcache_raw_read_part): Remove, update callers to
4764         use readable_regcache::raw_read_part instead.
4765         * regcache.c (regcache_raw_read_part): Remove.
4766
4767 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4768
4769         * regcache.h (regcache_cooked_read): Remove, update callers to
4770         use readable_regcache::cooked_read instead.
4771         * regcache.c (regcache_cooked_read): Remove.
4772
4773 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4774
4775         * regcache.h (regcache_raw_write): Remove, update callers to use
4776         regcache::raw_write instead.
4777         * regcache.c (regcache_raw_write): Remove.
4778
4779 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4780
4781         * regcache.h (regcache_raw_read): Remove, update callers to use
4782         readable_regcache::raw_read instead.
4783         * regcache.c (regcache_raw_read): Remove.
4784
4785 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4786
4787         * regcache.h (regcache_raw_update): Remove, update callers to
4788         use readable_regcache::raw_update instead.
4789         * regcache.c (regcache_raw_update): Remove.
4790
4791 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4792
4793         * regcache.h (regcache_register_status): Remove, update callers
4794         to use reg_buffer::get_register_status directly instead.
4795         * regcache.c (regcache_register_status): Remove.
4796
4797 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4798
4799         * regcache.h (regcache_get_ptid): Remove, update all callers to
4800         call regcache::ptid instead.
4801         * regcache.c (regcache_get_ptid): Remove.
4802
4803 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4804
4805         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4806
4807 2018-05-30  Pedro Alves  <palves@redhat.com>
4808
4809         * common/common-exceptions.h (exception_rethrow): Use
4810         ATTRIBUTE_NORETURN.
4811
4812 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4813
4814         * breakpoint.c (print_solib_event, check_status_catch_solib):
4815         Remove struct keyword in range-based for loops.
4816         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4817         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4818         Likewise.
4819         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4820         Likewise.
4821         * symfile.c (addr_info_make_relative): Likewise.
4822         * thread.c (value_in_thread_stack_temporaries): Likewise.
4823
4824 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4825
4826         PR gdb/16841
4827         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4828         aggregate type to get its real type before accessing it.
4829
4830 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4831
4832         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4833         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4834         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4835         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4836         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4837         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4838         * printcmd.c (info_address_command): Likewise.
4839
4840 2018-05-29  Tom Tromey  <tom@tromey.com>
4841
4842         * windows-nat.c (handle_exception): Update fall-through comment.
4843
4844 2018-05-29  Tom Tromey  <tom@tromey.com>
4845
4846         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4847         (struct program_space) <added_solibs>: Now a std::vector.
4848         * breakpoint.c (print_solib_event): Update.
4849         (check_status_catch_solib): Update.
4850         * progspace.c (clear_program_space_solib_cache): Update.
4851         * solib.c (update_solib_list): Update.
4852
4853 2018-05-29  Tom Tromey  <tom@tromey.com>
4854
4855         * python/py-type.c (typy_richcompare): Update.
4856         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4857         * gdbtypes.h (types_deeply_equal): Return bool.
4858         (types_equal): Likewise.
4859         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4860         declare VEC.
4861         (check_types_equal): Change worklist to std::vector.  Return
4862         bool.
4863         (struct type_equality_entry): Add constructor.
4864         (compare_maybe_null_strings): Return bool.
4865         (check_types_worklist): Return bool.  Change worklist to
4866         std::vector.
4867         (types_deeply_equal): Use std::vector.
4868         (types_equal): Return bool.
4869         (compare_maybe_null_strings): Simplify.
4870
4871 2018-05-29  Tom Tromey  <tom@tromey.com>
4872
4873         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4874
4875 2018-05-29  Tom Tromey  <tom@tromey.com>
4876
4877         * objc-lang.h: Don't include cp-support.h.
4878         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4879         declare VEC.
4880
4881 2018-05-27  Tom Tromey  <tom@tromey.com>
4882
4883         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4884
4885 2018-05-25  Tom Tromey  <tom@tromey.com>
4886
4887         * value.c (value::location): Initialize.
4888
4889 2018-05-25  Tom Tromey  <tom@tromey.com>
4890
4891         * dbxread.c (init_bincl_list): Remove.
4892         (bincl_list): Now a std::vector.
4893         (bincls_allocated, next_bincl): Remove.
4894         (free_bincl_list, do_free_bincl_list_cleanup)
4895         (make_cleanup_free_bincl_list): Remove.
4896         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4897         unique_xmalloc_ptr.
4898         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4899         (struct header_file_location): Add constructor.
4900         (add_bincl_to_list): Remove.
4901
4902 2018-05-25  Tom Tromey  <tom@tromey.com>
4903
4904         * tui/tui.c (tui_enable): Update.
4905         * mi/mi-interp.c (mi_interp::init): Update.
4906         * interps.h (class interp) <name>: New method.
4907         <m_name>: Rename from name.
4908         (~scoped_restore_interp): Update.
4909         * interps.c (interp::interp): Update.
4910         (interp_add, interp_set, interp_lookup_existing)
4911         (current_interp_named_p): Update.
4912
4913 2018-05-25  Tom Tromey  <tom@tromey.com>
4914
4915         * interps.c (interp_name): Remove.
4916         * mi/mi-interp.c (mi_interp::init): Update.
4917         * interps.h (interp_name): Remove.
4918         (~scoped_restore_interp): Update.
4919         * tui/tui.c (tui_enable): Update.
4920
4921 2018-05-25  Tom Tromey  <tom@tromey.com>
4922
4923         * utils.c (fputs_maybe_filtered): Update.
4924         * linespec.c (decode_line_full): Update.
4925         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4926         (mi_print_breakpoint_for_event, mi_solib_loaded)
4927         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4928         (mi_user_selected_context_changed): Update.
4929         * mi/mi-main.c (mi_execute_command): Update.
4930         * cli/cli-script.c (execute_control_command): Update.
4931         * python/python.c (execute_gdb_command): Update.
4932         * solib.c (info_sharedlibrary_command): Update.
4933         * interps.c (interp_ui_out): Remove.
4934         * interps.h (interp_ui_out): Remove.
4935
4936 2018-05-25  Tom Tromey  <tom@tromey.com>
4937
4938         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4939         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4940         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4941
4942 2018-05-25  Tom Tromey  <tom@tromey.com>
4943
4944         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4945         * interps.c (interp_exec): Use scoped_restore.
4946
4947 2018-05-25  Tom Tromey  <tom@tromey.com>
4948
4949         * remote.c (remote_target::remote_file_get): Use
4950         gdb::byte_vector.
4951         (remote_target::remote_file_put): Likewise.
4952
4953 2018-05-25  Tom Tromey  <tom@tromey.com>
4954
4955         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4956         a std::string.
4957         (get_pe_section_index, add_pe_exported_sym): Update.
4958         (read_pe_exported_syms): Use gdb::def_vector.
4959
4960 2018-05-25  Tom Tromey  <tom@tromey.com>
4961
4962         * frame.c (remove_prev_frame): Remove.
4963         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4964
4965 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
4966
4967         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4968         Remove prototypes.
4969         * mips-linux-nat.c (supply_fpregset): Always call
4970         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4971         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4972         `mips_fill_fpregset'.
4973         * mips-linux-tdep.c (mips_supply_fpregset)
4974         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4975         (mips_fill_fpregset_wrapper): Remove functions.
4976         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4977         (mips_linux_fpregset): Remove variable.
4978         (mips_linux_iterate_over_regset_sections): Use
4979         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4980         (mips_linux_o32_sigframe_init): Remove comment.
4981
4982 2018-05-25  Pedro Alves  <palves@redhat.com>
4983
4984         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4985         (struct readahead_cache, struct packet_reg, struct
4986         remote_arch_state, class remote_state): Move higher up in the
4987         file.
4988         (remote_target::m_remote_state): Now an object instead of a pointer.
4989         (remote_target::get_remote_state): Adjust.
4990
4991 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4992
4993         * stack.c (select_and_print_frame): Delete.
4994         (struct function_bounds): Move struct within function.
4995         (func_command): Most content moved into new function
4996         find_frame_for_function, use new function, print result, add
4997         function comment.
4998         (find_frame_for_function): New function, now returns a result.
4999
5000 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5001
5002         * stack.c (iterate_over_block_arg_vars): Fix comment.
5003         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5004
5005 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5006
5007         PR gdb/23203
5008         * frame.c
5009         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5010         Define.
5011         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5012         Define.
5013         * frame.h (class scoped_restore_selected_frame): New class.
5014         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5015         of any exception, use scoped_restore_selected_frame to restore the
5016         frame instead.
5017
5018 2018-05-24  Pedro Alves  <palves@redhat.com>
5019
5020         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5021         override.
5022
5023 2018-05-23  Tom Tromey  <tom@tromey.com>
5024
5025         * complaints.c (struct complaints): Remove.
5026         (symfile_complaint_book): Remove.
5027         (series): New global.
5028         (complaint_internal): Update.
5029         (clear_complaints): Update.
5030
5031 2018-05-23  Tom Tromey  <tom@tromey.com>
5032
5033         * complaints.c (counters): New global.
5034         (struct complain): Remove.
5035         (struct complaints) <root>: Remove.
5036         (complaint_sentinel): Remove.
5037         (symfile_complaint_book): Update.
5038         (find_complaint) Remove.
5039         (complaint_internal, clear_complaints): Update.
5040
5041 2018-05-23  Tom Tromey  <tom@tromey.com>
5042
5043         * complaints.c (struct complain) <file, line>: Remove.
5044         (find_complaint): Remove file, line parameters.
5045         (complaint_internal): Update.
5046
5047 2018-05-23  Tom Tromey  <tom@tromey.com>
5048
5049         * complaints.c (vcomplaint): Remove.
5050         (complaint_internal) Merge in contents of vcomplaint.
5051
5052 2018-05-23  Tom Tromey  <tom@tromey.com>
5053
5054         * complaints.c (struct complaints) <explanation>: Remove.
5055         (symfile_explanations): Remove.
5056         (symfile_complaint_book): Update.
5057         (vcomplaint): Update.
5058         (struct explanation): Remove.
5059
5060 2018-05-23  Tom Tromey  <tom@tromey.com>
5061
5062         * complaints.c (symfile_complaints): Remove.
5063         (complaint_internal): Remove "complaints" parameter.
5064         (clear_complaints, vcomplaint): Remove "c" parameter.
5065         (get_complaints): Remove.
5066         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5067         (dwarf2_debug_line_missing_file_complaint)
5068         (dwarf2_debug_line_missing_end_sequence_complaint)
5069         (dwarf2_complex_location_expr_complaint)
5070         (dwarf2_const_value_length_mismatch_complaint)
5071         (dwarf2_section_buffer_overflow_complaint)
5072         (dwarf2_macro_malformed_definition_complaint)
5073         (dwarf2_invalid_attrib_class_complaint)
5074         (create_addrmap_from_index, dw2_symtab_iter_next)
5075         (dw2_expand_marked_cus)
5076         (dw2_debug_names_iterator::find_vec_in_debug_names)
5077         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5078         (create_debug_type_hash_table, init_cutu_and_read_dies)
5079         (partial_die_parent_scope, add_partial_enumeration)
5080         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5081         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5082         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5083         (create_cus_hash_table, create_dwp_hash_table)
5084         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5085         (dwarf2_rnglists_process, dwarf2_ranges_process)
5086         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5087         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5088         (handle_struct_member_die, process_structure_scope)
5089         (read_array_type, read_common_block, read_module_type)
5090         (read_tag_pointer_type, read_typedef, read_base_type)
5091         (read_subrange_type, load_partial_dies, partial_die_info::read)
5092         (partial_die_info::read, partial_die_info::read)
5093         (partial_die_info::read, read_checked_initial_length_and_offset)
5094         (dwarf2_string_attr, read_formatted_entries)
5095         (dwarf_decode_line_header)
5096         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5097         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5098         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5099         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5100         (get_signatured_type, get_DW_AT_signature_type)
5101         (decode_locdesc, file_file_name, consume_improper_spaces)
5102         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5103         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5104         (dwarf2_symbol_mark_computed, set_die_type)
5105         (read_attribute_value): Update.
5106         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5107         Update.
5108         * dbxread.c (unknown_symtype_complaint)
5109         (lbrac_mismatch_complaint, repeated_header_complaint)
5110         (set_namestring, function_outside_compilation_unit_complaint)
5111         (read_dbx_symtab, process_one_symbol): Update.
5112         * gdbtypes.c (stub_noname_complaint): Update.
5113         * windows-nat.c (handle_unload_dll): Update.
5114         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5115         (decode_base_type): Update.
5116         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5117         (eb_complaint, record_include_begin, record_include_end)
5118         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5119         (process_xcoff_symbol, read_symbol)
5120         (function_outside_compilation_unit_complaint)
5121         (scan_xcoff_symtab): Update.
5122         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5123         * buildsym.c (finish_block_internal, make_blockvector)
5124         (end_symtab_get_static_block, augment_type_symtab): Update.
5125         * dtrace-probe.c (dtrace_process_dof)
5126         (dtrace_static_probe_ops::get_probes): Update.
5127         * complaints.h (struct complaint): Don't declare.
5128         (symfile_complaints): Remove.
5129         (complaint_internal): Remove "complaints" parameter.
5130         (complaint): Likewise.
5131         (clear_complaints): Likewise.
5132         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5133         (reread_symbols): Update.
5134         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5135         (dwarf2_frame_cache, decode_frame_entry): Update.
5136         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5137         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5138         (info_selectors_command): Update.
5139         * macrotab.c (macro_include, check_for_redefinition)
5140         (macro_undef): Update.
5141         * objfiles.c (filter_overlapping_sections): Update.
5142         * stabsread.c (invalid_cpp_abbrev_complaint)
5143         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5144         (define_symbol, error_type, read_type, rs6000_builtin_type)
5145         (stabs_method_name_from_physname, read_member_functions)
5146         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5147         (attach_fields_to_type, complain_about_struct_wipeout)
5148         (read_range_type, read_args, common_block_start)
5149         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5150         Update.
5151         * mdebugread.c (index_complaint, unknown_ext_complaint)
5152         (basic_type_complaint, bad_tag_guess_complaint)
5153         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5154         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5155         (parse_procedure, parse_lines)
5156         (function_outside_compilation_unit_complaint)
5157         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5158         (bad_tag_guess_complaint, reg_value_complaint): Update.
5159         * cp-support.c (demangled_name_complaint): Update.
5160         * macroscope.c (sal_macro_scope): Update.
5161         * dwarf-index-write.c (class debug_names): Update.
5162
5163 2018-05-23  Tom Tromey  <tom@tromey.com>
5164
5165         * complaints.c (clear_complaints): Remove "noisy" parameter.
5166         * complaints.h (clear_complaints): Update.
5167         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5168         (reread_symbols): Update.
5169
5170 2018-05-23  Tom Tromey  <tom@tromey.com>
5171
5172         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5173         SUBSEQUENT_MESSAGE.
5174         (vcomplaint, clear_complaints): Update.
5175         (symfile_explanations): Remove some messages.
5176
5177 2018-05-23  Tom Tromey  <tom@tromey.com>
5178
5179         * complaints.c (internal_complaint): Remove.
5180         * complaints.h (internal_complaint): Remove.
5181
5182 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5183
5184         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5185
5186 2018-05-22  Pedro Alves  <palves@redhat.com>
5187
5188         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5189         (remote_fileio_badfd, remote_fileio_return_errno)
5190         (remote_fileio_return_success, remote_fileio_func_open)
5191         (remote_fileio_func_open, remote_fileio_func_close)
5192         (remote_fileio_func_read, remote_fileio_func_write)
5193         (remote_fileio_func_lseek, remote_fileio_func_rename)
5194         (remote_fileio_func_unlink, remote_fileio_func_stat)
5195         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5196         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5197         remote_target parameter.
5198         (remote_fio_func_map) <func>: Add remote_target parameter.
5199         (do_remote_fileio_request, remote_fileio_request):
5200         * remote-fileio.h (remote_fileio_request):
5201         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5202         remote_target parameter.
5203         (remote_notif_process, handle_notification): Adjust to pass down
5204         the remote.
5205         (remote_notif_state_allocate): Add remote_target parameter.  Save
5206         it.
5207         * remote-notif.h (struct remote_target): Forward declare.
5208         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5209         remote_target parameter.
5210         (struct remote_notif_state) <remote>: New field.
5211         (remote_notif_ack, remote_notif_parse): Add remote_target
5212         parameter.
5213         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5214         remote_target parameter.
5215         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5216         (threads_listing_context, rmt_thread_action, protocol_feature)
5217         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5218         (packet_result, struct threads_listing_context, remote_state):
5219         Move definitions and declarations higher up.
5220         (remote_target) <~remote_target>: Declare.
5221         (remote_download_command_source, remote_file_put, remote_file_get)
5222         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5223         (remote_hostio_pread_vFile, remote_hostio_send_command)
5224         (remote_hostio_set_filesystem, remote_hostio_open)
5225         (remote_hostio_close, remote_hostio_unlink, remote_state)
5226         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5227         (get_memory_write_packet_size, get_memory_read_packet_size)
5228         (append_pending_thread_resumptions, remote_detach_1)
5229         (append_resumption, remote_resume_with_vcont)
5230         (add_current_inferior_and_thread, wait_ns, wait_as)
5231         (process_stop_reply, remote_notice_new_inferior)
5232         (process_initial_stop_replies, remote_add_thread)
5233         (btrace_sync_conf, remote_btrace_maybe_reopen)
5234         (remove_new_fork_children, kill_new_fork_children)
5235         (discard_pending_stop_replies, stop_reply_queue_length)
5236         (check_pending_events_prevent_wildcard_vcont)
5237         (discard_pending_stop_replies_in_queue, stop_reply)
5238         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5239         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5240         (remote_interrupt_as, remote_interrupt_ns)
5241         (remote_get_noisy_reply, remote_query_attached)
5242         (remote_add_inferior, remote_current_thread, get_current_thread)
5243         (set_thread, set_general_thread, set_continue_thread)
5244         (set_general_process, write_ptid)
5245         (remote_unpack_thread_info_response, remote_get_threadinfo)
5246         (parse_threadlist_response, remote_get_threadlist)
5247         (remote_threadlist_iterator, remote_get_threads_with_ql)
5248         (remote_get_threads_with_qxfer)
5249         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5250         (get_offsets, remote_check_symbols, remote_supported_packet)
5251         (remote_query_supported, remote_packet_size)
5252         (remote_serial_quit_handler, remote_detach_pid)
5253         (remote_vcont_probe, remote_resume_with_hc)
5254         (send_interrupt_sequence, interrupt_query)
5255         (remote_notif_get_pending_events, fetch_register_using_p)
5256         (send_g_packet, process_g_packet, fetch_registers_using_g)
5257         (store_register_using_P, store_registers_using_G)
5258         (set_remote_traceframe, check_binary_download)
5259         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5260         (remote_xfer_live_readonly_partial, remote_read_bytes)
5261         (remote_send_printf, remote_flash_write, readchar)
5262         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5263         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5264         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5265         (extended_remote_disable_randomization, extended_remote_run)
5266         (send_environment_packet, extended_remote_environment_support)
5267         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5268         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5269         (packet_command): Now methods of ...
5270         (remote_target): ... this class.
5271         (m_remote_state) <remote_target>: New field.
5272         (struct remote_state) <stop_reply_queue,
5273         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5274         fields.
5275         (remote_state::remote_state): Allocate stop_reply_queue.
5276         (remote_state): Delete global.
5277         (get_remote_state_raw): Delete.
5278         (remote_target::get_remote_state): Allocate m_remote_state on
5279         demand.
5280         (get_current_remote_target): New.
5281         (remote_ops, extended_remote_ops): Delete.
5282         (wait_forever_enabled_p, remote_async_inferior_event_token):
5283         Delete, moved to struct remote_state.
5284         (remote_target::close): Delete self.  Destruction bits split to
5285         ...
5286         (remote_target::~remote_target): ... this.
5287         (show_memory_packet_size): Adjust to use
5288         get_current_remote_target.
5289         (struct protocol_feature) <func>: Add remote_target parameter.
5290         All callers adjusted.
5291         (curr_quit_handler_target): New.
5292         (remote_serial_quit_handler): Reimplement.
5293         (remote_target::open_1): Adjust to use get_current_remote_target.
5294         Heap-allocate remote_target/extended_remote_target instances.
5295         (vcont_builder::vcont_builder): Add remote_target parameter, and
5296         save it in m_remote.  All callers adjusted.
5297         (vcont_builder::m_remote): New field.
5298         (vcont_builder::restart, vcont_builder::flush)
5299         (vcont_builder::push_action): Use it.
5300         (remote_target::commit_resume): Use it.
5301         (struct queue_iter_param) <remote>: New field.
5302         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5303         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5304         (check_pending_event_prevents_wildcard_vcont_callback)
5305         (remote_target::check_pending_events_prevent_wildcard_vcont)
5306         (remote_target::discard_pending_stop_replies)
5307         (remote_target::discard_pending_stop_replies_in_queue)
5308         (remote_target::remote_notif_remove_queued_reply): Fill in
5309         'remote' field.
5310         (remote_notif_get_pending_events): New.
5311         (remote_target::readchar, remote_target::remote_serial_write):
5312         Save/restore curr_quit_handler_target.
5313         (putpkt): New.
5314         (kill_new_fork_children): Fill in 'remote' field.
5315         (packet_command): Use get_current_remote_target, defer to
5316         remote_target method of same name.
5317         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5318         parameter, and save it in m_remote.  All callers adjusted.
5319         (scoped_remote_fd::release): Use m_remote.
5320         (scoped_remote_fd::m_remote): New field.
5321         (remote_file_put, remote_file_get, remote_file_delete): Use
5322         get_current_remote_target, defer to remote_target method of same
5323         name.
5324         (remote_btrace_reset): Add remote_state paremeter.  Update all
5325         callers.
5326         (remote_async_inferior_event_handler). Pass down 'data'.
5327         (remote_new_objfile): Use get_current_remote_target.
5328         (remote_target::vcont_r_supported): New.
5329         (set_range_stepping): Use get_current_remote_target and
5330         remote_target::vcont_r_supported.
5331         (_initialize_remote): Don't allocate 'remote_state' and
5332         'stop_reply_queue' globals.
5333         * remote.h (struct remote_target): Forward declare.
5334         (getpkt, putpkt, remote_notif_get_pending_events): Add
5335         'remote_target' parameter.
5336
5337 2018-05-22  Pedro Alves  <palves@redhat.com>
5338
5339         * remote.c (vcont_builder): Now a class.  Make all data members
5340         private.
5341         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5342         Declare methods.
5343         (vcont_builder_restart): Rename to ...
5344         (vcont_builder::restart): ... this.
5345         (vcont_builder_flush): Rename to ...
5346         (vcont_builder::flush): ... this.
5347         (vcont_builder_push_action): Rename to ...
5348         (vcont_builder::push_action): ... this.
5349         (remote_target::commit_resume): Adjust.
5350
5351 2018-05-22  Pedro Alves  <palves@redhat.com>
5352
5353         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5354         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5355         (get_fixed_memory_packet_size): New.
5356         (get_memory_packet_size): Use it.
5357         (set_memory_packet_size): Don't override the config size with
5358         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5359         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5360         Don't refer to get_memory_packet_size if not connected to a remote
5361         target.  Show "(default)" if configured size is 0.
5362
5363 2018-05-22  Pedro Alves  <palves@redhat.com>
5364
5365         * remote.c (remote_target::mourn_inferior): Move
5366         discard_pending_stop_replies call here from ...
5367         (_initialize_remote): ... here.
5368
5369 2018-05-22  Pedro Alves  <palves@redhat.com>
5370
5371         * remote.c (compare_section_command): Remove set_general_process
5372         call.
5373
5374 2018-05-22  Pedro Alves  <palves@redhat.com>
5375
5376         * remote.c (struct packet_reg, struct remote_arch_state):
5377         Move higher up in the file.
5378         (remote_state) <m_arch_states>: Store remote_arch_state values
5379         instead of remote_arch_state pointers.
5380         (remote_state::get_remote_arch_state): Adjust.
5381
5382 2018-05-22  Pedro Alves  <palves@redhat.com>
5383
5384         * remote.c: Include <unordered_map>.
5385         (remote_state): Now a class.
5386         (remote_state) <get_remote_arch_state>: Declare method.
5387         <get_remote_arch_state>: New field.
5388         (remote_arch_state) <remote_arch_state>: Declare ctor.
5389         <regs>: Now a unique_ptr.
5390         (remote_gdbarch_data_handle): Delete.
5391         (get_remote_arch_state): Delete.
5392         (remote_state::get_remote_arch_state): New.
5393         (get_remote_state): Adjust to call remote_state's
5394         get_remote_arch_state method.
5395         (init_remote_state): Delete, bits factored out to ...
5396         (remote_arch_state::remote_arch_state): ... this new method.
5397         (get_remote_packet_size, get_memory_packet_size)
5398         (process_g_packet, remote_target::fetch_registers)
5399         (remote_target::prepare_to_store, store_registers_using_G)
5400         (remote_target::store_registers, remote_target::get_trace_status):
5401         Adjust to call remote_state's method.
5402         (_initialize_remote): Remove reference to
5403         remote_gdbarch_data_handle.
5404
5405 2018-05-22  Pedro Alves  <palves@redhat.com>
5406
5407         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5408         pread>: New method declarations.
5409         (remote_target::open_1): Adjust.
5410         (readahead_cache_invalidate): Rename to ...
5411         (readahead_cache::invalidate): ... this, and adjust to be a class
5412         method.
5413         (readahead_cache_invalidate_fd): Rename to ...
5414         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5415         class method.
5416         (remote_hostio_pwrite): Adjust.
5417         (remote_hostio_pread_from_cache): Rename to ...
5418         (readahead_cache::pread): ... this, and adjust to be a class
5419         method.
5420         (remote_hostio_close): Adjust.
5421
5422 2018-05-22  Pedro Alves  <palves@redhat.com>
5423
5424         * remote.c (remote_hostio_close_cleanup): Delete.
5425         (class scoped_remote_fd): New.
5426         (remote_file_put, remote_file_get): Use it.
5427
5428 2018-05-22  Pedro Alves  <palves@redhat.com>
5429
5430         (struct vCont_action_support): Use bool and initialize all fields.
5431         (struct readahead_cache): Initialize all fields.
5432         (remote_state): Use bool and initialize all fields.
5433         (remote_state::remote_state, remote_state::~remote_state): New.
5434         (new_remote_state): Delete.
5435         (_initialize_remote): Use new to allocate remote_state.
5436
5437 2018-05-22  Pedro Alves  <palves@redhat.com>
5438             張俊芝  <zjz@zjz.name>
5439
5440         PR gdb/22973
5441         * c-exp.y: Include "c-support.h".
5442         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5443         of tolower.  Use c_ident_is_alpha to scan names.
5444         * c-lang.c: Include "c-support.h".
5445         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5446         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5447         * c-support.h: New file, with bits factored out from ...
5448         * cp-name-parser.y: ... this file.
5449         Include "c-support.h".
5450         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5451         c-support.h and renamed.
5452         (symbol_end, yylex): Adjust.
5453
5454 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5455
5456         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5457         parameter type to CORE_ADDR.
5458         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5459         parameter type in declaration to CORE_ADDR.
5460         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5461         target_auxv_search to get AT_HWCAP and use the result to get the
5462         target description.
5463         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5464         to CORE_ADDR. Remove the cast of the return value to unsigned
5465         long. Fix error predicate of target_auxv_search.
5466         (ppc_linux_nat_target::read_description): Change the type of the
5467         hwcap variable to CORE_ADDR.
5468
5469 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5470
5471         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5472         if the size of fpscr is larger than 32 bits.
5473
5474 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5475
5476         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5477         (ppc32_linux_vsxregmap): New global.
5478         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5479         regcache_supply_regset, and regcache_collect_regset.
5480         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5481         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5482         (fetch_vsx_register, store_vsx_register): Remove.
5483         (fetch_vsx_registers): Add regno parameter. Get regset using
5484         ppc_linux_vsxregset. Use regset to supply registers.
5485         (store_vsx_registers): Add regno parameter. Get regset using
5486         ppc_linux_vsxregset. Use regset to collect registers.
5487         (fetch_register): Call fetch_vsx_registers instead of
5488         fetch_vsx_register.
5489         (store_register): Call store_vsx_registers instead of
5490         store_vsx_register.
5491         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5492         new regno parameter.
5493         (store_ppc_registers): Call store_vsx_registers with -1 for the
5494         new regno parameter.
5495         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5496         (ppc_collect_vsxregset): Remove.
5497
5498 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5499
5500         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5501         offset fields.
5502         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5503         for vector register offset fields.
5504         (ppc64_fbsd_reg_offsets): Likewise.
5505         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5506         to vector register offset fields.
5507         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5508         to vector register offset fields.
5509         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5510         vector register offset fields.
5511         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5512         initializers for vector register offset fields.
5513         (rs6000_aix64_reg_offsets): Likewise.
5514         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5515         (ppc_supply_vrregset): Remove.
5516         (ppc_collect_vrregset): Remove.
5517         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5518         (ppc_linux_vrregset) : New function.
5519         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5520         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5521         (ppc32_linux_vrregset): Remove.
5522         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5523         and use result instead of ppc32_linux_vrregset.
5524         (ppc32_linux_reg_offsets): Remove initializers for vector register
5525         offset fields.
5526         (ppc64_linux_reg_offsets): Likewise.
5527         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5528         * ppc-linux-nat.c: Include regset.h.
5529         (gdb_vrregset_t): Adjust comment to account for little-endian
5530         mode.
5531         (supply_vrregset, fill_vrregset): Remove.
5532         (fetch_altivec_register, store_altivec_register): Remove.
5533         (fetch_altivec_registers): Add regno parameter. Get regset using
5534         ppc_linux_vrregset. Use regset to supply registers.
5535         (store_altivec_registers): Add regno parameter. Get regset using
5536         ppc_linux_vrregset. Use regset to collect registers.
5537         (fetch_register): Call fetch_altivec_registers instead of
5538         fetch_altivec_register.
5539         (store_register): Call store_altivec_registers instead of
5540         store_altivec_register.
5541         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5542         the new regno parameter.
5543         (store_ppc_registers): Call store_altivec_registers with -1 for
5544         the new regno parameter.
5545
5546 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5547
5548         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5549         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5550         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5551         (gdb_vrregset_t): Change array type size to
5552         PPC_LINUX_SIZEOF_VRREGSET.
5553         (gdb_vsxregset_t): Change array type size to
5554         PPC_LINUX_SIZEOF_VSXREGSET.
5555         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5556         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5557         PPC_LINUX_SIZEOF_VSXREGSET.
5558
5559 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5560
5561         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5562         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5563         nat/ppc-linux.c.
5564         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5565         ppc_linux_target_wordsize with tid.
5566         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5567         wordsize with tid.
5568         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5569         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5570         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5571         tid parameter. Remove static specifier.
5572         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5573         (ppc_linux_target_wordsize): New declaration.
5574
5575 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5576
5577         * arch/ppc-linux-common.c: New file.
5578         * arch/ppc-linux-common.h: New file.
5579         * arch/ppc-linux-tdesc.h: New file.
5580         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5581         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5582         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5583         arch/ppc-linux-tdesc.h.
5584         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5585         arch/ppc-linux-tdesc.h.
5586         (ppc_linux_nat_target::read_description): Remove target
5587         description matching code. Fill a ppc_linux_features struct and
5588         call ppc_linux_match_description with it. Move comment about ISA
5589         2.05 to ppc-linux-common.c.
5590         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5591         arch/ppc-linux-tdesc.h.
5592         (ppc_linux_core_read_description): Remove target description
5593         matching code. Fill a ppc_linux_features struct and call
5594         ppc_linux_match_description with it.
5595         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5596         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5597         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5598         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5599         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5600         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5601         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5602         (tdesc_powerpc_e500l): Remove.
5603
5604 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5605
5606         * ada-lang.c (catch_assert_command): Pass empty string instead
5607         of NULL for excep_string argument.
5608
5609 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5610
5611         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5612         the width of the requested register exceeds the width of the
5613         `ptrace' data type.
5614
5615 2018-05-21  Tom Tromey  <tom@tromey.com>
5616
5617         * printcmd.c (output_command): Remove.
5618         (output_command_const): Rename to output_command.
5619         * valprint.h (output_command): Rename from output_command_const.
5620         * tracepoint.c (trace_dump_actions): Call output_command.
5621
5622 2018-05-21  Tom Tromey  <tom@tromey.com>
5623
5624         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5625         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5626         * ada-lang.h (create_ada_exception_catchpoint): Update.
5627         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5628         std::string.
5629         (create_excep_cond_exprs, ~ada_catchpoint)
5630         (should_stop_exception, print_one_exception)
5631         (print_mention_exception, print_recreate_exception): Update.
5632         (ada_get_next_arg): Remove.
5633         (catch_ada_exception_command_split): Use std::string.  Change type
5634         of "excep_string", "cond_string".
5635         (catch_ada_exception_command): Update.
5636         (create_ada_exception_catchpoint): Change type of excep_string.
5637         (ada_exception_sal): Remove excep_string parameter.
5638         (~ada_catchpoint): Remove.
5639
5640 2018-05-21  Tom Tromey  <tom@tromey.com>
5641
5642         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5643         cleanup.
5644
5645 2018-05-21  Tom Tromey  <tom@tromey.com>
5646
5647         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5648         Return unique_xmalloc_ptr.
5649         (print_it_exception): Update.
5650
5651 2018-05-21  Tom Tromey  <tom@tromey.com>
5652
5653         * tracepoint.c (trace_dump_actions): Use std::string.
5654
5655 2018-05-21  Tom Tromey  <tom@tromey.com>
5656
5657         * symfile.c (reread_symbols): Use std::string for original_name.
5658
5659 2018-05-21  Tom Tromey  <tom@tromey.com>
5660
5661         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5662         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5663         constructor.
5664
5665 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5666
5667         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5668         instance to...
5669         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5670         * objfiles.c (get_objfile_bfd_data): Allocate
5671         objfile_per_bfd_storage with obstack_new when allocating on
5672         obstack.
5673
5674 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5675
5676         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5677         OBSTACK_ZALLOC.
5678         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5679         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5680         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5681         (add_pending): Likewise.
5682         (parse_symbol): Likewise.
5683         (parse_partial_symbols): Likewise.
5684         (psymtab_to_symtab_1): Likewise.
5685         (new_psymtab): Likewise.
5686         (elfmdebug_build_psymtabs): Likewise.
5687         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5688         * objfiles.c (get_objfile_bfd_data): Likewise.
5689         (objfile_register_static_link): Likewise.
5690         * psymtab.c (allocate_psymtab): Likewise.
5691         * stabsread.c (read_member_functions): Likewise.
5692         * xcoffread.c (xcoff_end_psymtab): Likewise.
5693
5694 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5695
5696         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5697         compiler supports std::is_trivially_constructible.
5698         * common/poison.h: Include obstack.h.
5699         (IsMallocable): Define to is_trivially_constructible if the
5700         compiler supports it, define to true_type otherwise.
5701         (xobnew): New.
5702         (XOBNEW): Redefine.
5703         (xobnewvec): New.
5704         (XOBNEWVEC): Redefine.
5705         * gdb_obstack.h (obstack_zalloc): New.
5706         (OBSTACK_ZALLOC): Redefine.
5707         (obstack_calloc): New.
5708         (OBSTACK_CALLOC): Redefine.
5709         (obstack_new): New.
5710         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5711         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5712         gdbarch.c.
5713         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5714         obstack_calloc/obstack_zalloc.
5715         (gdbarch_obstack_zalloc): Remove.
5716         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5717
5718 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5719
5720         * stack.c (backtrace_command_1): Remove useless variable int i.
5721
5722 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5723
5724         * stack.c (print_frame_info): Fix comment.
5725
5726 2018-05-18  Tom Tromey  <tom@tromey.com>
5727
5728         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5729         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5730         (~dwarf2_per_objfile): Update
5731         (dwarf2_get_dwz_file): Use new.
5732         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5733         unique_ptr.
5734
5735 2018-05-18  Tom Tromey  <tom@tromey.com>
5736
5737         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5738         unique_ptr.
5739         * dwarf2read.c (struct dwp_file): Add constructor and
5740         initializers.
5741         (open_and_init_dwp_file): Return a unique_ptr.
5742         (dwarf2_per_objfile, create_dwp_hash_table)
5743         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5744         (lookup_dwo_unit_in_dwp): Update.
5745         (open_and_init_dwp_file, get_dwp_file): Update.
5746
5747 2018-05-18  Tom Tromey  <tom@tromey.com>
5748
5749         * dwarf2read.c (dwarf2_per_objfile): Update.
5750         (struct mapped_index): Add initializers.
5751         (dwarf2_read_index): Use new.
5752         (dw2_symtab_iter_init): Update.
5753         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5754         unique_ptr.
5755
5756 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5757
5758         * dwarf2read.c (mapped_index) <total_size>: Remove.
5759
5760 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5761
5762         * unittests/format_pieces-selftests.c (test_format_specifier):
5763         Add ARI comments.
5764
5765 2018-05-18  Tom Tromey  <tom@tromey.com>
5766
5767         * c-typeprint.c (maybe_print_hole): New function.
5768         (c_print_type_struct_field_offset): Update.
5769         (c_type_print_base_struct_union): Call maybe_print_hole.
5770
5771 2018-05-17  Keith Seitz  <keiths@redhat.com>
5772
5773         * breakpoint.c (build_bpstat_chain): New function, moved from
5774         bpstat_stop_status.
5775         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5776         If no stop chain is passed, call build_bpstat_chain to build it.
5777         * breakpoint.h (build_bpstat_chain): Declare.
5778         (bpstat_stop_status): Move documentation here from breakpoint.c.
5779         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5780         build the stop chain and pass it to skip_inline_frames.
5781         Pass this stop chain to bpstat_stop_status.
5782         * inline-frame.c: Include breakpoint.h.
5783         (stopped_by_user_bp_inline_frame): New function.
5784         (skip_inline_frames): Add parameter `stop_chain'.
5785         Move documention to inline-frame.h.
5786         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5787         whether the frame should be elided.
5788         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5789         Add moved documentation and update for new parameter.
5790
5791 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5792
5793         PR cli/14975
5794         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5795         unittests/format_pieces-selftests.c.
5796         * common/format.h (format_piece) <operator==>: New.
5797         (format_pieces) <operator[]>: Remove.
5798         * common/format.c (format_pieces::format_pieces): Handle \e.
5799         * unittests/format_pieces-selftests.c: New.
5800
5801 2018-05-17  Tom Tromey  <tom@tromey.com>
5802
5803         PR symtab/23010:
5804         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5805         (dw2_instantiate_symtab): Add skip_partial parameter.
5806         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5807         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5808         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5809         (dw2_expand_symtabs_matching_one)
5810         (dw2_find_pc_sect_compunit_symtab)
5811         (dw2_debug_names_lookup_symbol)
5812         (dw2_debug_names_expand_symtabs_for_function): Update.
5813         (init_cutu_and_read_dies): Add skip_partial parameter.
5814         (process_psymtab_comp_unit, build_type_psymtabs_1)
5815         (process_skeletonless_type_unit, load_partial_comp_unit)
5816         (psymtab_to_symtab_1): Update.
5817         (load_full_comp_unit): Add skip_partial parameter.
5818         (process_imported_unit_die, dwarf2_read_addr_index)
5819         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5820         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5821         (read_signatured_type): Update.
5822
5823 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5824
5825         * value.c (release_value): Remove unused variable.
5826         (record_latest_value): Likewise.
5827         (access_value_history): Likewise.
5828         (preserve_values): Likewise.
5829
5830 2018-05-17  Tom Tromey  <tom@tromey.com>
5831
5832         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5833         Initialize.
5834
5835 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5836
5837         PR gdb/22286
5838         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5839         Also handle registers whose width is not a multiple of
5840         PTRACE_TYPE_RET.
5841         (linux_nat_trad_target::store_register): Likewise.
5842
5843 2018-05-16  Tom Tromey  <tom@tromey.com>
5844
5845         * gdbcore.h (core_bfd): Redefine.
5846         * corelow.c (core_target::close): Update.
5847         (core_target_open): Update.
5848         * progspace.h (struct program_space) <cbfd>: Now a
5849         gdb_bfd_ref_ptr.
5850
5851 2018-05-16  Tom Tromey  <tom@tromey.com>
5852
5853         PR cli/19551:
5854         * symfile-add-flags.h (enum symfile_add_flags)
5855         <SYMFILE_NOT_FILENAME>: New constant.
5856         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5857         objfile name from BFD.
5858         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5859         * minidebug.c (find_separate_debug_file_in_section): Put
5860         ".gnu_debugdata" into BFD's file name.
5861
5862 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5863
5864         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5865         Remove.
5866
5867 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5868
5869         PR binutils/21446
5870         * aarch64-tdep.c (aarch64_analyze_prologue,
5871         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5872         Indicate not interested in errors.
5873
5874 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5875
5876         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5877         Supply the MIPS_ZERO_REGNUM register.
5878
5879 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5880
5881         * mips-tdep.c (mask_address_var): Make variable static.
5882
5883 2018-05-14  Tom Tromey  <tom@tromey.com>
5884
5885         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5886
5887 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
5888
5889         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5890         FXSAVE_ADDR for the mxcsr register.
5891
5892 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
5893
5894         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5895
5896 2018-05-11  Pedro Alves  <palves@redhat.com>
5897
5898         * corelow.c (core_target) <core_target>: No longer inline.
5899         Initialize m_core_gdbarch, m_core_vec and build the section table
5900         here.
5901         <~core_target>: New.
5902         <core_gdbarch, get_core_register_section>: New methods.
5903         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5904         factored out from ...
5905         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5906         (core_ops): Delete.
5907         (sniff_core_bfd): Add gdbarch parameter.
5908         (core_close): Delete, merged into ...
5909         (core_target::close): ... here.  Delete self.
5910         (core_close_cleanup): Delete.
5911         (core_target_open): Allocate a core_target on the heap.  Use a
5912         unique_ptr instead of a cleanup.  Bits moved into the core_target
5913         ctor.  Adjust to use core_target methods instead of globals.
5914         (get_core_register_section): Rename to ...
5915         (core_target::get_core_register_section): ... this and adjust.
5916         (struct get_core_registers_cb_data): New.
5917         (get_core_registers_cb): Use it.  Use bool.
5918         (core_target::fetch_registers, core_target::files_info)
5919         (core_target::xfer_partial, core_target::read_description)
5920         (core_target::pid_to, core_target::thread_name): Adjust to
5921         reference class fields instead of globals.
5922         * target.h (struct target_ops_deleter, target_ops_up): New.
5923
5924 2018-05-11  Pedro Alves  <palves@redhat.com>
5925
5926         * corefile.c (core_file_command): Move to corelow.c.
5927         * corelow.c (the_core_target): Delete.
5928         (core_file_command): Moved from corefile.c.  Check exec_bfd
5929         instead of the_core_target.  Use target_detach instead of calling
5930         into the_core_target directly.
5931         (maybe_say_no_core_file_now): New.
5932         (core_target::detach): Use it.
5933         (_initialize_corelow): Remove references to the_core_target.
5934         * gdbcore.h (the_core_target): Delete.
5935
5936 2018-05-11  Tom Tromey  <tromey@redhat.com>
5937             Pedro Alves  <palves@redhat.com>
5938
5939         * corefile.c (core_bfd): Remove.
5940         * gdbcore.h (core_bfd): Now a macro.
5941         * progspace.h (struct program_space) <cbfd>: New field.
5942
5943 2018-05-11  Tom Tromey  <tom@tromey.com>
5944
5945         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5946         gdb::def_vector.
5947
5948 2018-05-10  Tom Tromey  <tom@tromey.com>
5949
5950         * configure: Rebuild.
5951         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5952
5953 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
5954
5955         PR server/23158:
5956         * regformats/regdat.sh: Adjust script, following the addition
5957         of the new expedite_regs parameter to init_target_desc.
5958
5959 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
5960     
5961         PR gdb/23127
5962         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5963         set_gdbarch_significant_addr_bit.
5964         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5965         set_gdbarch_significant_addr_bit.
5966         * utils.c (address_significant): Update to sign extend addr.
5967
5968 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
5969
5970         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5971         (xtensa_linux_init_abi): Limit tdep->num_regs by
5972         tdep->num_nopriv_regs.
5973         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5974         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5975         not initialized.
5976
5977 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
5978
5979         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5980
5981 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5982
5983         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5984         (I387_MXCSR_INIT_VAL): New constant.
5985         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5986         buffer if it was supplied by the inferior.
5987         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5988         (i387_xsave_get_clear_bv): New function.
5989         (i387_supply_xsave): Only read x87 control registers from the
5990         xsave buffer if the feature is enabled, and the state will have
5991         been written, otherwise, provide a suitable default.
5992         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5993         including x87 control registers.  Update control registers if they
5994         have changed from the default value, and mark features as enabled
5995         as required.
5996         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5997
5998 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
5999
6000         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6001
6002 2018-05-07  Tom Tromey  <tom@tromey.com>
6003
6004         * configure: Rebuild.
6005         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6006
6007 2018-05-07  Tom Tromey  <tom@tromey.com>
6008
6009         PR tdep/20362:
6010         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6011         bit.  Use correct value for VDIV.
6012
6013 2018-05-04  Tom Tromey  <tom@tromey.com>
6014
6015         * configure: Rebuild.
6016         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6017
6018 2018-05-04  Tom Tromey  <tom@tromey.com>
6019
6020         * linux-record.c (record_linux_system_call) <case
6021         RECORD_SYS_RECVFROM>: Add "break".
6022
6023 2018-05-04  Tom Tromey  <tom@tromey.com>
6024
6025         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6026         Add missing "break".
6027         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6028         Add missing "break".
6029
6030 2018-05-04  Tom Tromey  <tom@tromey.com>
6031
6032         * rs6000-tdep.c (ppc_process_record_op4)
6033         (ppc_process_record_op63): Add fall-through comment.
6034
6035 2018-05-04  Tom Tromey  <tom@tromey.com>
6036
6037         * i386-tdep.c (i386_process_record): Add fall-through comment.
6038
6039 2018-05-04  Tom Tromey  <tom@tromey.com>
6040
6041         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6042         comment.
6043
6044 2018-05-04  Tom Tromey  <tom@tromey.com>
6045
6046         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6047         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6048         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6049         comment.
6050         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6051         comment.
6052         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6053         comment.
6054
6055 2018-05-04  Tom Tromey  <tom@tromey.com>
6056
6057         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6058
6059 2018-05-04  Tom Tromey  <tom@tromey.com>
6060
6061         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6062         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6063         * symfile.c (section_is_mapped): Fix fall-through comment.
6064         * stabsread.c (define_symbol, read_member_functions): Fix
6065         fall-through comment.
6066         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6067         comment.
6068         * remote.c (remote_wait_as): Fix fall-through comment.
6069         * p-exp.y (yylex): Fix fall-through comment.
6070         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6071         comment.
6072         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6073         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6074         * jv-exp.y (yylex): Fix fall-through comment.
6075         * go-exp.y (lex_one_token): Fix fall-through comment.
6076         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6077         fall-through comment.
6078         * f-exp.y (yylex): Fix fall-through comment.
6079         * dwarf2read.c (process_die): Fix fall-through comments.
6080         * dbxread.c (process_one_symbol): Fix fall-through comment.
6081         * d-exp.y (lex_one_token): Fix fall-through comment.
6082         * cp-name-parser.y (yylex): Fix fall-through comment.
6083         * coffread.c (coff_symtab_read): Fix fall-through comment.
6084         * c-exp.y (lex_one_token): Fix fall-through comment.
6085         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6086         comment.
6087         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6088         comment.
6089
6090 2018-05-04  Tom Tromey  <tom@tromey.com>
6091
6092         PR python/22730:
6093         * NEWS: Mention gdb.execute change.
6094         * gdbcmd.h (execute_control_command): Don't declare.
6095         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6096         execute_control_commands, execute_control_commands_to_string.
6097         * cli/cli-script.h (execute_control_commands)
6098         (execute_control_commands_to_string): Declare.
6099         (execute_control_command): Add from_tty parameter.
6100         * cli/cli-script.c (execute_control_commands)
6101         (execute_control_commands_to_string): New functions.
6102         (execute_user_command): Use execute_control_commands.
6103         (execute_control_command_1): Add "from_tty" parameter.  Update.
6104         (execute_control_command): Likewise.
6105
6106 2018-05-04  Tom Tromey  <tom@tromey.com>
6107
6108         PR python/22731:
6109         * NEWS: Mention that breakpoint commands are writable.
6110         * python/py-breakpoint.c (bppy_set_commands): New function.
6111         (breakpoint_object_getset) <"commands">: Use it.
6112
6113 2018-05-04  Tom Tromey  <tom@tromey.com>
6114
6115         * tracepoint.c (actions_command): Update.
6116         * mi/mi-cmd-break.c (mi_command_line_array)
6117         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6118         (mi_read_next_line): Remove.
6119         (mi_cmd_break_commands): Update.
6120         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6121         function_view.
6122         * cli/cli-script.c (get_command_line): Update.
6123         (process_next_line): Use function_view.  Constify.
6124         (recurse_read_control_structure, read_command_lines)
6125         (read_command_lines_1): Change argument types to function_view.
6126         (do_define_command, document_command): Update.
6127         * breakpoint.h (check_tracepoint_command): Don't declare.
6128         * breakpoint.c (check_tracepoint_command): Remove.
6129         (commands_command_1, create_tracepoint_from_upload): Update.
6130
6131 2018-05-04  Tom Tromey  <tom@tromey.com>
6132
6133         PR gdb/11750:
6134         * cli/cli-script.h (enum command_control_type) <define_control>:
6135         New constant.
6136         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6137         (build_command_line, execute_control_command_1)
6138         (process_next_line): Likewise.
6139         (do_define_command): New function, extracted from define_command.
6140         (define_command): Use it.
6141
6142 2018-05-04  Tom Tromey  <tom@tromey.com>
6143
6144         * tracepoint.c (actions_command): Update.
6145         * cli/cli-script.h (read_command_lines): Update.
6146         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6147         (MAX_TMPBUF): Remove define.
6148         (define_command): Use string_printf.
6149         (document_command): Likewise.
6150         * breakpoint.c (commands_command_1): Update.
6151
6152 2018-05-04  Tom Tromey  <tom@tromey.com>
6153
6154         * top.c (execute_command): Update.
6155         * cli/cli-script.h (print_command_lines): Now varargs.
6156         * cli/cli-script.c (print_command_lines): Now varargs.
6157         (execute_control_command_1) <case while_control, case if_control>:
6158         Update.
6159
6160 2018-05-04  Tom Tromey  <tom@tromey.com>
6161
6162         * tracepoint.c (all_tracepoint_actions): Rename from
6163         all_tracepoint_actions_and_cleanup.  Change return type.
6164         (actions_command, encode_actions_1, encode_actions)
6165         (trace_dump_actions, tdump_command): Update.
6166         * remote.c (remote_download_command_source): Update.
6167         * python/python.c (gdbpy_eval_from_control_command)
6168         (python_command, python_interactive_command): Update.
6169         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6170         * guile/guile.c (guile_command)
6171         (gdbscm_eval_from_control_command, guile_command): Update.
6172         * compile/compile.c (compile_code_command)
6173         (compile_print_command, compile_to_object): Update.
6174         * cli/cli-script.h (struct command_lines_deleter): New.
6175         (counted_command_line): New typedef.
6176         (struct command_line): Add constructor, destructor.
6177         <body_list>: Remove.
6178         <body_list_0, body_list_1>: New members.
6179         (command_line_up): Remove typedef.
6180         (read_command_lines, read_command_lines_1, get_command_line):
6181         Update.
6182         (copy_command_lines): Don't declare.
6183         * cli/cli-script.c (build_command_line): Use "new".
6184         (get_command_line): Return counted_command_line.
6185         (print_command_lines, execute_user_command)
6186         (execute_control_command_1, while_command, if_command): Update.
6187         (realloc_body_list): Remove.
6188         (process_next_line, recurse_read_control_structure): Update.
6189         (read_command_lines, read_command_lines_1): Return counted_command_line.
6190         (free_command_lines): Use "delete".
6191         (copy_command_lines): Remove.
6192         (define_command, document_command, show_user_1): Update.
6193         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6194         a counted_command_line.
6195         * breakpoint.h (counted_command_line): Remove typedef.
6196         (breakpoint_set_commands): Update.
6197         * breakpoint.c (check_no_tracepoint_commands)
6198         (validate_commands_for_breakpoint): Update.
6199         (breakpoint_set_commands): Change commands to be a
6200         counted_command_line.
6201         (commands_command_1, update_dprintf_command_list)
6202         (create_tracepoint_from_upload): Update.
6203
6204 2018-05-04  Tom Tromey  <tom@tromey.com>
6205
6206         * cli/cli-decode.h (cmd_list_element): New constructor.
6207         (~cmd_list_element): New destructor.
6208         (struct cmd_list_element): Add initializers.
6209         * cli/cli-decode.c (do_add_cmd): Use "new".
6210         (delete_cmd): Use "delete".
6211
6212 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6213             Pedro Alves <palves@redhat.com>
6214
6215         PR breakpoints/19806 and support for PR external/20207.
6216         * NEWS: Mention Aarch64 watchpoint improvements.
6217         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6218         watchpoints and PR external/20207 watchpoints.
6219         * nat/aarch64-linux-hw-point.c
6220         (kernel_supports_any_contiguous_range): New.
6221         (aarch64_watchpoint_offset): New.
6222         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6223         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6224         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6225         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6226         next_addr_orig_p.  Support PR external/20207 watchpoints.
6227         (aarch64_downgrade_regs): New.
6228         (aarch64_dr_state_insert_one_point): New parameters offset and
6229         addr_orig.
6230         (aarch64_dr_state_remove_one_point): Likewise.
6231         (aarch64_handle_breakpoint): Update caller.
6232         (aarch64_handle_aligned_watchpoint): Likewise.
6233         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6234         aligned_offset.
6235         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6236         aarch64_downgrade_regs.
6237         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6238         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6239         (DR_CONTROL_MASK): ... this.
6240         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6241         (unsigned int aarch64_watchpoint_offset): New prototype.
6242         (aarch64_linux_set_debug_regs): Remove const from state.
6243         * utils.c (align_up, align_down): Move to ...
6244         * common/common-utils.c (align_up, align_down): ... here.
6245         * utils.h (align_up, align_down): Move to ...
6246         * common/common-utils.h (align_up, align_down): ... here.
6247
6248 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6249
6250         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6251         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6252         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6253         Re-implement to match the ABI as summarized in GCC's
6254         gcc/config/sparc/sparc.c.  All callers updated.
6255         (sparc32_store_arguments): Remove assertion.
6256
6257 2018-05-04  Tom Tromey  <tom@tromey.com>
6258
6259         * printcmd.c: Don't include tui.h.
6260         (decode_format): Use skip_spaces.
6261
6262 2018-05-04  Tom Tromey  <tom@tromey.com>
6263
6264         PR gdb/22619:
6265         * printcmd.c (last_count): New global.
6266         (x_command): Use saved count when repeating.
6267
6268 2018-05-04  Tom Tromey  <tom@tromey.com>
6269
6270         * nto-procfs.c (do_closedir_cleanup): Remove.
6271         (procfs_pidlist): Use gdb_dir_up.
6272         * procfs.c (do_closedir_cleanup): Remove.
6273         (proc_update_threads): Use gdb_dir_up.
6274         * common/filestuff.h (struct gdb_dir_deleter): New.
6275         (gdb_dir_up): New typedef.
6276
6277 2018-05-04  Tom Tromey  <tom@tromey.com>
6278
6279         * ada-lang.c (print_mention_exception): Use std::string.
6280
6281 2018-05-04  Tom Tromey  <tom@tromey.com>
6282
6283         * ada-lang.c (create_excep_cond_exprs): Update.
6284         (ada_exception_catchpoint_cond_string): Use std::string.
6285
6286 2018-05-04  Tom Tromey  <tom@tromey.com>
6287
6288         * ada-lang.c (xget_renaming_scope): Return std::string.
6289         (old_renaming_is_invisible): Update.
6290
6291 2018-05-04  Tom Tromey  <tom@tromey.com>
6292
6293         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6294         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6295
6296 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6297
6298         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6299
6300 2018-05-04  Tom Tromey  <tom@tromey.com>
6301
6302         * remote.c (remote_query_supported_append): Change type.
6303         (remote_check_symbols): Update.
6304
6305 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6306
6307         PR gdb/11420
6308         * configure.ac: Prepend libpython.
6309         * python/python-config.py: Likewise.
6310         * configure: Regenerate.
6311
6312 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6313
6314         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6315
6316 2018-05-03  Pedro Alves  <palves@redhat.com>
6317
6318         * s390-linux-nat.c
6319         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6320         override.  Write 'true' instead of '1'.
6321         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6322         declaration.
6323
6324 2018-05-02  Pedro Alves  <palves@redhat.com>
6325
6326         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6327         add_inf_child_target.
6328         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6329         add_inf_child_target.
6330         * aix-thread.c (aix_thread_target_info): New.
6331         (aix_thread_target) <shortname, longname, doc>: Delete.
6332         <info>: New.
6333         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6334         add_inf_child_target.
6335         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6336         add_inf_child_target.
6337         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6338         add_inf_child_target.
6339         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6340         add_inf_child_target.
6341         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6342         add_inf_child_target.
6343         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6344         add_inf_child_target.
6345         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6346         add_inf_child_target.
6347         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6348         add_inf_child_target.
6349         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6350         add_inf_child_target.
6351         * bfd-target.c (target_bfd_target_info): New.
6352         (target_bfd) <shortname, longname, doc>: Delete.
6353         <info>: New.
6354         * bsd-kvm.c (bsd_kvm_target_info): New.
6355         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6356         <info>: New.
6357         (bsd_kvm_target::open): Rename to ...
6358         (bsd_kvm_target_open): ... this.  Adjust.
6359         * bsd-uthread.c (bsd_uthread_target_info): New.
6360         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6361         <info>: New.
6362         * corefile.c (core_file_command): Adjust.
6363         * corelow.c (core_target_info): New.
6364         (core_target) <shortname, longname, doc>: Delete.
6365         <info>: New.
6366         (core_target::open): Rename to ...
6367         (core_target_open): ... this.  Adjust.
6368         * ctf.c (ctf_target_info): New.
6369         (ctf_target) <shortname, longname, doc>: Delete.
6370         <info>: New.
6371         (ctf_target::open): Rename to ...
6372         (ctf_target_open): ... this.
6373         (_initialize_ctf): Adjust.
6374         * exec.c (exec_target_info): New.
6375         (exec_target) <shortname, longname, doc>: Delete.
6376         <info>: New.
6377         (exec_target::open): Rename to ...
6378         (exec_target_open): ... this.
6379         * gdbcore.h (core_target_open): Declare.
6380         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6381         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6382         add_inf_child_target.
6383         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6384         add_inf_child_target.
6385         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6386         add_inf_child_target.
6387         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6388         add_inf_child_target.
6389         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6390         add_inf_child_target.
6391         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6392         add_inf_child_target.
6393         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6394         add_inf_child_target.
6395         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6396         add_inf_child_target.
6397         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6398         add_inf_child_target.
6399         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6400         add_inf_child_target.
6401         * inf-child.c (inf_child_target_info): New.
6402         (inf_child_target::info): New.
6403         (inf_child_open_target): Remove 'target' parameter.  Use
6404         get_native_target instead.
6405         (inf_child_target::open): Delete.
6406         (add_inf_child_target): New.
6407         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6408         Delete.
6409         <info>: New.
6410         (add_inf_child_target): Declare.
6411         (inf_child_open_target): Declare.
6412         * linux-thread-db.c (thread_db_target_info): New.
6413         (thread_db_target) <shortname, longname, doc>: Delete.
6414         <info>: New.
6415         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6416         add_inf_child_target.
6417         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6418         add_inf_child_target.
6419         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6420         add_inf_child_target.
6421         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6422         add_inf_child_target.
6423         * make-target-delegates (print_class): Adjust.
6424         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6425         add_inf_child_target.
6426         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6427         add_inf_child_target.
6428         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6429         add_inf_child_target.
6430         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6431         add_inf_child_target.
6432         * nto-procfs.c (nto_native_target_info): New.
6433         (nto_procfs_target_native) <shortname, longname, doc>:
6434         Delete.
6435         <info>: New.
6436         (nto_procfs_target_info): New.
6437         (nto_procfs_target_procfs) <shortname, longname, doc>:
6438         Delete.
6439         <info>: New.
6440         (init_procfs_targets): Adjust.
6441         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6442         add_inf_child_target.
6443         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6444         add_inf_child_target.
6445         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6446         add_inf_child_target.
6447         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6448         add_inf_child_target.
6449         * ravenscar-thread.c (ravenscar_target_info): New.
6450         (ravenscar_thread_target) <shortname, longname, doc>:
6451         Delete.
6452         <info>: New.
6453         * record-btrace.c (record_btrace_target_info):
6454         (record_btrace_target) <shortname, longname, doc>: Delete.
6455         <info>: New.
6456         (record_btrace_target::open): Rename to ...
6457         (record_btrace_target_open): ... this.  Adjust.
6458         * record-full.c (record_longname, record_doc): New.
6459         (record_full_base_target) <shortname, longname, doc>: Delete.
6460         <info>: New.
6461         (record_full_target_info): New.
6462         (record_full_target): <shortname>: Delete.
6463         <info>: New.
6464         (record_full_core_open_1, record_full_open_1): Update comments.
6465         (record_full_base_target::open): Rename to ...
6466         (record_full_open): ... this.
6467         (cmd_record_full_restore): Update.
6468         (_initialize_record_full): Update.
6469         * remote-sim.c (remote_sim_target_info): New.
6470         (gdbsim_target) <shortname, longname, doc>: Delete.
6471         <info>: New.
6472         (gdbsim_target::open): Rename to ...
6473         (gdbsim_target_open): ... this.
6474         (_initialize_remote_sim): Adjust.
6475         * remote.c (remote_doc): New.
6476         (remote_target_info): New.
6477         (remote_target) <shortname, longname, doc>: Delete.
6478         <info>: New.
6479         (extended_remote_target_info): New.
6480         (extended_remote_target) <shortname, longname, doc>: Delete.
6481         <info>: New.
6482         (remote_target::open_1): Make static.  Adjust.
6483         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6484         * s390-linux-nat.c (_initialize_s390_nat): Use
6485         add_inf_child_target.
6486         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6487         add_inf_child_target.
6488         * sol-thread.c (thread_db_target_info): New.
6489         (sol_thread_target) <shortname, longname, doc>: Delete.
6490         <info>: New.
6491         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6492         add_inf_child_target.
6493         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6494         add_inf_child_target.
6495         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6496         add_inf_child_target.
6497         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6498         add_inf_child_target.
6499         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6500         add_inf_child_target.
6501         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6502         add_inf_child_target.
6503         * spu-linux-nat.c (_initialize_spu_nat): Use
6504         add_inf_child_target.
6505         * spu-multiarch.c (spu_multiarch_target_info): New.
6506         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6507         <info>: New.
6508         * target-delegates.c: Regenerate.
6509         * target.c: Include <unordered_map>.
6510         (target_ops_p): Delete.
6511         (DEF_VEC_P(target_ops_p)): Delete.
6512         (target_factories): New.
6513         (test_target_info): New.
6514         (test_target_ops::info): New.
6515         (open_target): Adjust to use target_factories.
6516         (add_target_with_completer): Rename to ...
6517         (add_target): ... this.  Change prototype.  Register target_info
6518         and open callback in target_factories.  Register target_info in
6519         command context instead of target_ops.
6520         (add_target): Delete old implementation.
6521         (add_deprecated_target_alias): Change prototype.  Adjust.
6522         (the_native_target): New.
6523         (set_native_target, get_native_target): New.
6524         (find_default_run_target): Use the_native_target.
6525         (find_attach_target, find_run_target): Simplify.
6526         (target_ops::open): Delete.
6527         (dummy_target_info): New.
6528         (dummy_target::shortname, dummy_target::longname)
6529         (dummy_target::doc): Delete.
6530         (dummy_target::info): New.
6531         (debug_target::shortname, debug_target::longname)
6532         (debug_target::doc): Delete.
6533         (debug_target::info): New.
6534         * target.h (struct target_info): New.
6535         (target_ops::~target_ops): Add comment.
6536         (target_ops::info): New.
6537         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6538         longer virtual.  Implement in terms of target_info.
6539         (set_native_target, get_native_target): Declare.
6540         (target_open_ftype): New.
6541         (add_target, add_target_with_completer)
6542         (add_deprecated_target_alias): Change prototype.
6543         (test_target) <shortname, longname, doc>: Delete.
6544         <info>: New.
6545         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6546         add_inf_child_target.
6547         * tracefile-tfile.c (tfile_target_info): New.
6548         (tfile_target) <shortname, longname, doc>: Delete.
6549         <info>: New.
6550         (tfile_target::open): Rename to ...
6551         (tfile_target_open): ... this.
6552         (_initialize_tracefile_tfile): Adjust.
6553         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6554         add_inf_child_target.
6555         * windows-nat.c (_initialize_windows_nat): Use
6556         add_inf_child_target.
6557         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6558         add_inf_child_target.
6559
6560 2018-05-02  Pedro Alves  <palves@redhat.com>
6561
6562         * linux-nat.h (linux_nat_target) <low_new_thread,
6563         low_delete_thread, low_new_fork, low_forget_process,
6564         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6565         New virtual methods.
6566         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6567         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6568         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6569         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6570         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6571         Delete.
6572         * linux-fork.c (delete_fork): Adjust to call low method.
6573         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6574         (linux_nat_new_fork, linux_nat_forget_process_hook)
6575         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6576         (linux_nat_status_is_event):
6577         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6578         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6579         to call low method.
6580         (sigtrap_is_event): Rename to ...
6581         (linux_nat_target::low_status_is_event): ... this.
6582         (linux_nat_set_status_is_event): Delete.
6583         (save_stop_reason, linux_nat_wait_1)
6584         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6585         low methods.
6586         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6587         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6588         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6589         (linux_nat_set_prepare_to_resume): Delete.
6590         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6591         low virtual methods.
6592         * amd64-linux-nat.c: Likewise.
6593         * arm-linux-nat.c: Likewise.
6594         * i386-linux-nat.c: Likewise.
6595         * ia64-linux-nat.c: Likewise.
6596         * mips-linux-nat.c: Likewise.
6597         * ppc-linux-nat.c: Likewise.
6598         * s390-linux-nat.c: Likewise.
6599         * sparc64-linux-nat.c: Likewise.
6600         * x86-linux-nat.c: Likewise.
6601         * x86-linux-nat.h: Include "nat/x86-linux.h".
6602         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6603         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6604         Override methods.
6605
6606 2018-05-02  Pedro Alves  <palves@redhat.com>
6607
6608         * target.h (target_ops)
6609         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6610         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6611         stopped_by_watchpoint, have_continuable_watchpoint,
6612         stopped_data_address, watchpoint_addr_within_range,
6613         can_accel_watchpoint_condition, can_run, thread_alive,
6614         has_all_memory, has_memory, has_stack, has_registers,
6615         has_execution, can_async_p, is_async_p, supports_non_stop,
6616         always_non_stop_p, can_execute_reverse, supports_multi_process,
6617         supports_enable_disable_tracepoint,
6618         supports_disable_randomization, supports_string_tracing,
6619         supports_evaluation_of_breakpoint_conditions,
6620         can_run_breakpoint_commands, filesystem_is_local,
6621         can_download_tracepoint, get_trace_state_variable_value,
6622         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6623         record_is_replaying, record_will_replay,
6624         augmented_libraries_svr4_read>: Adjust to return bool.
6625         * aarch64-linux-nat.c: All implementations adjusted.
6626         * aix-thread.c: All implementations adjusted.
6627         * arm-linux-nat.c: All implementations adjusted.
6628         * breakpoint.c: All implementations adjusted.
6629         * bsd-kvm.c: All implementations adjusted.
6630         * bsd-uthread.c: All implementations adjusted.
6631         * corelow.c: All implementations adjusted.
6632         * ctf.c: All implementations adjusted.
6633         * darwin-nat.c: All implementations adjusted.
6634         * darwin-nat.h: All implementations adjusted.
6635         * exec.c: All implementations adjusted.
6636         * fbsd-nat.c: All implementations adjusted.
6637         * fbsd-nat.h: All implementations adjusted.
6638         * gnu-nat.c: All implementations adjusted.
6639         * gnu-nat.h: All implementations adjusted.
6640         * go32-nat.c: All implementations adjusted.
6641         * ia64-linux-nat.c: All implementations adjusted.
6642         * inf-child.c: All implementations adjusted.
6643         * inf-child.h: All implementations adjusted.
6644         * inf-ptrace.c: All implementations adjusted.
6645         * inf-ptrace.h: All implementations adjusted.
6646         * linux-nat.c: All implementations adjusted.
6647         * linux-nat.h: All implementations adjusted.
6648         * mips-linux-nat.c: All implementations adjusted.
6649         * nto-procfs.c: All implementations adjusted.
6650         * ppc-linux-nat.c: All implementations adjusted.
6651         * procfs.c: All implementations adjusted.
6652         * ravenscar-thread.c: All implementations adjusted.
6653         * record-btrace.c: All implementations adjusted.
6654         * record-full.c: All implementations adjusted.
6655         * remote-sim.c: All implementations adjusted.
6656         * remote.c: All implementations adjusted.
6657         * s390-linux-nat.c: All implementations adjusted.
6658         * sol-thread.c: All implementations adjusted.
6659         * spu-multiarch.c: All implementations adjusted.
6660         * target-delegates.c: All implementations adjusted.
6661         * target.c: All implementations adjusted.
6662         * target.h: All implementations adjusted.
6663         * tracefile-tfile.c: All implementations adjusted.
6664         * tracefile.c: All implementations adjusted.
6665         * tracefile.h: All implementations adjusted.
6666         * windows-nat.c: All implementations adjusted.
6667         * x86-linux-nat.h: All implementations adjusted.
6668         * x86-nat.h: All implementations adjusted.
6669
6670 2018-05-02  Pedro Alves  <palves@redhat.com>
6671
6672         * make-target-delegates (scan_target_h): Don't trim lines here.
6673         Replace sequences of tabs and/or whitespace with a single
6674         whitespace.
6675         (top level, parsing methods): Trim each line before processing it
6676         here.
6677
6678 2018-05-02  Pedro Alves  <palves@redhat.com>
6679             John Baldwin  <jhb@freebsd.org>
6680
6681         * target.h (enum strata) <debug_stratum>: New.
6682         (struct target_ops) <all delegation methods>: Replace by C++
6683         virtual methods, and drop "to_" prefix.  All references updated
6684         throughout.
6685         <to_shortname, to_longname, to_doc, to_data,
6686         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6687         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6688         virtual methods.  All references updated throughout.
6689         <can_attach, supports_terminal_ours, can_create_inferior,
6690         get_thread_control_capabilities, attach_no_wait>: New
6691         virtual methods.
6692         <insert_breakpoint, remove_breakpoint>: Now
6693         TARGET_DEFAULT_NORETURN methods.
6694         <info_proc>: Now returns bool.
6695         <to_magic>: Delete.
6696         (OPS_MAGIC): Delete.
6697         (current_target): Delete.  All references replaced by references
6698         to ...
6699         (target_stack): ... this.  New.
6700         (target_shortname, target_longname): Adjust.
6701         (target_can_run): Now a function declaration.
6702         (default_child_has_all_memory, default_child_has_memory)
6703         (default_child_has_stack, default_child_has_registers)
6704         (default_child_has_execution): Remove target_ops parameter.
6705         (complete_target_initialization): Delete.
6706         (memory_breakpoint_target): New template class.
6707         (test_target_ops): Refactor as a C++ class with virtual methods.
6708         * make-target-delegates (NAME_PART): Tighten.
6709         (POINTER_PART, CP_SYMBOL): New.
6710         (SIMPLE_RETURN_PART): Reimplement.
6711         (VEC_RETURN_PART): Expect less.
6712         (RETURN_PART, VIRTUAL_PART): New.
6713         (METHOD): Adjust to C++ virtual methods.
6714         (scan_target_h): Remove reference to C99.
6715         (dname): Output "target_ops::" prefix.
6716         (write_function_header): Adjust to output a C++ class method.
6717         (write_declaration): New.
6718         (write_delegator): Adjust to output a C++ class method.
6719         (tdname): Output "dummy_target::" prefix.
6720         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6721         method.
6722         (tdefault_names, debug_names): Delete.
6723         (return_types, tdefaults, styles, argtypes_array): New.
6724         (top level): All methods are delegators.
6725         (print_class): New.
6726         (top level): Print dummy_target and debug_target classes.
6727         * target-delegates.c: Regenerate.
6728         * target-debug.h (target_debug_print_enum_info_proc_what)
6729         (target_debug_print_thread_control_capabilities)
6730         (target_debug_print_thread_info_p): New.
6731         * target.c (dummy_target): Delete.
6732         (the_dummy_target, the_debug_target): New.
6733         (target_stack): Now extern.
6734         (set_targetdebug): Push/unpush debug target.
6735         (default_child_has_all_memory, default_child_has_memory)
6736         (default_child_has_stack, default_child_has_registers)
6737         (default_child_has_execution): Remove target_ops parameter.
6738         (complete_target_initialization): Delete.
6739         (add_target_with_completer): No longer call
6740         complete_target_initialization.
6741         (target_supports_terminal_ours): Use regular delegation.
6742         (update_current_target): Delete.
6743         (push_target): No longer check magic number.  Don't call
6744         update_current_target.
6745         (unpush_target): Don't call update_current_target.
6746         (target_is_pushed): No longer check magic number.
6747         (target_require_runnable): Skip for all stratums over
6748         process_stratum.
6749         (target_ops::info_proc): New.
6750         (target_info_proc): Use find_target_at and
6751         find_default_run_target.
6752         (target_supports_disable_randomization): Use regular delegation.
6753         (target_get_osdata): Use find_target_at.
6754         (target_ops::open, target_ops::close, target_ops::can_attach)
6755         (target_ops::attach, target_ops::can_create_inferior)
6756         (target_ops::create_inferior, target_ops::can_run)
6757         (target_can_run): New.
6758         (default_fileio_target): Use regular delegation.
6759         (target_ops::fileio_open, target_ops::fileio_pwrite)
6760         (target_ops::fileio_pread, target_ops::fileio_fstat)
6761         (target_ops::fileio_close, target_ops::fileio_unlink)
6762         (target_ops::fileio_readlink): New.
6763         (target_fileio_open_1, target_fileio_unlink)
6764         (target_fileio_readlink): Always call the target method.  Handle
6765         FILEIO_ENOSYS.
6766         (return_zero, return_zero_has_execution): Delete.
6767         (init_dummy_target): Delete.
6768         (dummy_target::dummy_target, dummy_target::shortname)
6769         (dummy_target::longname, dummy_target::doc)
6770         (debug_target::debug_target, debug_target::shortname)
6771         (debug_target::longname, debug_target::doc): New.
6772         (target_supports_delete_record): Use regular delegation.
6773         (setup_target_debug): Delete.
6774         (maintenance_print_target_stack): Skip debug_stratum.
6775         (initialize_targets): Instantiate the_dummy_target and
6776         the_debug_target.
6777         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6778         use target_stack.
6779         (target_auxv_search, fprint_target_auxv): Adjust.
6780         (info_auxv_command): Adjust to use target_stack.
6781         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6782         * exceptions.c (print_flush): Handle a NULL target_stack.
6783         * regcache.c (target_ops_no_register): Refactor as class with
6784         virtual methods.
6785
6786         * exec.c (exec_target): New class.
6787         (exec_ops): Now an exec_target.
6788         (exec_open, exec_close_1, exec_get_section_table)
6789         (exec_xfer_partial, exec_files_info, exec_has_memory)
6790         (exec_make_note_section): Refactor as exec_target methods.
6791         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6792         Delete.
6793         (exec_target::find_memory_regions): New.
6794         (_initialize_exec): Don't call init_exec_ops.
6795         * gdbcore.h (exec_file_clear): Delete.
6796
6797         * corefile.c (core_target): Delete.
6798         (core_file_command): Adjust.
6799         * corelow.c (core_target): New class.
6800         (the_core_target): New.
6801         (core_close): Remove target_ops parameter.
6802         (core_close_cleanup): Adjust.
6803         (core_target::close): New.
6804         (core_open, core_detach, get_core_registers, core_files_info)
6805         (core_xfer_partial, core_thread_alive, core_read_description)
6806         (core_pid_to_str, core_thread_name, core_has_memory)
6807         (core_has_stack, core_has_registers, core_info_proc): Rework as
6808         core_target methods.
6809         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6810         (_initialize_corelow): Initialize the_core_target.
6811         * gdbcore.h (core_target): Delete.
6812         (the_core_target): New.
6813
6814         * ctf.c: (ctf_target): New class.
6815         (ctf_ops): Now a ctf_target.
6816         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6817         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6818         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6819         methods.
6820         (init_ctf_ops): Delete.
6821         (_initialize_ctf): Don't call it.
6822         * tracefile-tfile.c (tfile_target): New class.
6823         (tfile_ops): Now a tfile_target.
6824         (tfile_open, tfile_close, tfile_files_info)
6825         (tfile_get_tracepoint_status, tfile_trace_find)
6826         (tfile_fetch_registers, tfile_xfer_partial)
6827         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6828         Refactor as tfile_target methods.
6829         (tfile_xfer_partial_features): Remove target_ops parameter.
6830         (init_tfile_ops): Delete.
6831         (_initialize_tracefile_tfile): Don't call it.
6832         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6833         (tracefile_has_stack, tracefile_has_registers)
6834         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6835         tracefile_target methods.
6836         (init_tracefile_ops): Delete.
6837         (tracefile_target::tracefile_target): New.
6838         * tracefile.h: Include "target.h".
6839         (tracefile_target): New class.
6840         (init_tracefile_ops): Delete.
6841
6842         * spu-multiarch.c (spu_multiarch_target): New class.
6843         (spu_ops): Now a spu_multiarch_target.
6844         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6845         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6846         (spu_search_memory, spu_mourn_inferior): Refactor as
6847         spu_multiarch_target methods.
6848         (init_spu_ops): Delete.
6849         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6850         complete_target_initialization.
6851
6852         * ravenscar-thread.c (ravenscar_thread_target): New class.
6853         (ravenscar_ops): Now a ravenscar_thread_target.
6854         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6855         (ravenscar_thread_alive, ravenscar_pid_to_str)
6856         (ravenscar_fetch_registers, ravenscar_store_registers)
6857         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6858         (ravenscar_stopped_by_hw_breakpoint)
6859         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6860         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6861         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6862         methods.
6863         (init_ravenscar_thread_ops): Delete.
6864         (_initialize_ravenscar): Remove references to
6865         init_ravenscar_thread_ops and complete_target_initialization.
6866
6867         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6868         (bsd_uthread_target): New class.
6869         (bsd_uthread_ops): Now a bsd_uthread_target.
6870         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6871         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6872         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6873         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6874         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6875         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6876         (bsd_uthread_target): Delete function.
6877         (_initialize_bsd_uthread): Remove reference to
6878         complete_target_initialization.
6879
6880         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6881         (target_bfd): ... this new class.
6882         (target_bfd_xfer_partial, target_bfd_get_section_table)
6883         (target_bfd_close): Refactor as target_bfd methods.
6884         (target_bfd::~target_bfd): New.
6885         (target_bfd_reopen): Adjust.
6886         (target_bfd::close): New.
6887
6888         * record-btrace.c (record_btrace_target): New class.
6889         (record_btrace_ops): Now a record_btrace_target.
6890         (record_btrace_open, record_btrace_stop_recording)
6891         (record_btrace_disconnect, record_btrace_close)
6892         (record_btrace_async, record_btrace_info)
6893         (record_btrace_insn_history, record_btrace_insn_history_range)
6894         (record_btrace_insn_history_from, record_btrace_call_history)
6895         (record_btrace_call_history_range)
6896         (record_btrace_call_history_from, record_btrace_record_method)
6897         (record_btrace_is_replaying, record_btrace_will_replay)
6898         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6899         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6900         (record_btrace_store_registers, record_btrace_prepare_to_store)
6901         (record_btrace_to_get_unwinder)
6902         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6903         (record_btrace_commit_resume, record_btrace_wait)
6904         (record_btrace_stop, record_btrace_can_execute_reverse)
6905         (record_btrace_stopped_by_sw_breakpoint)
6906         (record_btrace_supports_stopped_by_sw_breakpoint)
6907         (record_btrace_stopped_by_hw_breakpoint)
6908         (record_btrace_supports_stopped_by_hw_breakpoint)
6909         (record_btrace_update_thread_list, record_btrace_thread_alive)
6910         (record_btrace_goto_begin, record_btrace_goto_end)
6911         (record_btrace_goto, record_btrace_stop_replaying_all)
6912         (record_btrace_execution_direction)
6913         (record_btrace_prepare_to_generate_core)
6914         (record_btrace_done_generating_core): Refactor as
6915         record_btrace_target methods.
6916         (init_record_btrace_ops): Delete.
6917         (_initialize_record_btrace): Remove reference to
6918         init_record_btrace_ops.
6919         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6920         the execution_direction global.
6921         (record_full_base_target, record_full_target)
6922         (record_full_core_target): New classes.
6923         (record_full_ops): Now a record_full_target.
6924         (record_full_core_ops): Now a record_full_core_target.
6925         (record_full_target::detach, record_full_target::disconnect)
6926         (record_full_core_target::disconnect)
6927         (record_full_target::mourn_inferior, record_full_target::kill):
6928         New.
6929         (record_full_open, record_full_close, record_full_async): Refactor
6930         as methods of the record_full_base_target class.
6931         (record_full_resume, record_full_commit_resume): Refactor
6932         as methods of the record_full_target class.
6933         (record_full_wait, record_full_stopped_by_watchpoint)
6934         (record_full_stopped_data_address)
6935         (record_full_stopped_by_sw_breakpoint)
6936         (record_full_supports_stopped_by_sw_breakpoint)
6937         (record_full_stopped_by_hw_breakpoint)
6938         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6939         methods of the record_full_base_target class.
6940         (record_full_store_registers, record_full_xfer_partial)
6941         (record_full_insert_breakpoint, record_full_remove_breakpoint):
6942         Refactor as methods of the record_full_target class.
6943         (record_full_can_execute_reverse, record_full_get_bookmark)
6944         (record_full_goto_bookmark, record_full_execution_direction)
6945         (record_full_record_method, record_full_info, record_full_delete)
6946         (record_full_is_replaying, record_full_will_replay)
6947         (record_full_goto_begin, record_full_goto_end, record_full_goto)
6948         (record_full_stop_replaying): Refactor as methods of the
6949         record_full_base_target class.
6950         (record_full_core_resume, record_full_core_kill)
6951         (record_full_core_fetch_registers)
6952         (record_full_core_prepare_to_store)
6953         (record_full_core_store_registers, record_full_core_xfer_partial)
6954         (record_full_core_insert_breakpoint)
6955         (record_full_core_remove_breakpoint)
6956         (record_full_core_has_execution): Refactor
6957         as methods of the record_full_core_target class.
6958         (record_full_base_target::supports_delete_record): New.
6959         (init_record_full_ops): Delete.
6960         (init_record_full_core_ops): Delete.
6961         (record_full_save): Refactor as method of the
6962         record_full_base_target class.
6963         (_initialize_record_full): Remove references to
6964         init_record_full_ops and init_record_full_core_ops.
6965
6966         * remote.c (remote_target, extended_remote_target): New classes.
6967         (remote_ops): Now a remote_target.
6968         (extended_remote_ops): Now an extended_remote_target.
6969         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6970         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6971         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6972         (remote_pass_signals, remote_set_syscall_catchpoint)
6973         (remote_program_signals, )
6974         (remote_thread_always_alive): Remove target_ops parameter.
6975         (remote_thread_alive, remote_thread_name)
6976         (remote_update_thread_list, remote_threads_extra_info)
6977         (remote_static_tracepoint_marker_at)
6978         (remote_static_tracepoint_markers_by_strid)
6979         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6980         (remote_open): Refactor as methods of remote_target.
6981         (extended_remote_open, extended_remote_detach)
6982         (extended_remote_attach, extended_remote_post_attach):
6983         (extended_remote_supports_disable_randomization)
6984         (extended_remote_create_inferior): : Refactor as method of
6985         extended_remote_target.
6986         (remote_set_permissions, remote_open_1, remote_detach)
6987         (remote_follow_fork, remote_follow_exec, remote_disconnect)
6988         (remote_resume, remote_commit_resume, remote_stop)
6989         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6990         (remote_terminal_ours, remote_wait, remote_fetch_registers)
6991         (remote_prepare_to_store, remote_store_registers)
6992         (remote_flash_erase, remote_flash_done, remote_files_info)
6993         (remote_kill, remote_mourn, remote_insert_breakpoint)
6994         (remote_remove_breakpoint, remote_insert_watchpoint)
6995         (remote_watchpoint_addr_within_range)
6996         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6997         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6998         (remote_supports_stopped_by_sw_breakpoint)
6999         (remote_stopped_by_hw_breakpoint)
7000         (remote_supports_stopped_by_hw_breakpoint)
7001         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7002         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7003         (remote_verify_memory): Refactor as methods of remote_target.
7004         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7005         parameter.
7006         (remote_xfer_partial, remote_get_memory_xfer_limit)
7007         (remote_search_memory, remote_rcmd, remote_memory_map)
7008         (remote_pid_to_str, remote_get_thread_local_address)
7009         (remote_get_tib_address, remote_read_description): Refactor as
7010         methods of remote_target.
7011         (remote_target::fileio_open, remote_target::fileio_pwrite)
7012         (remote_target::fileio_pread, remote_target::fileio_close): New.
7013         (remote_hostio_readlink, remote_hostio_fstat)
7014         (remote_filesystem_is_local, remote_can_execute_reverse)
7015         (remote_supports_non_stop, remote_supports_disable_randomization)
7016         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7017         (remote_supports_enable_disable_tracepoint)
7018         (remote_supports_string_tracing)
7019         (remote_can_run_breakpoint_commands, remote_trace_init)
7020         (remote_download_tracepoint, remote_can_download_tracepoint)
7021         (remote_download_trace_state_variable, remote_enable_tracepoint)
7022         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7023         (remote_trace_start, remote_get_trace_status)
7024         (remote_get_tracepoint_status, remote_trace_stop)
7025         (remote_trace_find, remote_get_trace_state_variable_value)
7026         (remote_save_trace_data, remote_get_raw_trace_data)
7027         (remote_set_disconnected_tracing, remote_core_of_thread)
7028         (remote_set_circular_trace_buffer, remote_traceframe_info)
7029         (remote_get_min_fast_tracepoint_insn_len)
7030         (remote_set_trace_buffer_size, remote_set_trace_notes)
7031         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7032         (remote_disable_btrace, remote_teardown_btrace)
7033         (remote_read_btrace, remote_btrace_conf)
7034         (remote_augmented_libraries_svr4_read, remote_load)
7035         (remote_pid_to_exec_file, remote_can_do_single_step)
7036         (remote_execution_direction, remote_thread_handle_to_thread_info):
7037         Refactor as methods of remote_target.
7038         (init_remote_ops, init_extended_remote_ops): Delete.
7039         (remote_can_async_p, remote_is_async_p, remote_async)
7040         (remote_thread_events, remote_upload_tracepoints)
7041         (remote_upload_trace_state_variables): Refactor as methods of
7042         remote_target.
7043         (_initialize_remote): Remove references to init_remote_ops and
7044         init_extended_remote_ops.
7045
7046         * remote-sim.c (gdbsim_target): New class.
7047         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7048         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7049         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7050         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7051         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7052         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7053         Refactor as methods of gdbsim_target.
7054         (gdbsim_ops): Now a gdbsim_target.
7055         (init_gdbsim_ops): Delete.
7056         (gdbsim_cntrl_c): Adjust.
7057         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7058
7059         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7060         (the_amd64_linux_nat_target): New.
7061         (amd64_linux_fetch_inferior_registers)
7062         (amd64_linux_store_inferior_registers): Refactor as methods of
7063         amd64_linux_nat_target.
7064         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7065         * i386-linux-nat.c: Don't include "linux-nat.h".
7066         (i386_linux_nat_target): New class.
7067         (the_i386_linux_nat_target): New.
7068         (i386_linux_fetch_inferior_registers)
7069         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7070         as methods of i386_linux_nat_target.
7071         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7072         * inf-child.c (inf_child_ops): Delete.
7073         (inf_child_fetch_inferior_registers)
7074         (inf_child_store_inferior_registers): Delete.
7075         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7076         methods of inf_child_target.
7077         (inf_child_target::supports_terminal_ours)
7078         (inf_child_target::terminal_init)
7079         (inf_child_target::terminal_inferior)
7080         (inf_child_target::terminal_ours_for_output)
7081         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7082         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7083         New.
7084         (inf_child_open, inf_child_disconnect, inf_child_close)
7085         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7086         (inf_child_post_startup_inferior, inf_child_can_run)
7087         (inf_child_pid_to_exec_file): Refactor as methods of
7088         inf_child_target.
7089         (inf_child_follow_fork): Delete.
7090         (inf_child_target::can_create_inferior)
7091         (inf_child_target::can_attach): New.
7092         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7093         (inf_child_target::has_stack, inf_child_target::has_registers)
7094         (inf_child_target::has_execution): New.
7095         (inf_child_fileio_open, inf_child_fileio_pwrite)
7096         (inf_child_fileio_pread, inf_child_fileio_fstat)
7097         (inf_child_fileio_close, inf_child_fileio_unlink)
7098         (inf_child_fileio_readlink, inf_child_use_agent)
7099         (inf_child_can_use_agent): Refactor as methods of
7100         inf_child_target.
7101         (return_zero, inf_child_target): Delete.
7102         (inf_child_target::inf_child_target): New.
7103         * inf-child.h: Include "target.h".
7104         (inf_child_target): Delete function prototype.
7105         (inf_child_target): New class.
7106         (inf_child_open_target, inf_child_mourn_inferior)
7107         (inf_child_maybe_unpush_target): Delete.
7108         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7109         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7110         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7111         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7112         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7113         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7114         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7115         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7116         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7117         methods of inf_ptrace_target.
7118         (inf_ptrace_target): Delete function.
7119         * inf-ptrace.h: Include "inf-child.h".
7120         (inf_ptrace_target): Delete function declaration.
7121         (inf_ptrace_target): New class.
7122         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7123         * linux-nat.c (linux_target): New.
7124         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7125         (linux_nat_target::~linux_nat_target): New.
7126         (linux_child_post_attach, linux_child_post_startup_inferior)
7127         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7128         (linux_child_remove_fork_catchpoint)
7129         (linux_child_insert_vfork_catchpoint)
7130         (linux_child_remove_vfork_catchpoint)
7131         (linux_child_insert_exec_catchpoint)
7132         (linux_child_remove_exec_catchpoint)
7133         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7134         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7135         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7136         (linux_nat_stopped_data_address)
7137         (linux_nat_stopped_by_sw_breakpoint)
7138         (linux_nat_supports_stopped_by_sw_breakpoint)
7139         (linux_nat_stopped_by_hw_breakpoint)
7140         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7141         (linux_nat_kill, linux_nat_mourn_inferior)
7142         (linux_nat_xfer_partial, linux_nat_thread_alive)
7143         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7144         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7145         (linux_child_static_tracepoint_markers_by_strid)
7146         (linux_nat_is_async_p, linux_nat_can_async_p)
7147         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7148         (linux_nat_supports_multi_process)
7149         (linux_nat_supports_disable_randomization, linux_nat_async)
7150         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7151         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7152         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7153         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7154         methods of linux_nat_target.
7155         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7156         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7157         parameter.
7158         (check_stopped_by_watchpoint): Adjust.
7159         (linux_xfer_partial): Delete.
7160         (linux_target_install_ops, linux_target, linux_nat_add_target):
7161         Delete.
7162         (linux_nat_target::linux_nat_target): New.
7163         * linux-nat.h: Include "inf-ptrace.h".
7164         (linux_nat_target): New.
7165         (linux_target, linux_target_install_ops, linux_nat_add_target):
7166         Delete function declarations.
7167         (linux_target): Declare global.
7168         * linux-thread-db.c (thread_db_target): New.
7169         (thread_db_target::thread_db_target): New.
7170         (thread_db_ops): Delete.
7171         (the_thread_db_target): New.
7172         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7173         (thread_db_update_thread_list, thread_db_pid_to_str)
7174         (thread_db_extra_thread_info)
7175         (thread_db_thread_handle_to_thread_info)
7176         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7177         (thread_db_resume): Refactor as methods of thread_db_target.
7178         (init_thread_db_ops): Delete.
7179         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7180         * x86-linux-nat.c: Don't include "linux-nat.h".
7181         (super_post_startup_inferior): Delete.
7182         (x86_linux_nat_target::~x86_linux_nat_target): New.
7183         (x86_linux_child_post_startup_inferior)
7184         (x86_linux_read_description, x86_linux_enable_btrace)
7185         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7186         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7187         methods of x86_linux_nat_target.
7188         (x86_linux_create_target): Delete.  Bits folded ...
7189         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7190         pointer.
7191         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7192         (x86_linux_nat_target): New class.
7193         (x86_linux_create_target): Delete.
7194         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7195         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7196         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7197         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7198         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7199         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7200         make extern.
7201         (x86_use_watchpoints): Delete.
7202         * x86-nat.h: Include "breakpoint.h" and "target.h".
7203         (x86_use_watchpoints): Delete.
7204         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7205         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7206         (x86_insert_watchpoint, x86_remove_watchpoint)
7207         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7208         (x86_stopped_by_hw_breakpoint): New declarations.
7209         (x86_nat_target): New template class.
7210
7211         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7212         (the_ppc_linux_nat_target): New.
7213         (ppc_linux_fetch_inferior_registers)
7214         (ppc_linux_can_use_hw_breakpoint)
7215         (ppc_linux_region_ok_for_hw_watchpoint)
7216         (ppc_linux_ranged_break_num_registers)
7217         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7218         (ppc_linux_insert_mask_watchpoint)
7219         (ppc_linux_remove_mask_watchpoint)
7220         (ppc_linux_can_accel_watchpoint_condition)
7221         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7222         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7223         (ppc_linux_watchpoint_addr_within_range)
7224         (ppc_linux_masked_watch_num_registers)
7225         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7226         (ppc_linux_read_description): Refactor as methods of
7227         ppc_linux_nat_target.
7228         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7229
7230         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7231         (procfs_target): New class.
7232         (the_procfs_target): New.
7233         (procfs_target): Delete function.
7234         (procfs_auxv_parse, procfs_attach, procfs_detach)
7235         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7236         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7237         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7238         (procfs_create_inferior, procfs_update_thread_list)
7239         (procfs_thread_alive, procfs_pid_to_str)
7240         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7241         (procfs_stopped_data_address, procfs_insert_watchpoint)
7242         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7243         (proc_find_memory_regions, procfs_info_proc)
7244         (procfs_make_note_section): Refactor as methods of procfs_target.
7245         (_initialize_procfs): Adjust.
7246         * sol-thread.c (sol_thread_target): New class.
7247         (sol_thread_ops): Now a sol_thread_target.
7248         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7249         (sol_thread_fetch_registers, sol_thread_store_registers)
7250         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7251         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7252         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7253         (init_sol_thread_ops): Delete.
7254         (_initialize_sol_thread): Adjust.  Remove references to
7255         init_sol_thread_ops and complete_target_initialization.
7256
7257         * windows-nat.c (windows_nat_target): New class.
7258         (windows_fetch_inferior_registers)
7259         (windows_store_inferior_registers, windows_resume, windows_wait)
7260         (windows_attach, windows_detach, windows_pid_to_exec_file)
7261         (windows_files_info, windows_create_inferior)
7262         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7263         (windows_close, windows_pid_to_str, windows_xfer_partial)
7264         (windows_get_tib_address, windows_get_ada_task_ptid)
7265         (windows_thread_name, windows_thread_alive): Refactor as
7266         windows_nat_target methods.
7267         (do_initial_windows_stuff): Adjust.
7268         (windows_target): Delete function.
7269         (_initialize_windows_nat): Adjust.
7270
7271         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7272         (darwin_mourn_inferior, darwin_kill_inferior)
7273         (darwin_create_inferior, darwin_attach, darwin_detach)
7274         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7275         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7276         (darwin_supports_multi_process): Refactor as darwin_nat_target
7277         methods.
7278         (darwin_resume_to, darwin_files_info): Delete.
7279         (_initialize_darwin_inferior): Rename to ...
7280         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7281         * darwin-nat.h: Include "inf-child.h".
7282         (darwin_nat_target): New class.
7283         (darwin_complete_target): Delete.
7284         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7285         (darwin_target): New.
7286         (i386_darwin_fetch_inferior_registers)
7287         (i386_darwin_store_inferior_registers): Refactor as methods of
7288         darwin_nat_target.
7289         (darwin_complete_target): Delete, with ...
7290         (_initialize_i386_darwin_nat): ... bits factored out here.
7291
7292         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7293         (the_alpha_linux_nat_target): New.
7294         (alpha_linux_register_u_offset): Refactor as
7295         alpha_linux_nat_target method.
7296         (_initialize_alpha_linux_nat): Adjust.
7297         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7298         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7299         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7300         methods of linux_nat_trad_target.
7301         (linux_trad_target): Delete.
7302         * linux-nat-trad.h (linux_trad_target): Delete function.
7303         (linux_nat_trad_target): New class.
7304         * mips-linux-nat.c (mips_linux_nat_target): New class.
7305         (super_fetch_registers, super_store_registers, super_close):
7306         Delete.
7307         (the_mips_linux_nat_target): New.
7308         (mips64_linux_regsets_fetch_registers)
7309         (mips64_linux_regsets_store_registers)
7310         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7311         (mips_linux_register_u_offset, mips_linux_read_description)
7312         (mips_linux_can_use_hw_breakpoint)
7313         (mips_linux_stopped_by_watchpoint)
7314         (mips_linux_stopped_data_address)
7315         (mips_linux_region_ok_for_hw_watchpoint)
7316         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7317         (mips_linux_close): Refactor as methods of mips_linux_nat.
7318         (_initialize_mips_linux_nat): Adjust to C++ification.
7319
7320         * aix-thread.c (aix_thread_target): New class.
7321         (aix_thread_ops): Now an aix_thread_target.
7322         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7323         (aix_thread_fetch_registers, aix_thread_store_registers)
7324         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7325         (aix_thread_thread_alive, aix_thread_pid_to_str)
7326         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7327         Refactor as methods of aix_thread_target.
7328         (init_aix_thread_ops): Delete.
7329         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7330         and complete_target_initialization.
7331         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7332         (rs6000_nat_target): New class.
7333         (the_rs6000_nat_target): New.
7334         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7335         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7336         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7337         (super_create_inferior): Delete.
7338         (_initialize_rs6000_nat): Adjust to C++ification.
7339
7340         * arm-linux-nat.c (arm_linux_nat_target): New class.
7341         (the_arm_linux_nat_target): New.
7342         (arm_linux_fetch_inferior_registers)
7343         (arm_linux_store_inferior_registers, arm_linux_read_description)
7344         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7345         (arm_linux_remove_hw_breakpoint)
7346         (arm_linux_region_ok_for_hw_watchpoint)
7347         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7348         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7349         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7350         arm_linux_nat_target.
7351         (_initialize_arm_linux_nat): Adjust to C++ification.
7352
7353         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7354         (the_aarch64_linux_nat_target): New.
7355         (aarch64_linux_fetch_inferior_registers)
7356         (aarch64_linux_store_inferior_registers)
7357         (aarch64_linux_child_post_startup_inferior)
7358         (aarch64_linux_read_description)
7359         (aarch64_linux_can_use_hw_breakpoint)
7360         (aarch64_linux_insert_hw_breakpoint)
7361         (aarch64_linux_remove_hw_breakpoint)
7362         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7363         (aarch64_linux_region_ok_for_hw_watchpoint)
7364         (aarch64_linux_stopped_data_address)
7365         (aarch64_linux_stopped_by_watchpoint)
7366         (aarch64_linux_watchpoint_addr_within_range)
7367         (aarch64_linux_can_do_single_step): Refactor as methods of
7368         aarch64_linux_nat_target.
7369         (super_post_startup_inferior): Delete.
7370         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7371
7372         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7373         (the_hppa_linux_nat_target): New.
7374         (hppa_linux_fetch_inferior_registers)
7375         (hppa_linux_store_inferior_registers): Refactor as methods of
7376         hppa_linux_nat_target.
7377         (_initialize_hppa_linux_nat): Adjust to C++ification.
7378
7379         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7380         (the_ia64_linux_nat_target): New.
7381         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7382         (ia64_linux_stopped_data_address)
7383         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7384         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7385         ia64_linux_nat_target methods.
7386         (super_xfer_partial): Delete.
7387         (_initialize_ia64_linux_nat): Adjust to C++ification.
7388
7389         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7390         (the_m32r_linux_nat_target): New.
7391         (m32r_linux_fetch_inferior_registers)
7392         (m32r_linux_store_inferior_registers): Refactor as
7393         m32r_linux_nat_target methods.
7394         (_initialize_m32r_linux_nat): Adjust to C++ification.
7395
7396         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7397         (the_m68k_linux_nat_target): New.
7398         (m68k_linux_fetch_inferior_registers)
7399         (m68k_linux_store_inferior_registers): Refactor as
7400         m68k_linux_nat_target methods.
7401         (_initialize_m68k_linux_nat): Adjust to C++ification.
7402
7403         * s390-linux-nat.c (s390_linux_nat_target): New class.
7404         (the_s390_linux_nat_target): New.
7405         (s390_linux_fetch_inferior_registers)
7406         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7407         (s390_insert_watchpoint, s390_remove_watchpoint)
7408         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7409         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7410         (s390_auxv_parse, s390_read_description): Refactor as methods of
7411         s390_linux_nat_target.
7412         (_initialize_s390_nat): Adjust to C++ification.
7413
7414         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7415         (the_sparc_linux_nat_target): New.
7416         (_initialize_sparc_linux_nat): Adjust to C++ification.
7417         * sparc-nat.c (sparc_fetch_inferior_registers)
7418         (sparc_store_inferior_registers): Remove target_ops parameter.
7419         * sparc-nat.h (sparc_fetch_inferior_registers)
7420         (sparc_store_inferior_registers): Remove target_ops parameter.
7421         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7422         (the_sparc64_linux_nat_target): New.
7423         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7424
7425         * spu-linux-nat.c (spu_linux_nat_target): New class.
7426         (the_spu_linux_nat_target): New.
7427         (spu_child_post_startup_inferior, spu_child_post_attach)
7428         (spu_child_wait, spu_fetch_inferior_registers)
7429         (spu_store_inferior_registers, spu_xfer_partial)
7430         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7431         methods.
7432         (_initialize_spu_nat): Adjust to C++ification.
7433
7434         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7435         (the_tilegx_linux_nat_target): New.
7436         (fetch_inferior_registers, store_inferior_registers):
7437         Refactor as methods.
7438         (_initialize_tile_linux_nat): Adjust to C++ification.
7439
7440         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7441         (the_xtensa_linux_nat_target): New.
7442         (xtensa_linux_fetch_inferior_registers)
7443         (xtensa_linux_store_inferior_registers): Refactor as
7444         xtensa_linux_nat_target methods.
7445         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7446
7447         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7448         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7449         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7450         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7451         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7452         (fbsd_stopped_by_sw_breakpoint)
7453         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7454         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7455         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7456         (fbsd_post_startup_inferior, fbsd_post_attach)
7457         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7458         (fbsd_set_syscall_catchpoint)
7459         (super_xfer_partial, super_resume, super_wait)
7460         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7461         (fbsd_handle_debug_trap): Remove target_ops parameter.
7462         (fbsd_nat_add_target): Delete.
7463         * fbsd-nat.h: Include "inf-ptrace.h".
7464         (fbsd_nat_add_target): Delete.
7465         (USE_SIGTRAP_SIGINFO): Define.
7466         (fbsd_nat_target): New class.
7467
7468         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7469         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7470         (amd64bsd_target): Delete.
7471         * amd64-bsd-nat.h: New file.
7472         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7473         "x86-bsd-nat.h".
7474         (amd64_fbsd_nat_target): New class.
7475         (the_amd64_fbsd_nat_target): New.
7476         (amd64fbsd_read_description): Refactor as method of
7477         amd64_fbsd_nat_target.
7478         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7479         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7480         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7481         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7482         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7483         (i386bsd_target): Delete.
7484         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7485         (i386bsd_fetch_inferior_registers)
7486         (i386bsd_store_inferior_registers): Declare.
7487         (i386_bsd_nat_target): New class.
7488         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7489         (the_i386_fbsd_nat_target): New.
7490         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7491         i386_fbsd_nat_target methods.
7492         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7493         (_initialize_i386fbsd_nat): Adjust to C++ification.
7494         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7495         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7496         (_initialize_x86_bsd_nat): Adjust to C++ification.
7497         * x86-bsd-nat.h: Include "x86-nat.h".
7498         (x86bsd_target): Delete declaration.
7499         (x86bsd_nat_target): New class.
7500
7501         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7502         (the_aarch64_fbsd_nat_target): New.
7503         (aarch64_fbsd_fetch_inferior_registers)
7504         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7505         aarch64_fbsd_nat_target.
7506         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7507         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7508         (the_alpha_bsd_nat_target): New.
7509         (alphabsd_fetch_inferior_registers)
7510         (alphabsd_store_inferior_registers): Refactor as
7511         alpha_bsd_nat_target methods.
7512         (_initialize_alphabsd_nat): Refactor as methods of
7513         alpha_bsd_nat_target.
7514         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7515         (the_amd64_nbsd_nat_target): New.
7516         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7517         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7518         (the_amd64_obsd_nat_target): New.
7519         (_initialize_amd64obsd_nat): Adjust to C++ification.
7520         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7521         (the_arm_fbsd_nat_target): New.
7522         (arm_fbsd_fetch_inferior_registers)
7523         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7524         (_initialize_arm_fbsd_nat): Refactor as methods of
7525         arm_fbsd_nat_target.
7526         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7527         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7528         (the_arm_netbsd_nat_target): New.
7529         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7530         arm_netbsd_nat_target.
7531         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7532         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7533         (the_hppa_nbsd_nat_target): New.
7534         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7535         hppa_nbsd_nat_target methods.
7536         (_initialize_hppanbsd_nat): Adjust to C++ification.
7537         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7538         (the_hppa_obsd_nat_target): New.
7539         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7540         methods of hppa_obsd_nat_target.
7541         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7542         add_target.
7543         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7544         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7545         add_target.
7546         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7547         (_initialize_i386obsd_nat): Use add_target.
7548         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7549         (the_m68k_bsd_nat_target): New.
7550         (m68kbsd_fetch_inferior_registers)
7551         (m68kbsd_store_inferior_registers): Refactor as methods of
7552         m68k_bsd_nat_target.
7553         (_initialize_m68kbsd_nat): Adjust to C++ification.
7554         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7555         (the_mips_fbsd_nat_target): New.
7556         (mips_fbsd_fetch_inferior_registers)
7557         (mips_fbsd_store_inferior_registers): Refactor as methods of
7558         mips_fbsd_nat_target.
7559         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7560         add_target.
7561         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7562         (the_mips_nbsd_nat_target): New.
7563         (mipsnbsd_fetch_inferior_registers)
7564         (mipsnbsd_store_inferior_registers): Refactor as methods of
7565         mips_nbsd_nat_target.
7566         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7567         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7568         (the_mips64_obsd_nat_target): New.
7569         (mips64obsd_fetch_inferior_registers)
7570         (mips64obsd_store_inferior_registers): Refactor as methods of
7571         mips64_obsd_nat_target.
7572         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7573         add_target.
7574         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7575         nbsd_nat_target.
7576         * nbsd-nat.h: Include "inf-ptrace.h".
7577         (nbsd_nat_target): New class.
7578         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7579         (obsd_wait): Refactor as methods of obsd_nat_target.
7580         (obsd_add_target): Delete.
7581         * obsd-nat.h: Include "inf-ptrace.h".
7582         (obsd_nat_target): New class.
7583         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7584         (the_ppc_fbsd_nat_target): New.
7585         (ppcfbsd_fetch_inferior_registers)
7586         (ppcfbsd_store_inferior_registers): Refactor as methods of
7587         ppc_fbsd_nat_target.
7588         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7589         add_target.
7590         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7591         (the_ppc_nbsd_nat_target): New.
7592         (ppcnbsd_fetch_inferior_registers)
7593         (ppcnbsd_store_inferior_registers): Refactor as methods of
7594         ppc_nbsd_nat_target.
7595         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7596         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7597         (the_ppc_obsd_nat_target): New.
7598         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7599         methods of ppc_obsd_nat_target.
7600         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7601         add_target.
7602         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7603         (the_sh_nbsd_nat_target): New.
7604         (shnbsd_fetch_inferior_registers)
7605         (shnbsd_store_inferior_registers): Refactor as methods of
7606         sh_nbsd_nat_target.
7607         (_initialize_shnbsd_nat): Adjust to C++ification.
7608         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7609         (inf_ptrace_xfer_partial): Delete.
7610         (sparc_xfer_partial, sparc_target): Delete.
7611         * sparc-nat.h (sparc_fetch_inferior_registers)
7612         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7613         (sparc_target): Delete function declaration.
7614         (sparc_target): New template class.
7615         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7616         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7617         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7618         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7619         add_target.
7620         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7621         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7622         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7623         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7624         add_target.
7625         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7626         (the_vax_bsd_nat_target): New.
7627         (vaxbsd_fetch_inferior_registers)
7628         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7629         methods.
7630         (_initialize_vaxbsd_nat): Adjust to C++ification.
7631
7632         * bsd-kvm.c (bsd_kvm_target): New class.
7633         (bsd_kvm_ops): Now a bsd_kvm_target.
7634         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7635         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7636         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7637         bsd_kvm_target.
7638         (bsd_kvm_return_one): Delete.
7639         (bsd_kvm_add_target): Adjust to C++ification.
7640
7641         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7642         (nto_procfs_target_procfs): New classes.
7643         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7644         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7645         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7646         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7647         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7648         (procfs_remove_hw_breakpoint, procfs_resume)
7649         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7650         (procfs_kill_inferior, procfs_store_registers)
7651         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7652         as methods of nto_procfs_target.
7653         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7654         (nto_native_ops): Delete.
7655         (procfs_open, procfs_native_open): Delete.
7656         (nto_native_ops): Now an nto_procfs_target_native.
7657         (init_procfs_targets): Adjust to C++ification.
7658         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7659         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7660         Refactor as methods of nto_procfs_target.
7661
7662         * go32-nat.c (go32_nat_target): New class.
7663         (the_go32_nat_target): New.
7664         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7665         (go32_store_registers, go32_xfer_partial, go32_files_info)
7666         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7667         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7668         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7669         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7670         (go32_target): Delete.
7671         (_initialize_go32_nat): Adjust to C++ification.
7672
7673         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7674         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7675         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7676         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7677         gnu_nat_target.
7678         (gnu_target): Delete.
7679         * gnu-nat.h (gnu_target): Delete.
7680         (gnu_nat_target): New class.
7681         * i386-gnu-nat.c (gnu_base_target): New.
7682         (i386_gnu_nat_target): New class.
7683         (the_i386_gnu_nat_target): New.
7684         (_initialize_i386gnu_nat): Adjust to C++ification.
7685
7686 2018-05-02  Pedro Alves  <palves@redhat.com>
7687
7688         * bfd-target.c (target_bfd_xclose): Rename to ...
7689         (target_bfd_close): ... this.
7690         (target_bfd_reopen): Adjust.
7691         * target.c (target_close): Remove references to to_xclose.
7692         * target.h (target_ops::to_xclose): Delete.
7693         (target_ops::to_close): Update comments.
7694
7695 2018-05-02  Pedro Alves  <palves@redhat.com>
7696
7697         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7698         "linux-nat.h".
7699         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7700         * inf-ptrace.c (inf_ptrace_register_u_offset)
7701         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7702         (inf_ptrace_store_register, inf_ptrace_store_registers)
7703         (inf_ptrace_trad_target): Move to ...
7704         * linux-nat-trad.c: ... this new file.
7705         * linux-nat-trad.h: New file.
7706         * linux-nat.c (linux_target_install_ops): Make extern.
7707         (linux_trad_target): Delete.
7708         * linux-nat.h (linux_trad_target): Delete declaration.
7709         (linux_target_install_ops): Declare.
7710         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7711         "linux-nat.h".
7712
7713 2018-05-02  Pedro Alves  <palves@redhat.com>
7714
7715         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7716         procfs_target/add_target here.
7717         * procfs.c (procfs_target): Make static.
7718         (_initialize_procfs): Call add_target here.
7719         * procfs.h (struct target_ops): Remove forward declaration.
7720         (procfs_target): Remove declaration.
7721         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7722
7723 2018-05-02  Pedro Alves  <palves@redhat.com>
7724
7725         * procfs.c (procfs_stopped_by_watchpoint)
7726         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7727         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7728         Forward declare.
7729         (procfs_use_watchpoints): Delete, move contents...
7730         (procfs_target): ... here.
7731         * procfs.h (procfs_use_watchpoints): Delete declaration.
7732         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7733         procfs_use_watchpoints.
7734         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7735         procfs_use_watchpoints.
7736
7737 2018-05-02  Tom Tromey  <tom@tromey.com>
7738
7739         PR python/20084:
7740         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7741         and var_zuinteger_unlimited.
7742         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7743         and PARAM_ZUINTEGER_UNLIMITED.
7744         (set_parameter_value): Handle var_zuinteger and
7745         var_zuinteger_unlimited.
7746         (add_setshow_generic): Likewise.
7747         (parmpy_init): Likewise.
7748
7749 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7750
7751         PR rust/23124
7752         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7753         pointer is not null before dereferencing it.
7754
7755 2018-04-30  Tom Tromey  <tom@tromey.com>
7756
7757         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7758         is_mi_like_p.
7759
7760 2018-04-30  Tom Tromey  <tom@tromey.com>
7761
7762         * breakpoint.c (mention): Remove use of is_mi_like_p.
7763         (print_mention_ranged_breakpoint): Likewise.
7764         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7765         of is_mi_like_p.
7766
7767 2018-04-30  Tom Tromey  <tom@tromey.com>
7768
7769         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7770
7771 2018-04-30  Tom Tromey  <tom@tromey.com>
7772
7773         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7774         (info_spu_event_command): Remove some uses of is_mi_like_p.
7775
7776 2018-04-30  Tom Tromey  <tom@tromey.com>
7777
7778         * python/py-framefilter.c (py_print_single_arg)
7779         (enumerate_locals, py_print_args, py_print_frame): Remove some
7780         uses of is_mi_like_p.
7781
7782 2018-04-30  Tom Tromey  <tom@tromey.com>
7783
7784         * ui-out.c: Update.
7785         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7786         * ui-out.h (ui_out::is_mi_like_p): Now const.
7787         (ui_out::do_is_mi_like_p): Now const.
7788         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7789
7790 2018-04-30  Tom Tromey  <tom@tromey.com>
7791
7792         * varobj.c (varobj_set_visualizer): Use new_reference.
7793         * python/python.c (gdbpy_decode_line): Use new_reference.
7794         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7795         new_reference.
7796
7797 2018-04-30  Tom Tromey  <tom@tromey.com>
7798
7799         * varobj.c (install_new_value): Use new_reference.
7800         * value.h (value_incref): Return void.  Swap intro comment with
7801         value_decref.
7802         * value.c (set_value_parent): Use new_reference.
7803         (value_incref): Return void.  Update intro comment.
7804         (release_value): Use new_reference.
7805         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7806
7807 2018-04-30  Tom Tromey  <tom@tromey.com>
7808
7809         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7810         * gdb_bfd.h (new_bfd_ref): Remove.
7811         (gdb_bfd_open): Update comment.
7812         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7813         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7814         (gdb_bfd_fdopenr): Use new_reference.
7815         * exec.c (exec_file_attach): Use new_reference.
7816
7817 2018-04-30  Tom Tromey  <tom@tromey.com>
7818
7819         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7820         method.
7821
7822 2018-04-30  Tom Tromey  <tom@tromey.com>
7823
7824         * jit.c (jit_read_code_entry): Use type_align.
7825         * i386-tdep.c (i386_gdbarch_init): Don't call
7826         set_gdbarch_long_long_align_bit.
7827         * gdbarch.sh: Remove long_long_align_bit.
7828         * gdbarch.c, gdbarch.h: Rebuild.
7829         * arc-tdep.c (arc_type_align): New function.
7830         (arc_gdbarch_init): Use arc_type_align.  Don't call
7831         set_gdbarch_long_long_align_bit.
7832
7833 2018-04-30  Tom Tromey  <tom@tromey.com>
7834
7835         * rust-lang.c (rust_type_alignment): Remove.
7836         (rust_composite_type): Use type_align.
7837
7838 2018-04-30  Tom Tromey  <tom@tromey.com>
7839
7840         * NEWS: Mention Type.align.
7841         * python/py-type.c (typy_get_alignof): New function.
7842         (type_object_getset): Add "alignof".
7843
7844 2018-04-30  Tom Tromey  <tom@tromey.com>
7845
7846         PR exp/17095:
7847         * NEWS: Update.
7848         * std-operator.def (UNOP_ALIGNOF): New operator.
7849         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7850         New.
7851         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7852         * c-lang.c (c_op_print_tab): Add alignof.
7853         * c-exp.y (ALIGNOF): New token.
7854         (exp): Add "ALIGNOF" production.
7855         (ident_tokens): Add _Alignof and alignof.
7856
7857 2018-04-30  Tom Tromey  <tom@tromey.com>
7858
7859         * i386-tdep.c (i386_type_align): New function.
7860         (i386_gdbarch_init): Update.
7861         * gdbarch.sh (type_align): New method.
7862         * gdbarch.c, gdbarch.h: Rebuild.
7863         * arch-utils.h (default_type_align): Declare.
7864         * arch-utils.c (default_type_align): New function.
7865         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7866         (struct type) <align_log2>: New field.
7867         <instance_flags>: Now a bitfield.
7868         (TYPE_RAW_ALIGN): New macro.
7869         (type_align, type_raw_align, set_type_align): Declare.
7870         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7871         functions.
7872         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7873         (get_alignment, maybe_set_alignment): New functions.
7874         (read_structure_type, read_enumeration_type, read_array_type)
7875         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7876         (read_subrange_type, read_base_type): Set type alignment.
7877
7878 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
7879
7880         * dwarf2read.c (read_index_from_section): Use bool.
7881
7882 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
7883
7884         PR gdb/22950
7885         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7886         with #ifdef.
7887
7888 2018-04-29  John Reiser  <jreiser@BitWagon.com>
7889
7890         PR build/22873
7891         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7892         last step, and do it atomically.
7893
7894 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
7895
7896         * compile/compile-c-types.c (convert_int, convert_float):
7897         Update for C FE v1.
7898
7899 2018-04-27  Tom Tromey  <tom@tromey.com>
7900
7901         PR rust/22545:
7902         * rust-lang.c (rust_inclusive_range_type_p): New function.
7903         (rust_range): Handle inclusive ranges.
7904         (rust_compute_range): Likewise.
7905         * rust-exp.y (struct rust_op) <inclusive>: New field.
7906         (DOTDOTEQ): New constant.
7907         (range_expr): Add "..=" productions.
7908         (operator_tokens): Add "..=" token.
7909         (ast_range): Add "inclusive" parameter.
7910         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7911         ranges.
7912         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7913         bounds values.
7914         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7915         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7916         Update comments.
7917         * expprint.c (print_subexp_standard): Handle new bounds values.
7918         (dump_subexp_body_standard): Likewise.
7919
7920 2018-04-27  Tom Tromey  <tom@tromey.com>
7921
7922         * configure: Rebuild.
7923         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7924         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7925         "OVERRIDE".
7926         (class symbol_needs_eval_context): Likewise.
7927         * dwarf2read.c (mock_mapped_index::symbol_name_count)
7928         (mock_mapped_index::symbol_name_at): Use "override".  Remove
7929         "virtual".
7930         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7931         "override".
7932         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7933         * aarch64-tdep.c (instruction_reader::read): Use "override".
7934         (instruction_reader_test::read): Likewise.
7935         * arm-tdep.c (instruction_reader::read): Use "override".
7936         (instruction_reader_thumb::read): Likewise.
7937
7938 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
7939
7940         PR remote/9665
7941         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7942         instead of remote_send.
7943         (remote_send): Remove.
7944
7945 2018-04-26  Pedro Alves  <palves@redhat.com>
7946
7947         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7948         find_function_start_sal instead of find_pc_line.
7949
7950 2018-04-26  Pedro Alves  <palves@redhat.com>
7951
7952         * breakpoint.c (set_breakpoint_location_function): Handle
7953         mst_data_gnu_ifunc.
7954         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7955         * elfread.c (elf_symtab_read): Give data symbols with
7956         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7957         (elf_rel_plt_read): Update comment.
7958         * linespec.c (convert_linespec_to_sals): Handle
7959         mst_data_gnu_ifunc.
7960         (minsym_found): Handle mst_data_gnu_ifunc.
7961         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7962         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7963         * parse.c (find_minsym_type_and_address): Handle
7964         mst_data_gnu_ifunc.
7965         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7966         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7967         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7968         comment.
7969         <mst_data_gnu_ifunc>: New enumerator.
7970
7971 2018-04-26  Pedro Alves  <palves@redhat.com>
7972
7973         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7974         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
7975         'want_trampoline' parameter by a lookup_msym_prefer parameter.
7976         Handle it.
7977         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7978         (lookup_minimal_symbol_by_pc): Adjust.
7979         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7980         (lookup_solib_trampoline_symbol_by_pc): Adjust.
7981         * minsyms.h (lookup_msym_prefer): New enum.
7982         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7983         parameter by a lookup_msym_prefer parameter.
7984
7985 2018-04-26  Pedro Alves  <palves@redhat.com>
7986
7987         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7988         ends in "@plt" instead of looking at the symbol's section.
7989
7990 2018-04-26  Pedro Alves  <palves@redhat.com>
7991
7992         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
7993         all references.
7994         (find_pc_partial_function_gnu_ifunc): Rename to ...
7995         (find_pc_partial_function): ... this, and remove references to
7996         'is_gnu_ifunc_p'.
7997         (find_pc_partial_function): Delete old implementation.
7998         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7999
8000 2018-04-26  Pedro Alves  <palves@redhat.com>
8001
8002         * linespec.c (struct bound_minimal_symbol_search_key): New.
8003         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8004         skip first line if we found a GNU ifunc minimal symbol by name.
8005         (compare_msymbols): Change parameters to work with a destructured
8006         lhs minsym.
8007         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8008         functions.
8009
8010 2018-04-26  Pedro Alves  <palves@redhat.com>
8011
8012         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8013         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8014         address/name.
8015         (add_location_to_breakpoint): Store the minsym and the objfile in
8016         the breakpoint location.
8017         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8018         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8019         Record the minsym in the sal.
8020         * symtab.h (symtab_and_line) <msymbol>: New field.
8021
8022 2018-04-26  Pedro Alves  <palves@redhat.com>
8023
8024         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8025         unless we actually resolved the ifunc.
8026
8027 2018-04-26  Pedro Alves  <palves@redhat.com>
8028
8029         * c-exp.y (variable production): Prefer ifunc minsyms over
8030         regular function symbols.
8031         * symtab.c (find_gnu_ifunc): New function.
8032         * minsyms.h (lookup_msym_prefer): New enum.
8033         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8034         parameter by a lookup_msym_prefer parameter.
8035         * symtab.h (find_gnu_ifunc): New declaration.
8036
8037 2018-04-26  Pedro Alves  <palves@redhat.com>
8038
8039         * blockframe.c (find_gnu_ifunc_target_type): New function.
8040         (find_function_type): New.
8041         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8042         return a value with a memory address.
8043         (eval_call): For calls to GNU ifunc functions, try to find the
8044         type of the target function from the type that the resolver
8045         returns.
8046         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8047         symbols.
8048         * infcall.c (find_function_return_type): Delete.
8049         (find_function_addr): Add 'function_type' parameter.  For calls to
8050         GNU ifunc functions, try to find the type of the target function
8051         from the type that the resolver returns, and return it via
8052         FUNCTION_TYPE.
8053         (call_function_by_hand_dummy): Adjust to use the function type
8054         returned by find_function_addr.
8055         (find_function_addr): Add 'function_type' parameter and move
8056         description here.
8057         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8058         declarations.
8059
8060 2018-04-26  Pedro Alves  <palves@redhat.com>
8061
8062         * c-exp.y (variable production): Skip finding an alias for ifunc
8063         symbols.
8064
8065 2018-04-26  Pedro Alves  <palves@redhat.com>
8066
8067         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8068
8069 2018-04-25  Pedro Alves  <palves@redhat.com>
8070
8071         * infcmd.c (kill_command): Print the pid as string, not the whole
8072         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8073         message.
8074         * remote.c (remote_detach_1): Print the pid as string, not the
8075         whole thread's ptid.
8076
8077 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8078             Sergio Durigan Junior  <sergiodj@redhat.com>
8079             Pedro Alves  <palves@redhat.com>
8080
8081         * infcmd.c (kill_command): Print message when inferior has
8082         been killed.
8083         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8084         '1'.
8085         (add_inferior): Improve message printed when
8086         'print_inferior_events' is on.
8087         (exit_inferior): Remove message printed when
8088         'print_inferior_events' is on.
8089         (detach_inferior): Improve message printed when
8090         'print_inferior_events' is on.
8091         (initialize_inferiors): Use 'add_inferior_silent' to set
8092         'current_inferior_'.
8093         * inferior.h (print_inferior_events): Declare here as
8094         'extern'.
8095         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8096         '[Detaching...]' messages when 'print_inferior_events' is on.
8097         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8098         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8099         'Detaching after fork from child...', replace it by '... from
8100         parent...'.
8101         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8102         prefix/suffix when printing 'Detaching...' messages.  Print
8103         them when 'print_inferior_events' is on.
8104         * remote.c (remote_detach_1): Print message when detaching
8105         from inferior and '!is_fork_parent'.
8106
8107 2018-04-24  Tom Tromey  <tom@tromey.com>
8108
8109         * cli-out.h: Reindent.
8110
8111 2018-04-24  Tom Tromey  <tom@tromey.com>
8112
8113         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8114         (cli_ui_out::do_field_string): Use fputs_filtered.
8115         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8116
8117 2018-04-23  Tom Tromey  <tom@tromey.com>
8118
8119         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8120         gdb::unique_xmalloc_ptr.
8121
8122 2018-04-23  Tom Tromey  <tom@tromey.com>
8123
8124         * configure: Rebuild.
8125
8126 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8127
8128         PR gdb/23095
8129         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8130         prepare_for_testing.  Set normal_bp to r_debug_state if target
8131         is bsd.
8132
8133 2018-04-21  Pedro Alves  <palves@redhat.com>
8134             Rajendra SY  <rajendra.sy@gmail.com>
8135
8136         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8137         * remote.c (extended_remote_attach): In all-stop mode, mark the
8138         thread as executing.
8139
8140 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8141
8142         * thread.c (thread_apply_all_command): Fix comment.
8143         (thread_command): Fix comment.
8144
8145 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8146
8147         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8148         parameter.
8149         * features/aarch64-core.c (create_feature_aarch64_core):
8150         Regenerate.
8151         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8152         Likewise.
8153         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8154         Likewise.
8155         * features/i386/32bit-avx512.c
8156         (create_feature_i386_32bit_avx512): Likewise.
8157         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8158         Likewise.
8159         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8160         Likewise.
8161         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8162         Likewise.
8163         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8164         Likewise.
8165         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8166         Likewise.
8167         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8168         Likewise.
8169         * features/i386/64bit-avx512.c
8170         (create_feature_i386_64bit_avx512): Likewise.
8171         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8172         Likewise.
8173         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8174         Likewise.
8175         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8176         Likewise.
8177         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8178         Likewise.
8179         * features/i386/64bit-segments.c
8180         (create_feature_i386_64bit_segments): Likewise.
8181         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8182         Likewise.
8183         * features/i386/x32-core.c
8184         (create_feature_i386_x32_core): Likewise.
8185         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8186         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8187         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8188         * target-descriptions.c: In generated code, don't pass xml
8189         filename.
8190
8191 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8192
8193         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8194         (print_xml_feature::visit_post): Likewise.
8195         (print_xml_feature::visit): Likewise.
8196         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8197         (print_xml_feature): Add new class.
8198         * regformats/regdat.sh: Null xmltarget on feature targets.
8199         * target-descriptions.c (struct target_desc): Add xmltarget.
8200         (maintenance_check_tdesc_xml_convert): Add unittest function.
8201         (tdesc_get_features_xml): Add function to get xml.
8202         (maintenance_check_xml_descriptions): Test xml generation.
8203         * xml-tdesc.c (string_read_description_xml): Add function.
8204         * xml-tdesc.h (string_read_description_xml): Add declaration.
8205
8206 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8207
8208         * features/Makefile: Add feature marker to targets with new style
8209         target descriptions.
8210         * regformats/aarch64.dat: Regenerate.
8211         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8212         * regformats/i386/amd64-avx-linux.dat: Likewise.
8213         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8214         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8215         * regformats/i386/amd64-linux.dat: Likewise.
8216         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8217         * regformats/i386/amd64.dat: Likewise.
8218         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8219         * regformats/i386/i386-avx-linux.dat: Likewise.
8220         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8221         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8222         * regformats/i386/i386-linux.dat: Likewise.
8223         * regformats/i386/i386-mmx-linux.dat: Likewise.
8224         * regformats/i386/i386-mpx-linux.dat: Likewise.
8225         * regformats/i386/i386.dat: Likewise.
8226         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8227         * regformats/i386/x32-avx-linux.dat: Likewise.
8228         * regformats/i386/x32-linux.dat: Likewise.
8229         * regformats/tic6x-c62x-linux.dat: Likewise.
8230         * regformats/tic6x-c64x-linux.dat: Likewise.
8231         * regformats/tic6x-c64xp-linux.dat: Likewise.
8232         * regformats/regdat.sh: Parse feature marker.
8233
8234 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8235
8236         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8237         (tdesc_osabi_name): Likewise.
8238         * target-descriptions.c (tdesc_architecture_name): Add new
8239         function.
8240         (tdesc_osabi_name): Likewise.
8241
8242 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8243
8244         * common/tdesc.c (tdesc_predefined_type): Move to here.
8245         (tdesc_named_type): Likewise.
8246         (tdesc_create_vector): Likewise.
8247         (tdesc_create_struct): Likewise.
8248         (tdesc_set_struct_size): Likewise.
8249         (tdesc_create_union): Likewise.
8250         (tdesc_create_flags): Likewise.
8251         (tdesc_create_enum): Likewise.
8252         (tdesc_add_field): Likewise.
8253         (tdesc_add_typed_bitfield): Likewise.
8254         (tdesc_add_bitfield): Likewise.
8255         (tdesc_add_flag): Likewise.
8256         (tdesc_add_enum_value): Likewise.
8257         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8258         (struct tdesc_type_vector): Likewise.
8259         (struct tdesc_type_field): Likewise.
8260         (struct tdesc_type_with_fields): Likewise.
8261         (tdesc_create_enum): Add declaration.
8262         (tdesc_add_typed_bitfield): Likewise.
8263         (tdesc_add_enum_value): Likewise.
8264         * target-descriptions.c (tdesc_type_field): Move from here.
8265         (tdesc_type_builtin): Likewise.
8266         (tdesc_type_vector): Likewise.
8267         (tdesc_type_with_fields): Likewise.
8268         (tdesc_predefined_types): Likewise.
8269         (tdesc_named_type): Likewise.
8270         (tdesc_create_vector): Likewise.
8271         (tdesc_create_struct): Likewise.
8272         (tdesc_set_struct_size): Likewise.
8273         (tdesc_create_union): Likewise.
8274         (tdesc_create_flags): Likewise.
8275         (tdesc_create_enum): Likewise.
8276         (tdesc_add_field): Likewise.
8277         (tdesc_add_typed_bitfield): Likewise.
8278         (tdesc_add_bitfield): Likewise.
8279         (tdesc_add_flag): Likewise.
8280         (tdesc_add_enum_value): Likewise.
8281         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8282         (tdesc_add_typed_bitfield): Likewise.
8283         (tdesc_add_enum_value): Likewise.
8284
8285 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8286
8287         * common/tdesc.c (tdesc_feature::accept): Move to here.
8288         (tdesc_feature::operator==): Likewise.
8289         (tdesc_create_reg): Likewise.
8290         * common/tdesc.h (tdesc_type_kind): Likewise.
8291         (struct tdesc_type): Likewise.
8292         (struct tdesc_feature): Likewise.
8293         * regformats/regdat.sh: Create a feature.
8294         * target-descriptions.c (tdesc_type_kind): Move from here.
8295         (tdesc_type): Likewise.
8296         (tdesc_type_up): Likewise.
8297         (tdesc_feature): Likewise.
8298         (tdesc_create_reg): Likewise.
8299
8300 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8301
8302         * Makefile.in: Add arch/tdesc.c
8303         * common/tdesc.c: New file.
8304         * common/tdesc.h (tdesc_element_visitor): Move to here.
8305         (tdesc_element): Likewise.
8306         (tdesc_reg): Likewise.
8307         (tdesc_reg_up): Likewise.
8308         * regformats/regdef.h (reg): Add offset to constructors.
8309         * target-descriptions.c (tdesc_element_visitor): Move from here.
8310         (tdesc_element): Likewise.
8311         (tdesc_reg): Likewise.
8312         (tdesc_reg_up): Likewise.
8313
8314 2018-04-17  Tom Tromey  <tom@tromey.com>
8315
8316         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8317         discriminant field.
8318
8319 2018-04-17  Tom Tromey  <tom@tromey.com>
8320
8321         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8322
8323 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8324
8325         * symtab.c (print_symbol_info): Skip printing filename and line
8326         number when `last' is NULL.
8327         (symtab_symbol_info): Use empty string instead of NULL for first
8328         invocation of print_symbol_info.
8329         (rbreak_command): Pass NULL to `last' parameter of
8330         print_symbol_info.
8331
8332 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8333
8334         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8335         instead of nullptr.
8336
8337 2018-04-16  Pedro Alves  <palves@redhat.com>
8338
8339         * MAINTAINERS (sh): Remove.
8340         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8341         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8342         (ALLDEPFILES): Remove sh64-tdep.c.
8343         * NEWS: Mentions that support for SH-5/SH64 is removed.
8344         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8345         (sh*-*-openbsd*): Ditto.
8346         (sh64-*-elf*): Remove.
8347         (sh*): Remove.
8348         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8349         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8350         * sh-tdep.c: No longer include "sh64-tdep.h".
8351         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8352         * sh64-tdep.c, sh64-tdep.h: Remove files.
8353
8354 2018-04-16  Pedro Alves  <palves@redhat.com>
8355
8356         * MAINTAINERS: Remove m88k.
8357         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8358         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8359         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8360         * NEWS: Mention that support for m88k was removed.
8361         * configure.host (m88*-*-*): Remove support.
8362         * configure.nat (m88k-*-*): Remove support.
8363         * configure.tgt (m88*-*-openbsd*): Remove.
8364         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8365
8366 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8367
8368         * configure.tgt (x86_tobjs): New variable.
8369         (amd64_tobjs, i386_tobjs): Use it.
8370
8371 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8372
8373         * symtab.c (print_symbol_info): Precede the symbol definition by
8374         the line number when available.
8375         * NEWS: Advertise this enhancement.
8376
8377 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8378
8379         * NEWS (New options): announce set/show record btrace cpu.
8380         * btrace.c: Include record-btrace.h.
8381         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8382         the vendor is unknown.
8383         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8384         Maybe overwrite the btrace configuration's cpu.
8385         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8386         (btrace_fetch): Add cpu parameter.  Update callers.
8387         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8388         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8389         errata workarounds if the vendor is unknown.
8390         * python/py-record-btrace.c: Include record-btrace.h.
8391         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8392         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8393         * record-btrace.c (record_btrace_cpu_state_kind): New.
8394         (record_btrace_cpu): New.
8395         (set_record_btrace_cpu_cmdlist): New.
8396         (record_btrace_get_cpu): New.
8397         (require_btrace_thread, record_btrace_info)
8398         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8399         (cmd_set_record_btrace_cpu_none): New.
8400         (cmd_set_record_btrace_cpu_auto): New.
8401         (cmd_set_record_btrace_cpu): New.
8402         (cmd_show_record_btrace_cpu): New.
8403         (_initialize_record_btrace): Initialize set/show record btrace cpu
8404         commands.
8405         * record-btrace.h (record_btrace_get_cpu): New.
8406
8407 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8408
8409         * record.c (set_record_command): Fix typo in message.
8410
8411 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8412
8413         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8414
8415 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8416
8417         * infrun.c (process_event_stop_test): Call
8418         gdbarch_in_indirect_branch_thunk.
8419         * gdbarch.sh (in_indirect_branch_thunk): New.
8420         * gdbarch.c: Regenerated.
8421         * gdbarch.h: Regenerated.
8422         * x86-tdep.h: New.
8423         * x86-tdep.c: New.
8424         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8425         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8426         (ALLDEPFILES): Add x86-tdep.c.
8427         * arch-utils.h (default_in_indirect_branch_thunk): New.
8428         * arch-utils.c (default_in_indirect_branch_thunk): New.
8429         * i386-tdep: Include x86-tdep.h.
8430         (i386_in_indirect_branch_thunk): New.
8431         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8432         function.
8433         * amd64-tdep: Include x86-tdep.h.
8434         (amd64_in_indirect_branch_thunk): New.
8435         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8436
8437 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8438
8439         PR gdb/23053
8440         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8441         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8442         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8443         regression.
8444
8445 2018-04-12  Tom Tromey  <tom@tromey.com>
8446
8447         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8448         (rust_evaluate_subexp): Likewise.
8449
8450 2018-04-12  Pedro Alves  <palves@redhat.com>
8451
8452         * procfs.c (procfs_detach): Make forward declaration's prototype
8453         match definition's protototype.
8454         (proc_get_LDT_entry): Remove stale do_cleanups call.
8455
8456 2018-04-12  Pedro Alves  <palves@redhat.com>
8457
8458         * target.h (target_ops::to_has_exited): Delete.
8459         (target_has_exited): Delete.
8460         * target-delegates.c: Regenerate.
8461
8462 2018-04-11  Pedro Alves  <palves@redhat.com>
8463
8464         * target.c (fileio_fh_t::t): Add comment.
8465         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8466         (target_fileio_close): Handle a NULL target.
8467         (invalidate_fileio_fh): New.
8468         (target_close): Call it.
8469         * remote.c (remote_hostio_send_command): No longer check whether
8470         remote_desc is open.
8471
8472 2018-04-11  Pedro Alves  <palves@redhat.com>
8473
8474         * target.c (fileio_fh_t): Make it a named struct instead of a
8475         typedef.
8476         (fileio_fh_t::is_closed): New method.
8477         (DEF_VEC_O (fileio_fh_t)): Remove.
8478         (fileio_fhandles): Now a std::vector.
8479         (is_closed_fileio_fh): Delete.
8480         (acquire_fileio_fd): Adjust.  Rename parameters.
8481         (release_fileio_fd): Adjust.
8482         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8483         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8484         (target_fileio_close): Adjust.
8485
8486 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8487
8488         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8489         index.
8490
8491 2018-04-10  Pedro Alves  <palves@redhat.com>
8492
8493         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8494         (scoped_finish_thread_state): New class.
8495         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8496         cleanup.
8497         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8498         (fetch_inferior_event, normal_stop): Likewise.
8499         * thread.c (finish_thread_state_cleanup): Delete.
8500
8501 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8502             Pedro Alves  <palves@redhat.com>
8503
8504         * value.c: Include "selftest.h" and "common/array-view.h".
8505         (struct range) <operator ==>: New.
8506         (test_ranges_contain): New.
8507         (check_ranges_vector): New.
8508         (test_insert_into_bit_range_vector): New.
8509         (_initialize_values): Register selftests.
8510         * common/array-view.h (operator==, operator!=): New.
8511
8512 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8513
8514         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8515         an iterator.
8516         * inline-frame.c: Include <algorithm>.
8517         (struct inline_state): Add constructor.
8518         (inline_state_s): Remove.
8519         (DEF_VEC_O(inline_state_s)): Remove.
8520         (inline_states): Change type to std::vector.
8521         (find_inline_frame_state): Adjust to std::vector.
8522         (allocate_inline_frame_state): Remove.
8523         (clear_inline_frame_state): Adjust to std::vector.
8524         (skip_inline_frames): Adjust to std::vector.
8525
8526 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8527
8528         * tracepoint.h (struct trace_state_variable): Add constructor.
8529         <name>: Change type to std::string.
8530         * tracepoint.c (tsv_s): Remove.
8531         (DEF_VEC_O(tsv_s)): Remove.
8532         (tvariables): Change to std::vector.
8533         (create_trace_state_variable): Adjust to std::vector.
8534         (find_trace_state_variable): Likewise.
8535         (find_trace_state_variable_by_number): Likewise.
8536         (delete_trace_state_variable): Likewise.
8537         (trace_variable_command): Adjust to std::string.
8538         (delete_trace_variable_command): Likewise.
8539         (tvariables_info_1): Adjust to std::vector.
8540         (save_trace_state_variables): Likewise.
8541         (start_tracing): Likewise.
8542         (merge_uploaded_trace_state_variables): Adjust to std::vector
8543         and std::string.
8544         * target.h (struct target_ops)
8545         <to_download_trace_state_variable>: Pass reference to
8546         trace_state_variable.
8547         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8548         * target-delegates.c: Re-generate.
8549         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8550         (mi_tsv_deleted): Likewise.
8551         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8552         * remote.c (remote_download_trace_state_variable): Change
8553         pointer to reference and adjust.
8554         * make-target-delegates (parse_argtypes): Handle references.
8555         (write_function_header): Likewise.
8556         (munge_type): Likewise.
8557
8558 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8559
8560         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8561         string_view-selftests.c.
8562         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8563         testsuite.
8564         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8565         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8566         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8567         * unittests/basic_string_view/element_access/char/1.cc:
8568         Likewise.
8569         * unittests/basic_string_view/element_access/char/empty.cc:
8570         Likewise.
8571         * unittests/basic_string_view/element_access/char/front_back.cc:
8572         Likewise.
8573         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8574         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8575         Likewise.
8576         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8577         Likewise.
8578         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8579         Likewise.
8580         * unittests/basic_string_view/operations/compare/char/1.cc:
8581         Likewise.
8582         * unittests/basic_string_view/operations/compare/char/13650.cc:
8583         Likewise.
8584         * unittests/basic_string_view/operations/copy/char/1.cc:
8585         Likewise.
8586         * unittests/basic_string_view/operations/data/char/1.cc:
8587         Likewise.
8588         * unittests/basic_string_view/operations/find/char/1.cc:
8589         Likewise.
8590         * unittests/basic_string_view/operations/find/char/2.cc:
8591         Likewise.
8592         * unittests/basic_string_view/operations/find/char/3.cc:
8593         Likewise.
8594         * unittests/basic_string_view/operations/find/char/4.cc:
8595         Likewise.
8596         * unittests/basic_string_view/operations/rfind/char/1.cc:
8597         Likewise.
8598         * unittests/basic_string_view/operations/rfind/char/2.cc:
8599         Likewise.
8600         * unittests/basic_string_view/operations/rfind/char/3.cc:
8601         Likewise.
8602         * unittests/basic_string_view/operations/substr/char/1.cc:
8603         Likewise.
8604         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8605         * unittests/string_view-selftests.c: New file.
8606
8607 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8608
8609         * unittests/basic_string_view/capacity/1.cc: New file.
8610         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8611         * unittests/basic_string_view/cons/char/1.cc: New file.
8612         * unittests/basic_string_view/cons/char/2.cc: New file.
8613         * unittests/basic_string_view/cons/char/3.cc: New file.
8614         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8615         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8616         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8617         * unittests/basic_string_view/element_access/char/1.cc: New file.
8618         * unittests/basic_string_view/element_access/char/2.cc: New file.
8619         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8620         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8621         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8622         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8623         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8624         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8625         * unittests/basic_string_view/include.cc: New file.
8626         * unittests/basic_string_view/inserters/char/1.cc: New file.
8627         * unittests/basic_string_view/inserters/char/2.cc: New file.
8628         * unittests/basic_string_view/inserters/char/3.cc: New file.
8629         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8630         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8631         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8632         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8633         * unittests/basic_string_view/literals/types.cc: New file.
8634         * unittests/basic_string_view/literals/values.cc: New file.
8635         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8636         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8637         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8638         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8639         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8640         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8641         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8642         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8643         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8644         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8645         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8646         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8647         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8648         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8649         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8650         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8651         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8652         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8653         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8654         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8655         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8656         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8657         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8658         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8659         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8660         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8661         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8662         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8663         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8664         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8665         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8666         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8667         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8668         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8669         * unittests/basic_string_view/operators/char/2.cc: New file.
8670         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8671         * unittests/basic_string_view/range_access/char/1.cc: New file.
8672         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8673         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8674         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8675         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8676         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8677         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8678         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8679         * unittests/basic_string_view/typedefs.cc: New file.
8680         * unittests/basic_string_view/types/1.cc: New file.
8681
8682 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8683
8684         * common/gdb_string_view.h: Remove libstdc++ implementation
8685         details, adjust to gdb reality.
8686         * common/gdb_string_view.tcc: Likewise.
8687         * cli/cli-script.c (struct string_view): Remove.
8688         (user_args) <m_args>: Change element type to gdb::string_view.
8689         (user_args::insert_args): Adjust.
8690
8691 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8692
8693         * common/gdb_string_view.h: New file.
8694         * common/gdb_string_view.tcc: New file.
8695
8696 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8697
8698         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8699         * configure: Re-generate.
8700
8701 2018-04-09  Pedro Alves  <palves@redhat.com>
8702
8703         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8704         (set_target_gdbarch): Call
8705         gdb::observers::architecture_changed.notify instead of
8706         observer_notify_architecture_changed.
8707
8708 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8709
8710         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8711         (do_restore_current_traceframe_cleanup): Remove.
8712         (restore_current_traceframe_cleanup_dtor): Remove.
8713         (make_cleanup_restore_current_traceframe): Remove.
8714         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8715         New.
8716         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8717         * infrun.c (fetch_inferior_event): Use
8718         scoped_restore_current_traceframe.
8719
8720 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8721
8722         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8723         Remove.
8724         <n_allocated_type_units>: Remove.
8725         <all_type_units>: Change to std::vector.
8726         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8727         to std::vector change.
8728         (dwarf2_per_objfile::get_cutu): Likewise.
8729         (dwarf2_per_objfile::get_tu): Likewise.
8730         (create_signatured_type_table_from_index): Likewise.
8731         (create_signatured_type_table_from_debug_names): Likewise.
8732         (dw2_symtab_iter_next): Likewise.
8733         (dw2_print_stats): Likewise.
8734         (dw2_expand_all_symtabs): Likewise.
8735         (dw2_expand_marked_cus): Likewise.
8736         (dw2_debug_names_iterator::next): Likewise.
8737         (dwarf2_initialize_objfile): Likewise.
8738         (add_signatured_type_cu_to_table): Likewise.
8739         (create_all_type_units): Likewise.
8740         (add_type_unit): Likewise.
8741         (struct tu_abbrev_offset): Add constructor.
8742         (build_type_psymtabs_1): Adjust to std::vector change.
8743         (print_tu_stats): Likewise.
8744         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8745         (write_debug_names): Likewise.
8746
8747 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8748
8749         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8750         Make an std::vector.
8751         <n_comp_units>: Remove.
8752         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8753         to std::vector change.
8754         (dwarf2_per_objfile::get_cutu): Likewise.
8755         (dwarf2_per_objfile::get_cu): Likewise.
8756         (create_cus_from_index): Likewise.
8757         (create_addrmap_from_index): Likewise.
8758         (create_addrmap_from_aranges): Likewise.
8759         (dwarf2_read_index): Likewise.
8760         (dw2_find_last_source_symtab): Likewise.
8761         (dw2_map_symtabs_matching_filename): Likewise.
8762         (dw2_symtab_iter_next): Likewise.
8763         (dw2_print_stats): Likewise.
8764         (dw2_expand_all_symtabs): Likewise.
8765         (dw2_expand_symtabs_with_fullname): Likewise.
8766         (dw2_expand_marked_cus): Likewise.
8767         (dw2_map_symbol_filenames): Likewise.
8768         (create_cus_from_debug_names): Likewise.
8769         (dwarf2_read_debug_names): Likewise.
8770         (dw2_debug_names_iterator::next): Likewise.
8771         (dwarf2_initialize_objfile): Likewise.
8772         (set_partial_user): Likewise.
8773         (dwarf2_build_psymtabs_hard): Likewise.
8774         (read_comp_units_from_section): Remove arguments, adjust to
8775         std::vector change.
8776         (create_all_comp_units): Adjust to std::vector and
8777         read_comp_units_from_section changes.
8778         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8779         change.
8780         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8781         (psyms_seen_size): Likewise.
8782         (write_gdbindex): Likewise.
8783         (write_debug_names): Likewise.
8784
8785 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8786
8787         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8788         with dwarf2_per_objfile.
8789         (create_cus_from_index): Likewise.
8790         (create_signatured_type_table_from_index): Likewise.
8791         (dwarf2_read_index): Likewise.
8792         (dwarf2_initialize_objfile): Likewise.
8793         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8794         per_cu rather than get_dwarf2_per_objfile.
8795
8796 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8797
8798         * dwarf2read.h (struct signatured_type): Forward declare.
8799         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8800         New methods.
8801         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8802         (dw2_get_cutu): ...this.
8803         (dwarf2_per_objfile::get_cu): Rename from...
8804         (dw2_get_cu): ...this.
8805         (dwarf2_per_objfile::get_tu): New.
8806         (create_addrmap_from_index): Adjust.
8807         (create_addrmap_from_aranges): Adjust.
8808         (dw2_find_last_source_symtab): Adjust.
8809         (dw2_map_symtabs_matching_filename): Adjust.
8810         (dw2_symtab_iter_next): Adjust.
8811         (dw2_print_stats): Adjust.
8812         (dw2_expand_all_symtabs): Adjust.
8813         (dw2_expand_symtabs_with_fullname): Adjust.
8814         (dw2_expand_marked_cus): Adjust.
8815         (dw_expand_symtabs_matching_file_matcher): Adjust.
8816         (dw2_map_symbol_filenames): Adjust.
8817         (dw2_debug_names_iterator::next): Adjust.
8818         (dwarf2_initialize_objfile): Adjust.
8819         (set_partial_user): Adjust.
8820         (dwarf2_build_psymtabs_hard): Adjust.
8821
8822 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8823
8824         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8825         Remove unused variables.
8826         (dw2_map_symtabs_matching_filename): Likewise.
8827         (dwarf2_record_block_ranges): Likewise.
8828         (dwarf2_read_addr_index): Likewise.
8829         (follow_die_offset): Likewise.
8830
8831 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8832
8833         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8834         to symbol_file_add_main.
8835
8836 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8837
8838         PR mi/22299
8839         * mi/mi-console.c (do_fputc_async_safe): New.
8840         (mi_console_file::write_async_safe): New.
8841         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8842         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8843         New.
8844         * ui-file.c (ui_file::putstrn): Adjust call to
8845         fputstrn_unfiltered.
8846         * utils.c (printchar): Replace do_fputs and do_fprintf
8847         parameters by do_fputc.
8848         (fputstr_filtered): Adjust call to printchar.
8849         (fputstr_unfiltered): Likewise.
8850         (fputstrn_filtered): Likewise.
8851         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8852         printchar.
8853         * utils.h (do_fputc_ftype): New typedef.
8854         (fputstrn_unfiltered): Add do_fputc parameter.
8855
8856 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8857
8858         * regformats/i386/i386-avx.dat: Remove.
8859
8860 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8861
8862         PR gdb/22979
8863         * amd64-tdep.c (amd64_none_init_abi): New function.
8864         (amd64_x32_none_init_abi): New function.
8865         (_initialize_amd64_tdep): Register handlers for x86-64 and
8866         x64_32 with GDB_OSABI_NONE.
8867         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8868         GDB_OSABI_NONE osabi.
8869
8870 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8871
8872         PR gdb/22980
8873         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8874         GDB_OSABI_NONE.
8875         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8876         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8877
8878 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8879
8880         * common/byte-vector.h (char_vector): New type.
8881         * target.h (target_read_alloc): Return
8882         gdb::optional<byte_vector>.
8883         (target_read_stralloc): Return gdb::optional<char_vector>.
8884         (target_get_osdata): Return gdb::optional<char_vector>.
8885         * target.c (target_read_alloc_1): Templatize.  Replacement
8886         manual memory management with vector.
8887         (target_read_alloc): Change return type, adjust.
8888         (target_read_stralloc): Change return type, adjust.
8889         (target_get_osdata): Change return type, adjust.
8890         * auxv.c (struct auxv_info) <length>: Remove.
8891         <data>: Change type to gdb::optional<byte_vector>.
8892         (auxv_inferior_data_cleanup): Free auxv_info with delete.
8893         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8894         (target_auxv_search): Adjust.
8895         (fprint_target_auxv): Adjust.
8896         * avr-tdep.c (avr_io_reg_read_command): Adjust.
8897         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8898         (linux_make_corefile_notes): Adjust.
8899         * osdata.c (get_osdata): Adjust.
8900         * remote.c (remote_get_threads_with_qxfer): Adjust.
8901         (remote_memory_map): Adjust.
8902         (remote_traceframe_info): Adjust.
8903         (btrace_read_config): Adjust.
8904         (remote_read_btrace): Adjust.
8905         (remote_pid_to_exec_file): Adjust.
8906         * solib-aix.c (solib_aix_get_library_list): Adjust.
8907         * solib-dsbt.c (decode_loadmap): Don't free buf.
8908         (dsbt_get_initial_loadmaps): Adjust.
8909         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8910         * solib-target.c (solib_target_current_sos): Adjust.
8911         * tracepoint.c (sdata_make_value): Adjust.
8912         * xml-support.c (xinclude_start_include): Adjust.
8913         (xml_fetch_content_from_file): Adjust.
8914         * xml-support.h (xml_fetch_another): Change return type.
8915         (xml_fetch_content_from_file): Change return type.
8916         * xml-syscall.c (xml_init_syscalls_info): Adjust.
8917         * xml-tdesc.c (file_read_description_xml): Adjust.
8918         (fetch_available_features_from_target): Change return type.
8919         (target_fetch_description_xml): Adjust.
8920         (target_read_description_xml): Adjust.
8921
8922 2018-04-06  Tom Tromey  <tom@tromey.com>
8923
8924         * value.c (~value): Update.
8925         (struct value) <contents>: Now unique_xmalloc_ptr.
8926         (value_contents_bits_eq, allocate_value_contents)
8927         (value_contents_raw, value_contents_all_raw)
8928         (value_contents_for_printing, value_contents_for_printing_const)
8929         (set_value_enclosing_type): Update.
8930
8931 2018-04-06  Tom Tromey  <tom@tromey.com>
8932
8933         * value.c (range_s): Remove typedef, VEC.
8934         (struct range): Add operator<.
8935         (range_lessthan): Remove.
8936         (ranges_contain): Change type.
8937         (~value): Update.
8938         (struct value) <unavailable, optimized_out>: Now std::vector.
8939         (value_entirely_available)
8940         (value_entirely_covered_by_range_vector)
8941         (value_entirely_unavailable, value_entirely_optimized_out):
8942         Update.
8943         (insert_into_bit_range_vector): Change argument type.
8944         (find_first_range_overlap): Likewise.
8945         (struct ranges_and_idx, value_contents_bits_eq)
8946         (require_not_optimized_out, require_available): Update.
8947         (ranges_copy_adjusted): Change argument types.
8948         (value_optimized_out, value_copy, value_fetch_lazy): Update.
8949
8950 2018-04-06  Tom Tromey  <tom@tromey.com>
8951
8952         * value.c (~value): Update.
8953         (struct value) <parent>: Now a value_ref_ptr.
8954         (value_parent, set_value_parent, value_address, value_copy):
8955         Update.
8956
8957 2018-04-06  Tom Tromey  <tom@tromey.com>
8958
8959         * value.c (struct value): Add constructor, destructor, and member
8960         initializers.
8961         (allocate_value_lazy, value_decref): Update.
8962
8963 2018-04-06  Tom Tromey  <tom@tromey.com>
8964
8965         * value.c (struct value) <released, next>: Remove.
8966         (all_values): Now a std::vector.
8967         (allocate_value_lazy): Update.
8968         (value_next): Remove.
8969         (value_mark, value_free_to_mark, release_value)
8970         (value_release_to_mark): Update.
8971
8972 2018-04-06  Tom Tromey  <tom@tromey.com>
8973
8974         * value.h (fetch_subexp_value, value_release_to_mark): Update.
8975         (free_value_chain): Remove.
8976         * value.c (free_value_chain): Remove.
8977         (value_release_to_mark): Return a std::vector.
8978         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8979         std::vector.
8980         (check_condition): Update.
8981         * eval.c (fetch_subexp_value): Change "val_chain" to a
8982         std::vector.
8983         * breakpoint.c (update_watchpoint): Update.
8984         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8985
8986 2018-04-06  Tom Tromey  <tom@tromey.com>
8987
8988         * value.h (free_all_values): Remove.
8989         * value.c (free_all_values): Remove.
8990
8991 2018-04-06  Tom Tromey  <tom@tromey.com>
8992
8993         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8994         (value_history_chain, value_history_count): Remove.
8995         (value_history): New global.
8996         (record_latest_value, access_value_history, show_values)
8997         (preserve_values): Update.
8998
8999 2018-04-06  Tom Tromey  <tom@tromey.com>
9000
9001         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9002         * varobj.c (varobj_set_display_format, varobj_set_value)
9003         (install_default_visualizer, construct_visualizer)
9004         (install_new_value, ~varobj, varobj_get_value_type)
9005         (my_value_of_variable, varobj_editable_p): Update.
9006         * c-varobj.c (c_describe_child, c_value_of_variable)
9007         (cplus_number_of_children, cplus_describe_child): Update.
9008         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9009         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9010         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9011
9012 2018-04-06  Tom Tromey  <tom@tromey.com>
9013
9014         * printcmd.c (last_examine_address): Change type to
9015         value_ref_ptr.
9016         (do_examine, x_command): Update.
9017
9018 2018-04-06  Tom Tromey  <tom@tromey.com>
9019
9020         * value.c (release_value): Update.
9021         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9022         (struct bpstats) <val>: Now a value_ref_ptr.
9023         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9024         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9025         (~watchpoint, print_it_watchpoint, watch_command_1)
9026         (invalidate_bp_value_on_memory_change): Update.
9027
9028 2018-04-06  Tom Tromey  <tom@tromey.com>
9029
9030         * varobj.c (varobj_clear_saved_item)
9031         (update_dynamic_varobj_children, install_new_value, ~varobj):
9032         Update.
9033         * value.h (value_incref): Move declaration earlier.
9034         (value_decref): Rename from value_free.
9035         (struct value_ref_policy): New.
9036         (value_ref_ptr): New typedef.
9037         (struct value_deleter): Remove.
9038         (gdb_value_up): Remove typedef.
9039         (release_value): Change return type.
9040         (release_value_or_incref): Remove.
9041         * value.c (set_value_parent): Update.
9042         (value_incref): Change return type.
9043         (value_decref): Rename from value_free.
9044         (value_free_to_mark, free_all_values, free_value_chain): Update.
9045         (release_value): Return value_ref_ptr.
9046         (release_value_or_incref): Remove.
9047         (record_latest_value, set_internalvar, clear_internalvar):
9048         Update.
9049         * stack.c (info_frame_command): Don't call value_free.
9050         * python/py-value.c (valpy_dealloc, valpy_new)
9051         (value_to_value_object): Update.
9052         * printcmd.c (do_examine): Update.
9053         * opencl-lang.c (lval_func_free_closure): Update.
9054         * mi/mi-main.c (register_changed_p): Don't call value_free.
9055         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9056         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9057         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9058         value_free.
9059         * guile/scm-value.c (vlscm_free_value_smob)
9060         (vlscm_scm_from_value): Update.
9061         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9062         (frame_unwind_register_unsigned, get_frame_register_bytes)
9063         (put_frame_register_bytes): Don't call value_free.
9064         * findvar.c (address_from_register): Don't call value_free.
9065         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9066         * dwarf2loc.c (entry_data_value_free_closure)
9067         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9068         (dwarf2_evaluate_loc_desc_full): Update.
9069         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9070         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9071         (~watchpoint, watch_command_1)
9072         (invalidate_bp_value_on_memory_change): Update.
9073         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9074
9075 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9076
9077         PR gdb/23022
9078         * warning.m4: Add -Wno-error=deprecated-register.
9079         * configure: Re-generate.
9080
9081 2018-04-05  Tom Tromey  <tom@tromey.com>
9082
9083         * linespec.h: Remove include of "vec.h".
9084
9085 2018-04-05  Tom Tromey  <tom@tromey.com>
9086
9087         * linespec.c (typep): Remove typedef.
9088         (find_methods, find_superclass_methods): Take a std::vector.
9089         (find_method): Use std::vector.
9090
9091 2018-04-05  Tom Tromey  <tom@tromey.com>
9092
9093         * utils.c (compare_strings): Remove.
9094         * utils.h (compare_strings): Remove.
9095         * objc-lang.h (find_imps): Update.
9096         * objc-lang.c (find_methods): Take a std::vector.
9097         (uniquify_strings, find_imps): Likewise.
9098         * linespec.c (find_methods): Take a std::vector.
9099         (decode_objc): Use std::vector.
9100         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9101         a std::vector.
9102         (find_method, find_function_symbols): Use std::vector.
9103
9104 2018-04-05  Tom Tromey  <tom@tromey.com>
9105
9106         * completer.c (completion_tracker::completion_tracker): Remove
9107         cast.
9108         (completion_tracker::discard_completions): Likewise.
9109         * breakpoint.c (ambiguous_names_p): Remove cast.
9110         * ada-lang.c (_initialize_ada_language): Remove cast.
9111         * utils.h (streq): Update.
9112         (streq_hash): Add new declaration.
9113         * utils.c (streq): Return bool.
9114         (streq_hash): New function.
9115
9116 2018-04-05  Tom Tromey  <tom@tromey.com>
9117
9118         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9119         Remove a string copy.
9120
9121 2018-04-05  Tom Tromey  <tom@tromey.com>
9122
9123         * linespec.c (filter_results): Use std::vector.
9124         (decode_line_2, decode_line_full): Update.
9125
9126 2018-04-05  Tom Tromey  <tom@tromey.com>
9127
9128         * linespec.c (canonical_to_fullform): Return std::string.
9129         (filter_results): Update.
9130         (struct decode_line_2_item): Add constructor.
9131         <fullform, displayform>: Now std::string.
9132         (decode_line_2_compare_items): Now a std::sort comparator.
9133         (decode_line_2): Update.
9134
9135 2018-04-05  Tom Tromey  <tom@tromey.com>
9136
9137         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9138         (unexpected_linespec_error): Update.
9139         (linespec_parse_basic, parse_linespec): Update.
9140
9141 2018-04-05  Tom Tromey  <tom@tromey.com>
9142
9143         * linespec.c (linespec_parse_basic): Reindent.
9144
9145 2018-04-05  Tom Tromey  <tom@tromey.com>
9146
9147         * minsyms.h (iterate_over_minimal_symbols): Update.
9148         * minsyms.c (iterate_over_minimal_symbols): Take a
9149         gdb::function_view.
9150         * linespec.c (struct collect_minsyms): Remove.
9151         (compare_msyms): Now a std::sort comparator.
9152         (add_minsym): Add parameters.
9153         (search_minsyms_for_name): Update.  Use std::vector.
9154
9155 2018-04-03  Tom Tromey  <tom@tromey.com>
9156
9157         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9158         gdb::byte_vector.
9159
9160 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9161
9162         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9163
9164 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9165
9166         PR gdb/16959
9167         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9168         printing static type.
9169
9170 2018-04-01  Tom Tromey  <tom@tromey.com>
9171
9172         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9173         (rs6000_xfer_shared_libraries): Update.
9174
9175 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9176
9177         * common/gdb_vecs.h (char_ptr): Remove.
9178         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9179
9180 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9181
9182         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9183         with std::vector.
9184         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9185
9186 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9187
9188         * tracepoint.h (struct uploaded_tp): Initialize fields.
9189         <actions, step_actions, cmd_strings>: Change type to
9190         std::vector<char *>.
9191         * tracepoint.c (get_uploaded_tp): Allocate with new.
9192         (free_uploaded_tps): Free with delete.
9193         (parse_tracepoint_definition): Adjust to std::vector change.
9194         * breakpoint.c (read_uploaded_action): Likewise.
9195         (create_tracepoint_from_upload): Likewise.
9196         * ctf.c (ctf_write_uploaded_tp): Likewise.
9197         (SET_ARRAY_FIELD): Likewise.
9198         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9199
9200 2018-03-30  Tom Tromey  <tom@tromey.com>
9201
9202         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9203         std::unique_ptr.
9204         (svr4_keep_data_in_core): Update.
9205         (svr4_read_so_list): Update.
9206
9207 2018-03-30  Tom Tromey  <tom@tromey.com>
9208
9209         * windows-nat.c (handle_output_debug_string, handle_exception):
9210         Update.
9211         * target.h (target_read_string): Update.
9212         * target.c (target_read_string): Change "string" to
9213         unique_xmalloc_ptr.
9214         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9215         Update.
9216         * solib-frv.c (frv_current_sos): Update.
9217         * solib-dsbt.c (dsbt_current_sos): Update.
9218         * solib-darwin.c (darwin_current_sos): Update.
9219         * linux-thread-db.c (inferior_has_bug): Update.
9220         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9221         Update.  Remove alloca.
9222         * ada-lang.c (ada_main_name): Update.
9223
9224 2018-03-30  Tom Tromey  <tom@tromey.com>
9225
9226         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9227         (struct dwo_file_deleter): New.
9228         (dwo_file_up): New typedef.
9229         (open_and_init_dwo_file): Use dwo_file_up.
9230         (free_dwo_file_cleanup): Remove.
9231
9232 2018-03-30  Tom Tromey  <tom@tromey.com>
9233
9234         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9235         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9236
9237 2018-03-30  Tom Tromey  <tom@tromey.com>
9238
9239         * dwarf2read.c (class free_cached_comp_units): New class.
9240         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9241         (free_cached_comp_units): Remove function.
9242
9243 2018-03-30  Tom Tromey  <tom@tromey.com>
9244
9245         * utils.h (make_cleanup_unpush_target): Remove.
9246         * inf-ptrace.c (struct target_unpusher): New.
9247         (target_unpush_up) New typedef.
9248         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9249         target_unpush_up.
9250         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9251
9252 2018-03-27  Tom Tromey  <tom@tromey.com>
9253
9254         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9255
9256 2018-03-27  Pedro Alves  <palves@redhat.com>
9257             Tom Tromey  <tom@tromey.com>
9258
9259         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9260         destructor.  Now a class.
9261         (gdb_readline_wrapper_cleanup): Remove function.
9262         (gdb_readline_wrapper): Remove cleanups.
9263
9264 2018-03-27  Tom Tromey  <tom@tromey.com>
9265
9266         * typeprint.h (struct type_print_options) <local_typedefs,
9267         global_typedefs>: Remove "struct" keyword.
9268         (class typedef_hash_table): New class.
9269         (recursively_update_typedef_hash, add_template_parameters)
9270         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9271         (find_typedef_in_hash): Don't declare.
9272         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9273         (typedef_hash_table::recursively_update): Rename from
9274         recursively_update_typedef_hash.  Now a member.
9275         (typedef_hash_table::add_template_parameters): Rename from
9276         add_template_parameters.  Now a member.
9277         (typedef_hash_table::typedef_hash_table): Now a constructor;
9278         rename from create_typedef_hash.
9279         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9280         rename from free_typedef_hash.
9281         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9282         (do_free_global_table): Remove.
9283         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9284         from copy_type_recursive.
9285         (create_global_typedef_table): Remove.
9286         (typedef_hash_table::find_global_typedef): Now a member of
9287         typedef_hash_table.
9288         (typedef_hash_table::find_typedef): Rename from
9289         find_typedef_in_hash; now a member.
9290         (whatis_exp): Update.
9291         * extension.h (struct ext_lang_type_printers): Add constructor and
9292         destructor.
9293         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9294         declare.
9295         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9296         Now a constructor; rename from start_ext_lang_type_printers.
9297         (ext_lang_type_printers): Now a destructor; rename from
9298         free_ext_lang_type_printers.
9299         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9300         Update.
9301         (c_type_print_base_struct_union): Update.  Remove cleanups.
9302
9303 2018-03-27  Tom Tromey  <tom@tromey.com>
9304
9305         * dwarf-index-write.c: Include <cmath>.
9306
9307 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9308
9309         * NEWS: Add entry describing new "set|show varsize-limit" command.
9310         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9311         command.
9312         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9313         "set variable".
9314
9315 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9316
9317         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9318         dwarf-index-write.c
9319         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9320         * dwarf-index-common.c: New file.
9321         * dwarf-index-common.h: New file.
9322         * dwarf-index-write.c: New file.
9323         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9324         (struct dwarf2_section_info): Move from here.
9325         (dwarf2_section_info_def): Likewise.
9326         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9327         (offset_type): Likewise.
9328         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9329         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9330         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9331         (byte_swap): Likewise.
9332         (MAYBE_SWAP): Likewise.
9333         (dwarf2_per_cu_ptr): Likewise.
9334         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9335         (struct tu_stats): Likewise.
9336         (struct dwarf2_per_objfile): Likewise.
9337         (struct dwarf2_per_cu_data): Likewise.
9338         (struct signatured_type): Likewise.
9339         (sig_type_ptr): Likewise.
9340         (DEF_VEC_P (sig_type_ptr)): Likewise.
9341         (INDEX4_SUFFIX): Likewise.
9342         (INDEX5_SUFFIX): Likewise.
9343         (DEBUG_STR_SUFFIX): Likewise.
9344         (dwarf2_read_section): Make non-static.
9345         (mapped_index_string_hash): Move from here.
9346         (dwarf5_djb_hash): Likewise.
9347         (file_write): Likewise.
9348         (class data_buf): Likewise.
9349         (struct symtab_index_entry): Likewise.
9350         (struct mapped_symtab): Likewise.
9351         (find_slot): Likewise.
9352         (hash_expand): Likewise.
9353         (add_index_entry): Likewise.
9354         (uniquify_cu_indices): Likewise.
9355         (class c_str_view): Likewise.
9356         (class c_str_view_hasher): Likewise.
9357         (class vector_hasher): Likewise.
9358         (write_hash_table): Likewise.
9359         (psym_index_map): Likewise.
9360         (struct addrmap_index_data): Likewise.
9361         (add_address_entry): Likewise.
9362         (add_address_entry_worker): Likewise.
9363         (write_address_map): Likewise.
9364         (symbol_kind): Likewise.
9365         (write_psymbols): Likewise.
9366         (struct signatured_type_index_data): Likewise.
9367         (write_one_signatured_type): Likewise.
9368         (recursively_count_psymbols): Likewise.
9369         (recursively_write_psymbols): Likewise.
9370         (class debug_names): Likewise.
9371         (check_dwarf64_offsets): Likewise.
9372         (psyms_seen_size): Likewise.
9373         (write_gdbindex): Likewise.
9374         (write_debug_names): Likewise.
9375         (assert_file_size): Likewise.
9376         (write_psymtabs_to_index): Likewise.
9377         (save_gdb_index_command): Likewise.
9378         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9379         command.
9380         * dwarf2read.h: New file.
9381
9382 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9383
9384         PR gdb/22670
9385         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9386         symbol name if the CU's language stores symbol names in linkage
9387         format.
9388         * language.h (struct language_defn)
9389         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9390         all instances of this struct.
9391
9392 2018-03-26  Tom Tromey  <tom@tromey.com>
9393
9394         * stack.c (backtrace_command_1): Remove verbose code.
9395
9396 2018-03-26  Tom Tromey  <tom@tromey.com>
9397
9398         * python/py-framefilter.c (py_print_type): Don't catch
9399         exceptions.  Return void.
9400         (py_print_value): Likewise.
9401         (py_print_single_arg): Likewise.
9402         (enumerate_args): Don't catch exceptions.
9403         (py_print_args): Likewise.
9404         (py_print_frame): Likewise.
9405         (gdbpy_apply_frame_filter): Catch exceptions here.
9406
9407 2018-03-26  Tom Tromey  <tom@tromey.com>
9408
9409         * stack.c (_initialize_stack): Remove trailing newlines from help
9410         text.  Add "Usage" line to "backtrace" help.
9411
9412 2018-03-26  Tom Tromey  <tom@tromey.com>
9413
9414         PR python/16486:
9415         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9416
9417 2018-03-26  Tom Tromey  <tom@tromey.com>
9418
9419         * python/py-framefilter.c (py_print_single_arg): Return
9420         EXT_LANG_BT_ERROR from catch.
9421
9422 2018-03-26  Tom Tromey  <tom@tromey.com>
9423
9424         PR backtrace/15584:
9425         * stack.c (backtrace_command_1): Move some code into no-filters
9426         "if".
9427
9428 2018-03-26  Tom Tromey  <tom@tromey.com>
9429
9430         * python/py-framefilter.c (throw_quit_or_print_exception): New
9431         function.
9432         (gdbpy_apply_frame_filter): Use it.
9433
9434 2018-03-26  Tom Tromey  <tom@tromey.com>
9435
9436         PR cli/17716:
9437         * python/py-framefilter.c (py_print_type, py_print_value)
9438         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9439         RETURN_MASK_ERROR.
9440
9441 2018-03-26  Tom Tromey  <tom@tromey.com>
9442
9443         * python/py-framefilter.c (enumerate_args): Use
9444         gdb::unique_xmalloc_ptr.
9445
9446 2018-03-26  Tom Tromey  <tom@tromey.com>
9447
9448         * python/py-framefilter.c (py_print_frame): Return
9449         EXT_LANG_BT_OK.
9450         (gdbpy_apply_frame_filter): Update comment.
9451         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9452         Remove.
9453         <EXT_LANG_BT_NO_FILTERS>: Change value.
9454
9455 2018-03-26  Tom Tromey  <tom@tromey.com>
9456
9457         PR backtrace/15582:
9458         * stack.c (backtrace_command): Parse "hide" argument.
9459         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9460         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9461         constant.
9462
9463 2018-03-26  Tom Tromey  <tom@tromey.com>
9464
9465         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9466         add "flags".
9467         (backtrace_command): Remove "fulltrace", add "flags".
9468
9469 2018-03-26  Tom Tromey  <tom@tromey.com>
9470
9471         * stack.c (backtrace_command): Rewrite command line parsing.
9472
9473 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9474
9475         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9476
9477 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9478
9479         * filename-seen-cache.h: Add include guard.
9480
9481 2018-03-26  Keith Seitz  <keiths@redhat.com>
9482
9483         * symfile.c (place_section): Remove "struct" from section_addr_info
9484         in comment.
9485         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9486         "struct" keyword from section_addr_info.
9487
9488 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9489
9490         * regformats/regdef.h (reg): Add constructors.
9491
9492 2018-03-25  Pedro Alves  <palves@redhat.com>
9493
9494         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9495         if then/else bodies in var_func_name extraction.
9496
9497 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9498
9499         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9500         lookup_minimal_symbol() to find symbol entry.
9501         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9502
9503 2018-03-23  Keith Seitz  <keiths@redhat.com>
9504
9505         PR c++/22968
9506         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9507         nested type definitions for C++, too.
9508
9509 2018-03-23  Tom Tromey  <tom@tromey.com>
9510
9511         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9512         a typedef.
9513         (macho_register_oso): Remove.
9514         (macho_symtab_read): Take a std::vector.
9515         (oso_el_compare_name): Now a std::sort comparator.
9516         (macho_symfile_read_all_oso): Take a std::vector.
9517         (macho_symfile_read): Use std::vector.  Remove cleanups.
9518
9519 2018-03-22  Tom Tromey  <tom@tromey.com>
9520
9521         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9522         (record_full_goto_bookmark): Use std::string.
9523
9524 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9525
9526         PR tdep/18295
9527         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9528         a single mask.
9529
9530 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9531
9532         * rs6000-tdep.c (store_insn_p): New function.
9533         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9534         and cr_reg to their unshifted values. Use store_insn_p to
9535         match LR saves using either R1 or fdata->alloca_reg. Use
9536         store_insn_p to match CR saves. Set alloca_reg_offset
9537         when alloca_reg and framep are set. Remove lr_reg shift
9538         when assigning to fdata->lr_register.
9539
9540 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9541
9542         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9543         command line args instead of emitting a warning.
9544
9545 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9546
9547         * tracepoint.h (struct static_tracepoint_marker): Initialize
9548         fields, define default constructor, move constructor and move
9549         assignment, disable the rest.
9550         <str_id, extra>: Make std::string.
9551         (release_static_tracepoint_marker): Remove.
9552         (free_current_marker): Remove.
9553         * tracepoint.c (free_current_marker): Remove.
9554         (parse_static_tracepoint_marker_definition): Adjust to
9555         std::string, use new hex2str overload.
9556         (release_static_tracepoint_marker): Remove.
9557         (print_one_static_tracepoint_marker): Get marker by reference
9558         and adjust to std::string.
9559         (info_static_tracepoint_markers_command): Adjust to std::vector
9560         changes
9561         * target.h (static_tracepoint_marker_p): Remove typedef.
9562         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9563         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9564         bool.
9565         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9566         * target-debug.h
9567         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9568         (target_debug_print_std_vector_static_tracepoint_marker): New.
9569         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9570         to...
9571         (target_debug_print_static_tracepoint_marker_p): ... this.
9572         * target-delegates.c: Re-generate.
9573         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9574         Make std::string.
9575         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9576         (decode_static_tracepoint_spec): Adjust to std::vector.
9577         (tracepoint_print_one_detail): Adjust to std::string.
9578         (strace_marker_decode_location): Adjust to std::string.
9579         (update_static_tracepoint): Adjust to std::string, remove call
9580         to release_static_tracepoint_marker.
9581         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9582         Adjust to std::vector.
9583         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9584         (remote_static_tracepoint_markers_by_strid): Adjust to
9585         std::vector.
9586         * common/rsp-low.h (hex2str): New overload with explicit count
9587         of bytes.
9588         * common/rsp-low.c (hex2str): New overload with explicit count
9589         of bytes.
9590         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9591         (_initialize_rsp_low_selftests): Add test_hex2str test.
9592         * unittests/tracepoint-selftests.c
9593         (test_parse_static_tracepoint_marker_definition): Adjust to
9594         std::string.
9595
9596 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9597
9598         * tracepoint.c (parse_static_tracepoint_marker_definition):
9599         Consider case where the definition is followed by more
9600         definitions.
9601         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9602         tracepoint-selftests.c.
9603         * unittests/tracepoint-selftests.c: New.
9604
9605 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9606
9607         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9608         Carvalho.
9609
9610 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9611
9612         * symtab.c (find_pc_sect_line): fixed indentation.
9613
9614 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9615
9616         * symtab.c (find_pc_sect_line): now uses binary search.
9617
9618 2018-03-19  Tom Tromey  <tom@tromey.com>
9619
9620         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9621         "IDENT" production.
9622
9623 2018-03-19  Pedro Alves  <palves@redhat.com>
9624             Tom Tromey  <tom@tromey.com>
9625
9626         * unittests/observable-selftests.c: New file.
9627         * common/observable.h: New file.
9628         * observable.h: New file.
9629         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9630         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9631         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9632         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9633         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9634         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9635         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9636         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9637         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9638         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9639         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9640         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9641         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9642         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9643         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9644         tui/tui-interp.c, valops.c: Update all users.
9645         * tui/tui-hooks.c (tui_bp_created_observer)
9646         (tui_bp_deleted_observer, tui_bp_modified_observer)
9647         (tui_inferior_exit_observer, tui_before_prompt_observer)
9648         (tui_normal_stop_observer, tui_register_changed_observer):
9649         Remove.
9650         (tui_observers_token): New global.
9651         (attach_or_detach, tui_attach_detach_observers): New functions.
9652         (tui_install_hooks, tui_remove_hooks): Use
9653         tui_attach_detach_observers.
9654         * record-btrace.c (record_btrace_thread_observer): Remove.
9655         (record_btrace_thread_observer_token): New global.
9656         * observer.sh: Remove.
9657         * observer.c: Rename to observable.c.
9658         * observable.c (namespace gdb_observers): Define new objects.
9659         (observer_debug): Move into gdb_observers namespace.
9660         (struct observer, struct observer_list, xalloc_observer_list_node)
9661         (xfree_observer_list_node, generic_observer_attach)
9662         (generic_observer_detach, generic_observer_notify): Remove.
9663         (_initialize_observer): Update.
9664         Don't include observer.inc.
9665         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9666         (clean mostlyclean): Likewise.
9667         (observer.h, observer.inc): Remove targets.
9668         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9669         (COMMON_SFILES): Use observable.c, not observer.c.
9670         * .gitignore: Remove observer.h.
9671
9672 2018-03-18  Tom Tromey  <tom@tromey.com>
9673
9674         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9675         gdb::def_vector.
9676         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9677
9678 2018-03-17  Tom Tromey  <tom@tromey.com>
9679
9680         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9681
9682 2018-03-17  Tom Tromey  <tom@tromey.com>
9683
9684         * target.c (class scoped_target_fd): New.
9685         (target_fileio_close_cleanup): Remove.
9686         (target_fileio_read_alloc_1): Use scoped_target_fd.
9687
9688 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9689
9690         * silent-rules.mk: New.
9691         * Makefile.in: Include silent-rules.mk
9692         (srcdir, VPATH, top_srcdir): Move up.
9693         (COMPILE): Add ECHO_CXX.
9694         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9695         (init.c): Add ECHO_INIT_C.
9696         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9697         (version.c): Add ECHO_GEN.
9698         (printcmd.o): Add ECHO_CXX.
9699         (target-float.o): Add ECHO_CXX.
9700         (ada-exp.o): Add ECHO_CXX.
9701         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9702         (insight$(EXEEXT)): Add ECHO_CXXLD.
9703         * gnulib/configure.ac: Add AM_SILENT_RULES.
9704         * gnulib/aclocal.m4: Re-generate.
9705         * gnulib/configure: Re-generate.
9706         * gnulib/import/Makefile.in: Re-generate.
9707
9708 2018-03-16  Tom Tromey  <tom@tromey.com>
9709
9710         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9711         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9712         * utils.c (do_free_section_addr_info)
9713         (make_cleanup_free_section_addr_info): Remove.
9714         * symfile.h (struct other_sections): Add constructor.
9715         (struct section_addr_info): Remove.
9716         (section_addr_info): New typedef.
9717         (struct sym_fns) <sym_offsets>: Change type of parameter.
9718         (build_section_addr_info_from_objfile)
9719         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9720         (default_symfile_offsets, symbol_file_add)
9721         (symbol_file_add_from_bfd)
9722         (build_section_addr_info_from_section_table): Update.
9723         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9724         * symfile.c (alloc_section_addr_info): Remove.
9725         (build_section_addr_info_from_section_table): Change return type.
9726         Update.
9727         (build_section_addr_info_from_bfd)
9728         (build_section_addr_info_from_objfile): Likewise.
9729         (free_section_addr_info): Remove.
9730         (relative_addr_info_to_section_offsets): Change type of "addrs".
9731         (addrs_section_compar): Now a std::sort comparator.
9732         (addrs_section_sort): Change return type.
9733         (addr_info_make_relative): Change type of "addrs".  Update.
9734         (default_symfile_offsets, syms_from_objfile_1)
9735         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9736         (symbol_file_add_separate): Update.
9737         (symbol_file_add): Change type of "addrs".  Update.
9738         (add_symbol_file_command): Update.  Remove cleanups.
9739         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9740         cleanups.
9741         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9742         * solib.c (solib_read_symbols): Update.
9743         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9744         * machoread.c (macho_symfile_offsets): Update.
9745         * jit.c (jit_bfd_try_read_symtab): Update.
9746
9747 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9748
9749         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9750         unittests/utils-selftests.c.
9751         * unittests/utils-selftests.c: New file.
9752
9753 2018-03-14  Tom Tromey  <tom@tromey.com>
9754
9755         PR cli/14977:
9756         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9757         for NULL.
9758
9759 2018-03-14  Tom Tromey  <tom@tromey.com>
9760
9761         PR cli/19918:
9762         * printcmd.c (printf_pointer): Allow "-" in format.
9763
9764 2018-03-14  Tom Tromey  <tom@tromey.com>
9765
9766         * printcmd.c (_initialize_printcmd): Add usage to printf.
9767
9768 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9769
9770         * MAINTAINERS: Update my email address.
9771
9772 2018-03-13  Tom Tromey  <tom@tromey.com>
9773
9774         * machoread.c (macho_check_dsym): Change filenamep to a
9775         std::string*.
9776         (macho_symfile_read): Update.
9777         * symfile.c (load_command): Use std::string.
9778
9779 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9780
9781         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9782         to error message string.
9783         (riscv_register_name): Use xsnprintf instead of sprintf.
9784         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9785         internal_error.
9786         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9787         error.
9788         (riscv_push_dummy_call): Likewise.
9789
9790 2018-03-12  Tom Tromey  <tom@tromey.com>
9791
9792         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9793         Use gdb::byte_vector.
9794         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9795
9796 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9797
9798         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9799         parameter type to readable_regcache.
9800         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9801         the declaration.
9802
9803 2018-03-11  Tom Tromey  <tom@tromey.com>
9804
9805         * dwarf2read.c (struct nextfield): Add initializers.
9806         (struct nextfnfield): Remove.
9807         (struct fnfieldlist): Add initializers.  Remove "length" and
9808         "head", use std::vector.
9809         (struct decl_field_list): Remove.
9810         (struct field_info): Add initializers.
9811         <fields, baseclasses>: Now std::vector.
9812         <nbaseclasses, nfnfields, typedef_field_list_count,
9813         nested_types_list_count>: Remove.
9814         (dwarf2_add_field, dwarf2_add_type_defn)
9815         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9816         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9817         (process_structure_scope): Update.
9818
9819 2018-03-11  Tom Tromey  <tom@tromey.com>
9820
9821         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9822         for use by std::sort.
9823         (build_type_psymtabs_1): Use std::vector.
9824
9825 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9826
9827         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9828         and LIBMPFR in the printed configuration.
9829
9830 2018-03-08  Tom Tromey  <tom@tromey.com>
9831
9832         * source.c (get_filename_and_charpos): Use scoped_fd.
9833         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9834         (procfs_pidlist): Likewise.
9835         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9836         (iterate_over_mappings): Likewise.
9837
9838 2018-03-08  Tom Tromey  <tom@tromey.com>
9839
9840         * infcall.c (struct call_return_meta_info)
9841         <stack_temporaries_enabled>: Remove.
9842         (get_call_return_value, call_function_by_hand_dummy): Update.
9843         * thread.c (disable_thread_stack_temporaries): Remove.
9844         (enable_thread_stack_temporaries): Remove.
9845         (thread_stack_temporaries_enabled_p): Return bool.
9846         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9847         (get_last_thread_stack_temporary): Update.
9848         * eval.c (evaluate_subexp): Update.
9849         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9850         class, not a function.
9851         (value_ptr, value_vec): Remove typedefs.
9852         (class thread_info) <stack_temporaries_enabled>: Now bool.
9853         <stack_temporaries>: Now a std::vector.
9854         (thread_stack_temporaries_enabled_p)
9855         (value_in_thread_stack_temporaries): Return bool.
9856
9857 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9858
9859         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9860         (getpkt_or_notif_sane_1): Likewise.
9861
9862 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9863
9864         * build-id.c (build_id_to_debug_bfd): Use std::string.
9865
9866 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9867
9868         * build-id.c (find_separate_debug_file_by_buildid): Return
9869         std::string.
9870         * build-id.h (find_separate_debug_file_by_buildid): Return
9871         std::string.
9872         * coffread.c (coff_symfile_read): Adjust to std::string.
9873         * elfread.c (elf_symfile_read): Adjust to std::string.
9874         * symfile.c (separate_debug_file_exists): Change parameter to
9875         std::string.
9876         (find_separate_debug_file): Return std::string.
9877         (find_separate_debug_file_by_debuglink): Return std::string.
9878         * symfile.h (find_separate_debug_file_by_debuglink): Return
9879         std::string.
9880
9881 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9882
9883         * common/xml-utils.c (xml_escape_text): Move code to...
9884         (xml_escape_text_append): ... this new function.
9885         * common/xml-utils.h (xml_escape_text_append): New declaration.
9886         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9887         New function.
9888         (_initialize_xml_utils): register test_xml_escape_text_append as
9889         a selftest.
9890
9891 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
9892
9893         * defs.h: Remove MAX_REGISTER_SIZE.
9894         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9895         asserts.
9896         * python/py-unwind.c (pyuw_sniffer): Likewise.
9897
9898 2018-03-07  Tom Tromey  <tom@tromey.com>
9899
9900         * linux-tdep.c (linux_info_proc): Update.
9901         * target.h (struct target_ops) <to_fileio_readlink>: Return
9902         optional<string>.
9903         (target_fileio_readlink): Return optional<string>.
9904         * remote.c (remote_hostio_readlink): Return optional<string>.
9905         * inf-child.c (inf_child_fileio_readlink): Return
9906         optional<string>.
9907         * target.c (target_fileio_readlink): Return optional<string>.
9908
9909 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
9910
9911         * regcache.c (cooked_read_test): Add riscv to the list of
9912         architectures that have a save_reggroup.
9913
9914 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9915
9916         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9917         value is not a dynamic class object.
9918
9919 2018-03-06  Tom Tromey  <tom@tromey.com>
9920
9921         * rust-exp.y: Formatting fixes.
9922
9923 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9924
9925         * riscv-tdep.c (riscv_register_name): Remove target description
9926         support.
9927         (riscv_gdbarch_init): Remove target description check.
9928
9929 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9930
9931         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9932         comment.
9933         * riscv-tdep.h: Likewise.
9934
9935 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9936
9937         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9938         (riscv_pseudo_register_write): Delete.
9939         (riscv_gdbarch_init): Remove all use of pseudo registers.
9940
9941 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9942
9943         * record-btrace.c (btrace_print_lines): Replace cleanup
9944         parameter with RAII equivalents.
9945         (btrace_insn_history): Replace cleanup with RAII equivalents.
9946         * ui-out.h (make_cleanup_ui_out_list_begin_end,
9947         make_cleanup_ui_out_tuple_begin_end): Remove.
9948         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9949         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9950         make_cleanup_ui_out_list_begin_end): Remove.
9951
9952 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9953
9954         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9955         parameter types to std::vector.  Use bool.
9956         (record_btrace_wait): Replace VEC(tp_t) with
9957         std::vector<thread_info *>.
9958         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9959
9960 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9961
9962         * record-btrace.c (record_btrace_disable_callback): Remove.
9963         (struct scoped_btrace_disable): New.
9964         (record_btrace_open): Use scoped_btrace_disable.
9965
9966 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9967
9968         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9969         reading values from registers.
9970
9971 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9972
9973         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9974         where appropriate.
9975
9976 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9977
9978         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9979         change parameter type.  Use GDB's print functions, and use
9980         core_addr_to_string where appropriate.
9981         (riscv_push_dummy_call): Use core_addr_to_string where
9982         appropriate, update call to riscv_print_arg_location, and reindent
9983         a few lines.
9984         (riscv_return_value): Update call to riscv_print_arg_location.
9985
9986 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9987             Tim Newsome <tim@sifive.com>
9988             Albert Ou <a0u@eecs.berkeley.edu>
9989             Darius Rad <darius@bluespec.com>
9990
9991         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9992         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9993         (ALLDEPFILES): Add riscv-tdep.c
9994         * configure.tgt: Add riscv support.
9995         * riscv-tdep.c: New file.
9996         * riscv-tdep.h: New file.
9997         * NEWS: Mention new target.
9998         * MAINTAINERS: Add entry for riscv.
9999
10000 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10001
10002         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10003         fields within aggregates.
10004
10005 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10006
10007         * record-btrace.c (btrace_print_lines): Change type of flags to
10008         gdb_disassembly_flags.
10009
10010 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10011
10012         * fbsd-nat.c: Include "inf-ptrace.h".
10013         (USE_SIGTRAP_SIGINFO): Conditionally define.
10014         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10015         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10016         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10017         function.
10018         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10019         Likewise.
10020         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10021         Likewise.
10022         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10023         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10024         "supports_stopped_by_hw_breakpoint" target methods.
10025
10026 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10027
10028         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10029         * fbsd-nat.c (debug_fbsd_nat): New variable.
10030         (show_fbsd_nat_debug): New function.
10031         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10032         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10033
10034 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10035
10036         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10037         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10038         prototype.
10039         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10040         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10041         method.
10042
10043 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10044
10045         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10046         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10047
10048 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10049
10050         * charset.c (struct charset_vector): New.
10051         (charsets): Change type to charset_vector.
10052         (find_charset_names): Adjust.
10053         (add_one): Adjust.
10054         (_initialize_charset): Adjust.
10055
10056 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10057
10058         * progspace.h (struct program_space) <deleted_solibs>: Change
10059         type to std::vector<std::string>.
10060         * progspace.c (clear_program_space_solib_cache): Adjust.
10061         * breakpoint.c (print_solib_event): Adjust.
10062         (check_status_catch_solib): Adjust.
10063         * solib.c (update_solib_list): Adjust.
10064         * ui-out.h (class ui_out) <field_string>: New overload.
10065         * ui-out.c (ui_out::field_string): New overload.
10066
10067 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10068
10069         * progspace.h (struct program_space): Add constructor and
10070         destructor, initialize fields.
10071         (add_program_space): Remove.
10072         * progspace.c (add_program_space): Rename to...
10073         (program_space::program_space): ... this.
10074         (release_program_space): Rename to...
10075         (program_space::~program_space): ... this.
10076         (delete_program_space): Use delete to delete program_space.
10077         (initialize_progspace): Use new to allocate program_space.
10078         * inferior.c (add_inferior_with_spaces): Likewise.
10079         (clone_inferior_command): Likewise.
10080         * infrun.c (follow_fork_inferior): Likewise.
10081         (handle_vfork_child_exec_or_exit): Likewise.
10082
10083 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10084
10085         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10086         (delim_string_to_char_ptr_vec): Return std::vector of
10087         gdb::unique_xmalloc_ptr.
10088         (dirnames_to_char_ptr_vec_append): Take std::vector of
10089         gdb::unique_xmalloc_ptr.
10090         (dirnames_to_char_ptr_vec): Return std::vector of
10091         gdb::unique_xmalloc_ptr.
10092         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10093         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10094         (delim_string_to_char_ptr_vec): Return an std::vector of
10095         gdb::unique_xmalloc_ptr, adjust the code.
10096         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10097         gdb::unique_xmalloc_ptr, adjust the code.
10098         (dirnames_to_char_ptr_vec): Return an std::vector of
10099         gdb::unique_xmalloc_ptr, adjust the code.
10100         * auto-load.c (auto_load_safe_path_vec): Change type to
10101         std::vector of gdb::unique_xmalloc_ptr.
10102         (auto_load_expand_dir_vars): Return an std::vector of
10103         gdb::unique_xmalloc_ptr, adjust the code.
10104         (auto_load_safe_path_vec_update): Adjust.
10105         (filename_is_in_auto_load_safe_path_vec): Adjust.
10106         (auto_load_objfile_script_1): Adjust.
10107         * build-id.c (build_id_to_debug_bfd): Adjust.
10108         * linux-thread-db.c (thread_db_load_search): Adjust.
10109         * source.c (add_path): Adjust.
10110         (openp): Adjust.
10111         * symfile.c (find_separate_debug_file): Adjust.
10112         * utils.c (do_free_char_ptr_vec): Remove.
10113         (make_cleanup_free_char_ptr_vec): Remove.
10114
10115 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10116
10117         PR gdb/22907
10118         * common/pathstuff.c: Conditionally include "<windows.h>".
10119
10120 2018-03-01  Georg Sauthoff  <mail@georg.so>
10121
10122         PR gdb/22888
10123         * gcore.in: Quote variables and switch interpreter to bash.
10124
10125 2018-03-01  Tom Tromey  <tom@tromey.com>
10126
10127         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10128         assertion.  Add assertion for discriminant_index.
10129         (quirk_rust_enum): Use correct base type name in univariant case.
10130
10131 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10132
10133         * record.c (get_call_history_modifiers): Return a
10134         record_print_flags.
10135         (cmd_record_call_history): Adjust.
10136         * record-btrace.c (record_btrace_call_history): Adjust.
10137         (record_btrace_call_history_range): Adjust.
10138         (record_btrace_call_history_from): Adjust.
10139         * target-debug.h (target_debug_print_record_print_flags): New.
10140         * target-delegates.c: Re-generate.
10141         * target.c (target_call_history): Change flags type.
10142         (target_call_history_from): Likewise.
10143         (target_call_history_range): Likewise.
10144         * target.h (struct target_ops) <target_call_history>: Likewise.
10145         (target_call_history_from): Likewise.
10146         (target_call_history_range): Likewise.
10147
10148 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10149             Simon Marchi  <simon.marchi@polymtl.ca>
10150
10151         * common/common-utils.c: Include "sys/stat.h".
10152         (is_regular_file): Move here from "source.c"; change return
10153         type to "bool".
10154         * common/common-utils.h (is_regular_file): New prototype.
10155         * common/pathstuff.c (contains_dir_separator): New function.
10156         * common/pathstuff.h (contains_dir_separator): New prototype.
10157         * source.c: Don't include "sys/stat.h".
10158         (is_regular_file): Move to "common/common-utils.c".
10159
10160 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10161
10162         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10163         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10164         * auto-load.c: Include "common/pathstuff.h".
10165         * common/common-def.h (current_directory): Move here.
10166         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10167         function.
10168         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10169         prototype.
10170         * common/pathstuff.c: New file.
10171         * common/pathstuff.h: New file.
10172         * compile/compile.c: Include "common/pathstuff.h".
10173         * defs.h (current_directory): Move to "common/common-defs.h".
10174         * dwarf2read.c: Include "common/pathstuff.h".
10175         * exec.c: Likewise.
10176         * guile/scm-safe-call.c: Likewise.
10177         * linux-thread-db.c: Likewise.
10178         * main.c: Likewise.
10179         * nto-tdep.c: Likewise.
10180         * objfiles.c: Likewise.
10181         * source.c: Likewise.
10182         * symtab.c: Likewise.
10183         * utils.c: Include "common/pathstuff.h".
10184         (gdb_realpath): Move to "common/pathstuff.c".
10185         (gdb_realpath_keepfile): Likewise.
10186         (gdb_abspath): Likewise.
10187         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10188         (gdb_realpath_keepfile): Likewise.
10189         (gdb_abspath): Likewise.
10190
10191 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10192
10193         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10194         wildcard process pid for super_resume for kernels with a
10195         specific bug.
10196
10197 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10198
10199         * compile/compile.c (get_args): Add additional comments
10200         explaining function.
10201
10202 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10203             Tom Tromey  <tom@tromey.com>
10204
10205         * target.h (memory_write_request_s): Remove typedef.  Don't define
10206         VEC.
10207         (target_write_memory_blocks): Change argument to std::vector.
10208         (struct memory_write_request): Add constructor.
10209         * target-memory.c (compare_block_starting_address): Return bool.
10210         Change argument types.
10211         (claim_memory): Change arguments to use std::vector.
10212         (split_regular_and_flash_blocks, blocks_to_erase)
10213         (compute_garbled_blocks): Likewise.
10214         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10215         (target_write_memory_blocks): Change argument to std::vector.
10216         * symfile.c (struct load_section_data): Add constructor and
10217         destructor.  Use std::vector for "requests".
10218         (struct load_progress_data): Add initializers.
10219         (load_section_callback): Update.  Use "new".
10220         (clear_memory_write_data): Remove.
10221         (generic_load): Update.
10222
10223 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10224
10225         * arch/aarch64.h: Use common/tdesc.h.
10226
10227 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10228
10229         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10230         architecture with a 64-bit ABI.
10231
10232 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10233
10234         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10235         ahead of target description loading.
10236
10237 2018-02-26  Tom Tromey  <tom@tromey.com>
10238
10239         * stack.c (backtrace_command_1): Update.
10240         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10241         of "flags".
10242         * python/py-framefilter.c (py_print_frame)
10243         (gdbpy_apply_frame_filter): Change type of "flags".
10244         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10245         of "flags".
10246         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10247         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10248         * extension.h (enum frame_filter_flag): Rename from
10249         frame_filter_flags.
10250         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10251         (apply_ext_lang_frame_filter): Change type of "flags".
10252         * extension.c (apply_ext_lang_frame_filter): Change type of
10253         "flags".
10254         * extension-priv.h (struct extension_language_ops)
10255         <apply_frame_filter>: Change type of "flags".
10256
10257 2018-02-26  Tom Tromey  <tom@tromey.com>
10258
10259         PR python/16497:
10260         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10261         off-by-one in py_end computation.
10262         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10263         PRINT_MORE_FRAMES.
10264         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10265         constant.
10266
10267 2018-02-26  Tom Tromey  <tom@tromey.com>
10268
10269         * dwarf2read.c (struct variant_field): New.
10270         (struct nextfield) <variant>: New field.
10271         (dwarf2_add_field): Handle DW_TAG_variant_part.
10272         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10273         discriminated union.
10274         (read_structure_type): Handle DW_TAG_variant_part.
10275         (handle_struct_member_die): New function, extracted from
10276         process_structure_scope.  Handle DW_TAG_variant.
10277         (process_structure_scope): Handle discriminated unions.  Call
10278         handle_struct_member_die.
10279
10280 2018-02-26  Tom Tromey  <tom@tromey.com>
10281
10282         * rust-lang.h (rust_last_path_segment): Declare.
10283         * rust-lang.c (rust_last_path_segment): Now public.  Change
10284         contract.
10285         (struct disr_info): Remove.
10286         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10287         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10288         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10289         (rust_enum_p, rust_enum_variant): New function.
10290         (rust_underscore_fields): Remove "offset" parameter.
10291         (rust_print_enum): New function.
10292         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10293         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10294         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10295         enums.
10296         (rust_internal_print_type): New function, from rust_print_type.
10297         Remove enum code.
10298         (rust_print_type): Call rust_internal_print_type.
10299         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10300         Update enum handling.
10301         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10302         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10303         (rust_union_quirks): New functions.
10304         (process_full_comp_unit, process_full_type_unit): Call
10305         rust_union_quirks.
10306         (process_structure_scope): Update rust_unions if necessary.
10307
10308 2018-02-26  Tom Tromey  <tom@tromey.com>
10309
10310         * value.h (value_union_variant): Declare.
10311         * valops.c (value_union_variant): New function.
10312         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10313         (struct discriminant_info): New.
10314         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10315         enumerator.
10316         (struct main_type) <flag_discriminated_union>: New field.
10317
10318 2018-02-26  Tom Tromey  <tom@tromey.com>
10319
10320         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10321         unittests/unpack-selftests.c.
10322         * unittests/unpack-selftests.c: New file.
10323         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10324
10325 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10326
10327         * dwarf2read.c (struct partial_die_info) <read>: New method.
10328         (read_partial_die): Remove the declaration.
10329         (load_partial_dies): Update.
10330         (partial_die_info::partial_die_info):
10331         (read_partial_die): Change it to partial_die_info::read.
10332
10333 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10334
10335         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10336         (fixup_partial_die): Remove declaration.
10337         (scan_partial_symbols): Update.
10338         (partial_die_parent_scope): Likewise.
10339         (partial_die_full_name): Likewise.
10340         (fixup_partial_die): Change it to partial_die_info::fixup.
10341
10342 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10343
10344         * dwarf2read.c (read_partial_die): Update the declaration.
10345         (load_partial_dies): Caller update.
10346         (read_partial_die): Remove one argument abbrev_len.
10347
10348 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10349
10350         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10351         assignment operator.
10352         (load_partial_dies): Use ctor and copy ctor.
10353         (read_partial_die): Update.
10354         (dwarf2_cu::find_partial_die): Use ctor.
10355
10356 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10357
10358         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10359         (find_partial_die_in_comp_unit): Change it to
10360         dwarf2_cu::find_partial_die.
10361         (find_partial_die): Update.
10362
10363 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10364
10365         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10366         is NULL.
10367
10368 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10369
10370         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10371
10372 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10373
10374         * arch/amd64.h: Use common/tdesc.h.
10375         * arch/i386.c: Likewise.
10376         * arch/i386.h: Likewise.
10377         * arch/tic6x.c: Likewise.
10378         * arch/tdesc.h: Move file from here...
10379         * common/tdesc.h: ...to here.
10380         * features/aarch64-core.c: Regenerate.
10381         * features/aarch64-fpu.c: Regenerate.
10382         * features/i386/32bit-avx.c: Regenerate.
10383         * features/i386/32bit-avx512.c: Regenerate.
10384         * features/i386/32bit-core.c: Regenerate.
10385         * features/i386/32bit-linux.c: Regenerate.
10386         * features/i386/32bit-mpx.c: Regenerate.
10387         * features/i386/32bit-pkeys.c: Regenerate.
10388         * features/i386/32bit-sse.c: Regenerate.
10389         * features/i386/64bit-avx.c: Regenerate.
10390         * features/i386/64bit-avx512.c: Regenerate.
10391         * features/i386/64bit-core.c: Regenerate.
10392         * features/i386/64bit-linux.c: Regenerate.
10393         * features/i386/64bit-mpx.c: Regenerate.
10394         * features/i386/64bit-pkeys.c: Regenerate.
10395         * features/i386/64bit-segments.c: Regenerate.
10396         * features/i386/64bit-sse.c: Regenerate.
10397         * features/i386/x32-core.c: Regenerate.
10398         * features/tic6x-c6xp.c: Regenerate.
10399         * features/tic6x-core.c: Regenerate.
10400         * features/tic6x-gp.c: Regenerate.
10401         * target-descriptions.c: Use common/tdesc.h.
10402         * target-descriptions.h: Likewise.
10403
10404 2018-02-24  Tom Tromey  <tom@tromey.com>
10405
10406         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10407         (try_thread_db_load_from_dir, thread_db_load_search): Use
10408         std::string.
10409         (info_auto_load_libthread_db_compare): Return bool.  Change
10410         argument types.
10411         (info_auto_load_libthread_db): Use std::vector, std::string.
10412         Remove cleanups.
10413
10414 2018-02-24  Tom Tromey  <tom@tromey.com>
10415
10416         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10417         std::string.
10418         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10419         std::string*.
10420         * gdbarch.c: Rebuild.
10421         * gdbarch.h: Rebuild.
10422         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10423         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10424         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10425         std::string*.
10426
10427 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10428
10429         * gdbtypes.h (sect_offset): Change type to uint64_t.
10430         (sect_offset_str): New function.
10431         * dwarf2read.c (create_addrmap_from_aranges): Use
10432         sect_offset_str.
10433         (error_check_comp_unit_head): Likewise.
10434         (create_debug_type_hash_table): Likewise.
10435         (read_cutu_die_from_dwo): Likewise.
10436         (init_cutu_and_read_dies): Likewise.
10437         (init_cutu_and_read_dies_no_follow): Likewise.
10438         (process_psymtab_comp_unit_reader): Likewise.
10439         (partial_die_parent_scope): Likewise.
10440         (peek_die_abbrev): Likewise.
10441         (process_queue): Likewise.
10442         (dwarf2_physname): Likewise.
10443         (read_namespace_alias): Likewise.
10444         (read_import_statement): Likewise.
10445         (create_dwo_cu_reader): Likewise.
10446         (create_cus_hash_table): Likewise.
10447         (lookup_dwo_cutu): Likewise.
10448         (inherit_abstract_dies): Likewise.
10449         (read_func_scope): Likewise.
10450         (read_call_site_scope): Likewise.
10451         (dwarf2_add_member_fn): Likewise.
10452         (read_common_block): Likewise.
10453         (read_module_type): Likewise.
10454         (read_typedef): Likewise.
10455         (read_subrange_type): Likewise.
10456         (load_partial_dies): Likewise.
10457         (read_partial_die): Likewise.
10458         (find_partial_die): Likewise.
10459         (read_str_index): Likewise.
10460         (dwarf2_string_attr): Likewise.
10461         (build_error_marker_type): Likewise.
10462         (lookup_die_type): Likewise.
10463         (dump_die_shallow): Likewise.
10464         (follow_die_ref): Likewise.
10465         (dwarf2_fetch_die_loc_sect_off): Likewise.
10466         (dwarf2_fetch_constant_bytes): Likewise.
10467         (follow_die_sig): Likewise.
10468         (get_signatured_type): Likewise.
10469         (get_DW_AT_signature_type): Likewise.
10470         (dwarf2_find_containing_comp_unit): Likewise.
10471         (set_die_type): Likewise.
10472
10473 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10474
10475         * arch/aarch64.c: Include "common-defs.h".
10476         * arch/amd64.c: Likewise.
10477         * arch/i386.c: Likewise.
10478
10479 2018-02-21  Tom Tromey  <tom@tromey.com>
10480
10481         * value.h: (extract_field_op): Update.
10482         * eval.c (extract_field_op): Return a const char *.
10483         * expression.h (parse_expression_for_completion): Update.
10484         * completer.c (complete_expression): Update.
10485         (add_struct_fields): Make fieldname const.
10486         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10487         (mark_completion_tag, parse_exp_in_context_1): Update.
10488         (parse_expression_for_completion): Change "name" to
10489         unique_xmalloc_ptr*.
10490
10491 2018-02-21  Tom Tromey  <tom@tromey.com>
10492
10493         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10494
10495 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10496
10497         * avr-tdep.c (avr_read_pc): Change parameter type to
10498         readable_regcache.
10499         * gdbarch.sh (read_pc): Likewise.
10500         * gdbarch.c: Re-generated.
10501         * gdbarch.h: Re-generated.
10502         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10503         readable_regcache.
10504         * ia64-tdep.c (ia64_read_pc): Likewise.
10505         * mips-tdep.c (mips_read_pc): Likewise.
10506         * spu-tdep.c (spu_read_pc): Likewise.
10507
10508 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10509
10510         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10511         * regcache-dump.c: New file.
10512         * regcache.c: Move register_dump to regcache-dump.c.
10513         (maintenance_print_registers): Likewise.
10514         (maintenance_print_raw_registers): Likewise.
10515         (maintenance_print_cooked_registers): Likewise.
10516         (maintenance_print_register_groups): Likewise.
10517         (maintenance_print_remote_registers): Likewise.
10518         (_initialize_regcache): Likewise.
10519         * regcache.h (register_dump): Moved from regcache.c.
10520
10521 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10522
10523         * regcache.c (regcache::regcache): Update.
10524         (regcache::invalidate): Move it to detached_regcache::invalidate.
10525         (get_thread_arch_aspace_regcache): Update.
10526         (regcache::raw_update): Update.
10527         (regcache::cooked_read): Remove some code.
10528         (regcache::cooked_read_value): Likewise.
10529         (regcache::raw_write): Remove assert on m_readonly_p.
10530         (regcache::raw_supply_integer): Move it to
10531         detached_regcache::raw_supply_integer.
10532         (regcache::raw_supply_zeroed): Likewise.
10533         * regcache.h (detached_regcache) <raw_supply_integer>: New
10534         declaration.
10535         <raw_supply_zeroed, invalidate>: Likewise.
10536         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10537         <invalidate>: Likewise.
10538         <m_readonly_p>: Removed.
10539
10540 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10541
10542         * infcmd.c (get_return_value): Let stop_regs point to
10543         get_current_regcache.
10544         * regcache.c (regcache::regcache): Remove.
10545         (register_dump_reg_buffer): New class.
10546         (regcache_print): Adjust.
10547         * regcache.h (regcache): Remove constructors.
10548
10549 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10550
10551         * regcache.c (class register_dump): New class.
10552         (register_dump_regcache, register_dump_none): New class.
10553         (register_dump_remote, register_dump_groups): New class.
10554         (regcache_print): Update.
10555         * regcache.h (regcache_dump_what): Move it to regcache.c.
10556         (regcache) <dump>: Remove.
10557
10558 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10559
10560         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10561          reg_buffer_rw *.
10562         (jit_unwind_reg_set_impl): Call raw_supply.
10563         (jit_frame_sniffer): Use reg_buffer_rw.
10564         * record-full.c (record_full_core_regbuf): Change its type.
10565         (record_full_core_open_1): Use reg_buffer_rw.
10566         (record_full_close): Likewise.
10567         (record_full_core_fetch_registers): Use regcache->raw_supply.
10568         (record_full_core_store_registers): Likewise.
10569         * regcache.c (regcache::get_register_status): Move it to
10570         reg_buffer.
10571         (regcache_raw_set_cached_value): Remove.
10572         (regcache::raw_set_cached_value): Remove.
10573         (regcache::raw_write): Call raw_supply.
10574         (regcache::raw_supply): Move it to reg_buffer_rw.
10575         * regcache.h (regcache_raw_set_cached_value): Remove.
10576         (reg_buffer_rw): New class.
10577
10578 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10579
10580         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10581         readonly_detached_regcache.
10582         (dummy_frame_prev_register): Use regcache->cooked_read.
10583         * frame.c (frame_save_as_regcache): Change return type.
10584         (frame_pop): Update.
10585         * frame.h (frame_save_as_regcache): Update declaration.
10586         * inferior.h (get_infcall_suspend_state_regcache): Update
10587         declaration.
10588         * infrun.c (infcall_suspend_state) <registers>: use
10589         readonly_detached_regcache.
10590         (save_infcall_suspend_state): Don't use regcache_dup.
10591         (get_infcall_suspend_state_regcache): Change return type.
10592         * linux-fork.c (struct fork_info) <savedregs>: Change to
10593         readonly_detached_regcache.
10594         <pc>: New field.
10595         (fork_save_infrun_state): Don't use regcache_dup.
10596         (info_checkpoints_command): Adjust.
10597         * mi/mi-main.c (register_changed_p): Update declaration.
10598         (mi_cmd_data_list_changed_registers): Use
10599         readonly_detached_regcache.
10600         (register_changed_p): Change parameter type to
10601         readonly_detached_regcache.
10602         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10603         readonly_detached_regcache.
10604         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10605         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10606         New.
10607         (regcache::save): Move it to reg_buffer.
10608         (regcache::restore): Change parameter type.
10609         (regcache_dup): Remove.
10610         * regcache.h (reg_buffer) <save>: New method.
10611         (readonly_detached_regcache): New class.
10612         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10613         readonly_detached_regcache.
10614         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10615
10616 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10617
10618         * frame.c (frame_save_as_regcache): Use regcache method save.
10619         (frame_pop): Use regcache method restore.
10620         * infrun.c (restore_infcall_suspend_state): Likewise.
10621         * linux-fork.c (fork_load_infrun_state): Likewise.
10622         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10623         save.
10624         * regcache.c (regcache_save): Remove.
10625         (regcache::restore): More asserts.
10626         (regcache_cpy): Remove.
10627         * regcache.h (regcache_save): Remove the declaration.
10628         (regcache::restore): Move from private to public.
10629         Remove the friend declaration of regcache_cpy.
10630         (regcache_cpy): Remove declaration.
10631
10632 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10633
10634         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10635         parameter type to 'readable_regcache *'.
10636         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10637         * arm-tdep.c (arm_neon_quad_read): Likewise.
10638         (arm_pseudo_read): Likewise.
10639         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10640         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10641         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10642         * gdbarch.c: Re-generated.
10643         * gdbarch.h: Re-generated.
10644         * gdbarch.sh (pseudo_register_read): Change parameter type to
10645         'readable_regcache *'.
10646         (pseudo_register_read_value): Likewise.
10647         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10648         (h8300_pseudo_register_read): Likewise.
10649         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10650         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10651         (i386_pseudo_register_read_into_value): Likewise.
10652         (i386_pseudo_register_read_value): Likewise.
10653         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10654         declaration.
10655         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10656         * m32c-tdep.c (m32c_raw_read): Likewise.
10657         (m32c_read_flg): Likewise.
10658         (m32c_banked_register): Likewise.
10659         (m32c_banked_read): Likewise.
10660         (m32c_sb_read): Likewise.
10661         (m32c_part_read): Likewise.
10662         (m32c_cat_read): Likewise.
10663         (m32c_r3r2r1r0_read): Likewise.
10664         (m32c_pseudo_register_read): Likewise.
10665         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10666         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10667         (mep_pseudo_cr64_read): Likewise.
10668         (mep_pseudo_register_read): Likewise.
10669         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10670         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10671         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10672         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10673         (regcache::cooked_read): Likewise.
10674         (regcache::cooked_read_value): Likewise.
10675         (regcache_cooked_read_signed):
10676         (regcache::cooked_read): Likewise.
10677         * regcache.h (readable_regcache): New class.
10678         (regcache): Inherit readable_regcache.  Move some methods to
10679         readable_regcache.
10680         * rl78-tdep.c (rl78_pseudo_register_read): Change
10681         parameter type to 'readable_regcache *'.
10682         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10683         (e500_pseudo_register_read): Change parameter type to
10684         'readable_regcache *'.
10685         (dfp_pseudo_register_read): Likewise.
10686         (vsx_pseudo_register_read): Likewise.
10687         (efpr_pseudo_register_read): Likewise.
10688         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10689         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10690         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10691         (sh64_pseudo_register_read): Likewise.
10692         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10693         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10694         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10695         (spu_pseudo_register_read): Likewise.
10696         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10697         (xtensa_pseudo_register_read): Likewise.
10698
10699 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10700
10701         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10702         (regcache::arch): Move it to reg_buffer::arch.
10703         (regcache::register_buffer): Likewise.
10704         (regcache::assert_regnum): Likewise.
10705         (regcache::num_raw_registers): Likewise.
10706         * regcache.h (reg_buffer): New class.
10707         (regcache): Inherit reg_buffer.
10708
10709 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10710
10711         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10712         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10713
10714 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10715
10716         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10717
10718 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10719
10720         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10721         (SFILES): Remove common/*.c files.
10722         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10723         * common/common.host: Add common reference.
10724         * configure.ac: Likewise.
10725         * configure: Regenerate.
10726
10727 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10728
10729         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10730         (block_initialize_namespace): Use new.
10731         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10732         (dwarf2_free_objfile): Use delete.
10733         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10734         (copy_type_recursive): Use new.
10735         * gdb_obstack.h (allocate_on_obstack): New.
10736
10737 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10738
10739         PR gdb/22849
10740         * inferior.c (exit_inferior_1): Reset inf->control.
10741
10742 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10743
10744         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10745         declaration.
10746
10747 2018-02-14  Pedro Alves  <palves@redhat.com>
10748
10749         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10750         frame_cleanup_after_sniffer on exception.
10751
10752 2018-02-14  Tom Tromey  <tom@tromey.com>
10753
10754         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10755         const.
10756         (solib_bfd_open): Make pathname const.
10757         * solib.c (solib_bfd_open): Make pathname const.
10758         * solib-spu.c (spu_bfd_fopen): Make name const.
10759         (spu_bfd_open): Make pathname const.
10760         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10761         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10762
10763 2018-02-14  Tom Tromey  <tom@tromey.com>
10764
10765         * symfile.c (symfile_bfd_open): Update.
10766         * source.h (openp, source_full_path_of, find_and_open_source):
10767         Change argument type to unique_xmalloc_ptr.
10768         * source.c (openp): Take a unique_xmalloc_ptr.
10769         (source_full_path_of, find_and_open_source): Likewise.
10770         (open_source_file, symtab_to_fullname): Update.
10771         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10772         unique_xmalloc_ptr.
10773         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10774         (exec_file_find): Update.
10775         * psymtab.c (psymtab_to_fullname): Update.
10776         * nto-tdep.h (nto_find_and_open_solib): Update.
10777         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10778         unique_xmalloc_ptr.
10779         * exec.c (exec_file_attach): Update.
10780         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10781         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10782
10783 2018-02-14  Tom Tromey  <tom@tromey.com>
10784
10785         * solib.c: Include source.h.
10786         * nto-tdep.c: Include source.h.
10787         * mi/mi-cmd-env.c: Include source.h.
10788         * infcmd.c: Include source.h.
10789         * exec.c: Include source.h.
10790         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10791         (add_path, directory_switch, source_path, init_source_path): Move
10792         declarations...
10793         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10794         (add_path, directory_switch, source_path, init_source_path):
10795         ...here.
10796
10797 2018-02-14  Tom Tromey  <tom@tromey.com>
10798
10799         * solist.h (exec_file_find, solib_find): Return
10800         unique_xmalloc_ptr.
10801         (solib_bfd_fopen): Take a const char *.
10802         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10803         (exec_file_find, solib_find): Likewise.
10804         (solib_bfd_fopen): Do not take ownership of "pathname".
10805         (solib_bfd_open): Use unique_xmalloc_ptr.
10806         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10807         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10808         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10809         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10810
10811 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10812
10813         * ada-lang.c (name_match_type_from_name): Remove reference to
10814         ada_name_for_lookup in function's documentation.
10815         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10816
10817 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10818
10819         * defs.h (enum openp_flags): New enum.
10820         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10821         Move to enum openp_flags.
10822         (openp_flags): New enum flags.
10823         (openp): Change parameter type to openp_flags.
10824         * source.c (openp): Change parameter type to openp_flags.
10825         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10826         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10827
10828 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10829
10830         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10831         per-command.
10832
10833 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10834
10835         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10836         into...
10837         (class dwarf2_queue_guard): ...the destructor of this new class.
10838         (dw2_do_instantiate_symtab): Create instance of the new class
10839         dwarf2_queue_guard, remove cleanup.
10840
10841 2018-02-09  Tom Tromey  <tom@tromey.com>
10842
10843         * source.c (find_source_lines): Don't reference past the end of
10844         the vector.
10845
10846 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10847
10848         * remote.c (remote_btrace_maybe_reopen): Change error message.
10849         * btrace.c (btrace_enable): Likewise.
10850         (parse_xml_btrace): Likewise.
10851         (parse_xml_btrace_conf): Likewise.
10852
10853 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10854
10855         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10856         (linux_enable_pt, linux_enable_bts): Call
10857         diagnose_perf_event_open_fail.
10858
10859 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10860
10861         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10862         Remove parameter and change return type.  Update callers.  Move it.
10863         (linux_enable_bts, linux_enable_pt): Improve error message.
10864         (linux_enable_pt): Remove zero buffer size check.
10865         (linux_enable_btrace): Improve error messages.  Remove NULL return
10866         check.
10867
10868 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10869
10870         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10871         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10872         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10873         (linux_supports_pt, linux_supports_btrace): Remove.
10874         (linux_enable_bts): Call cpu_supports_bts.
10875         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10876         * remote.c (remote_supports_btrace): Remove.
10877         (init_remote_ops): Remove remote_supports_btrace.
10878         * target-delegates.c: Regenerated.
10879         * target.c (target_supports_btrace): Remove.
10880         * target.h (target_ops) <to_supports_btrace>: Remove
10881         (target_supports_btrace): Remove.
10882         * x86-linux-nat.c (x86_linux_create_target): Remove
10883         linux_supports_btrace.
10884
10885 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10886
10887         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10888         btrace failed.
10889         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10890         exception and use message in own exception.
10891
10892 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10893
10894         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10895         (perf_event_pt_event_type): Use gdb_file_up.
10896         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10897         scoped_fd, and scoped_mmap.
10898
10899 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10900
10901         * common/scoped_mmap.h: New.
10902         * unittests/scoped_mmap-selftest.c: New.
10903         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10904         unittests/scoped_mmap-selftest.c.
10905
10906 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10907
10908         * common/scoped_fd.h: New.
10909         * unittests/scoped_fd-selftest.c: New.
10910         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10911         unittests/scoped_fd-selftest.c.
10912
10913 2018-02-09  Tom Tromey  <tom@tromey.com>
10914
10915         * auto-load.c (auto_load_section_scripts): Use
10916         gdb::unique_xmalloc_ptr.
10917
10918 2018-02-09  Tom Tromey  <tom@tromey.com>
10919
10920         * auto-load.c (execute_script_contents): Use std::string.
10921
10922 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
10923
10924         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10925         Python function, rather than a new command.
10926
10927 2018-02-08  Tom Tromey  <tom@tromey.com>
10928
10929         * solib.c (solib_find_1): Use std::string.
10930         (solib_bfd_fopen): Use unique_xmalloc_ptr.
10931
10932 2018-02-08  Tom Tromey  <tom@tromey.com>
10933
10934         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10935
10936 2018-02-08  Tom Tromey  <tom@tromey.com>
10937
10938         * source.c (find_source_lines): Use gdb::def_vector.
10939
10940 2018-02-08  Tom Tromey  <tom@tromey.com>
10941
10942         * macrocmd.c (struct temporary_macro_definition): New.
10943         (macro_define_command): Use temporary_macro_definition.  Remove
10944         cleanups.
10945         (free_macro_definition_ptr): Remove.
10946
10947 2018-02-08  Tom Tromey  <tom@tromey.com>
10948
10949         * macroexp.c (maybe_expand): Use std::string.
10950
10951 2018-02-08  Tom Tromey  <tom@tromey.com>
10952
10953         * macroexp.c (struct macro_buffer): Add initializers for some
10954         members.
10955         (init_buffer, init_shared_buffer, free_buffer)
10956         (free_buffer_return_text): Remove.
10957         (macro_buffer): New constructors.
10958         (~macro_buffer): New destructor.
10959         (macro_buffer::set_shared): New method.
10960         (macro_buffer::resize_buffer, macro_buffer::appendc)
10961         (macro_buffer::appendmem): Now methods, not free functions.
10962         (set_token, append_tokens_without_splicing, stringify)
10963         (macro_stringify): Update.
10964         (gather_arguments): Change return type.  Remove argc_p argument,
10965         add args_ptr argument.  Use std::vector.
10966         (substitute_args): Remove argc argument.  Accept std::vector.
10967         (expand): Update.  Use std::vector.
10968         (scan, macro_expand, macro_expand_next): Update.
10969
10970 2018-02-08  Tom Tromey  <tom@tromey.com>
10971
10972         * symtab.c (default_collect_symbol_completion_matches_break_on):
10973         Use unique_xmalloc_ptr.
10974         * macroscope.h: (sal_macro_scope, user_macro_scope)
10975         (default_macro_scope): Return unique_xmalloc_ptr.
10976         * macroscope.c (sal_macro_scope, user_macro_scope)
10977         (default_macro_scope): Return unique_xmalloc_ptr.
10978         * macroexp.h (macro_expand, macro_expand_once): Return
10979         unique_xmalloc_ptr.
10980         * macroexp.c (macro_expand, macro_expand_once): Return
10981         unique_xmalloc_ptr.
10982         * macrocmd.c (macro_expand_command, macro_expand_once_command)
10983         (info_macro_command, info_macros_command): Use
10984         unique_xmalloc_ptr.
10985         * compile/compile-c-support.c (write_macro_definitions): Use
10986         unique_xmalloc_ptr.
10987         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10988
10989 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
10990
10991         * value.c (value_static_field): Assign field type instead of
10992         containing type when returning an optimized out value.
10993
10994 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10995
10996         * ft32-tdep.c (ft32_read_pc): Remove.
10997         (ft32_write_pc): Remove.
10998         (ft32_gdbarch_init): Update.
10999         * m32r-tdep.c (m32r_read_pc): Remove.
11000         (m32r_gdbarch_init): Update.
11001         * mep-tdep.c (mep_read_pc): Remove.
11002         (mep_gdbarch_init): Update.
11003         * microblaze-tdep.c (microblaze_write_pc): Remove.
11004         (microblaze_gdbarch_init): Update.
11005         * mn10300-tdep.c (mn10300_read_pc): Remove.
11006         (mn10300_write_pc): Remove.
11007         (mn10300_gdbarch_init): Update.
11008         * moxie-tdep.c (moxie_read_pc): Remove.
11009         (moxie_write_pc): Remove.
11010         (moxie_gdbarch_init): Update.
11011
11012 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11013
11014         * expprint.c (print_subexp_standard): Handle
11015         OP_F77_UNDETERMINED_ARGLIST.
11016         (dump_subexp_body_standard): Likewise.
11017
11018 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11019
11020         * target-descriptions.c (tdesc_element_visitor) Add empty
11021         implementations.
11022         (tdesc_type): Move make_gdb_type from here.
11023         (tdesc_type_builtin): Likewise.
11024         (tdesc_type_vector): Likewise.
11025         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11026         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11027         (make_gdb_type_union): Likewise.
11028         (make_gdb_type_flags): Likewise.
11029         (make_gdb_type_enum): Likewise.
11030         (make_gdb_type): New function.
11031         (tdesc_register_type): Use static make_gdb_type.
11032
11033 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11034
11035         * infcmd.c (default_print_one_register_info): Align natural-format
11036         column values consistently one under another.
11037         (pad_to_column): New function.
11038
11039 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11040
11041         * dwarf2read.c (dwarf2_physname): Move commment.
11042
11043 2018-02-01  Leszek Swirski  <leszeks@google.com>
11044
11045         * varobj.c (varobj_formatted_print_options): Allow recursive
11046         pretty printing if pretty printing is enabled.
11047
11048 2018-02-01  Leszek Swirski  <leszeks@google.com>
11049
11050         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11051         names after a structop as a filename.
11052
11053 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11054
11055         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11056         (arm_record_coproc_data_proc): Likewise.
11057
11058 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11059
11060         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11061
11062 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11063
11064         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11065         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11066
11067 2018-01-31  Pedro Alves  <palves@redhat.com>
11068
11069         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11070         * inflow.c (child_terminal_save_inferior): Wrap reference to
11071         tcgetpgrp in HAVE_TERMIOS_H.
11072         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11073         _WIN32.
11074         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11075         always iterate over all inferiors.
11076         (gdbsim_cntrl_c): Adjust.
11077         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11078
11079 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11080
11081         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11082         index type is objfile-owned if the element type is as well.
11083
11084 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11085
11086         GDB 8.1 released.
11087
11088 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11089
11090         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11091         "features/s390x-linux64.c".
11092         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11093         s390_linux32 and s390x_linux64.
11094         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11095         default tdesc.
11096         * s390-tdep.c: Include "features/s390-linux32.c" and
11097         "features/s390x-linux64.c".
11098         (s390_tdesc_valid): Add check for tdesc_has_registers.
11099         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11100         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11101         tdesc_s390x_linux64.
11102         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11103         tdesc_s390x_linux64 to...
11104         * s390-tdep.h: ...here.
11105
11106 2018-01-30  Pedro Alves  <palves@redhat.com>
11107
11108         PR gdb/13211
11109         * config.in, configure: Regenerate.
11110         * configure.ac: Check for getpgid.
11111         * go32-nat.c (go32_pass_ctrlc): New.
11112         (go32_target): Install it.
11113         * inf-child.c (inf_child_target): Install
11114         child_terminal_save_inferior, child_pass_ctrlc and
11115         child_interrupt.
11116         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11117         (inf_ptrace_target): No longer install it.
11118         * infcmd.c (interrupt_target_1): Adjust.
11119         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11120         (child_interrupt): Declare.
11121         (inferior::terminal_state): New.
11122         * inflow.c (struct terminal_info): Update comments.
11123         (inferior_process_group): Delete.
11124         (terminal_is_ours): Delete.
11125         (gdb_tty_state): New.
11126         (child_terminal_init): Adjust.
11127         (is_gdb_terminal, sharing_input_terminal_1)
11128         (sharing_input_terminal): New functions.
11129         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11130         Set the process's actual process group in the foreground if
11131         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11132         mark terminal as the inferior's if not sharing GDB's terminal.
11133         Don't check attach_flag.
11134         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11135         pass down a target_terminal_state.
11136         (child_terminal_save_inferior): New, factored out from ...
11137         (child_terminal_ours_1): ... this.  Handle
11138         target_terminal_state::is_ours_for_output.
11139         (child_interrupt, child_pass_ctrlc): New.
11140         (inflow_inferior_exit): Clear the inferior's terminal_state.
11141         (copy_terminal_info): Copy the inferior's terminal state.
11142         (_initialize_inflow): Remove reference to terminal_is_ours.
11143         * inflow.h (inferior_process_group): Delete.
11144         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11145         * procfs.c (procfs_target): Don't install procfs_interrupt.
11146         (procfs_interrupt): Delete.
11147         * remote.c (remote_serial_quit_handler): Adjust.
11148         (remote_interrupt): Remove ptid parameter.  Adjust.
11149         * target-delegates.c: Regenerate.
11150         * target.c: Include "terminal.h".
11151         (target_terminal::terminal_state): Rename to ...
11152         (target_terminal::m_terminal_state): ... this.
11153         (target_terminal::init): Adjust.
11154         (target_terminal::inferior): Adjust to per-inferior
11155         terminal_state.
11156         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11157         (target_terminal::ours, target_terminal::ours_for_output): Use
11158         target_terminal_is_ours_kind.
11159         (target_interrupt): Remove ptid parameter.  Adjust.
11160         (default_target_pass_ctrlc): Adjust.
11161         * target.h (target_ops::to_terminal_save_inferior): New field.
11162         (target_ops::to_interrupt): Remove ptid_t parameter.
11163         (target_interrupt): Remove ptid_t parameter.  Update comment.
11164         (target_pass_ctrlc): Update comment.
11165         * target/target.h (target_terminal_state): New scoped enum,
11166         factored out of ...
11167         (target_terminal::terminal_state): ... here.
11168         (target_terminal::inferior): Update comments.
11169         (target_terminal::restore_inferior): New.
11170         (target_terminal::is_inferior, target_terminal::is_ours)
11171         (target_terminal::is_ours_for_output): Adjust.
11172         (target_terminal::scoped_restore_terminal_state): Adjust to
11173         rename, and call restore_inferior() instead of inferior().
11174         (target_terminal::scoped_restore_terminal_state::m_state): Change
11175         type.
11176         (target_terminal::terminal_state): Rename to ...
11177         (target_terminal::m_terminal_state): ... this and change type.
11178
11179 2018-01-30  Pedro Alves  <palves@redhat.com>
11180
11181         * linux-nat.c (wait_for_signal): New function.
11182         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11183         directly.
11184         (async_terminal_is_ours)
11185         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11186         (linux_nat_add_target): Don't override
11187         to_terminal_inferior/to_terminal_ours.
11188
11189 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11190
11191         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11192
11193 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11194
11195         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11196         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11197         dwarf2_per_objfile_free here.
11198         (dwarf2_per_objfile_free): Remove.
11199         (_initialize_dwarf2_read): Don't register
11200         dwarf2_per_objfile_free as a registry cleanup.
11201
11202 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11203
11204         Avoid compilation errors in MinGW native builds
11205
11206         The error is triggered by including python-internal.h, and the
11207         error message is:
11208
11209              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11210                       from build-gnulib/import/math.h:27,
11211                       from d:/usr/Python26/include/pyport.h:235,
11212                       from d:/usr/Python26/include/Python.h:58,
11213                       from python/python-internal.h:94,
11214                       from python/py-arch.c:24:
11215              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11216         using ::hypot;
11217                 ^~~~~
11218
11219         This happens because Python headers define 'hypot' to expand t
11220         '_hypot' in the Windows builds.
11221         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11222         'hypoth'.  This avoids a compilation error.
11223
11224 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11225
11226         * MAINTAINERS (Write After Approval): Fix ordering.
11227
11228 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11229
11230         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11231
11232 2018-01-26  Alan Modra  <amodra@gmail.com>
11233
11234         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11235         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11236         Remove nop.  Make const.  Comment.
11237         (powerpc32_plt_stub_so_2): New.
11238         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11239         Correct count.  Update uses.
11240         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11241         Move common code reading PLT entry word.  Correct
11242         powerpc32_plt_stub PLT address calculation.
11243         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11244         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11245         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11246         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11247         (ppc64_standard_linkage8): Likewise.
11248         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11249         Correct insns description.
11250         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11251
11252 2018-01-24  Pedro Alves  <palves@redhat.com>
11253
11254         GCC PR libstdc++/83906
11255         * gdbtypes.c (operator==(const dynamic_prop &,
11256         const dynamic_prop &)): New.
11257         (operator==(const range_bounds &, const range_bounds &)): New.
11258         (check_types_equal): Use them instead of memcmp.
11259         * gdbtypes.h (operator==(const dynamic_prop &,
11260         const dynamic_prop &)): Declare.
11261         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11262         (operator==(const range_bounds &, const range_bounds &)): Declare.
11263         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11264
11265 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11266
11267         * s390-linux-tdep.c (s390_record_address_mask)
11268         (s390_record_calc_disp_common, s390_record_calc_disp)
11269         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11270         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11271         (s390_process_record): Move to s390-tdep.c.
11272         (s390_linux_init_abi_any): Adjust.
11273         * s390-tdep.c (s390_record_address_mask)
11274         (s390_record_calc_disp_common, s390_record_calc_disp)
11275         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11276         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11277         (s390_process_record): Moved from s390-linux-tdep.c
11278         (s390_gdbarch_init): Adjust.
11279
11280 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11281
11282         * s390-linux-nat.c (s390-tdep.h): New include.
11283         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11284         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11285         (ALLDEPFILES): Add s390-tdep.c.
11286         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11287         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11288         * s390-tdep.h: ...this.  New file.
11289         * s390-linux-tdep.c (s390-tdep.h): New include.
11290         (_initialize_s390_tdep): Rename to...
11291         (_initialize_s390_linux_tdep): ...this and adjust.
11292         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11293         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11294         s390-tdep.h.
11295         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11296         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11297         (s390_is_partial_instruction, s390_software_single_step)
11298         (is_non_branch_ril, s390_displaced_step_copy_insn)
11299         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11300         (s390_prologue_data, s390_addr, s390_store, s390_load)
11301         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11302         (s390_register_call_saved, s390_guess_tracepoint_registers)
11303         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11304         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11305         (s390_pseudo_register_name, s390_pseudo_register_type)
11306         (s390_pseudo_register_read, s390_pseudo_register_write)
11307         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11308         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11309         (s390_addr_bits_remove, s390_address_class_type_flags)
11310         (s390_address_class_type_flags_to_name)
11311         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11312         (s390_function_arg_float, s390_function_arg_vector)
11313         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11314         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11315         (s390_frame_align, s390_register_return_value, s390_return_value)
11316         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11317         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11318         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11319         (s390_trad_frame_prev_register, s390_unwind_cache)
11320         (s390_prologue_frame_unwind_cache)
11321         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11322         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11323         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11324         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11325         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11326         (s390_frame_base_address, s390_local_base_address)
11327         (s390_frame_base, s390_gcc_target_options)
11328         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11329         (s390_validate_reg_range, s390_tdesc_valid)
11330         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11331         * s390-tdep.c: ...this.  New file.
11332
11333 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11334
11335         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11336         (s390_process_record, s390_gdbarch_tdep_alloc)
11337         (s390_linux_init_abi_any): Use/set new hook.
11338
11339 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11340
11341         * s390-linux-tdep.c (osabi.h): New include.
11342         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11343         (s390_linux_init_abi_any): New functions.
11344         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11345
11346 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11347
11348         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11349         tdesc_has_registers check
11350
11351 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11352
11353         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11354         (s390_validate_reg_range): New macro.
11355         (s390_gdbarch_init): Adjust.
11356
11357 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11358
11359         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11360         (s390_gdbarch_tdep_alloc): Adjust.
11361         (s390_gdbarch_init): Adjust.
11362
11363 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11364
11365         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11366         <have_tdb>: Change type to bool.
11367         (s390_gdbarch_tdep_alloc): Adjust.
11368         (s390_gdbarch_init): Adjust.
11369
11370 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11371
11372         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11373         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11374         (s390_gdbarch_tdep_alloc): New function.
11375         (s390_gdbarch_init): Allocate tdep at start and use its fields
11376         instead of separate variables.
11377
11378 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11379
11380         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11381         when looking for cached gdbarch and add comment for remaining.
11382
11383 2018-01-22  Pedro Alves  <palves@redhat.com>
11384             Sergio Durigan Junior  <sergiodj@redhat.com>
11385
11386         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11387         case.
11388
11389 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11390
11391         * MAINTAINERS: Update my company e-mail address.
11392
11393 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11394
11395         * regcache.c (cooked_write_test): New function.
11396         (_initialize_regcache): Register the test.
11397
11398 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11399
11400         * ia64-tdep.c (ia64_pseudo_register_read): Call
11401         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11402         * m32c-tdep.c (m32c_cat_read): Likewise.
11403         (m32c_r3r2r1r0_read): Likewise.
11404         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11405         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11406
11407 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11408
11409         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11410         method raw_read instead of regcache_raw_read.
11411         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11412         * arm-tdep.c (arm_neon_quad_read): Likewise.
11413         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11414         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11415         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11416         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11417         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11418         (i386_pseudo_register_read_into_value): Likewise.
11419         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11420         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11421         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11422         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11423         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11424         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11425         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11426         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11427         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11428
11429 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11430
11431         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11432         * configure.tgt: Remove target mt.
11433         * mt-tdep.c: Remove.
11434         * regcache.c (cooked_read_test): Remove the check for mt.
11435
11436 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11437
11438         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11439         instead of gdbarch_pseudo_register_read_value.
11440
11441 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11442
11443         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11444         language is Ada.
11445
11446 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11447
11448         * linespec.c (create_sals_line_offset): Remove code that preserved
11449         the symtab_and_line's line number.
11450
11451 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11452
11453         * varobj.c (varobj_create): Don't set valid_block when creating a
11454         floating varobj.
11455
11456 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11457
11458         * varobj.c (varobj_create): Remove out of date comment.
11459
11460 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11461
11462         PR mi/20395
11463         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11464         updating innermost block.
11465         * parse.c (innermost_block_tracker::update): Take extra type
11466         parameter, and check types match before updating innermost block.
11467         (write_dollar_variable): Update innermost block for registers.
11468         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11469         (innermost_block_tracker::innermost_block_tracker): Initialise
11470         m_types member.
11471         (innermost_block_tracker::reset): Take type parameter.
11472         (innermost_block_tracker::update): Take type parameter, and pass
11473         type through as needed.
11474         (innermost_block_tracker::m_types): New member.
11475         * varobj.c (varobj_create): Pass type when reseting innermost
11476         block.
11477
11478 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11479
11480         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11481         * ada-lang.c (resolve_subexp): Likewise.
11482         * breakpoint.c (set_breakpoint_condition) Likewise.
11483         (watch_command_1) Likewise.
11484         * c-exp.y (variable): Likewise.
11485         * d-exp.y (PrimaryExpression): Likewise.
11486         * f-exp.y (variable): Likewise.
11487         * go-exp.y (variable): Likewise.
11488         * m2-exp.y (variable): Likewise.
11489         * objfiles.c (objfile::~objfile): Likewise.
11490         * p-exp.y (variable): Likewise.
11491         * parse.c (innermost_block): Change type.
11492         * parser-defs.h (class innermost_block_tracker): New.
11493         (innermost_block): Change to innermost_block_tracker.
11494         * printcmd.c (display_command): Switch to innermost_block API.
11495         (do_one_display): Likewise.
11496         * rust-exp.y (do_one_display): Likewise.
11497         * symfile.c (clear_symtab_users): Likewise.
11498         * varobj.c (varobj_create): Switch to innermost_block API, replace
11499         use of innermost_block with block stored on varobj object.
11500
11501 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11502
11503         * expression.h (innermost_block): Remove declaration.
11504         * varobj.c: Add 'parser-defs.h' include.
11505
11506 2018-01-19  Tom Tromey  <tom@tromey.com>
11507
11508         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11509         symbols in the static and global blocks.
11510
11511 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11512
11513         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11514         gdb_ptrace.h, and move including gdb_wait.h ...
11515         * nat/linux-ptrace.h: ... to here.
11516
11517 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11518
11519         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11520         inf_ptrace_detach_success.
11521         (inf_ptrace_detach_success): Add inferior parameter, use it
11522         instead of inferior_ptid, pass it to detach_inferior.
11523         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11524         parameter.
11525         * inferior.c (detach_inferior): Add overload that takes an
11526         inferior object.
11527         * inferior.h (detach_inferior): Likewise.
11528         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11529         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11530         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11531
11532 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11533
11534         * target.h (struct target_ops) <to_detach>: Add inferior
11535         parameter.
11536         (target_detach): Likewise.
11537         * target.c (dispose_inferior): Pass inferior down.
11538         (target_detach): Pass inferior down.  Assert that it is equal to
11539         the current inferior.
11540         * aix-thread.c (aix_thread_detach): Pass inferior down.
11541         * corefile.c (core_file_command): Pass current_inferior() down.
11542         * corelow.c (core_detach): Add inferior parameter.
11543         * darwin-nat.c (darwin_detach): Likewise.
11544         * gnu-nat.c (gnu_detach): Likewise.
11545         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11546         * infcmd.c (detach_command): Pass current_inferior() down to
11547         target_detach.
11548         * infrun.c (follow_fork_inferior): Pass parent_inf to
11549         target_detach.
11550         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11551         target_detach.
11552         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11553         * linux-thread-db.c (thread_db_detach): Likewise.
11554         * nto-procfs.c (procfs_detach): Likewise.
11555         * procfs.c (procfs_detach): Likewise.
11556         * record.c (record_detach): Likewise.
11557         * record.h (struct inferior): Forward-declare.
11558         (record_detach): Add inferior parameter.
11559         * remote-sim.c (gdbsim_detach): Likewise.
11560         * remote.c (remote_detach_1): Likewise.
11561         (remote_detach): Likewise.
11562         (extended_remote_detach): Likewise.
11563         * sol-thread.c (sol_thread_detach): Likewise.
11564         * target-debug.h (target_debug_print_inferior_p): New macro.
11565         * target-delegates.c: Re-generate.
11566         * top.c (kill_or_detach): Pass inferior down to target_detach.
11567         * windows-nat.c (windows_detach): Add inferior parameter.
11568
11569 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11570
11571         * target.h (struct target_ops) <to_detach>: Remove args
11572         parameter.
11573         (target_detach): Likewise.
11574         * target.c (dispose_inferior): Adjust.
11575         (target_detach): Remove args parameter, adjust.
11576         * aix-thread.c (aix_thread_detach): Adjust.
11577         * corefile.c (core_file_command): Adjust.
11578         * corelow.c (core_detach): Adjust.
11579         * darwin-nat.c (darwin_detach): Adjust.
11580         * gnu-nat.c (gnu_detach): Adjust.
11581         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11582         * infcmd.c (detach_command): Adjust
11583         * infrun.c (follow_fork_inferior): Adjust.
11584         (handle_vfork_child_exec_or_exit): Adjust.
11585         * linux-fork.c (linux_fork_detach): Remove args parameter.
11586         * linux-fork.h (linux_fork_detach): Likewise.
11587         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11588         * linux-thread-db.c (thread_db_detach): Likewise.
11589         * nto-procfs.c (procfs_detach): Likewise.
11590         * procfs.c (procfs_detach): Likewise.
11591         (do_detach): Remove signo parameter.
11592         * record.c (record_detach): Remove args parameter.
11593         * record.h (record_detach): Likewise.
11594         * remote-sim.c (gdbsim_detach): Likewise.
11595         * remote.c (remote_detach_1): Likewise.
11596         (remote_detach): Likewise.
11597         (extended_remote_detach): Likewise.
11598         * sol-thread.c (sol_thread_detach): Likewise.
11599         * target-delegates.c: Re-generate.
11600         * top.c (struct qt_args) <args>: Remove field.
11601         (kill_or_detach): Don't pass args.
11602         (quit_force): Don't set args.
11603         * windows-nat.c (windows_detach): Remove args parameter.
11604
11605 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11606
11607         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11608         (arm_linux_init_abi): Install it.
11609
11610 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11611
11612         * osabi.c (gdb_osabi_names): Extend the regexp for
11613         arm-linux-gnueabihf.
11614
11615 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11616
11617         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11618         m_abbrevs.
11619         (abbrev_table::add_abbrev): Update.
11620         (abbrev_table::lookup_abbrev): Update.
11621
11622 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11623
11624         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11625
11626 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11627
11628         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11629         to "std::string".
11630
11631 2018-01-17  Tom Tromey  <tom@tromey.com>
11632
11633         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11634
11635 2018-01-17  Tom Tromey  <tom@tromey.com>
11636
11637         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11638         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11639         (create_array_type_with_stride): Update.
11640         * dwarf2read.c (set_die_type): Update.
11641
11642 2018-01-17  Tom Tromey  <tom@tromey.com>
11643
11644         * dwarf2read.c (delayed_method_info): Remove typedef.
11645         (dwarf2_cu::method_info): Now a std::vector.
11646         (add_to_method_list): Update.
11647         (free_delayed_list): Remove.
11648         (compute_delayed_physnames): Update.
11649         (process_full_comp_unit, process_full_type_unit): Clear the method
11650         list.  Remove cleanups.
11651         (psymtab_include_file_name): Add name_holder parameter.  Use
11652         unique_xmalloc_ptr.
11653         (dwarf_decode_lines): Update.
11654
11655 2018-01-17  Tom Tromey  <tom@tromey.com>
11656             Simon Marchi  <simon.marchi@ericsson.com>
11657
11658         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11659         (dwarf2_per_objfile::free_cached_comp_units)
11660         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11661         (init_cutu_and_read_dies_no_follow): Update.
11662         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11663         (dwarf2_cu::~dwarf2_cu): New.
11664         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11665         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11666
11667 2018-01-17  Tom Tromey  <tom@tromey.com>
11668             Simon Marchi  <simon.marchi@ericsson.com>
11669
11670         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11671         (struct die_reader_specs) <abbrev_table>: New member.
11672         (struct abbrev_table): Add constructor.
11673         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11674         <abbrev_obstack>: Now an auto_obstack.
11675         (abbrev_table_up): New typedef.
11676         (init_cu_die_reader): Add abbrev_table parameter.
11677         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11678         Add result_dwo_abbrev_table.
11679         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11680         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11681         Update.
11682         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11683         parameter.
11684         (skip_children): Update.
11685         (abbrev_table::alloc_abbrev): Rename from
11686         abbrev_table_alloc_abbrev.
11687         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11688         (abbrev_table::lookup_abbrev): Rename from
11689         abbrev_table_lookup_abbrev.
11690         (abbrev_table_read_table): Return abbrev_table_up.
11691         (abbrev_table_free, abbrev_table_free_cleanup)
11692         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11693         (load_partial_dies): Update.
11694
11695 2018-01-17  Tom Tromey  <tom@tromey.com>
11696
11697         * dwarf2read.c (dwarf2_compute_name): Update comment.
11698         (read_func_scope, read_variable): Update.
11699         (new_symbol): Remove.
11700         (new_symbol_full): Rename to new_symbol.
11701
11702 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11703
11704         PR gdb/16577
11705         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11706         a warning instead of throwing an error, set section size to 0 and return
11707         NULL.
11708         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11709
11710 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11711
11712         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11713         std::string.
11714         (linux_ptrace_attach_fail_reason_string): Likewise.
11715         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11716         Likewise.
11717         (linux_ptrace_attach_fail_reason_string): Likewise.
11718         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11719
11720 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11721
11722         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11723
11724 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11725
11726         PR gdb/21559
11727         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11728         checking for fs_base/gs_base fields in struct user_regs_struct.
11729         * configure: Regenerate.
11730
11731 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11732
11733         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11734         function.
11735         (aarch64_linux_init_abi): Install it to gdbarch hook
11736         gcc_target_options.
11737
11738 2018-01-15  Pedro Alves  <palves@redhat.com>
11739
11740         * common/signals-state-save-restore.c
11741         (save_original_signals_state): Fix typos.
11742
11743 2017-01-12  Tom Tromey  <tom@tromey.com>
11744             Sergio Durigan Junior  <sergiodj@redhat.com>
11745
11746         * Makefile.in (install-only): Install gdb-add-index.
11747
11748 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11749
11750         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11751
11752 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11753
11754         * infrun.c (keep_going_pass_signal): Clear step-over info when
11755         insert_breakpoints fails.
11756
11757 2018-01-11  Pedro Alves  <palves@redhat.com>
11758
11759         PR gdb/22583
11760         * infrun.c (resume): Rename to ...
11761         (resume_1): ... this.
11762         (resume): Reimplement as wrapper around resume_1.
11763
11764 2018-01-11  Pedro Alves  <palves@redhat.com>
11765
11766         PR remote/22597
11767         * remote.c (remote_parse_stop_reply): Default to the last-set
11768         general thread instead of to 'magic_null_ptid'.
11769
11770 2018-01-10  Pedro Alves  <palves@redhat.com>
11771
11772         * language.h (language_get_symbol_name_matcher): Rename ...
11773         (get_symbol_name_matcher): ... this.
11774         * language.c (language_get_symbol_name_matcher): Ditto.
11775         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11776         callers adjusted.
11777
11778 2018-01-10  Pedro Alves  <palves@redhat.com>
11779
11780         PR gdb/22670
11781         * dwarf2read.c
11782         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11783         Adjust to use language_get_symbol_name_matcher instead of
11784         language_defn::la_get_symbol_name_matcher.
11785         * language.c (language_get_symbol_name_matcher): If in Ada mode
11786         and the lookup name is a verbatim match, return Ada's matcher.
11787         * language.h (language_get_symbol_name_matcher): Adjust comment.
11788         (ada_lookup_name_info::verbatim_p):: New method.
11789
11790 2018-01-10  Pedro Alves  <palves@redhat.com>
11791
11792         PR gdb/22670
11793         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11794         minsym's language is language_auto or language_cplus, pass down
11795         language_ada instead.
11796         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11797
11798 2018-01-10  Pedro Alves  <palves@redhat.com>
11799
11800         PR gdb/22670
11801         * minsyms.c (linkage_name_str): New function.
11802         (iterate_over_minimal_symbols): Use it.
11803
11804 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11805
11806         * NEWS: Document that 'info proc' now works on FreeBSD.
11807
11808 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11809
11810         * configure.ac: Check for kinfo_getfile in libutil.
11811         * configure: Regenerate.
11812         * config.in: Regenerate.
11813         * fbsd-nat.c: Include "fbsd-tdep.h".
11814         (fbsd_fetch_cmdline): New.
11815         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11816         rather than calling error.
11817         (fbsd_info_proc): New.
11818         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11819         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11820         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11821
11822 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11823
11824         * fbsd-nat.c (struct free_deleter): Remove.
11825         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11826
11827 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11828
11829         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11830         NULL for an empty pathname.
11831
11832 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11833
11834         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11835         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11836         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11837         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11838         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11839         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11840         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11841         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11842         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11843         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11844         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11845         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11846         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11847         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11848         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11849
11850 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11851
11852         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11853         (gnu_xfer_auxv): New function.
11854         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11855         TARGET_OBJECT_AUXV.
11856
11857 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11858             Simon Marchi  <simon.marchi@ericsson.com>
11859
11860         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11861         common/selftest.c.
11862         (COMMON_OBS): Remove selftest.o.
11863         * configure.ac: Append selftest-arch.c and common/selftest.c to
11864         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11865         * configure: Re-generated.
11866         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11867         GDB_SELF_TEST.
11868         (maintenance_info_selftests): Likewise.
11869
11870 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11871
11872         * ada-valprint.c (val_print_packed_array_elements): Use
11873         proper number of elements when printing an array indexed
11874         by an enumeration type.
11875
11876 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11877
11878         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11879         (dw2_get_file_names_reader): Adjust.
11880         (lookup_dwo_signatured_type): Adjust.
11881         (lookup_dwp_signatured_type): Adjust.
11882         (lookup_signatured_type): Adjust.
11883         (create_type_unit_group): Adjust.
11884         (get_type_unit_group): Adjust.
11885         (process_psymtab_comp_unit_reader): Adjust.
11886         (build_type_psymtabs_reader): Adjust.
11887         (scan_partial_symbols): Adjust.
11888         (add_partial_symbol): Adjust.
11889         (add_partial_subprogram): Adjust.
11890         (peek_die_abbrev): Adjust.
11891         (fixup_go_packaging): Adjust.
11892         (process_imported_unit_die): Adjust.
11893         (dwarf2_compute_name): Adjust.
11894         (dwarf2_physname): Adjust.
11895         (read_import_statement): Adjust.
11896         (handle_DW_AT_stmt_list): Adjust.
11897         (read_file_scope): Adjust.
11898         (read_func_scope): Adjust.
11899         (read_lexical_block_scope): Adjust.
11900         (read_call_site_scope): Adjust.
11901         (read_variable): Adjust.
11902         (dwarf2_rnglists_process): Adjust.
11903         (dwarf2_ranges_process): Adjust.
11904         (dwarf2_ranges_read): Adjust.
11905         (dwarf2_get_pc_bounds): Adjust.
11906         (dwarf2_record_block_ranges): Adjust.
11907         (dwarf2_add_field): Adjust.
11908         (dwarf2_add_member_fn): Adjust.
11909         (read_structure_type): Adjust.
11910         (process_structure_scope): Adjust.
11911         (read_enumeration_type): Adjust.
11912         (read_array_type): Adjust.
11913         (mark_common_block_symbol_computed): Adjust.
11914         (read_common_block): Adjust.
11915         (read_namespace_type): Adjust.
11916         (read_namespace): Adjust.
11917         (read_module_type): Adjust.
11918         (read_tag_pointer_type): Adjust.
11919         (read_tag_ptr_to_member_type): Adjust.
11920         (read_tag_string_type): Adjust.
11921         (read_subroutine_type): Adjust.
11922         (read_typedef): Adjust.
11923         (read_base_type): Adjust.
11924         (attr_to_dynamic_prop): Adjust.
11925         (read_subrange_type): Adjust.
11926         (read_unspecified_type): Adjust.
11927         (dwarf2_read_abbrevs): Adjust.
11928         (load_partial_dies): Adjust.
11929         (read_partial_die): Adjust.
11930         (find_partial_die): Adjust.
11931         (guess_partial_die_structure_name): Adjust.
11932         (fixup_partial_die): Adjust.
11933         (read_attribute_value): Adjust.
11934         (read_addr_index): Adjust.
11935         (read_addr_index_from_leb128): Adjust.
11936         (read_str_index): Adjust.
11937         (dwarf2_string_attr): Adjust.
11938         (get_debug_line_section): Adjust.
11939         (dwarf_decode_line_header): Adjust.
11940         (lnp_state_machine::check_line_address): Adjust.
11941         (dwarf_decode_lines_1): Adjust.
11942         (dwarf_decode_lines): Adjust.
11943         (dwarf2_start_symtab): Adjust.
11944         (var_decode_location): Adjust.
11945         (new_symbol_full): Adjust.
11946         (dwarf2_const_value_data): Adjust.
11947         (dwarf2_const_value_attr): Adjust.
11948         (dwarf2_const_value): Adjust.
11949         (die_type): Adjust.
11950         (die_containing_type): Adjust.
11951         (build_error_marker_type): Adjust.
11952         (lookup_die_type): Adjust.
11953         (guess_full_die_structure_name): Adjust.
11954         (anonymous_struct_prefix): Adjust.
11955         (determine_prefix): Adjust.
11956         (dwarf2_name): Adjust.
11957         (follow_die_ref_or_sig): Adjust.
11958         (follow_die_offset): Adjust.
11959         (follow_die_ref): Adjust.
11960         (follow_die_sig_1): Adjust.
11961         (follow_die_sig): Adjust.
11962         (get_signatured_type): Adjust.
11963         (get_DW_AT_signature_type): Adjust.
11964         (decode_locdesc): Adjust.
11965         (dwarf_decode_macros): Adjust.
11966         (cu_debug_loc_section): Adjust.
11967         (fill_in_loclist_baton): Adjust.
11968         (dwarf2_symbol_mark_computed): Adjust.
11969         (init_one_comp_unit): Don't assign
11970         dwarf2_cu::dwarf2_per_objfile.
11971         (set_die_type): Adjust.
11972
11973 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11974
11975         * dwarf2read.c (struct mapped_debug_names): Add constructor.
11976         <dwarf2_per_objfile>: New field.
11977         (dwarf2_per_objfile): Remove global.
11978         (get_dwarf2_per_objfile): New function.
11979         (set_dwarf2_per_objfile): New function.
11980         (dwarf2_build_psymtabs_hard): Change objfile parameter to
11981         dwarf2_per_objfile.
11982         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11983         (read_abbrev_offset): Likewise.
11984         (read_indirect_string): Likewise.
11985         (read_indirect_line_string): Likewise.
11986         (read_indirect_string_at_offset): Likewise.
11987         (read_indirect_string_from_dwz): Likewise.
11988         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11989         dwarf2_per_objfile.
11990         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11991         (create_all_comp_units): Change objfile parameter to
11992         dwarf2_per_objfile.
11993         (create_all_type_units): Likewise.
11994         (process_queue): Add dwarf2_per_objfile parameter.
11995         (read_and_check_comp_unit_head): Likewise.
11996         (lookup_dwo_unit_in_dwp): Likewise.
11997         (get_dwp_file): Likewise.
11998         (process_cu_includes): Likewise.
11999         (struct free_dwo_file_cleanup_data): New struct.
12000         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12001         set_dwarf2_per_objfile.
12002         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12003         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12004         context, adjust calls.
12005         (dw2_instantiate_symtab): Likewise.
12006         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12007         (dw2_get_cu): Likewise.
12008         (create_cu_from_index_list): Change objfile parameter to
12009         dwarf2_per_objfile.
12010         (create_cus_from_index_list): Get dwarf2_per_objfile from
12011         context, adjust calls.
12012         (create_cus_from_index): Likewise.
12013         (create_signatured_type_table_from_index): Change objfile
12014         parameter to dwarf2_per_objfile.
12015         (create_signatured_type_table_from_debug_names): Change objfile
12016         parameter to dwarf2_per_objfile.
12017         (create_addrmap_from_index): Likewise.
12018         (create_addrmap_from_aranges): Likewise.
12019         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12020         (dw2_setup): Remove.
12021         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12022         context.
12023         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12024         get_dwarf2_per_objfile.
12025         (dw2_forget_cached_source_info): Likewise.
12026         (dw2_map_symtabs_matching_filename): Likewise.
12027         (struct dw2_symtab_iterator) <index>: Remove.
12028         <dwarf2_per_objfile>: New field.
12029         (dw2_symtab_iter_init): Replace index parameter with
12030         dwarf2_per_objfile.
12031         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12032         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12033         (dw2_print_stats): Likewise.
12034         (dw2_dump): Likewise.
12035         (dw2_expand_symtabs_for_function): Likewise.
12036         (dw2_expand_all_symtabs): Likewise.
12037         (dw2_expand_symtabs_with_fullname): Likewise.
12038         (dw2_expand_marked_cus): Replace index and objfile parameters
12039         with dwarf2_per_objfile.
12040         (dw_expand_symtabs_matching_file_matcher): Add
12041         dwarf2_per_objfile parameter and adjust calls.
12042         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12043         adjust calls.
12044         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12045         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12046         adjust calls.
12047         (create_cus_from_debug_names_list): Replace objfile parameter
12048         with dwarf2_per_objfile and adjust calls.
12049         (create_cus_from_debug_names): Likewise.
12050         (dwarf2_read_debug_names): Likewise.
12051         (mapped_debug_names::namei_to_name): Adjust call.
12052         (dw2_debug_names_iterator::next): Likewise.
12053         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12054         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12055         (dw2_debug_names_dump): Likewise.
12056         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12057         (dw2_debug_names_expand_symtabs_matching): Likewise.
12058         (dwarf2_initialize_objfile): Likewise.
12059         (dwarf2_build_psymtabs): Likewise.
12060         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12061         this_cu.
12062         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12063         (read_and_check_comp_unit_head): Likewise.
12064         (read_abbrev_offset): Likewise.
12065         (create_debug_type_hash_table): Likewise.
12066         (create_debug_types_hash_table): Likewise.
12067         (create_all_type_units): Replace objfile parameter with
12068         dwarf2_per_objfile.
12069         (add_type_unit): Add dwarf2_per_objfile parameter.
12070         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12071         with dwarf2_per_objfile.
12072         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12073         (lookup_dwp_signatured_type): Likewise.
12074         (lookup_signatured_type): Likewise.
12075         (read_cutu_die_from_dwo): Likewise.
12076         (init_tu_and_read_dwo_dies): Likewise.
12077         (init_cutu_and_read_dies): Likewise.
12078         (init_cutu_and_read_dies_no_follow): Likewise.
12079         (allocate_type_unit_groups_table): Add objfile parameter.
12080         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12081         (get_type_unit_group): Likewise.
12082         (process_psymtab_comp_unit): Update call.
12083         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12084         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12085         (print_tu_stats): Likewise.
12086         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12087         in void* parameter.
12088         (build_type_psymtabs): Change objfile parameter to
12089         dwarf2_per_objfile.
12090         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12091         passed in void* parameter.
12092         (process_skeletonless_type_units): Change objfile parameter to
12093         dwarf2_per_objfile.
12094         (set_partial_user): Likewise.
12095         (dwarf2_build_psymtabs_hard): Likewise.
12096         (read_comp_units_from_section): Likewise.
12097         (create_all_comp_units): Likewise.
12098         (scan_partial_symbols): Update calls.
12099         (add_partial_symbol): Likewise.
12100         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12101         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12102         (process_queue): Add dwarf2_per_objfile parameter.
12103         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12104         (compute_compunit_symtab_includes): Likewise.
12105         (process_cu_includes): Add dwarf2_per_objfile parameter.
12106         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12107         (process_full_type_unit): Likewise.
12108         (process_imported_unit_die): Update call.
12109         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12110         (read_file_scope): Likewise.
12111         (allocate_dwo_file_hash_table): Add objfile parameter.
12112         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12113         (create_cus_hash_table): Likewise.
12114         (create_dwp_hash_table): Likewise.
12115         (create_dwo_unit_in_dwp_v1): Likewise.
12116         (create_dwp_v2_section): Likewise.
12117         (create_dwo_unit_in_dwp_v2): Likewise.
12118         (lookup_dwo_unit_in_dwp): Likewise.
12119         (try_open_dwop_file): Likewise.
12120         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12121         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12122         cleanup to include a reference to dwarf2_per_objfile.
12123         (open_dwp_file): Add dwarf2_per_objfile parameter.
12124         (open_and_init_dwp_file): Likewise.
12125         (get_dwp_file): Likewise.
12126         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12127         (queue_and_load_all_dwo_tus): Update call.
12128         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12129         data.
12130         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12131         (dwarf2_ranges_process): Likewise.
12132         (dwarf2_get_pc_bounds): Likewise.
12133         (mark_common_block_symbol_computed): Likewise.
12134         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12135         (dwarf2_read_abbrevs): Update call.
12136         (read_partial_die): Use dwarf2_per_objfile from cu.
12137         (find_partial_die): Likewise.
12138         (fixup_partial_die): Likewise.
12139         (read_attribute_value): Likewise.
12140         (read_indirect_string_at_offset_from): Add objfile parameter.
12141         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12142         parameter.
12143         (read_indirect_string_from_dwz): Add objfile parameter.
12144         (read_indirect_string): Add objfile parameter.
12145         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12146         (read_addr_index): Use dwarf2_per_objfile from cu.
12147         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12148         call dw2_setup.
12149         (read_str_index): Use dwarf2_per_objfile from cu.
12150         (get_debug_line_section): Likewise.
12151         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12152         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12153         (new_symbol_full): Use dwarf2_per_objfile from cu.
12154         (build_error_marker_type): Likewise.
12155         (lookup_die_type): Likewise.
12156         (determine_prefix): Likewise.
12157         (follow_die_offset): Likewise.
12158         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12159         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12160         (dwarf2_fetch_die_type_sect_off): Likewise.
12161         (dwarf2_get_die_type): Likewise.
12162         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12163         (get_signatured_type): Likewise.
12164         (get_DW_AT_signature_type): Likewise.
12165         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12166         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12167         (cu_debug_loc_section): Likewise.
12168         (fill_in_loclist_baton): Likewise.
12169         (dwarf2_symbol_mark_computed): Likewise.
12170         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12171         dwarf2_per_objfile.
12172         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12173         parameter.
12174         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12175         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12176         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12177         (set_die_type): Use dwarf2_free_objfile from cu.
12178         (get_die_type_at_offset): Likewise.
12179         (dwarf2_per_objfile_free): Don't assign global variable.
12180         (debug_names) <constructor>: Add dwarf2_per_objfile
12181         parameter, update m_debugstrlookup construction.
12182         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12183         parameter.
12184         <m_dwarf2_per_objfile>: New field.
12185         <lookup>: Use m_dwarf2_per_objfile.
12186         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12187         (psyms_seen_size): Likewise.
12188         (write_gdbindex): Replace objfile parameter with
12189         dwarf2_per_objfile.
12190         (write_debug_names): Likewise.
12191         (write_psymtabs_to_index): Likewise.
12192         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12193         calls.
12194
12195 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12196
12197         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12198         <dwarf2_per_objfile>: New field.
12199         (struct dwarf2_per_cu_data) <objfile>: Remove.
12200         <dwarf2_per_objfile>: New field.
12201         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12202         of objfile.
12203         (create_signatured_type_table_from_index): Likewise.
12204         (create_debug_type_hash_table): Likewise.
12205         (fill_in_sig_entry_from_dwo_entry): Likewise.
12206         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12207         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12208         objfile.
12209         (create_partial_symtab): Access objfile through
12210         dwarf2_per_objfile.
12211         (process_psymtab_comp_unit_reader): Likewise.
12212         (read_comp_units_from_section): Likewise.
12213         (scan_partial_symbols): Likewise.
12214         (add_partial_symbol): Likewise.
12215         (add_partial_subprogram): Likewise.
12216         (peek_die_abbrev): Likewise.
12217         (fixup_go_packaging): Likewise.
12218         (process_full_comp_unit): Likewise.
12219         (process_full_type_unit): Likewise.
12220         (process_imported_unit_die): Likewise.
12221         (dwarf2_compute_name): Likewise.
12222         (dwarf2_physname): Likewise.
12223         (read_import_statement): Likewise.
12224         (create_cus_hash_table): Assign dwarf2_physname instead of
12225         objfile.
12226         (read_func_scope): Access objfile through dwarf2_per_objfile.
12227         (read_lexical_block_scope): Likewise.
12228         (read_call_site_scope): Likewise.
12229         (read_variable): Likewise.
12230         (dwarf2_rnglists_process): Likewise.
12231         (dwarf2_ranges_process): Likewise.
12232         (dwarf2_ranges_read): Likewise.
12233         (dwarf2_record_block_ranges): Likewise.
12234         (dwarf2_add_field): Likewise.
12235         (dwarf2_add_member_fn): Likewise.
12236         (read_structure_type): Likewise.
12237         (process_structure_scope): Likewise.
12238         (read_enumeration_type): Likewise.
12239         (read_array_type): Likewise.
12240         (read_common_block): Likewise.
12241         (read_namespace_type): Likewise.
12242         (read_namespace): Likewise.
12243         (read_module_type): Likewise.
12244         (read_tag_pointer_type): Likewise.
12245         (read_tag_ptr_to_member_type): Likewise.
12246         (read_tag_string_type): Likewise.
12247         (read_subroutine_type): Likewise.
12248         (read_typedef): Likewise.
12249         (read_base_type): Likewise.
12250         (attr_to_dynamic_prop): Likewise.
12251         (read_subrange_type): Likewise.
12252         (read_unspecified_type): Likewise.
12253         (load_partial_dies): Likewise.
12254         (read_partial_die): Likewise.
12255         (find_partial_die): Likewise.
12256         (guess_partial_die_structure_name): Likewise.
12257         (fixup_partial_die): Likewise.
12258         (read_attribute_value): Likewise.
12259         (read_addr_index_from_leb128): Likewise.
12260         (dwarf2_read_addr_index): Likewise.
12261         (dwarf2_string_attr): Likewise.
12262         (lnp_state_machine::check_line_address): Likewise.
12263         (dwarf_decode_lines_1): Likewise.
12264         (dwarf_decode_lines): Likewise.
12265         (dwarf2_start_symtab): Likewise.
12266         (var_decode_location): Likewise.
12267         (new_symbol_full): Likewise.
12268         (dwarf2_const_value_data): Likewise.
12269         (dwarf2_const_value_attr): Likewise.
12270         (dwarf2_const_value): Likewise.
12271         (die_type): Likewise.
12272         (die_containing_type): Likewise.
12273         (lookup_die_type): Likewise.
12274         (guess_full_die_structure_name): Likewise.
12275         (anonymous_struct_prefix): Likewise.
12276         (dwarf2_name): Likewise.
12277         (follow_die_ref_or_sig): Likewise.
12278         (follow_die_offset): Likewise.
12279         (follow_die_ref): Likewise.
12280         (dwarf2_fetch_die_loc_sect_off): Likewise.
12281         (dwarf2_fetch_constant_bytes): Likewise.
12282         (dwarf2_fetch_die_type_sect_off): Likewise.
12283         (dwarf2_get_die_type): Likewise.
12284         (follow_die_sig): Likewise.
12285         (decode_locdesc): Likewise.
12286         (dwarf2_per_cu_objfile): Likewise.
12287         (dwarf2_per_cu_text_offset): Likewise.
12288         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12289         objfile.
12290         (set_die_type): Access objfile through
12291         dwarf2_per_objfile.
12292
12293 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12294
12295         * valprint.c (converted_character_d): Remove typedef.
12296         (DEF_VEC_O (converted_character_d)): Remove.
12297         (count_next_character): Use std::vector.
12298         (print_converted_chars_to_obstack): Likewise.
12299         (generic_printstr): Likewise.
12300
12301 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12302
12303         * xml-support.h (struct gdb_xml_value): Add constructor.
12304         <value>: Change type to unique_xmalloc_ptr.
12305         (gdb_xml_value_s): Remove typedef.
12306         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12307         (gdb_xml_element_start_handler): Change parameter type to
12308         std::vector.
12309         (xml_find_attribute): Likewise.
12310         * xml-support.c (xml_find_attribute): Change parameter type to
12311         std::vector and adjust.
12312         (gdb_xml_values_cleanup): Remove.
12313         (gdb_xml_parser::start_element): Adjust to std::vector.
12314         (xinclude_start_include): Change paraeter type to std::vector
12315         and adjust.
12316         * btrace.c (check_xml_btrace_version): Likewise.
12317         (parse_xml_btrace_block): Likewise.
12318         (parse_xml_btrace_pt_config_cpu): Likewise.
12319         (parse_xml_btrace_pt): Likewise.
12320         (parse_xml_btrace_conf_bts): Likewise.
12321         (parse_xml_btrace_conf_pt): Likewise.
12322         * memory-map.c (memory_map_start_memory): Likewise.
12323         (memory_map_start_property): Likewise.
12324         * osdata.c (osdata_start_osdata): Likewise.
12325         (osdata_start_item): Likewise.
12326         (osdata_start_column): Likewise.
12327         * remote.c (start_thread): Likewise.
12328         * solib-aix.c (library_list_start_library): Likewise.
12329         (library_list_start_list): Likewise.
12330         * solib-svr4.c (library_list_start_library): Likewise.
12331         (svr4_library_list_start_list): Likewise.
12332         * solib-target.c (library_list_start_segment): Likewise.
12333         (library_list_start_section): Likewise.
12334         (library_list_start_library): Likewise.
12335         (library_list_start_list): Likewise.
12336         * tracepoint.c (traceframe_info_start_memory): Likewise.
12337         (traceframe_info_start_tvar): Likewise.
12338         * xml-syscall.c (syscall_start_syscall): Likewise.
12339         * xml-tdesc.c (tdesc_start_target): Likewise.
12340         (tdesc_start_feature): Likewise.
12341         (tdesc_start_reg): Likewise.
12342         (tdesc_start_union): Likewise.
12343         (tdesc_start_struct): Likewise.
12344         (tdesc_start_flags): Likewise.
12345         (tdesc_start_enum): Likewise.
12346         (tdesc_start_field): Likewise.
12347         (tdesc_start_enum_value): Likewise.
12348         (tdesc_start_vector): Likewise.
12349
12350 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12351
12352         * extension.h (struct xmethod_worker) <clone>: Remove.
12353         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12354         Remove.
12355         (python_xmethod_worker::clone): Remove.
12356         * valops.c (find_overload_match): Use std::move instead of
12357         clone.
12358
12359 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12360
12361         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12362         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12363         <free_xmethod_worker_data>: Remove.
12364         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12365         <get_xmethod_arg_types>: Remove.
12366         <get_xmethod_result_type>: Remove.
12367         <invoke_xmethod>: Remove.
12368         * extension.c (new_xmethod_worker): Remove.
12369         (clone_xmethod_worker): Remove.
12370         (get_matching_xmethod_workers): Return void, pass std::vector by
12371         pointer.
12372         (get_xmethod_arg_types): Rename to...
12373         (xmethod_worker::get_arg_types): ... this, and adjust.
12374         (get_xmethod_result_type): Rename to...
12375         (xmethod_worker::get_result_type): ... this, and adjust.
12376         (invoke_xmethod): Remove.
12377         (free_xmethod_worker): Remove.
12378         (free_xmethod_worker_vec): Remove.
12379         * extension.h (enum ext_lang_rc): Move here from
12380         extension-priv.h.
12381         (struct xmethod_worker): Add constructor and destructor.
12382         <data>: Remove.
12383         <value>: Remove.
12384         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12385         virtual pure methods.
12386         <get_arg_types, get_result_type>: New methods.
12387         (xmethod_worker_ptr): Remove typedef.
12388         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12389         (xmethod_worker_vec): Remove typedef.
12390         (xmethod_worker_up): New typedef.
12391         (invoke_xmethod): Remove.
12392         (clone_xmethod_worker): Remove.
12393         (free_xmethod_worker): Remove.
12394         (free_xmethod_worker_vec): Remove.
12395         (get_xmethod_arg_types): Remove.
12396         (get_xmethod_result_type): Remove.
12397         * valops.c (find_method_list): Use std::vector, don't use
12398         intermediate vector.
12399         (value_find_oload_method_list): Use std::vector.
12400         (find_overload_match): Use std::vector.
12401         (find_oload_champ): Use std::vector.
12402         * value.c (value_free): Use operator delete.
12403         (value_of_xmethod): Rename to...
12404         (value_from_xmethod): ... this.  Don't assign
12405         xmethod_worker::value, take rvalue-reference.
12406         (result_type_of_xmethod): Adjust.
12407         (call_xmethod): Adjust.
12408         * value.h: Include extension.h.
12409         (struct xmethod_worker): Don't forward-declare.
12410         (value_of_xmethod): Rename to...
12411         (value_from_xmethod): ... this, take rvalue-reference.
12412         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12413         (struct python_xmethod_worker): ... this, add constructor and
12414         destructor.
12415         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12416         (gdbpy_free_xmethod_worker_data): Rename to...
12417         (python_xmethod_worker::~python_xmethod_worker): ... this and
12418         adjust.
12419         (gdbpy_clone_xmethod_worker_data): Rename to...
12420         (python_xmethod_worker::clone): ... this and adjust.
12421         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12422         temporary vector.
12423         (gdbpy_get_xmethod_arg_types): Rename to...
12424         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12425         (gdbpy_get_xmethod_result_type): Rename to...
12426         (python_xmethod_worker::do_get_result_type): ... this and
12427         adjust.
12428         (gdbpy_invoke_xmethod): Rename to...
12429         (python_xmethod_worker::invoke): ... this and adjust.
12430         (new_python_xmethod_worker): Rename to...
12431         (python_xmethod_worker::python_xmethod_worker): ... this and
12432         adjust.
12433         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12434         Remove.
12435         (gdbpy_free_xmethod_worker_data): Remove.
12436         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12437         (gdbpy_get_xmethod_arg_types): Remove.
12438         (gdbpy_get_xmethod_result_type): Remove.
12439         (gdbpy_invoke_xmethod): Remove.
12440         * python/python.c (python_extension_ops): Remove obsolete
12441         callbacks.
12442
12443 2018-01-05  Pedro Alves  <palves@redhat.com>
12444
12445         PR gdb/18653
12446         * common/signals-state-save-restore.c
12447         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12448         find a custom handler preinstalled, instead of internal erroring.
12449         But only warn if !quiet.
12450         * common/signals-state-save-restore.h
12451         (save_original_signals_state): New parameter 'quiet'.
12452         * main.c (captured_main_1): Move save_original_signals_state call
12453         after option handling, and pass QUIET.
12454
12455 2018-01-05  Pedro Alves  <palves@redhat.com>
12456
12457         * spu-tdep.c (spu_catch_start): Pass
12458         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12459
12460 2018-01-05  Pedro Alves  <palves@redhat.com>
12461
12462         PR gdb/22670
12463         * ada-lang.c (literal_symbol_name_matcher): New function.
12464         (ada_get_symbol_name_matcher): Use it for
12465         symbol_name_match_type::SEARCH_NAME.
12466         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12467         it down instead of assuming symbol_name_match_type::FULL.
12468         * block.h (block_lookup_symbol): New parameter 'match_type'.
12469         * c-valprint.c (print_unpacked_pointer): Use
12470         lookup_symbol_search_name instead of lookup_symbol.
12471         * compile/compile-object-load.c (get_out_value_type): Pass down
12472         symbol_name_match_type::SEARCH_NAME.
12473         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12474         symbol_name_match_type::FULL.
12475         * cp-support.c (cp_get_symbol_name_matcher): Handle
12476         symbol_name_match_type::SEARCH_NAME.
12477         * infrun.c (insert_exception_resume_breakpoint): Use
12478         lookup_symbol_search_name.
12479         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12480         * psymtab.c (maintenance_check_psymtabs): Use
12481         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12482         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12483         SYMBOL_SEARCH_NAME.
12484         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12485         if symbol_name_match_type::SEARCH_NAME.
12486         (lookup_symbol_in_language): Pass down
12487         symbol_name_match_type::FULL.
12488         (lookup_symbol_search_name): New.
12489         (lookup_language_this): Pass down
12490         symbol_name_match_type::SEARCH_NAME.
12491         (lookup_symbol_aux, lookup_local_symbol): New parameter
12492         'match_type'.  Pass it down.
12493         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12494         (lookup_symbol_search_name): New declaration.
12495         (lookup_symbol_in_block): New 'match_type' parameter.
12496
12497 2018-01-05  Pedro Alves  <palves@redhat.com>
12498
12499         PR gdb/22670
12500         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12501         ada_lookup_symbol.
12502         (ada_lookup_symbol): Reimplement in terms of
12503         ada_lookup_symbol_list, bits factored out from
12504         ada_lookup_encoded_symbol.
12505
12506 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12507
12508         * ada-exp.y (write_object_renaming): When subscripting an array
12509         using a symbol as the index, pass the block in call to
12510         ada_lookup_encoded_symbol when looking that symbol up.
12511
12512 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12513
12514         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12515         TYPE_INDEX_TYPE.
12516
12517 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12518
12519         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12520         the case where VALUE_LVAL (val0) is not lval_memory.
12521
12522 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12523
12524         * ada-valprint.c (print_optional_low_bound): Handle
12525         character-indexed array printing like boolean-indexed array
12526         printing.
12527
12528 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12529
12530         * NEWS: Create a new section for the next release branch.
12531         Rename the section of the current branch, now that it has
12532         been cut.
12533
12534 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12535
12536         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12537         * version.in: Bump version to 8.1.50.DATE-git.
12538
12539 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12540
12541         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12542         Add field.
12543         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12544         Add field.
12545         (default_exception_support_info) <catch_handlers_sym>: Add field.
12546         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12547         (ada_exception_name_addr_1): Add "catch handlers" handling.
12548         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12549         Update all callers.
12550         (create_excep_cond_exprs) <ex>: Add parameter.
12551         (re_set_exception): Update create_excep_cond_exprs call.
12552         (print_it_exception, print_one_exception, print_mention_exception)
12553         (print_recreate_exception): Add "catch handler" handling.
12554         (allocate_location_catch_handlers, re_set_catch_handlers)
12555         (check_status_catch_handlers, print_it_catch_handlers)
12556         (print_one_catch_handlers, print_mention_catch_handlers)
12557         (print_recreate_catch_handlers): New function.
12558         (catch_handlers_breakpoint_ops): New variable.
12559         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12560         Add parameter.  Add "catch handler" handling.
12561         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12562         Add "catch handler" handling.
12563         (ada_exception_catchpoint_cond_string): Add "catch handler"
12564         handling.
12565         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12566         call.
12567         (catch_ada_handlers_command): New function.
12568         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12569         operations structure.
12570         (_initialize_ada_language): Add "catch handlers" command entry.
12571         * NEWS: Document "catch handlers" feature.
12572
12573 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12574
12575         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12576         account when creating the array type of the slice.
12577         (ada_value_slice): Likewise.
12578
12579 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12580
12581         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12582         New enum value.
12583         (create_array_type_with_stride): Add byte_stride_prop parameter.
12584         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12585         New parameter.  Update all callers in this file.
12586         (array_type_has_dynamic_stride): New function.
12587         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12588         of arrays with dynamic byte strides.
12589         * dwarf2read.c (read_array_type): Add support for dynamic
12590         DW_AT_byte_stride attributes.
12591
12592 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12593
12594         * dwarf2read.c (read_unspecified_type): Treat
12595         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12596
12597 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12598
12599         Update copyright year range in all GDB files.
12600
12601 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12602
12603         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12604         and gdb/testsuite/gdb.base/step-line.c.
12605
12606 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12607
12608         * copyright.py (main): Dump the contents of
12609         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12610         even if BY_HAND is empty.
12611
12612 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12613
12614         * top.c (print_gdb_version): Update Copyright year in version
12615         message.
12616
12617 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12618
12619         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12620
12621 For older changes see ChangeLog-2017.
12622 \f
12623 Local Variables:
12624 mode: change-log
12625 left-margin: 8
12626 fill-column: 74
12627 version-control: never
12628 coding: utf-8
12629 End: