Eliminate target_have_continuable_watchpoint
[external/binutils.git] / gdb / ChangeLog
1 2018-08-31  Pedro Alves  <palves@redhat.com>
2
3         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4         Delete.
5         * s390-linux-nat.c
6         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
7         * target.h (target_ops::have_continuable_watchpoint): Delete.
8         (target_have_continuable_watchpoint): Delete.
9         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
10         * target-delegates.c: Regenerate.
11
12 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
13
14         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
15         the files present in "gnulib/import/m4/".
16
17 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
18
19         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
20         c.sw, c.swsp, and c.sdsp.
21
22 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
23
24         * riscv-tdep.c (struct riscv_inferior_data): Delete.
25         (riscv_read_misa_reg): Don't cache value read into inferior data.
26         (riscv_new_inferior_data): Delete.
27         (riscv_inferior_data_cleanup): Delete.
28         (riscv_inferior_data): Delete.
29         (riscv_invalidate_inferior_data): Delete.
30         (_initialize_riscv_tdep): Remove initialisation of inferior data.
31
32 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
33
34         * compile/compile-cplus-types.c
35         (compile_cplus_instance::leave_scope): Take the address of scope
36         object.
37         (compile_cplus_instance::convert_qualified_base): Compare quals
38         to 0.
39
40 2018-08-30  Keith Seitz  <keiths@redhat.com>
41
42         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
43         Use "%s" and host_address_to_string instead of "%p" in printf.
44
45 2018-08-29  Keith Seitz  <keiths@redhat.com>
46
47         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
48         and compile-cplus-types.c.
49         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
50         * c-lang.c (cplus_language_defn): Set C++ compile functions.
51         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
52         Declare.
53         * compile/compile-c-support.c: Include compile-cplus.h.
54         (load_libcompile): Templatize.
55         (get_compile_context): "New" function.
56         (c_get_compile_context): Use get_compile_context.
57         (cplus_get_compile_context): New function.
58         (cplus_push_user_expression, cplus_pop_user_expression)
59         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
60         (cplus_compute_program): Define new structs/functions.
61         * compile/compile-cplus-symmbols.c: New file.
62         * compile/compile-cplus-types.c: New file.
63         * compile/compile-cplus.h: New file.
64         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
65         Declare.
66         * compile/compile-object-load.c (get_out_value_type): Use
67         strncmp_iw when comparing symbol names.
68         (compile_object_load): Add mst_bss and mst_data.
69         * compile/compile.c (_initialize_compile): Remove
70         -Wno-implicit-function-declaration from `compile_args'.
71         * compile/gcc-cp-plugin.h: New file.
72         * NEWS: Mention C++ compile support and new debug options.
73
74 2018-08-29  Keith Seitz  <keiths@redhat.com>
75
76         * linespec.c (collect_info::add_symbol): Make virtual.
77         (struct symbol_searcher_collect_info): New struct.
78         (symbol_searcher::find_all_symbols): New method.
79         * symtab.h (class symbol_searcher): New class.
80
81 2018-08-29  Keith Seitz  <keiths@redhat.com>
82
83         * linespec.c (struct linespec) <function_symbols, label_symbols>:
84         Change to vector of block_symbol.  Update all users.
85         (struct collect_info) <symbols>: Likewise.
86         (collect_info::add_symbol): Take block_symbol as argument.
87         Update all callers.
88         (decode_compound_collector) <m_symbols>: Change type to vector
89         of block_symbol.  Update all users.
90         (decode_compound_collector::operator ()): Change parameter type
91         to block_symbol.
92         (find_method, find_function_symbols, find_linespec_symbols)
93         (find_label_symbols_in_block, find_label_symbols): Change symbol
94         vectors to block_symbol vectors.
95         * symtab.h (symbol_found_callback_ftype): Change parameter type to
96         block_symbol.
97
98 2018-08-29  Keith Seitz  <keiths@redhat.com>
99
100         * linespec.c (symbolp): Remove typedef and VEC definitions.
101         (bound_minimal_symbol_d): Likewise.
102
103 2018-08-29  Keith Seitz  <keiths@redhat.com>
104
105         * linespec.c (decode_compound_collector::decode_compound_collector):
106         Remove initialization for `m_symtabs'.
107         (decode_compound_collector::release_symbols): Change return type
108         to std::vector.  Update all callers.
109         (class decode_compound_collector) <m_symbols>: Change type to
110         std::vector.
111         (lookup_prefix_sym): Change return type to std::vector.  Update all
112         callers.
113         (compare_symbols): Remove.
114         (std_compare_symbols): Rename to `compare_symbols'.
115         (find_method): Change `sym_classes' parameter to std::vector.
116         Update all callers.  Use std::sort to sort sym_classes.
117         (find_linespec_symbols): Remove cleanup.
118
119 2018-08-29  Keith Seitz  <keiths@redhat.com>
120
121         * linespec.c (struct linespec) <minimal_symbols>: Change type to
122         std::vector.  Update all users.
123         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
124         (struct collect_info) <minimal_symbols>: Likewise.
125         (compare_msymbols): Return bool.  Change parameters to const
126         bound_minimal_symbol references.
127         (find_method, find_function_symbols, find_linespec_symbols): Change
128         `minsyms' parameter to std::vector.  Update all callers.
129
130 2018-08-29  Keith Seitz  <keiths@redhat.com>
131
132         * linespec.c (struct linespec) <label_symbols>: Change type to
133         std::vector.  Update all users.
134         (find_label_symbols_in_block): Change `result' parameter to
135         std::vector.  Update all callers.
136         (find_label_symbols): Return std::vector.  Update all callers.
137
138 2018-08-29  Keith Seitz  <keiths@redhat.com>
139
140         * linespec.c (struct linespec) <function_symbols>: Change type to
141         std::vector.  Update all users.
142         (struct collect_info) <function_symbols>: Likewise.
143         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
144         (std_compare_symbols): New function.
145         (find_method, find_function_symbols, find_linespec_symbols)
146         (find_label_symbols_in_block): Change `symbols' parameter to
147         std::vector.  Update all callers.
148         (find_label_symbols): Likewise for `function_symbols' and
149         `label_funcs_ret'.
150
151 2018-08-29  Keith Seitz  <keiths@redhat.com>
152
153         * linespec.c (symtab_vector_up): Define.
154         (struct linespec) <file_symtabs>: Change type to std::vector *.
155         Update all uses.
156         (struct collect_info) <file_symtabs>: Likewise.
157         (collect_symtabs_from_filename): Return symtab_vector_up.
158         Update all callers.
159         (decode_objc): Remove cleanup.
160         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
161         (symtab_collector::release_symtabs): Return symtab_vector_up.
162         Update all callers.
163         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
164         Update all users.
165         (collect_symtabs_from_filename, symtabs_from_filename): Return
166         symtab_vector_up.  Update all callers.
167
168 2018-08-29  Tom Tromey  <tom@tromey.com>
169
170         * csky-tdep.c (csky_analyze_prologue): Use
171         core_addr_to_string_nz.
172
173 2018-08-29  Tom Tromey  <tom@tromey.com>
174
175         * windows-nat.c (struct xlate_exception) <them>: Change type to
176         DWORD.
177         (xlate): Fix formatting.  Remove last entry.
178         (struct xlate_exception, xlate): Comment out.
179         (windows_nat_target::resume): Use ranged for.
180
181 2018-08-29  Jim Wilson  <jimw@sifive.com>
182
183         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
184         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
185         of NT_PRFPREG.
186         (riscv_linux_nat_target::store_registers): Likewise.
187
188 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
189
190         PR gdb/23555
191         PR gdb/23558
192         * gnulib/aclocal.m4: Regenerate.
193         * gnulib/config.in: Regenerate.
194         * gnulib/configure: Regenerate.
195         * gnulib/import/Makefile.am: Update.
196         * gnulib/import/Makefile.in: Update.
197         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
198         * gnulib/import/_Noreturn.h: ... this.
199         * gnulib/import/alloca.in.h: Update.
200         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
201         * gnulib/import/arg-nonnull.h: ... this.
202         * gnulib/import/assure.h: Update.
203         * gnulib/import/at-func.c: Update.
204         * gnulib/import/basename-lgpl.c: Update.
205         * gnulib/import/extra/snippet/c++defs.h: Rename to...
206         * gnulib/import/c++defs.h: ... this.
207         * gnulib/import/canonicalize-lgpl.c: Update.
208         * gnulib/import/cdefs.h: Update.
209         * gnulib/import/chdir-long.c: Update.
210         * gnulib/import/chdir-long.h: Update.
211         * gnulib/import/cloexec.c: Update.
212         * gnulib/import/cloexec.h: Update.
213         * gnulib/import/close.c: Update.
214         * gnulib/import/closedir.c: Update.
215         * gnulib/import/config.charset: Update.
216         * gnulib/import/dirent-private.h: Update.
217         * gnulib/import/dirent.in.h: Update.
218         * gnulib/import/dirfd.c: Update.
219         * gnulib/import/dirname-lgpl.c: Update.
220         * gnulib/import/dirname.h: Update.
221         * gnulib/import/dosname.h: Update.
222         * gnulib/import/dup-safer-flag.c: Update.
223         * gnulib/import/dup-safer.c: Update.
224         * gnulib/import/dup.c: Update.
225         * gnulib/import/dup2.c: Update.
226         * gnulib/import/errno.in.h: Update.
227         * gnulib/import/error.c: Update.
228         * gnulib/import/error.h: Update.
229         * gnulib/import/exitfail.c: Update.
230         * gnulib/import/exitfail.h: Update.
231         * gnulib/import/extra/update-copyright: Update.
232         * gnulib/import/fchdir.c: Update.
233         * gnulib/import/fcntl.c: Update.
234         * gnulib/import/fcntl.in.h: Update.
235         * gnulib/import/fd-hook.c: Update.
236         * gnulib/import/fd-hook.h: Update.
237         * gnulib/import/fd-safer-flag.c: Update.
238         * gnulib/import/fd-safer.c: Update.
239         * gnulib/import/fdopendir.c: Update.
240         * gnulib/import/filename.h: Update.
241         * gnulib/import/filenamecat-lgpl.c: Update.
242         * gnulib/import/filenamecat.h: Update.
243         * gnulib/import/flexmember.h: Update.
244         * gnulib/import/float+.h: Update.
245         * gnulib/import/float.c: Update.
246         * gnulib/import/float.in.h: Update.
247         * gnulib/import/fnmatch.c: Update.
248         * gnulib/import/fnmatch.in.h: Update.
249         * gnulib/import/fnmatch_loop.c: Update.
250         * gnulib/import/fpucw.h: Update.
251         * gnulib/import/frexp.c: Update.
252         * gnulib/import/frexpl.c: Update.
253         * gnulib/import/fstat.c: Update.
254         * gnulib/import/fstatat.c: Update.
255         * gnulib/import/getcwd-lgpl.c: Update.
256         * gnulib/import/getcwd.c: Update.
257         * gnulib/import/getdtablesize.c: Update.
258         * gnulib/import/getlogin_r.c: Update.
259         * gnulib/import/getprogname.c: Update.
260         * gnulib/import/getprogname.h: Update.
261         * gnulib/import/gettext.h: Update.
262         * gnulib/import/gettimeofday.c: Update.
263         * gnulib/import/glob-libc.h: Update.
264         * gnulib/import/glob.c: Update.
265         * gnulib/import/glob.in.h: Update.
266         * gnulib/import/glob_internal.h: Update.
267         * gnulib/import/glob_pattern_p.c: Update.
268         * gnulib/import/globfree.c: Update.
269         * gnulib/import/hard-locale.c: Update.
270         * gnulib/import/hard-locale.h: Update.
271         * gnulib/import/intprops.h: Update.
272         * gnulib/import/inttypes.in.h: Update.
273         * gnulib/import/isnan.c: Update.
274         * gnulib/import/isnand-nolibm.h: Update.
275         * gnulib/import/isnand.c: Update.
276         * gnulib/import/isnanl-nolibm.h: Update.
277         * gnulib/import/isnanl.c: Update.
278         * gnulib/import/itold.c: Update.
279         * gnulib/import/libc-config.h: Update.
280         * gnulib/import/limits.in.h: Update.
281         * gnulib/import/localcharset.c: Update.
282         * gnulib/import/localcharset.h: Update.
283         * gnulib/import/localtime-buffer.c: Update.
284         * gnulib/import/localtime-buffer.h: Update.
285         * gnulib/import/lstat.c: Update.
286         * gnulib/import/m4/00gnulib.m4: Update.
287         * gnulib/import/m4/__inline.m4: Update.
288         * gnulib/import/m4/absolute-header.m4: Update.
289         * gnulib/import/m4/alloca.m4: Update.
290         * gnulib/import/m4/builtin-expect.m4: Update.
291         * gnulib/import/m4/canonicalize.m4: Update.
292         * gnulib/import/m4/chdir-long.m4: Update.
293         * gnulib/import/m4/close.m4: Update.
294         * gnulib/import/m4/closedir.m4: Update.
295         * gnulib/import/m4/configmake.m4: Update.
296         * gnulib/import/m4/d-ino.m4: Update.
297         * gnulib/import/m4/d-type.m4: Update.
298         * gnulib/import/m4/dirent_h.m4: Update.
299         * gnulib/import/m4/dirfd.m4: Update.
300         * gnulib/import/m4/dirname.m4: Update.
301         * gnulib/import/m4/double-slash-root.m4: Update.
302         * gnulib/import/m4/dup.m4: Update.
303         * gnulib/import/m4/dup2.m4: Update.
304         * gnulib/import/m4/eealloc.m4: Update.
305         * gnulib/import/m4/environ.m4: Update.
306         * gnulib/import/m4/errno_h.m4: Update.
307         * gnulib/import/m4/error.m4: Update.
308         * gnulib/import/m4/exponentd.m4: Update.
309         * gnulib/import/m4/exponentl.m4: Update.
310         * gnulib/import/m4/extensions.m4: Update.
311         * gnulib/import/m4/extern-inline.m4: Update.
312         * gnulib/import/m4/fchdir.m4: Update.
313         * gnulib/import/m4/fcntl-o.m4: Update.
314         * gnulib/import/m4/fcntl.m4: Update.
315         * gnulib/import/m4/fcntl_h.m4: Update.
316         * gnulib/import/m4/fdopendir.m4: Update.
317         * gnulib/import/m4/filenamecat.m4: Update.
318         * gnulib/import/m4/flexmember.m4: Update.
319         * gnulib/import/m4/float_h.m4: Update.
320         * gnulib/import/m4/fnmatch.m4: Update.
321         * gnulib/import/m4/fnmatch_h.m4: Update.
322         * gnulib/import/m4/fpieee.m4: Update.
323         * gnulib/import/m4/frexp.m4: Update.
324         * gnulib/import/m4/frexpl.m4: Update.
325         * gnulib/import/m4/fstat.m4: Update.
326         * gnulib/import/m4/fstatat.m4: Update.
327         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
328         * gnulib/import/m4/getcwd-path-max.m4: Update.
329         * gnulib/import/m4/getcwd.m4: Update.
330         * gnulib/import/m4/getdtablesize.m4: Update.
331         * gnulib/import/m4/getlogin.m4: Update.
332         * gnulib/import/m4/getlogin_r.m4: Update.
333         * gnulib/import/m4/getpagesize.m4: Update.
334         * gnulib/import/m4/getprogname.m4: Update.
335         * gnulib/import/m4/gettimeofday.m4: Update.
336         * gnulib/import/m4/glibc21.m4: Update.
337         * gnulib/import/m4/glob.m4: Update.
338         * gnulib/import/m4/glob_h.m4: Update.
339         * gnulib/import/m4/gnulib-cache.m4: Update.
340         * gnulib/import/m4/gnulib-common.m4: Update.
341         * gnulib/import/m4/gnulib-comp.m4: Update.
342         * gnulib/import/m4/gnulib-tool.m4: Update.
343         * gnulib/import/m4/hard-locale.m4: Update.
344         * gnulib/import/m4/include_next.m4: Update.
345         * gnulib/import/m4/inttypes-pri.m4: Update.
346         * gnulib/import/m4/inttypes.m4: Update.
347         * gnulib/import/m4/isnand.m4: Update.
348         * gnulib/import/m4/isnanl.m4: Update.
349         * gnulib/import/m4/largefile.m4: Update.
350         * gnulib/import/m4/limits-h.m4: Update.
351         * gnulib/import/m4/localcharset.m4: Update.
352         * gnulib/import/m4/locale-fr.m4: Update.
353         * gnulib/import/m4/locale-ja.m4: Update.
354         * gnulib/import/m4/locale-zh.m4: Update.
355         * gnulib/import/m4/localtime-buffer.m4: Update.
356         * gnulib/import/m4/longlong.m4: Update.
357         * gnulib/import/m4/lstat.m4: Update.
358         * gnulib/import/m4/malloc.m4: Update.
359         * gnulib/import/m4/malloca.m4: Update.
360         * gnulib/import/m4/math_h.m4: Update.
361         * gnulib/import/m4/mbrtowc.m4: Update.
362         * gnulib/import/m4/mbsinit.m4: Update.
363         * gnulib/import/m4/mbsrtowcs.m4: Update.
364         * gnulib/import/m4/mbstate_t.m4: Update.
365         * gnulib/import/m4/memchr.m4: Update.
366         * gnulib/import/m4/memmem.m4: Update.
367         * gnulib/import/m4/mempcpy.m4: Update.
368         * gnulib/import/m4/memrchr.m4: Update.
369         * gnulib/import/m4/mkdir.m4: Update.
370         * gnulib/import/m4/mkstemp.m4: Update.
371         * gnulib/import/m4/mmap-anon.m4: Update.
372         * gnulib/import/m4/mode_t.m4: Update.
373         * gnulib/import/m4/msvc-inval.m4: Update.
374         * gnulib/import/m4/msvc-nothrow.m4: Update.
375         * gnulib/import/m4/multiarch.m4: Update.
376         * gnulib/import/m4/nocrash.m4: Update.
377         * gnulib/import/m4/off_t.m4: Update.
378         * gnulib/import/m4/onceonly.m4: Update.
379         * gnulib/import/m4/open-cloexec.m4: Update.
380         * gnulib/import/m4/open.m4: Update.
381         * gnulib/import/m4/openat.m4: Update.
382         * gnulib/import/m4/opendir.m4: Update.
383         * gnulib/import/m4/pathmax.m4: Update.
384         * gnulib/import/m4/rawmemchr.m4: Update.
385         * gnulib/import/m4/readdir.m4: Update.
386         * gnulib/import/m4/readlink.m4: Update.
387         * gnulib/import/m4/realloc.m4: Update.
388         * gnulib/import/m4/rename.m4: Update.
389         * gnulib/import/m4/rewinddir.m4: Update.
390         * gnulib/import/m4/rmdir.m4: Update.
391         * gnulib/import/m4/save-cwd.m4: Update.
392         * gnulib/import/m4/secure_getenv.m4: Update.
393         * gnulib/import/m4/setenv.m4: Update.
394         * gnulib/import/m4/signal_h.m4: Update.
395         * gnulib/import/m4/ssize_t.m4: Update.
396         * gnulib/import/m4/stat-time.m4: Update.
397         * gnulib/import/m4/stat.m4: Update.
398         * gnulib/import/m4/std-gnu11.m4: Update.
399         * gnulib/import/m4/stdbool.m4: Update.
400         * gnulib/import/m4/stddef_h.m4: Update.
401         * gnulib/import/m4/stdint.m4: Update.
402         * gnulib/import/m4/stdio_h.m4: Update.
403         * gnulib/import/m4/stdlib_h.m4: Update.
404         * gnulib/import/m4/strchrnul.m4: Update.
405         * gnulib/import/m4/strdup.m4: Update.
406         * gnulib/import/m4/strerror.m4: Update.
407         * gnulib/import/m4/string_h.m4: Update.
408         * gnulib/import/m4/strstr.m4: Update.
409         * gnulib/import/m4/strtok_r.m4: Update.
410         * gnulib/import/m4/sys_socket_h.m4: Update.
411         * gnulib/import/m4/sys_stat_h.m4: Update.
412         * gnulib/import/m4/sys_time_h.m4: Update.
413         * gnulib/import/m4/sys_types_h.m4: Update.
414         * gnulib/import/m4/tempname.m4: Update.
415         * gnulib/import/m4/time_h.m4: Update.
416         * gnulib/import/m4/unistd-safer.m4: Update.
417         * gnulib/import/m4/unistd_h.m4: Update.
418         * gnulib/import/m4/warn-on-use.m4: Update.
419         * gnulib/import/m4/wchar_h.m4: Update.
420         * gnulib/import/m4/wchar_t.m4: Update.
421         * gnulib/import/m4/wctype_h.m4: Update.
422         * gnulib/import/m4/wint_t.m4: Update.
423         * gnulib/import/malloc.c: Update.
424         * gnulib/import/malloc/scratch_buffer.h: Update.
425         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
426         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
427         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
428         * gnulib/import/malloca.c: Update.
429         * gnulib/import/malloca.h: Update.
430         * gnulib/import/malloca.valgrind: Update.
431         * gnulib/import/math.in.h: Update.
432         * gnulib/import/mbrtowc.c: Update.
433         * gnulib/import/mbsinit.c: Update.
434         * gnulib/import/mbsrtowcs-impl.h: Update.
435         * gnulib/import/mbsrtowcs-state.c: Update.
436         * gnulib/import/mbsrtowcs.c: Update.
437         * gnulib/import/memchr.c: Update.
438         * gnulib/import/memmem.c: Update.
439         * gnulib/import/mempcpy.c: Update.
440         * gnulib/import/memrchr.c: Update.
441         * gnulib/import/mkdir.c: Update.
442         * gnulib/import/mkstemp.c: Update.
443         * gnulib/import/msvc-inval.c: Update.
444         * gnulib/import/msvc-inval.h: Update.
445         * gnulib/import/msvc-nothrow.c: Update.
446         * gnulib/import/msvc-nothrow.h: Update.
447         * gnulib/import/open.c: Update.
448         * gnulib/import/openat-die.c: Update.
449         * gnulib/import/openat-priv.h: Update.
450         * gnulib/import/openat-proc.c: Update.
451         * gnulib/import/openat.c: Update.
452         * gnulib/import/openat.h: Update.
453         * gnulib/import/opendir.c: Update.
454         * gnulib/import/pathmax.h: Update.
455         * gnulib/import/pipe-safer.c: Update.
456         * gnulib/import/rawmemchr.c: Update.
457         * gnulib/import/readdir.c: Update.
458         * gnulib/import/readlink.c: Update.
459         * gnulib/import/realloc.c: Update.
460         * gnulib/import/ref-add.sin: Update.
461         * gnulib/import/ref-del.sin: Update.
462         * gnulib/import/rename.c: Update.
463         * gnulib/import/rewinddir.c: Update.
464         * gnulib/import/rmdir.c: Update.
465         * gnulib/import/same-inode.h: Update.
466         * gnulib/import/save-cwd.c: Update.
467         * gnulib/import/save-cwd.h: Update.
468         * gnulib/import/scratch_buffer.h: Update.
469         * gnulib/import/secure_getenv.c: Update.
470         * gnulib/import/setenv.c: Update.
471         * gnulib/import/signal.in.h: Update.
472         * gnulib/import/stat-time.c: Update.
473         * gnulib/import/stat-time.h: Update.
474         * gnulib/import/stat-w32.c: Update.
475         * gnulib/import/stat-w32.h: Update.
476         * gnulib/import/stat.c: Update.
477         * gnulib/import/stdbool.in.h: Update.
478         * gnulib/import/stddef.in.h: Update.
479         * gnulib/import/stdint.in.h: Update.
480         * gnulib/import/stdio.in.h: Update.
481         * gnulib/import/stdlib.in.h: Update.
482         * gnulib/import/str-two-way.h: Update.
483         * gnulib/import/strchrnul.c: Update.
484         * gnulib/import/strdup.c: Update.
485         * gnulib/import/streq.h: Update.
486         * gnulib/import/strerror-override.c: Update.
487         * gnulib/import/strerror-override.h: Update.
488         * gnulib/import/strerror.c: Update.
489         * gnulib/import/string.in.h: Update.
490         * gnulib/import/stripslash.c: Update.
491         * gnulib/import/strnlen1.c: Update.
492         * gnulib/import/strnlen1.h: Update.
493         * gnulib/import/strstr.c: Update.
494         * gnulib/import/strtok_r.c: Update.
495         * gnulib/import/sys_stat.in.h: Update.
496         * gnulib/import/sys_time.in.h: Update.
497         * gnulib/import/sys_types.in.h: Update.
498         * gnulib/import/tempname.c: Update.
499         * gnulib/import/tempname.h: Update.
500         * gnulib/import/time.in.h: Update.
501         * gnulib/import/unistd--.h: Update.
502         * gnulib/import/unistd-safer.h: Update.
503         * gnulib/import/unistd.in.h: Update.
504         * gnulib/import/unsetenv.c: Update.
505         * gnulib/import/verify.h: Update.
506         * gnulib/import/extra/snippet/warn-on-use.h: Update.
507         * gnulib/import/wchar.in.h: Update.
508         * gnulib/import/wctype.in.h: Update.
509         * gnulib/import/xalloc-oversized.h: Update.
510         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
511         "53e2c179f26a890fa6685af4b6c1397ee370433b".
512
513 2018-08-16  Gary Benson <gbenson@redhat.com>
514
515         PR gdb/13000:
516         * gdb/main.c (captured_main_1): Exit with nonzero status
517         in batch mode if the last command to be executed failed.
518         * NEWS: Mention the above.
519
520 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
521
522         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
523         end of warning message.
524
525 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
526
527         PR gdb/22943:
528         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
529         (aarch64_extract_return_value): Use
530         aapcs_is_vfp_call_or_return_candidate.
531         (aarch64_return_in_memory): Likewise.
532         (aarch64_store_return_value): Likewise.
533
534 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
535
536         * aarch64-tdep.c
537         (aapcs_is_vfp_call_or_return_candidate): Make static
538         (pass_in_v_or_stack): Remove function.
539         (pass_in_v_vfp_candidate): New function.
540         (aarch64_push_dummy_call): Check for float register candidates.
541
542 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
543
544         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
545         (aapcs_is_vfp_call_or_return_candidate_1): New function.
546         (aapcs_is_vfp_call_or_return_candidate): Likewise.
547
548 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
549
550         PR build/23399
551         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
552         (struct ipa_sym_addresses): Rename to...
553         (struct ipa_sym_addresses_common): ... this.
554         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
555
556 2018-08-28  Tom Tromey  <tom@tromey.com>
557
558         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
559         (token_fifo): Now a std::vector.
560         (yylex, c_parse): Update.
561         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
562         (token_fifo): Now a std::vector.
563         (yylex, d_parse): Update.
564         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
565         (token_fifo): Now a std::vector.
566         (yylex, go_parse): Update.
567
568 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
569
570         * parser-defs.h (struct type_stack) <elements>: Change type to
571         std::vector<union type_stack_elt>.
572         <depth, size>: Remove.
573         * parse.c (parse_exp_in_context_1): Adjust.
574         (type_stack_reserve): Remove.
575         (check_type_stack_depth): Remove.
576         (insert_into_type_stack): Adjust to std::vector.
577         (insert_type): Likewise.
578         (push_type): Likewise.
579         (push_type_int): Likewise.
580         (insert_type_address_space): Likewise.
581         (pop_type): Likewise.
582         (pop_type_int): Likewise.
583         (pop_typelist): Likewise.
584         (pop_type_stack): Likewise.
585         (append_type_stack): Likewise.
586         (push_type_stack): Likewise.
587         (get_type_stack): Likewise.
588         (type_stack_cleanup): Likewise.
589         (push_typelist): Likewise.
590         (follow_types): Likewise.
591         (_initialize_parse): Likewise.
592
593 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
594
595         * NEWS: Mention csky target.
596
597 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
598             Hafiz Abid Qadeer  <abidh@codesourcery.com>
599             Don Breazeal  <donb@codesourcery.com>
600
601         * csky-linux-tdep.c: New file.
602         * csky-tdep.c: Likewise.
603         * csky-tdep.h: Likewise.
604         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
605         csky-tdep.o.
606         (HFILES_NO_SRCDIR): Add csky-tdep.h.
607         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
608         * configure.tgt: Add csky support.
609
610 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
611
612         * python/py-framefilter.c (py_print_frame): Print frame architecture
613         when printing on an MI output.
614
615 2018-08-27  Tom Tromey  <tom@tromey.com>
616
617         PR build/23087:
618         * configure: Rebuild.
619         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
620
621 2018-08-27  Tom Tromey  <tom@tromey.com>
622
623         * aarch64-linux-tdep.c
624         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
625         casts to int.
626
627 2018-08-27  Tom Tromey  <tom@tromey.com>
628
629         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
630         unsigned.
631         (ppc64_standard_linkage1, ppc64_standard_linkage2)
632         (ppc64_standard_linkage3, ppc64_standard_linkage4)
633         (ppc64_standard_linkage5, ppc64_standard_linkage6)
634         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
635         unsigned.
636
637 2018-08-27  Tom Tromey  <tom@tromey.com>
638
639         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
640         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
641
642 2018-08-27  Tom Tromey  <tom@tromey.com>
643
644         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
645         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
646         ULONGEST_MAX.
647         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
648         ULONGEST_MAX.
649         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
650         ULONGEST_MAX.
651         * sparc-linux-tdep.c (sparc32_linux_sigframe)
652         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
653         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
654         ULONGEST_MAX.
655         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
656         (ppc64_linux_sigaction_tramp_frame)
657         (ppc32_linux_sighandler_tramp_frame)
658         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
659         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
660         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
661         * mn10300-linux-tdep.c (am33_linux_sigframe)
662         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
663         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
664         * mips-linux-tdep.c (mips_linux_o32_sigframe)
665         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
666         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
667         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
668         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
669         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
670         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
671         * microblaze-linux-tdep.c
672         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
673         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
674         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
675         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
676         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
677         * common/common-types.h (ULONGEST_MAX): New define.
678         (CORE_ADDR_MAX): Fix formatting.
679         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
680         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
681         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
682         (arm_linux_rt_sigreturn_tramp_frame)
683         (arm_eabi_linux_sigreturn_tramp_frame)
684         (arm_eabi_linux_rt_sigreturn_tramp_frame)
685         (thumb2_eabi_linux_sigreturn_tramp_frame)
686         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
687         (arm_linux_restart_syscall_tramp_frame)
688         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
689         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
690         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
691         ULONGEST_MAX.
692         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
693
694 2018-08-27  Tom Tromey  <tom@tromey.com>
695
696         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
697         CORE_ADDR_MAX.
698         * mips-tdep.c (mips_deal_with_atomic_sequence)
699         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
700         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
701         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
702         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
703         CORE_ADDR_MAX.
704         * aarch64-tdep.c (aarch64_software_single_step): Use
705         CORE_ADDR_MAX.
706
707 2018-08-27  Tom Tromey  <tom@tromey.com>
708
709         * linespec.c (complete_linespec_component): Add cast to "char".
710         * completer.c (completion_tracker::build_completion_result): Add
711         cast to "char".
712
713 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
714
715         * solist.h (struct solist, struct target_so_ops): Fix
716         indentation.
717
718 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
719
720         * ada-tasks.c (ada_task_info_s): Remove typedef.
721         (DEF_VEC_O(ada_task_info_s)): Remove.
722         (struct ada_tasks_inferior_data): Initialize fields.
723         <task_list>: Make an std::vector.
724         (get_ada_tasks_inferior_data): Allocate with new.
725         (ada_get_task_number): Adjust.
726         (get_task_number_from_id): Likewise.
727         (valid_task_id): Likewise.
728         (ada_get_task_info_from_ptid): Likewise.
729         (iterate_over_live_ada_tasks): Likewise.
730         (add_ada_task): Likewise.
731         (read_known_tasks): Likewise.
732         (ada_build_task_list): Likewise.
733         (print_ada_task_info): Likewise.
734         (info_task): Likewise.
735         (task_command_1): Likewise.
736
737 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
738
739         * ada-lang.c (add_angle_brackets): Return std::string.
740
741 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
742
743         * python/py-threadevent.c (py_get_event_thread): Initialize
744         pythread.
745
746 2018-08-24  Pedro Alves  <palves@redhat.com>
747
748         * python/py-bpevent.c (create_breakpoint_event_object): Use
749         copy-initialization.
750         * python/py-continueevent.c (emit_continue_event): Use
751         copy-initialization.
752         * python/py-exitedevent.c (create_exited_event_object): Return a
753         gdbpy_ref<>.
754         (emit_exited_event): Use copy-initialization.
755         * python/py-inferior.c (python_new_inferior)
756         (python_inferior_deleted, add_thread_object): Use
757         copy-initialization.
758         * python/py-infevents.c (create_inferior_call_event_object)
759         (create_register_changed_event_object)
760         (create_memory_changed_event_object): Return a gdbpy_ref<>.
761         (emit_inferior_call_event, emit_memory_changed_event)
762         (emit_register_changed_event): Use copy-initialization.
763         * python/py-newobjfileevent.c (create_new_objfile_event_object):
764         Return a gdbpy_ref<>.
765         (emit_new_objfile_event): Use copy-initialization.
766         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
767         (emit_clear_objfiles_event): Use copy-initialization.
768         * python/py-signalevent.c (create_signal_event_object): Use
769         copy-initialization.
770         * python/py-threadevent.c (create_thread_event_object): Use
771         copy-initialization.
772
773 2018-08-24  Pedro Alves  <palves@redhat.com>
774             Simon Marchi  <simon.marchi@ericsson.com>
775
776         PR gdb/23379
777         * python/py-continueevent.c: Include "gdbthread.h".
778         (create_continue_event_object): Add intro comment.  Add 'ptid'
779         parameter.  Use it to find thread to pass to
780         create_thread_event_object.
781         (emit_continue_event): Pass PTID down to
782         create_continue_event_object.
783         * python/py-event.h (py_get_event_thread): Declare.
784         (create_thread_event_object): Remove default from 'thread'
785         parameter.
786         * python/py-stopevent.c (create_stop_event_object): Use
787         py_get_event_thread.
788         * python/py-threadevent.c (get_event_thread): Rename to ...
789         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
790         and use it to find the thread.
791         (create_thread_event_object): Assert that THREAD isn't null.
792         Don't find the event thread here.
793
794 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
795
796         * block.h (blockrange, blockranges): New struct declarations.
797         (struct block): Add new field named `ranges'.
798         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
799         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
800         macros for accessing ranges in struct block.
801         (make_blockranges): New declaration.
802         block.c (make_blockranges): New function.
803         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
804         for block.
805         * symtab.h (find_pc_partial_function): Add new parameter `block'.
806         * blockframe.c (cache_pc_function_block): New static global.
807         (clear_pc_function_cache): Clear cache_pc_function_block.
808         (find_pc_partial_function): Move comment to symtab.h.  Add
809         support for non-contiguous blocks.
810         * cli/cli-cmds.c (block.h): Include.
811         (print_disassembly): Handle printing of non-contiguous blocks.
812         (disassemble_current_function): Likewise.
813         (disassemble_command): Likewise.
814
815         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
816         BLOCK_START.
817         * blockframe.c (get_pc_function_start): Likewise.
818         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
819         (gcc_symbol_address): Likewise.
820         * compile/compile-object-run.c (compile_object_run): Likewise.
821         * compile/compile.c (get_expr_block_and_pc): Likewise.
822         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
823         (func_addr_to_tail_call_list): Likewise.
824         * findvar.c (default_read_var_value): Likewise.
825         * inline-frame.c (inline_frame_this_id): Likewise.
826         (skip-inline_frames): Likewise.
827         * infcmd.c (until_next_command): Likewise.
828         * linespec.c (convert_linespec_to_sals): Likewise.
829         * parse.c (parse_exp_in_context_1): Likewise.
830         * printcmd.c (build_address_symbolic): likewise.
831         (info_address_command): Likewise.
832         symtab.c (find_function_start_sal): Likewise.
833         (skip_prologue_sal): Likewise.
834         (find_function_alias_target): Likewise.
835         (find_gnu_ifunc): Likewise.
836         * stack.c (find_frame_funname): Likewise.
837         * symtab.c (fixup_symbol_section): Likewise.
838         (find_function_start_sal): Likewise.
839         (skip_prologue_sal): Likewsie.
840         (find_function_alias_target): Likewise.
841         (find_gnu_ifunc): Likewise.
842         * tracepoint.c (info_scope_command): Likewise.
843         * value.c (value_fn_field): Likewise.
844
845         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
846         in place of find_pc_partial_function.
847         * blockframe.c (find_function_entry_range_from_pc): New function.
848         * symtab.h (find_function_entry_range_from_pc): Declare and document.
849         * objfiles.c (objfile_relocate1): Relocate start and end addresses
850         for each range in a block.
851
852
853 2018-08-23  Xavier Roirand  <roirand@adacore.com>
854
855         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
856         incrementation.
857
858 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
859
860         * solib-svr4.c (read_program_headers_from_bfd): Return
861         gdb::optional<gdb::byte_vector>.
862         (svr4_exec_displacement): Adjust.
863
864 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
865
866         * solib-svr4.c (read_program_header): Return
867         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
868         (find_program_interpreter): Return
869         gdb::optional<gdb::byte_vector>.
870         (scan_dyntag_auxv): Adjust.
871         (enable_break): Adjust.
872         (svr4_exec_displacement): Adjust.
873
874 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
875
876         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
877         * inf-child.c (inf_child_target::terminal_save_inferior): New.
878
879 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
880
881         * guile/scm-string.c (gdbscm_scm_from_printf): Use
882         string_vprintf.
883         * guile/scm-utils.c (gdbscm_printf): Likewise.
884         * serial.c (serial_printf): Likewise.
885         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
886
887 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
888
889         * stack.c (print_frame): Print frame architecture when printing on
890         an MI output.
891         * NEWS: Mention new "arch" attribute in frame output.
892
893 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
894
895         * arch/aarch64.h (aarch64_regnum): Update comment.
896
897 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
898
899         * NEWS: Add SVE to 8.2 section.
900
901 2018-08-21  Pedro Alves  <palves@redhat.com>
902
903         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
904         out from gdbscm_parse_function_args.
905         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
906         gdbscm_parse_function_args_1.
907
908 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
909
910         PR gdb/17816
911         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
912         operator.
913
914 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
915
916         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
917
918 2018-08-19  Michael Spang  <spang@google.com>
919
920         PR gdb/11786
921         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
922         for PT_TLS segments.
923
924 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
925
926         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
927         dwarf_variable_value.
928         * dwarf2-frame.c (class dwarf_expr_executor):
929         Add override for dwarf_variable_value.
930         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
931         (class symbol_needs_eval_context): Likewise.
932         (indirect_synthetic_pointer): Add forward declaration.
933         (sect_variable_value): New function.
934         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
935         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
936         for DW_OP_GNU_variable_value.
937
938 2018-08-16  Tom Tromey  <tom@tromey.com>
939
940         * top.c (read_command_file): Update.
941         (command_line_input): Remove "repeat" argument.
942         * ada-lang.c (get_selections): Update.
943         * linespec.c (decode_line_2): Update.
944         * defs.h (command_line_input): Remove argument.
945         * cli/cli-script.c (read_next_line): Update.
946         * python/py-gdb-readline.c: Update.
947
948 2018-08-17  Tom Tromey  <tom@tromey.com>
949
950         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
951         command_line_input.
952
953 2018-08-15  Tom Tromey  <tom@tromey.com>
954
955         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
956
957 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
958
959         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
960         If used, use find_pc_partial_function to find address range
961         to disassemble.
962         * mi/mi-main.c (mi_cmd_list_features): Report
963         "data-disassemble-a-option" feature.
964         * NEWS: Mention new -data-disassemble option -a.
965
966 2018-08-13  Tom Tromey  <tom@tromey.com>
967
968         * common/common-defs.h (_FORTIFY_SOURCE): Define.
969
970 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
971
972         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
973         (aarch64_linux_collect_sve_regset): Likewise.
974         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
975         * regcache.h (regcache_map_entry_size): New function.
976
977 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
978
979         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
980         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
981         (SVE_HEADER_VL_LENGTH): Likewise.
982         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
983         (SVE_HEADER_FLAGS_LENGTH): Likewise.
984         (SVE_HEADER_RESERVED_LENGTH): Likewise.
985         (SVE_HEADER_SIZE_OFFSET): Likewise.
986         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
987         (SVE_HEADER_VL_OFFSET): Likewise.
988         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
989         (SVE_HEADER_FLAGS_OFFSET): Likewise.
990         (SVE_HEADER_RESERVED_OFFSET): Likewise.
991         (SVE_HEADER_SIZE): Likewise.
992         (aarch64_linux_core_read_vq): Add function.
993         (aarch64_linux_core_read_description): Check for SVE section.
994
995 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
996
997         * aarch64-fbsd-tdep.c
998         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
999         collect_size.
1000         * aarch64-linux-tdep.c
1001         (aarch64_linux_iterate_over_regset_sections): Likewise.
1002         * alpha-linux-tdep.c
1003         (alpha_linux_iterate_over_regset_sections):
1004         * alpha-nbsd-tdep.c
1005         (alphanbsd_iterate_over_regset_sections): Likewise.
1006         * amd64-fbsd-tdep.c
1007         (amd64fbsd_iterate_over_regset_sections): Likewise.
1008         * amd64-linux-tdep.c
1009         (amd64_linux_iterate_over_regset_sections): Likewise.
1010         * arm-bsd-tdep.c
1011         (armbsd_iterate_over_regset_sections): Likewise.
1012         * arm-fbsd-tdep.c
1013         (arm_fbsd_iterate_over_regset_sections): Likewise.
1014         * arm-linux-tdep.c
1015         (arm_linux_iterate_over_regset_sections): Likewise.
1016         * corelow.c (get_core_registers_cb): Likewise.
1017         (core_target::fetch_registers): Likewise.
1018         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1019         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1020         * gdbarch.h (void): Regenerate.
1021         * gdbarch.sh: Add supply_size and collect_size.
1022         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1023         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1024         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1025         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1026         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1027         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1028         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1029         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1030         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1031         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1032         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1033         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1034         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1035         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1036         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1037         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1038         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1039         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1040         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1041         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1042         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1043         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1044         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1045         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1046         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1047         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1048         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1049         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1050         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1051         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1052
1053 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1054
1055         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1056         with string_printf.
1057
1058 2018-08-10  Keith Seitz  <keiths@redhat.com>
1059
1060         * compile/compile-c-support.c (add_code_header, add_code_footer):
1061         Move into policy class.
1062         (c_push_user_expression, pop_user_expression_nop)
1063         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1064         (compile_program): New host class.
1065         (c_compile_program): New typedef.
1066         (c_compute_porgram): Use c_compile_program.
1067
1068 2018-08-10  Keith Seitz  <keiths@redhat.com>
1069
1070         * compile/compile-internal.h (compile_instance::~compile_instance):
1071         Remove calls to htab_delete.
1072         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1073         * compile.c (compile_instance::compile_instance): Initialize
1074         htab unique pointers.
1075         (compile_instance::get_cached_type, compile_instance::insert_type)
1076         (compile_instance::error_symbol_once): Update for unique_ptr.
1077
1078 2018-08-10  Keith Seitz  <keiths@redhat.com>
1079
1080         * compile/compile-c-symbols.c (struct symbol_error)
1081         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1082         (compile_instance::insert_symbol_error)
1083         (compile_instance::error_symbol_once): Move to ...
1084         * compile/compile.c: ... here.
1085
1086 2018-08-10  Keith Seitz  <keiths@redhat.com>
1087
1088         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1089         instead of `new_compile_instance'.
1090         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1091         Update description.
1092         If the symbol error map is not initialized, create it.
1093         (generate_c_for_for_one_symbol): Do not check/initialize
1094         the symbol error map.
1095         * compile/compile-c-types.c (compile_c_instance): Make a class.
1096         Update all callers.
1097         (compile_instance::compile_instance): Initialize the type cache.
1098         (get_cached_type): New function.
1099         (insert_type): Update description.
1100         (compile_c_instance::m_default_cflags): Define.
1101         (convert_type): Update description.  Use get_cached_type.
1102         (delete_instance): Moved to destructor.
1103         (new_compile_instance): Moved to constructor.
1104         * compile/compile-c.h (compile_c_instance): Make class inheriting
1105         from compile_instance.
1106         <base>: Remove field.
1107         <type_map, symbol_err_map>: Move to base class.
1108         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1109         * compile/compile-internal.h (compile_instance): Make class.
1110         <type_map_t, symbol_err_map_t>: Define.
1111         <fe>: Rename to `m_gcc_fe'.
1112         <scope, block, gcc_target_options>: Add `m_' prefix.
1113         <m_type_map, m_symbol_err_map>: New fields, moved from
1114         compile_c_instance.
1115         <destroy>: Remove.
1116         (convert_type, new_compile_instance): Remove.
1117         * compile/compile.c (cleanup_compile_instance): Remove.
1118         (compile_to_object): Use unique_ptr to eliminate cleanups.
1119         (compile_instance::set_print_callback, compile_instance::version)
1120         (compile_instance::set_verbose)
1121         (compile_instance::set_driver_filename)
1122         (compile_instance::set_triplet_regexp)
1123         (compile_instance::set_arguments)
1124         (compile_instance::set_source_file)
1125         (compile_instance::compile): Define.
1126
1127 2018-08-10  Keith Seitz  <keiths@redhat.com>
1128
1129         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1130         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1131         gcc-c-fe.def to define C plugin.
1132         (delete_instance): Delete `c_plugin'.
1133         (new_compile_instance): Initialize `c_plugin'.
1134         * compile/compile-c.h: Include gcc_c_plugin.h.
1135         (struct compile_c_instance) <c_plugin>: New member.
1136         * gcc-c-plugin.h: New file.
1137         Update all callers with API change.
1138
1139 2018-08-10  Keith Seitz  <keiths@redhat.com>
1140
1141         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1142         (HFILES_NO_SRCDIR): ... to here.
1143         Add compile-internal.h and compile-c.h.
1144         * compile/compile-c-support.c: Include compile-c.h.
1145         * compile/compile-c-symbols.c: Include compile-c.h.
1146         (generate_c_for_variable_locations): Update comment.
1147         * compile/compile-c-types.c: Include compile-c.h.
1148         * compile/compile-c.h: New file -- moved C language declarations
1149         from other files here.
1150         * compile/compile-internal.h: Do not include hashtab.h or
1151         common/enum-flags.h.
1152         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1153         (gcc_convert_symbol, gcc_symbol_address)
1154         (generate_c_for_variable_locations, c_get_mode_for_size)
1155         (c_get_range_decl_name): Definitions moved to compile-c.h.
1156         * compile/compile-loc2c.c: Include compile-c.h.
1157
1158 2018-08-10  Keith Seitz  <keiths@redhat.com>
1159
1160         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1161         (c_symbol_substitution_name): ... this.
1162         Update all callers.
1163
1164 2018-08-10  Keith Seitz  <keiths@redhat.com>
1165
1166         * compile/compile-c-support.c (c_compute_program): Use
1167         unique_xmalloc_ptr to eliminate cleanup.
1168         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1169         Return a unique_xmalloc_ptr and eliminate cleanup.
1170         * compile/compile-internal.h (generate_c_for_variable_locations):
1171         Return unique_xmalloc_ptr and update description.
1172
1173 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1174
1175         * corelow.c (core_target::get_core_register_section): Rename
1176         min_size to section_min_size.
1177
1178 2018-08-09  Jim Wilson  <jimw@sifive.com>
1179
1180         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1181         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1182         * NEWS: Mention new GNU/Linux RISC-V target.
1183         * configure.host: Add riscv*-*-linux*.
1184         * configure.nat: Add riscv*.
1185         * configure.tgt: Add riscv*-*-linux*.
1186         * riscv-linux-nat.c: New file.
1187         * riscv-linux-tdep.c: New file.
1188
1189 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1190
1191         * infrun.c (resume): Make static, add forward declaration.
1192         (proceed): Update header comment.
1193         * infrun.h (resume): Delete declaration.
1194
1195 2018-08-09  Tom Tromey  <tom@tromey.com>
1196
1197         * riscv-tdep.h: Minor formatting fixes.
1198
1199 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1200
1201         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1202         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1203         (test_mkdir_recursive): Likewise.
1204         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1205
1206 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1207
1208         * valarith.c (value_subscripted_rvalue): If an array is not in
1209         memory, and we don't know the upper bound, then we can't know that
1210         the requested element exists or not.
1211
1212 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1213
1214         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1215         (target_options_to_string): Add comment.
1216
1217 2018-08-08  Tom Tromey  <tom@tromey.com>
1218
1219         * unittests/scoped_mmap-selftests.c: Check result of "write".
1220
1221 2018-08-08  Jim Wilson  <jimw@sifive.com>
1222
1223         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1224         (decode_register_index_short): New.
1225         (decode_j_type_insn, decode_cj_type_insn): New.
1226         (decode_b_type_insn, decode_cb_type_insn): New.
1227         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1228         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1229         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1230         is_c_sw_insn instead of is_sw_insn.
1231         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1232         (riscv_software_single_step): New.
1233         * riscv-tdep.h (riscv_software_single_step): Declare.
1234
1235         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1236         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1237
1238 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1239
1240         PR gdb/18050:
1241         * target.c (dispose_inferior): Don't dispose of inferiors that are
1242         already killed.
1243
1244 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1245
1246         * remote.c (remote_target::download_tracepoint): Change char* to
1247         const char*.
1248
1249 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1250
1251         * target.h (target_options_to_string): Return an std::string.
1252         * target.c (str_comma_list_concat_elem): Return void, use
1253         std::string.
1254         (do_option): Likewise.
1255         (target_options_to_string): Return an std::string.
1256         * linux-nat.c (linux_nat_target::wait): Adjust.
1257         * target-debug.h (target_debug_print_options): Adjust.
1258
1259 2018-08-07  Tom Tromey  <tom@tromey.com>
1260
1261         * Makefile.in (CPPFLAGS): New variable.
1262         (INTERNAL_CPPFLAGS): Use it.
1263
1264 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1265
1266         * NEWS: Mention the index cache.
1267
1268 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1269
1270         * common/pathstuff.h (get_standard_cache_dir): New.
1271         * common/pathstuff.c (get_standard_cache_dir): New.
1272         * build-id.h (build_id_to_string): New.
1273         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1274         DEBUG_STR_SUFFIX): Move to here.
1275         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1276         DEBUG_STR_SUFFIX): Move from there.
1277         (write_psymtabs_to_index): Make non-static, add basename
1278         parameter.  Write to temporary files, rename when done.
1279         (save_gdb_index_command): Adjust call to
1280         write_psymtabs_to_index.
1281         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1282         field.
1283         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1284         (get_gdb_index_contents_from_cache): New.
1285         (get_gdb_index_contents_from_cache_dwz): New.
1286         (dwarf2_initialize_objfile): Read index from cache.
1287         (dwarf2_build_psymtabs): Save to index.
1288         * dwarf-index-cache.h: New file.
1289         * dwarf-index-cache.c: New file.
1290         * dwarf-index-write.h: New file.
1291
1292 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1293
1294         * gnulib/aclocal.m4: Re-generate.
1295         * gnulib/config.in: Re-generate.
1296         * gnulib/configure: Re-generate.
1297         * gnulib/import/Makefile.am: Re-generate.
1298         * gnulib/import/Makefile.in: Re-generate.
1299         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1300         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1301         * gnulib/import/m4/mkdir.m4: New file.
1302         * gnulib/import/mkdir.c: New file.
1303         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1304         module.
1305
1306 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1307
1308         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1309         * common/scoped_mmap.c: New file.
1310         * common/scoped_mmap.h (destroy): New method.
1311         (~scoped_mmap, reset): Use destroy.
1312         (scoped_mmap): New move constructor.
1313         (mmap_file): New declaration.
1314         * unittests/scoped_mmap-selftests.c (test_normal,
1315         test_invalid_filename, run_tests): New functions.
1316         (_initialize_scoped_mmap_selftests): Register selftest.
1317
1318 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1319
1320         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1321         (read_gdb_index_from_buffer): ... this.  Remove section
1322         parameter, add buffer parameter.
1323         (get_gdb_index_contents_ftype,
1324         get_gdb_index_contents_dwz_ftype): New typedefs.
1325         (dwarf2_read_gdb_index): Add callback parameters to get the
1326         index contents.
1327         (get_gdb_index_contents_from_section): New.
1328         (dwarf2_initialize_objfile): Update call to
1329         dwarf2_read_gdb_index.
1330
1331 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1332
1333         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1334         (gdb_open_cloexec): Likewise.
1335         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1336         (commandline_from_pid): Likewise.
1337         (linux_xfer_osdata_threads): Likewise.
1338         (linux_xfer_osdata_fds): Likewise.
1339         * ada-lang.c (is_package_name): Likewise.
1340         * auxv.c (procfs_xfer_auxv): Likewise.
1341         * breakpoint.c (print_one_breakpoint_location): Use
1342         uiout::field_fmt.
1343         (print_one_catch_solib): Use string_printf.
1344         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1345         (add_pe_forwarded_sym): Likewise.
1346         * dwarf2read.c (create_type_unit_group): Likewise.
1347         (build_error_marker_type): Likewise.
1348         * infcall.c (get_function_name): Likewise.
1349         * valprint.c (print_converted_chars_to_obstack): Likewise.
1350         * xtensa-tdep.c (xtensa_register_type): Likewise.
1351
1352 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1353
1354         * remote.c (remote_target::download_tracepoint): Fix format
1355         string errors.
1356
1357 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1358
1359         * tracefile.c: Include common/byte-vector.h.
1360         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1361         with trace_regblock_size if needed.  Update uses of buf.
1362
1363 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1364
1365         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1366         std::vector<unsigned char>.
1367         * tracepoint.c (collection_list::collection_list): Remove
1368         m_regs_mask initializer from initializer list.  Resize
1369         m_regs_mask using the largest remote register number.
1370         (collection_list::add_remote_register): Remove size check on
1371         m_regs_mask.  Use at to access element.
1372         (collection_list::stringify): Change type of temp_buf to
1373         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1374         stringify the register mask.  Use pack_hex_byte for the register
1375         mask.
1376
1377 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1378
1379         * tracepoint.h (class collection_list) <add_register>: Remove.
1380         <add_remote_register, add_ax_registers, add_local_register>:
1381         Declare.
1382         <add_memrange>: Add scope parameter.
1383         * tracepoint.c (encode_actions_1): Likewise.
1384         (collection_list::add_register): Rename to ...
1385         (collection_list::add_remote_register): ... this.  Update
1386         comment.
1387         (collection_list::add_ax_registers, add_local_register): New
1388         methods.
1389         (collection_list::add_memrange): Add scope parameter.  Call
1390         add_local_register instead of add_register.
1391         (finalize_tracepoint_aexpr): New function.
1392         (collection_list::collect_symbol): Update calls to add_memrange.
1393         Call add_local_register instead of add_register.  Call
1394         add_ax_registers.  Call finalize_tracepoint_aexpr.
1395         (encode_actions_1): Get remote regnos for $reg action.  Call
1396         add_remote_register, add_ax_registers, and add_local_register.
1397         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1398         (validate_actionline): Call finalize_tracepoint_aexpr.
1399
1400 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1401
1402         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1403         Replace array buf with gdb::char_vector buf, of size
1404         get_remote_packet_size ().  Replace references to buf and
1405         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1406         and xsnprintf with snprintf.  Raise errors if the buffer is too
1407         small.
1408
1409 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1410
1411         * remote.c (remote_target::download_tracepoint): Fix the has_more
1412         predicate in the QTDP action list iteration.
1413
1414 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1415
1416         * remote.c (remote_target::download_tracepoint): Fix indentation
1417         in for block.
1418
1419 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1420
1421         * proc-api.c (_initialize_proc_api): Remove c, unused.
1422         * procfs.c (procfs_init_inferior): Remove signals, unused.
1423         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1424         unused.
1425
1426 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1427             Andrew Burgess  <andrew.burgess@embecosm.com>
1428
1429         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1430         'W_STOPCODE (0)' as this could be ambiguous.
1431
1432 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1433
1434         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1435         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1436         "ai_socktype").
1437
1438 2018-08-02  Tom Tromey  <tom@tromey.com>
1439
1440         PR symtab/16842.
1441         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1442         symbols.
1443         (process_structure_scope): Likewise.
1444
1445 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1446
1447         PR gdb/22629:
1448         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1449         kill inferior.
1450
1451 2018-08-02  Tom Tromey  <tom@tromey.com>
1452
1453         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1454         (darwin_suspend_inferior, darwin_resume_inferior)
1455         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1456         (darwin_check_new_threads): Check result of get_darwin_inferior.
1457
1458 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1459
1460         GDB 8.1.1 released.
1461
1462 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1463
1464         * varobj.c (varobj_get_path_expr_parent): Report an error if
1465         parent is a dynamic varobj.
1466
1467 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1468
1469         * gnulib/aclocal.m4: Re-generate.
1470         * gnulib/config.in: Re-generate.
1471         * gnulib/configure: Re-generate.
1472         * gnulib/import/Makefile.in: Re-generate.
1473         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1474         * gnulib/import/m4/onceonly.m4: Re-generate.
1475
1476 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1477
1478         * target-descriptions.c (struct xml_test_tdesc): New.
1479         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1480         (record_xml_tdesc): Update.
1481         (maintenance_check_xml_descriptions): Update.
1482         * target-descriptions.h (record_xml_tdesc): Update comment.
1483
1484 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1485
1486         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1487         checking array bounds are defined.
1488
1489 2018-07-30  Tom Tromey  <tom@tromey.com>
1490
1491         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1492         irreflexivity violation.
1493
1494 2018-07-30  Tom Tromey  <tom@tromey.com>
1495
1496         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1497         * value.c (unpack_long): Remove lint code.
1498         * valops.c (value_ind): Remove lint code.
1499         * valarith.c (value_x_binop, value_x_unop, value_equal)
1500         (value_pos): Remove lint code.
1501
1502 2018-07-28  Tom de Vries  <tdevries@suse.de>
1503
1504         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1505         with undefined upper bound as <optimized out>.
1506
1507 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1508
1509         * gcore.in: Rename variable "name" to "prefix".  Expand
1510         "usage" text.
1511
1512 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1513
1514         * windows-nat.c (windows_nat_target::create_inferior): Update to
1515         call close() in global namespace.
1516
1517 2018-07-26  Tom Tromey  <tom@tromey.com>
1518
1519         * dwarf-index-write.c (add_address_entry): Don't add objfile
1520         offsets.
1521         * dbxread.c (find_stab_function): Rename from
1522         find_stab_function_addr.  Return a bound_minimal_symbol.
1523         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1524         Don't add objfile offsets.
1525         (end_psymtab): Use raw_text_low, raw_text_high,
1526         MSYMBOL_VALUE_RAW_ADDRESS.
1527         (read_ofile_symtab): Update.
1528         (process_one_symbol): Update.
1529         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1530         offsets.
1531         (dw2_relocate): Remove.
1532         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1533         searching addrmap.
1534         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1535         Update.
1536         (process_psymtab_comp_unit_reader, add_partial_symbol)
1537         (add_partial_subprogram, dwarf2_ranges_read): Update.
1538         (load_partial_dies): Update.
1539         (add_address_entry): Don't add objfile offsets.
1540         (dwarf2_build_include_psymtabs): Update.
1541         (create_addrmap_from_aranges): Don't add objfile offsets.
1542         (dw2_find_pc_sect_compunit_symtab): Update.
1543         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1544         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1545         Update.
1546         (parse_partial_symbols): Don't add objfile offsets.  Use
1547         raw_text_low, raw_text_high.  Update.
1548         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1549         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1550         or call 'relocate' quick function.  Clear psymbol_map.
1551         * psympriv.h (struct partial_symbol) <address>: Add section
1552         offset.
1553         <set_unrelocated_address>: Rename from set_address.
1554         <raw_text_low, raw_text_high>: New methods.
1555         <text_low, text_high>: Add objfile parameter.
1556         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1557         set_unrelocated_address.
1558         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1559         (find_pc_psymbol): Update.
1560         (fixup_psymbol_section, relocate_psymtabs): Remove.
1561         (dump_psymtab, psym_functions): Update.
1562         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1563         parameter.
1564         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1565         (start_psymtab_common): Update.
1566         * symfile-debug.c (debug_qf_relocate): Remove.
1567         (debug_sym_quick_functions): Update.
1568         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1569         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1570         Update.
1571
1572 2018-07-26  Tom Tromey  <tromey@redhat.com>
1573
1574         * dbxread.c (end_psymtab): Use text_high_valid and
1575         text_low_valid.
1576         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1577         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1578         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1579         Update comment.
1580         <text_low_valid, text_high_valid>: New fields.
1581         <set_text_low, set_text_high>: Update.
1582         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1583
1584 2018-07-26  Tom Tromey  <tom@tromey.com>
1585
1586         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1587         Update.
1588         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1589         textlow and texthigh fields.
1590         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1591         Update.
1592         * mdebugread.c (parse_lines, parse_partial_symbols)
1593         (psymtab_to_symtab_1): Update.
1594         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1595         Rename fields.  Update comment.  Now private.
1596         <text_low, text_high, set_text_low, set_text_high>: New methods.
1597         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1598         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1599         (start_psymtab_common, maintenance_info_psymtabs)
1600         (maintenance_check_psymtabs): Update.
1601         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1602         texthigh fields.
1603         (scan_xcoff_symtab): Update.
1604
1605 2018-07-26  Tom Tromey  <tromey@redhat.com>
1606
1607         * psympriv.h (struct partial_symbol) <unrelocated_address,
1608         address, set_address>: New methods.
1609         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1610         (fixup_psymbol_section, relocate_psymtabs): Update.
1611         (print_partial_symbols): Add 'objfile' parameter.  Update.
1612         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1613         Update.
1614
1615 2018-07-26  Tom Tromey  <tom@tromey.com>
1616
1617         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1618         (debug_names::write_psymbols): Update.
1619         * psympriv.h (struct partial_symbol): Derive from
1620         general_symbol_info.
1621         <obj_section>: New method.
1622         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1623         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1624         (find_pc_sect_psymbol, fixup_psymbol_section)
1625         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1626         (print_partial_symbols, recursively_search_psymtabs)
1627         (compare_psymbols, psymbol_hash, psymbol_compare)
1628         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1629         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1630
1631 2018-07-26  Tom Tromey  <tromey@redhat.com>
1632
1633         * dbxread.c (end_psymtab): Remove dead code.
1634
1635 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1636
1637         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1638         DWARF unwinders are disabled.
1639         * dwarf2-frame.c: Add dwarf2read.h include.
1640         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1641         disabled.
1642         (dwarf2_frame_unwinders_enabled_p): Define.
1643         (show_dwarf_unwinders_enabled_p): New function.
1644         (_initialize_dwarf2_frame): Register switch to control DWARF
1645         unwinder use.
1646         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1647         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1648         (show_dwarf_cmdlist): Remove static keyword.
1649         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1650         (show_dwarf_cmdlist): Declare.
1651         * NEWS: Document new feature.
1652
1653 2018-07-26  Tom de Vries  <tdevries@suse.de>
1654
1655         PR breakpoints/23366
1656         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1657
1658 2018-07-26  Tom de Vries  <tdevries@suse.de>
1659
1660         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1661         DW_AT_count can't be translated to a dynamic prop.
1662
1663 2018-07-25  Tom de Vries  <tdevries@suse.de>
1664
1665         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1666         try/catch.
1667
1668 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1669
1670         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1671
1672 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1673
1674         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1675
1676 2018-07-24  Keith Seitz  <keiths@redhat.comt
1677
1678         PR symtab/23010
1679         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1680         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1681         instead of add_symbol_to_list.
1682         (read_file_scope): Call prepare_one_comp_unit before reading
1683         any other DIEs.
1684
1685 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1686
1687         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1688
1689 2018-07-24  Tom Tromey  <tom@tromey.com>
1690
1691         * utils.c (malloc, realloc, free): Don't declare.
1692         * configure, config.in: Rebuild.
1693         * configure.ac: Don't check for declarations of free, malloc, or
1694         realloc.
1695
1696 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1697
1698         * aarch64-linux-nat.c
1699         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1700         variable.
1701         * arm-linux-nat.c (fetch_regs): Likewise.
1702         (store_regs): Likewise.
1703         (fetch_vfp_regs): Likewise.
1704         (store_vfp_regs): Likewise.
1705         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1706         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1707         (arm_linux_nat_target::insert_watchpoint): Likewise.
1708         (arm_linux_nat_target::remove_watchpoint): Likewise.
1709         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1710         Likewise.
1711         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1712         Likewise.
1713         * ppc-linux-nat.c (fetch_register): Likewise.
1714         (fetch_all_gp_regs): Likewise.
1715         (fetch_ppc_registers): Likewise.
1716         (store_all_gp_regs): Likewise.
1717         (store_ppc_registers): Likewise.
1718         (hwdebug_insert_point): Likewise.
1719         (can_use_watchpoint_cond_accel): Likewise.
1720         * remote-sim.c (gdb_os_write_stdout): Likewise.
1721
1722 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1723             Tom Tromey  <tom@tromey.com>
1724
1725         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1726         test for it.
1727         * configure: Rebuild.
1728
1729 2018-07-22  Tom Tromey  <tom@tromey.com>
1730
1731         * regformats/regdat.sh: Define xmltarget_${name} inside
1732         #ifndef IN_PROCESS_AGENT.
1733
1734 2018-07-22  Tom Tromey  <tom@tromey.com>
1735
1736         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1737
1738 2018-07-22  Tom Tromey  <tom@tromey.com>
1739
1740         * symfile.c (reread_symbols): Notify iter, not objfile.
1741
1742 2018-07-22  Tom Tromey  <tom@tromey.com>
1743
1744         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1745         Use arch_ops.
1746         (ravenscar_thread_target::prepare_to_store): Likewise.
1747
1748 2018-07-22  Tom Tromey  <tom@tromey.com>
1749
1750         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1751         unused variable.  Call value_fetch_lazy when needed.
1752         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1753         Remove unused variable.  Call value_fetch_lazy when needed.
1754
1755 2018-07-22  Tom Tromey  <tom@tromey.com>
1756
1757         * m32c-tdep.c (mark_dma): Return void.
1758         (make_regs): Remove unused declarations.
1759
1760 2018-07-22  Tom Tromey  <tom@tromey.com>
1761
1762         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1763         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1764         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1765         bkscm_get_valid_block_smob_arg_unsafe for effect.
1766
1767 2018-07-22  Tom Tromey  <tom@tromey.com>
1768
1769         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1770         value_type.
1771
1772 2018-07-22  Tom Tromey  <tom@tromey.com>
1773
1774         * windows-nat.c (saved_context): Conditionally define.
1775         * remote.c (remote_target::remote_btrace_maybe_reopen):
1776         Conditionally declare "warned".
1777         * inflow.c (sigquit_ours): Conditionally define.
1778         (new_tty): Move "tty" declaration inside #if.
1779         * guile/guile.c (guile_datadir): Conditionally define.
1780         * charset.c (set_be_le_names): Move some declarations inside #if.
1781         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1782         #if.
1783         (parse_xml_btrace_conf): Likewise.
1784
1785 2018-07-22  Tom Tromey  <tom@tromey.com>
1786
1787         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1788
1789 2018-07-22  Tom Tromey  <tom@tromey.com>
1790
1791         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1792         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1793         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1794         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1795         * stack.c (frame_apply_level_command): Remove unused variable.
1796         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1797         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1798         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1799         unused variable.
1800         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1801         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1802         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1803         variable.
1804         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1805         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1806         variable.
1807         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1808         Remove unused variable.
1809         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1810         variable.
1811         * common/tdesc.c (print_xml_feature::visit): Remove unused
1812         variable.
1813         * compile/compile-object-load.c (store_regs): Remove unused
1814         variables.
1815         * complaints.c (clear_complaints): Remove unused variable.
1816         * corelow.c (core_target_open): Remove unused variable.
1817         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1818         variable.
1819         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1820         variable.
1821         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1822         variable.
1823         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1824         variable.
1825         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1826         variable.
1827         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1828         variable.
1829         * ia64-tdep.c (examine_prologue): Remove unused variable.
1830         * infcall.c (run_inferior_call): Remove unused variable.
1831         * inferior.c (exit_inferior): Remove unused variable.
1832         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1833         * linespec.c (decode_line_2): Remove unused variable.
1834         * linux-nat.c (super_close): Remove.
1835         * linux-tdep.c (linux_info_proc): Remove unused variable.
1836         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1837         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1838         Remove unused variable.
1839         * parse.c (find_minsym_type_and_address): Remove unused variable.
1840         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1841         variable.
1842         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1843         variable.
1844         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1845         variables.
1846         * record-btrace.c (record_btrace_target::store_registers): Remove
1847         unused variable.
1848         (cmd_show_record_btrace_cpu): Remove unused variable.
1849         * riscv-tdep.c (riscv_register_reggroup_p)
1850         (riscv_push_dummy_call, riscv_return_value): Remove unused
1851         variable.
1852         * rust-exp.y (literal): Remove unused variable.
1853         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1854         unused variable.
1855         <STRUCTOP_ANONYMOUS>: Likewise.
1856         * s390-linux-tdep.c (s390_linux_init_abi_31)
1857         (s390_linux_init_abi_64): Remove unused variable.
1858         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1859         (file_select_thread, net_windows_open, _initialize_ser_windows):
1860         Remove unused variables.
1861         * symtab.c (find_pc_sect_line): Remove unused variable.
1862         * target-memory.c (compute_garbled_blocks): Remove unused
1863         variable.
1864         (target_write_memory_blocks): Remove unused variable.
1865         * target.c (target_stack::unpush): Remove unused variables.
1866         * tracepoint.c (start_tracing, all_tracepoint_actions)
1867         (merge_uploaded_trace_state_variables)
1868         (print_one_static_tracepoint_marker): Remove unused variable.
1869         * unittests/basic_string_view/element_access/char/1.cc (test01):
1870         Remove unused variable.
1871         * windows-nat.c (windows_continue, windows_add_all_dlls)
1872         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1873         Remove unused variables.
1874
1875 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1876
1877         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1878         attr_profile in HAVE_ELF.
1879         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1880         HAVE_ELF.
1881
1882 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1883
1884         * frame.c (frame_register_unwind): Change parameter name.
1885         (frame_unwind_register): Likewise.
1886         (frame_unwind_register_value): Likewise.
1887         (frame_unwind_register_signed): Likewise.
1888         (frame_unwind_register_unsigned): Likewise.
1889         * frame.h (frame_register_unwind): Likewise.
1890         (frame_unwind_register): Likewise.
1891         (frame_unwind_register_value): Likewise.
1892         (frame_unwind_register_signed): Likewise.
1893         (frame_unwind_register_unsigned): Likewise.
1894         (frame_unwind_arch): Likewise.
1895
1896 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1897
1898         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1899         ISA maintenance.
1900
1901 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1902
1903         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1904         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1905         hand.
1906
1907 2018-07-20  Keith Seitz  <keiths@redhat.com>
1908
1909         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1910         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1911         m_compunit_symtab, m_language>: Add "m_" prefix.
1912         Update all uses.
1913         * buildsym.c: Update all uses.
1914
1915 2018-07-20  Tom Tromey  <tom@tromey.com>
1916
1917         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1918         * buildsym.h (record_line_ftype): Remove typedef.
1919
1920 2018-07-20  Tom Tromey  <tom@tromey.com>
1921
1922         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1923         (end_expandable_symtab): Likewise.
1924         (end_symtab_get_static_block): Likewise.
1925         (end_symtab_from_static_block): Likewise.
1926         * buildsym-legacy.c (augment_type_symtab): Remove.
1927         (end_expandable_symtab): Remove.
1928         (end_symtab_get_static_block): Remove.
1929         (end_symtab_from_static_block): Remove.
1930
1931 2018-07-20  Tom Tromey  <tom@tromey.com>
1932
1933         * dwarf2read.c: Include buildsym.h.
1934         (struct dwarf2_cu) <builder>: New method.
1935         (fixup_go_packaging): Update.
1936         (process_full_comp_unit, process_full_type_unit): Update.  Don't
1937         use scoped_free_pendings.
1938         (using_directives): Add "cu" parameter, remove "language".
1939         (read_import_statement, setup_type_unit_groups, )
1940         (read_func_scope, read_lexical_block_scope)
1941         (dwarf2_record_block_ranges, read_namespace): Update.
1942         (lnp_state_machine::lnp_state_machine): Add cu parameter.
1943         (lnp_state_machine::handle_end_sequence): Update.
1944         (class lnp_state_machine) <m_cu>: New member.
1945         <m_record_line_callback>: Remove.
1946         <m_currently_recording_lines>: New member.
1947         (lnp_state_machine::handle_set_file): Update.
1948         (noop_record_line): Remove.
1949         (dwarf_record_line_p): Add cu parameter.
1950         (dwarf_record_line_1, dwarf_finish_line): Likewise.
1951         (lnp_state_machine::record_line)
1952         (lnp_state_machine::lnp_state_machine)
1953         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1954         (dwarf_decode_lines): Update.
1955         (dwarf2_start_subfile): Add cu parameter.
1956         (dwarf2_start_symtab, new_symbol): Update.
1957         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1958         Remove dwarf2_per_objfile parameter.
1959         (dwarf_decode_macros): Update.
1960
1961 2018-07-20  Tom Tromey  <tom@tromey.com>
1962
1963         * stabsread.c (define_symbol): Update.
1964         * buildsym-legacy.h (get_buildsym_compunit): Declare.
1965         * dwarf2read.c (new_symbol): Update.
1966         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1967         * cp-namespace.c: Include buildsym.h.
1968         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1969         * buildsym-legacy.c (get_buildsym_compunit): New function.
1970
1971 2018-07-20  Tom Tromey  <tom@tromey.com>
1972
1973         * xcoffread.c: Include buildsym-legacy.h.
1974         * windows-nat.c: Include buildsym-legacy.h.
1975         * stabsread.c: Include buildsym-legacy.h.
1976         * mdebugread.c: Include buildsym-legacy.h.
1977         * buildsym-legacy.h: New file.
1978         * buildsym-legacy.c: New file, from buildsym.c.
1979         * go32-nat.c: Include buildsym-legacy.h.
1980         * dwarf2read.c: Include buildsym-legacy.h.
1981         * dbxread.c: Include buildsym-legacy.h.
1982         * cp-namespace.c: Include buildsym-legacy.h.
1983         * coffread.c: Include buildsym-legacy.h.
1984         * buildsym.h: Move some contents to buildsym-legacy.h.
1985         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
1986         buildsym-legacy.c.
1987         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1988
1989 2018-07-20  Tom Tromey  <tom@tromey.com>
1990
1991         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1992         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1993         (buildsym_compunit::buildsym_compunit)
1994         (buildsym_compunit::~buildsym_compunit)
1995         (buildsym_compunit::get_macro_table): Define.
1996
1997 2018-07-20  Tom Tromey  <tom@tromey.com>
1998
1999         * buildsym.c (reset_symtab_globals): Remove.
2000         (buildsym_compunit::end_symtab_from_static_block): Update.
2001         (buildsym_compunit::augment_type_symtab): Update.
2002         (end_symtab_from_static_block): Call free_buildsym_compunit.
2003         (augment_type_symtab, end_symtab, end_expandable_symtab):
2004         Likewise.
2005
2006 2018-07-20  Tom Tromey  <tom@tromey.com>
2007
2008         * arch-utils.c: Do not include buildsym.h.
2009         * mipsread.c: Do not include buildsym.h.
2010         * machoread.c: Do not include buildsym.h.
2011         * elfread.c: Do not include buildsym.h.
2012
2013 2018-07-20  Tom Tromey  <tom@tromey.com>
2014
2015         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2016         initialization.
2017         (buildsym_compunit): Add new constructor.
2018         (struct buildsym_compunit) <get_last_source_file, finish_block,
2019         record_block_range, start_subfile, patch_subfile_names,
2020         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2021         set_last_source_start_addr, get_last_source_start_addr,
2022         get_local_using_directives, set_local_using_directives,
2023         get_global_using_directives, outermost_context_p,
2024         get_current_context_stack, get_context_stack_depth,
2025         get_current_subfile, get_local_symbols, get_file_symbols,
2026         get_global_symbols, record_debugformat, record_producer,
2027         push_context, pop_context, end_symtab_get_static_block,
2028         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2029         New public methods.
2030         <record_pending_block, finish_block_internal, make_blockvector,
2031         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2032         private methods.
2033         Update all users.
2034
2035 2018-05-22  Tom Tromey  <tom@tromey.com>
2036
2037         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2038         parameter.
2039         (finish_block_internal): Update.
2040
2041 2018-07-20  Tom Tromey  <tom@tromey.com>
2042
2043         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2044         parameter.
2045         (finish_block_internal): Update.
2046
2047 2018-07-20  Tom Tromey  <tom@tromey.com>
2048
2049         * buildsym.h (EXTERN): Don't define or undef.
2050         * buildsym.c (EXTERN): Don't define.
2051
2052 2018-07-20  Tom Tromey  <tom@tromey.com>
2053
2054         * buildsym.c: Remove TODO comment.
2055
2056 2018-07-20  Tom Tromey  <tom@tromey.com>
2057
2058         * coffread.c (coff_symtab_read): Update.
2059         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2060         (xcoff_new_init): Update.
2061         * mipsread.c (mipscoff_new_init): Update.
2062         * mdebugread.c (mdebug_build_psymtabs): Update.
2063         * elfread.c (elf_new_init): Update.
2064         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2065         Update.
2066         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2067         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2068         (stabsect_build_psymtabs): Update.
2069         * buildsym.h (buildsym_init): Don't declare.
2070         * buildsym.c: Update comment.
2071         (prepare_for_building): Remove.
2072         (start_symtab, restart_symtab): Update.
2073         (reset_symtab_globals): Update comment.
2074         (buildsym_init): Remove.
2075
2076 2018-07-20  Tom Tromey  <tom@tromey.com>
2077
2078         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2079         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2080         (read_enum_type, common_block_start, common_block_end)
2081         (cleanup_undefined_types_1, finish_global_stabs): Update.
2082         * mdebugread.c (psymtab_to_symtab_1): Update.
2083         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2084         (read_lexical_block_scope, new_symbol): Update.
2085         * dbxread.c (process_one_symbol): Update.
2086         * coffread.c (coff_symtab_read, process_coff_symbol)
2087         (coff_read_enum_type): Update.
2088         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2089         declare.
2090         (get_local_symbols, get_file_symbols, get_global_symbols): New
2091         functions.
2092         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2093         m_global_symbols.
2094         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2095         (~scoped_free_pendings): Update.
2096         (finish_block, prepare_for_building, reset_symtab_globals)
2097         (end_symtab_get_static_block, end_symtab_with_blockvector)
2098         (augment_type_symtab, push_context): Update.
2099         (get_local_symbols, get_file_symbols, get_global_symbols): New
2100         functions.
2101         (buildsym_init): Update.
2102
2103 2018-07-20  Tom Tromey  <tom@tromey.com>
2104
2105         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2106         (process_full_type_unit): Likewise.
2107         (dwarf2_start_symtab): Set list_in_scope.
2108
2109 2018-07-20  Tom Tromey  <tom@tromey.com>
2110
2111         * dwarf2read.c (process_psymtab_comp_unit_reader)
2112         (build_type_psymtabs_reader): Do not set list_in_scope.
2113
2114 2018-07-20  Tom Tromey  <tom@tromey.com>
2115
2116         * buildsym.c (free_pendings): Remove.
2117         (add_symbol_to_list, scoped_free_pendings)
2118         (finish_block_internal, buildsym_init): Update.
2119
2120 2018-07-20  Tom Tromey  <tom@tromey.com>
2121
2122         * xcoffread.c (read_xcoff_symtab): Update.
2123         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2124         Update.
2125         * dbxread.c (process_one_symbol): Update.
2126         * coffread.c (coff_symtab_read): Update.
2127         * buildsym.h (finish_block): Update.
2128         * buildsym.c (finish_block): Remove "listhead" argument.
2129         (end_symtab_get_static_block): Update.
2130
2131 2018-07-20  Tom Tromey  <tom@tromey.com>
2132
2133         * buildsym.h (class scoped_free_pendings): Remove constructor.
2134         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2135         method.
2136         <m_pending_block_obstack, m_pending_blocks>: New members.
2137         (pending_block_obstack, pending_blocks): Remove.
2138         (scoped_free_pendings::scoped_free_pendings): Default.
2139         (~scoped_free_pendings): Update.
2140         (free_pending_blocks): Remove.
2141         (finish_block_internal, record_pending_block, make_blockvector)
2142         (end_symtab_get_static_block, augment_type_symtab, push_context)
2143         (buildsym_init): Update.
2144
2145 2018-07-20  Tom Tromey  <tom@tromey.com>
2146
2147         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2148         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2149         members.
2150         (pending_addrmap, pending_addrmap_obstack)
2151         (pending_addrmap_interesting): Remove.
2152         (scoped_free_pendings, record_block_range, make_blockvector)
2153         (prepare_for_building, reset_symtab_globals, buildsym_init):
2154         Update.
2155
2156 2018-07-20  Tom Tromey  <tom@tromey.com>
2157
2158         * xcoffread.c (process_linenos): Update.
2159         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2160         * mdebugread.c (psymtab_to_symtab_1): Update.
2161         * dwarf2read.c (setup_type_unit_groups)
2162         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2163         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2164         * dbxread.c (process_one_symbol): Update.
2165         * coffread.c (coff_symtab_read, enter_linenos)
2166         (process_coff_symbol): Update.
2167         * buildsym.h (current_subfile): Don't declare.
2168         (get_current_subfile): Declare.
2169         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2170         member.
2171         (start_subfile, free_buildsym_compunit, push_subfile)
2172         (prepare_for_building, start_symtab): Update.
2173         (get_current_subfile): New function.
2174
2175 2018-07-20  Tom Tromey  <tom@tromey.com>
2176
2177         * coffread.c (coff_symtab_read): Update.
2178         * xcoffread.c (read_xcoff_symtab): Update.
2179         * dwarf2read.c (new_symbol): Update.
2180         (read_func_scope, read_lexical_block_scope): Update.
2181         * dbxread.c (process_one_symbol): Update.
2182         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2183         (outermost_context_p): Remove macro.
2184         (outermost_context_p, get_current_context_stack)
2185         (get_context_stack_depth): Declare.
2186         (pop_context): Return struct context_stack.
2187         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2188         member.
2189         (context_stack_size): Remove.
2190         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2191         (prepare_for_building, end_symtab_get_static_block)
2192         (augment_type_symtab, push_context): Update.
2193         (pop_context): Return struct context_stack.
2194         (outermost_context_p, get_current_context_stack)
2195         (get_context_stack_depth): New functions.
2196         (buildsym_init): Update.
2197
2198 2018-07-20  Tom Tromey  <tom@tromey.com>
2199
2200         * rust-exp.y: Now a pure parser.  Update all rules.
2201         (%union): Move earlier.
2202         (current_parser, work_obstack): Remove globals.
2203         (rust_parser, ~rust_parser): Update.
2204         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2205         lex_character, lex_number, lex_string, lex_identifier,
2206         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2207         convert_name, convert_params_to_expression,
2208         convert_ast_to_expression, ast_basic_type, ast_operation,
2209         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2210         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2211         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2212         ast_array_type, ast_slice_type, ast_reference_type,
2213         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2214         (rust_parse): Update.
2215         (rustyyerror, rustyylex): Add parser parameter.
2216         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2217         (rust_lex_stringish_test, rust_lex_test_sequence)
2218         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2219         (rust_lex_test_push_back, rust_lex_tests): Update.
2220
2221 2018-07-19  Pedro Alves  <palves@redhat.com>
2222
2223         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2224         gdb::unique_xmalloc_ptr.
2225         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2226         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2227         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2228         copy-initialization.
2229         * guile/scm-pretty-print.c (ppscm_print_children): Use
2230         gdb::unique_xmalloc_ptr instead of cleanups.
2231         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2232         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2233         gdb::unique_xmalloc_ptr.
2234         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2235         Adjust to use gdb::unique_xmalloc_ptr.
2236         * guile/scm-utils.c (extract_arg): Adjust.
2237         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2238         gdb::unique_xmalloc_ptr instead of a cleanup.
2239
2240 2018-07-19  Tom Tromey  <tom@tromey.com>
2241
2242         * utils.c (do_value_free_to_mark)
2243         (make_cleanup_value_free_to_mark): Remove.
2244         * utils.h (make_cleanup_value_free_to_mark): Remove.
2245
2246 2018-07-19  Pedro Alves  <palves@redhat.com>
2247
2248         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2249         forwarding reference.
2250
2251 2018-07-18  Pedro Alves  <palves@redhat.com>
2252
2253         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2254         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2255         cleanup.
2256
2257 2018-07-18  Pedro Alves  <palves@redhat.com>
2258
2259         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2260         exceptions.
2261         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2262         (gdbscm_wrap): New.
2263         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2264         directly instead of a cleanup.
2265         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2266         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2267         (vlscm_binop_gdbthrow): New, factored out from ...
2268         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2269         (vlscm_rich_compare): Use gdbscm_wrap.
2270         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2271         instead of a cleanup.
2272         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2273         cleanup.
2274         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2275         Use xfree directly instead of a cleanup.
2276         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2277         Adjust to use gdbscm_wrap and scoped_value_mark.
2278         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2279         (gdbscm_value_address, gdbscm_value_dereference)
2280         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2281         scoped_value_mark.
2282         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2283         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2284         scoped_value_mark.
2285         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2286         gdbscm_wrap and scoped_value_mark.
2287         (gdbscm_value_to_string): Use xfree directly instead of a
2288         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2289         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2290         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2291         scoped_value_mark.
2292         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2293         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2294         scoped_value_mark.
2295         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2296         gdbscm_wrap.
2297
2298 2018-07-18  Tom de Vries  <tdevries@suse.de>
2299
2300         * findvar.c (default_read_var_value): Also resolve dynamic type for
2301         LOC_OPTIMIZED_OUT vars.
2302
2303 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2304
2305         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2306         decoding.
2307
2308 2018-07-17  Tom Tromey  <tom@tromey.com>
2309
2310         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2311         (compute_enum_list, pascm_set_param_value_x)
2312         (gdbscm_parameter_value): Update.
2313         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2314         (gdbscm_scm_to_host_string): Update.
2315         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2316         Update.
2317         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2318         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2319         * guile/scm-string.c (gdbscm_scm_to_string): Return
2320         unique_xmalloc_ptr.
2321         (gdbscm_scm_to_host_string): Likewise.
2322
2323 2018-07-17  Tom Tromey  <tom@tromey.com>
2324
2325         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2326         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2327         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2328         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2329         unique_xmalloc_ptr.
2330
2331 2018-07-17  Tom Tromey  <tom@tromey.com>
2332
2333         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2334         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2335         Update.
2336         * guile/scm-cmd.c (cmdscm_function): Update.
2337         * guile/scm-pretty-print.c
2338         (ppscm_print_exception_unless_memory_error): Update.
2339         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2340         Return unique_xmalloc_ptr.
2341
2342 2018-07-17  Tom Tromey  <tom@tromey.com>
2343
2344         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2345         Use string_printf.
2346
2347 2018-07-17  Jim Wilson  <jimw@sifive.com>
2348
2349         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2350         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2351         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2352         unecessary braces after EF_RISCV_RVC test.  Delete call to
2353         set_gdbarch_decr_pc_after_break.
2354
2355         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2356         RISCV_LAST_FP_REGNUM + 1.
2357         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2358
2359 2018-07-17  Tom Tromey  <tom@tromey.com>
2360
2361         * configure.ac: Remove --disable-gdbcli.
2362         * configure: Rebuild.
2363         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2364         (SUBDIR_CLI_CFLAGS): Remove.
2365         (SFILES): Use SUBDIR_CLI_SRCS.
2366         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2367
2368 2018-07-17  Tom Tromey  <tom@tromey.com>
2369
2370         PR gdb/18624:
2371         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2372
2373 2018-07-16  Jim Wilson  <jimw@sifive.com>
2374
2375         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2376
2377 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2378
2379         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2380         variable.
2381         (libunwind_frame_sniffer): Likewise.
2382         (libunwind_frame_prev_register): Likewise.
2383         (libunwind_sigtramp_frame_sniffer): Likewise.
2384         * ia64-tdep.c (ia64_access_reg): Likewise.
2385         (ia64_access_rse_reg): Likewise.
2386         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2387         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2388
2389 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2390
2391         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2392
2393 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2394
2395         * remote-sim.c (gdbsim_target::close,
2396         gdbsim_target::mourn_inferior): Remove unused variables.
2397
2398 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2399
2400         * ia64-tdep.c (ktab_buf): New global.
2401         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2402         (get_kernel_table): Adjust.
2403
2404 2018-07-16  Tom Tromey  <tom@tromey.com>
2405
2406         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2407         * dwarf2read.c (using_directives, new_symbol): Use
2408         outermost_context_p.
2409         * dbxread.c (process_one_symbol): Use outermost_context_p.
2410         * coffread.c (coff_symtab_read): Use outermost_context_p.
2411
2412 2018-07-16  Tom Tromey  <tom@tromey.com>
2413
2414         * dwarf2read.c (using_directives, read_func_scope)
2415         (read_lexical_block_scope): Update.
2416         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2417         * buildsym.h (local_using_directives, global_using_directives):
2418         Don't declare.
2419         (get_local_using_directives, set_local_using_directives)
2420         (get_global_using_directives): Declare.
2421         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2422         m_global_using_directives>: New members.
2423         (finish_block_internal, prepare_for_building)
2424         (reset_symtab_globals, end_symtab_get_static_block)
2425         (push_context): Update.
2426         (get_local_using_directives, set_local_using_directives)
2427         (get_global_using_directives): New functions.
2428         (buildsym_init): Update.
2429
2430 2018-07-16  Tom Tromey  <tom@tromey.com>
2431
2432         * xcoffread.c (xcoff_initial_scan): Don't call
2433         free_pending_blocks.
2434         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2435         * buildsym.h (class scoped_free_pendings): Add constructor.
2436         (free_pending_blocks): Don't declare.
2437         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2438         (free_pending_blocks): Now static.
2439
2440 2018-07-16  Tom Tromey  <tom@tromey.com>
2441
2442         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2443         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2444         member.
2445         (struct subfile_stack): Remove.
2446         (subfile_stack): Remove.
2447         (push_subfile, pop_subfile, buildsym_init): Update.
2448
2449 2018-07-16  Tom Tromey  <tom@tromey.com>
2450
2451         * buildsym.c (push_subfile): Use gdb_assert.
2452         (pop_subfile): Use gdb_assert.
2453
2454 2018-07-16  Tom Tromey  <tom@tromey.com>
2455
2456         * buildsym.h (merge_symbol_lists): Remove.
2457         * buildsym.c (merge_symbol_lists): Remove.
2458
2459 2018-07-16  Tom Tromey  <tom@tromey.com>
2460
2461         * stabsread.c (scan_file_globals): Update comment.
2462         * stabsread.h (scan_file_globals): Move from buildsym.h.
2463         * buildsym.h (scan_file_globals): Move to stabsread.h.
2464
2465 2018-07-16  Tom Tromey  <tom@tromey.com>
2466
2467         * xcoffread.c (xcoff_new_init): Update.
2468         * mipsread.c (mipscoff_new_init): Update.
2469         * mdebugread.c (mdebug_build_psymtabs): Update.
2470         * elfread.c (elf_new_init): Update.
2471         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2472         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2473         * buildsym.h (buildsym_new_init): Don't declare.
2474         * buildsym.c (buildsym_new_init): Remove.
2475
2476 2018-07-16  Tom Tromey  <tom@tromey.com>
2477
2478         * stabsread.h (within_function): Move from buildsym.h.
2479         * stabsread.c (start_stabs): Clear within_function.
2480         * coffread.c (coff_start_symtab): Clear within_function.
2481         * buildsym.h (within_function): Move to stabsread.h.
2482         * buildsym.c (prepare_for_building): Update.
2483
2484 2018-07-16  Tom Tromey  <tom@tromey.com>
2485
2486         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2487         * dwarf2read.c (dwarf2_start_symtab): Don't set
2488         processing_gcc_compilation.
2489         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2490
2491 2018-07-16  Tom Tromey  <tom@tromey.com>
2492
2493         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2494         (next_symbol_text_func): Move from buildsym.h.
2495         * stabsread.c (hashname): Move from buildsym.c.
2496         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2497         (next_symbol_text_func, hashname): Move to stabsread.h.
2498         * buildsym.c: Don't include bcache.h
2499         (hashname): Move to stasbread.c.
2500
2501 2018-07-16  Tom Tromey  <tom@tromey.com>
2502
2503         * buildsym.h (context_stack_size): Don't declare.
2504         * buildsym.c (context_stack_size): New global.
2505
2506 2018-07-16  Tom Tromey  <tom@tromey.com>
2507
2508         * dbxread.c (processing_acc_compilation): New global.
2509         * buildsym.h (processing_acc_compilation): Don't declare.
2510
2511 2018-07-16  Tom Tromey  <tom@tromey.com>
2512
2513         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2514         * dbxread.c (read_ofile_symtab): Update.
2515         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2516         * buildsym.h (last_source_start_addr): Remove.
2517         (set_last_source_start_addr, get_last_source_start_addr):
2518         Declare.
2519         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2520         parameter.
2521         (struct buildsym_compunit) <m_last_source_start_addr>: New
2522         member.
2523         (prepare_for_building): Remove start_addr parameter.
2524         (start_symtab, restart_symtab, end_symtab_get_static_block)
2525         (end_symtab_with_blockvector): Update.
2526         (set_last_source_start_addr, get_last_source_start_addr): New
2527         functions.
2528
2529 2018-07-16  Tom Tromey  <tom@tromey.com>
2530
2531         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2532         member.
2533         (have_line_numbers): Remove.
2534         (record_line, prepare_for_building, end_symtab_get_static_block)
2535         (augment_type_symtab): Update.
2536
2537 2018-07-16  Tom Tromey  <tom@tromey.com>
2538
2539         * buildsym.c (~buildsym_compunit): Free the macro table.
2540         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2541         methods.
2542         <m_pending_macros>: New member.
2543         (pending_macros): Remove.
2544         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2545         (reset_symtab_globals, end_symtab_get_static_block)
2546         (end_symtab_with_blockvector, augment_type_symtab)
2547         (buildsym_init): Update.
2548
2549 2018-07-16  Tom Tromey  <tom@tromey.com>
2550
2551         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2552         parameter.
2553         (buildsym_compunit::set_last_source_file): New method.
2554         <m_last_source_file>: New member.
2555         (prepare_for_building): Remove "name" parameter.
2556         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2557         (last_source_file): Remove.
2558         (set_last_source_file, get_last_source_file): Update.
2559
2560 2018-07-16  Tom Tromey  <tom@tromey.com>
2561
2562         * buildsym.c (prepare_for_building): Add assert.
2563
2564 2018-07-16  Tom Tromey  <tom@tromey.com>
2565
2566         * buildsym.c (~buildsym_compunit): Update.
2567         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2568         (start_subfile, patch_subfile_names)
2569         (end_symtab_with_blockvector): Update.
2570
2571 2018-07-16  Tom Tromey  <tom@tromey.com>
2572
2573         * buildsym.c (struct buildsym_compunit): Add constructor,
2574         destructor, initializers.
2575         (start_buildsym_compunit): Remove.
2576         (free_buildsym_compunit): Use "delete".
2577         (start_symtab, restart_symtab): Use "new".
2578
2579 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2580
2581         * symfile.c (set_objfile_default_section_offset): Remove struct
2582         keyword.
2583
2584 2018-07-14  Stafford Horne  <shorne@gmail.com>
2585
2586         * (Responsible Maintainers): Add myself as or1k maintainer.
2587
2588 2018-07-13  Tom Tromey  <tom@tromey.com>
2589
2590         * symfile.c (set_objfile_default_section_offset): Use extra braces
2591         around initializer.
2592
2593 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2594
2595         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2596         non-branching basr.
2597
2598 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2599
2600         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2601         unittests/cli-utils-selftests.c
2602         * unittests/cli-utils-selftests.c: New file.
2603
2604 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2605
2606         * NEWS: Mention new commands. Mention change to 'thread apply'.
2607
2608 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2609
2610         * thread.c (thr_try_catch_cmd): New function.
2611         (thread_apply_all_command): Handle qcs flags.
2612         (thread_apply_command): Handle qcs flags.
2613         (taas_command): New function.
2614         (tfaas_command): New function.
2615         (_initialize_thread): Update to setup the new commands 'taas
2616         and 'tfaas'. Change doc string for 'thread apply'.
2617
2618 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2619
2620         * stack.c: (trailing_outermost_frame): New function, mostly
2621         extracted from backtrace_command_1.
2622         (leading_innermost_frame): New function.
2623         (backtrace_command_1): Update to call trailing_outermost_frame.
2624         (frame_apply_command_count): New function.
2625         (frame_apply_level_command): New function.
2626         (frame_apply_all_command): New function.
2627         (frame_apply_command): New function.
2628         (faas_command): New function.
2629         (frame_cmd_list): New variable.
2630         (_initialize_stack): Update to setup the new commands 'frame apply'
2631         and 'faas'.
2632
2633 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2634
2635         * cli-utils.c (number_or_range_parser::get_number): Only handle
2636         numbers or convenience var as numbers.
2637         (parse_flags): New function.
2638         (parse_flags_qcs): New function.
2639         (number_or_range_parser::finished): Ensure parsing end is detected
2640         before end of string.
2641         * cli-utils.h (parse_flags): New function.
2642         (parse_flags_qcs): New function.
2643         (number_or_range_parser): Remove m_finished bool.
2644         (number_or_range_parser::skip_range): Set m_in_range to false.
2645
2646 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2647
2648         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2649         on Windows.
2650
2651 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2652             Jan Kratochvil  <jan.kratochvil@redhat.com>
2653             Paul Fertser  <fercerpav@gmail.com>
2654             Tsutomu Seki  <sekiriki@gmail.com>
2655             Pedro Alves  <palves@redhat.com>
2656
2657         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2658         'unittests/parse-connection-spec-selftests.c'.
2659         (COMMON_SFILES): Add 'common/netstuff.c'.
2660         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2661         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2662         * common/netstuff.c: New file.
2663         * common/netstuff.h: New file.
2664         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2665         (wait_for_connect): Update comment.  New parameter
2666         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2667         Use 'sock' directly instead of 'scb->fd'.
2668         (try_connect): New function, with code from 'net_open'.
2669         (net_open): Rewrite main loop to deal with multiple
2670         sockets/addresses.  Handle IPv6-style hostnames; implement
2671         support for IPv6 connections.
2672         * unittests/parse-connection-spec-selftests.c: New file.
2673
2674 2018-07-11  Pedro Alves  <palves@redhat.com>
2675
2676         PR gdb/23377
2677         * remote.c (remote_target::remote_detach_pid): Call
2678         set_current_process.
2679
2680 2018-07-11  Pedro Alves  <palves@redhat.com>
2681
2682         * h8300-tdep.c (h8300_gdbarch_init): Remove
2683         set_gdbarch_ecoff_reg_to_regnum calls.
2684
2685 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2686
2687         PR c++/23373
2688         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2689         offsets/sizes for static members of a class/struct.
2690
2691 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2692
2693         * target-descriptions.c (tdesc_register_bitsize): Rename.
2694         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2695         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2696         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2697
2698 2018-07-10  Tom Tromey  <tom@tromey.com>
2699
2700         * breakpoint.c (moribund_locations): Now static and a
2701         std::vector.
2702         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2703         (build_bpstat_chain, update_global_location_list)
2704         (breakpoint_retire_moribund): Update.
2705         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2706         VEC.
2707
2708 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2709
2710         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2711         (riscv_register_reggroup_p): Use new function, remove unneeded
2712         parenthesis.
2713         (riscv_push_dummy_call): Extend assert to compare against xlen or
2714         flen based on register type.
2715
2716 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2717
2718         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2719
2720 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2721
2722         * remote.c (show_hardware_watchpoint_limit): New function.
2723         (show_hardware_watchpoint_length_limit): New function.
2724         (show_hardware_breakpoint_limit): New function.
2725         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2726         where appropriate, update help text.
2727
2728 2018-07-09  Tom Tromey  <tom@tromey.com>
2729
2730         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2731         (CLIBS): Don't mention NAT_CLIBS.
2732
2733 2018-07-09  Tom Tromey  <tom@tromey.com>
2734
2735         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2736         (LIBGDB_OBS, clean mostlyclean): Update.
2737         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2738
2739 2018-07-09  Tom Tromey  <tom@tromey.com>
2740
2741         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2742         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2743         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2744
2745 2018-07-09  Tom Tromey  <tom@tromey.com>
2746
2747         * Makefile.in (ALLDEPFILES): Remove exec.c.
2748         (COMMON_OBS): Remove exec.o.
2749         (COMMON_SFILES): Add exec.c.
2750
2751 2018-07-09  Tom Tromey  <tom@tromey.com>
2752
2753         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2754
2755 2018-07-09  Tom Tromey  <tom@tromey.com>
2756
2757         * Makefile.in (clean mostlyclean): Remove stamp-version.
2758         (version.c): Depend on stamp-version.
2759         (stamp-version): New rule, from version.c rule.
2760
2761 2018-07-09  Tom Tromey  <tom@tromey.com>
2762
2763         * Makefile.in (init.c): Depend on stamp-init.
2764         (stamp-init): New rule, from init.c rule.
2765         (clean mostlyclean): Remove stamp-init.
2766
2767 2018-07-09  Tom Tromey  <tom@tromey.com>
2768
2769         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2770         SUBDIR_GCC_COMPILE_SRCS.
2771
2772 2018-07-09  Tom Tromey  <tom@tromey.com>
2773
2774         * Makefile.in (init.c): Remove some unused sed rules.
2775
2776 2018-07-09  Tom Tromey  <tom@tromey.com>
2777
2778         * Makefile.in (TSOBS): Remove.
2779         (INIT_FILES): Update.
2780         (LIBGDB_OBS): Update.
2781         (COMMON_SFILES): Add inflow.c.
2782         (SFILES): Remove inflow.c.
2783
2784 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2785
2786         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2787
2788 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2789
2790         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2791         get_saveloc_name, is_signal_frame_name, step_name,
2792         init_remote_name, create_addr_space_name,
2793         destroy_addr_space_name, search_unwind_table_name,
2794         find_dyn_list_name): Constify.
2795
2796 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2797
2798         * darwin-nat.c (darwin_pthread_kill): New function.
2799         (darwin_resume_thread): Use darwin_pthread_kill.
2800
2801 2018-07-05  Tom de Vries  <tdevries@suse.de>
2802
2803         * macroexp.c (macro_buffer) <operator=>: New member function.
2804
2805 2018-07-04  Tom Tromey  <tom@tromey.com>
2806
2807         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2808
2809 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2810
2811         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2812         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2813         * maint.c: Likewise.
2814         * top.c: Likewise.
2815
2816 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2817
2818         * NEWS: Create a new section for the next release branch.
2819         Rename the section of the current branch, now that it has
2820         been cut.
2821
2822 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2823
2824         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2825         * version.in: Bump version to 8.2.50.DATE-git.
2826
2827 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2828             Pedro Alves  <palves@redhat.com>
2829
2830         * linux-nat.c (linux_init_ptrace): Rename to ...
2831         (linux_init_ptrace_procfs): ... this.  Call
2832         linux_proc_init_warnings.
2833         (linux_nat_target::post_attach)
2834         (linux_nat_target::post_startup_inferior): Adjust.
2835         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2836         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2837
2838 2018-07-04  Tom de Vries  <tdevries@suse.de>
2839
2840         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2841         check ...
2842         (read_comp_unit_head): ... here.
2843
2844 2018-07-03  Tom Tromey  <tom@tromey.com>
2845
2846         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2847         (stop_tracing, tstatus_command)
2848         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2849         (print_one_static_tracepoint_marker): Update.
2850         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2851         std::vector.
2852         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2853         VEC.
2854         (all_tracepoints, static_tracepoints_here): Return std::vector.
2855
2856 2018-07-03  Tom Tromey  <tom@tromey.com>
2857
2858         * common/ptid.c (ptid_equal): Remove.
2859         * common/ptid.h (ptid_equal): Don't declare.
2860         * ada-tasks.c: Update.
2861         * breakpoint.c: Update.
2862         * common/agent.c: Update.
2863         * corelow.c: Update.
2864         * darwin-nat-info.c: Update.
2865         * darwin-nat.c: Update.
2866         * dcache.c: Update.
2867         * dtrace-probe.c: Update.
2868         * dummy-frame.c: Update.
2869         * fbsd-nat.c: Update.
2870         * frame.c: Update.
2871         * gdbthread.h: Update.
2872         * gnu-nat.c: Update.
2873         * go32-nat.c: Update.
2874         * inf-loop.c: Update.
2875         * inf-ptrace.c: Update.
2876         * infcall.c: Update.
2877         * infcmd.c: Update.
2878         * inflow.c: Update.
2879         * infrun.c: Update.
2880         * linux-fork.c: Update.
2881         * linux-nat.c: Update.
2882         * linux-thread-db.c: Update.
2883         * mi/mi-cmd-var.c: Update.
2884         * mi/mi-interp.c: Update.
2885         * mi/mi-main.c: Update.
2886         * nto-procfs.c: Update.
2887         * ppc-linux-tdep.c: Update.
2888         * procfs.c: Update.
2889         * python/py-inferior.c: Update.
2890         * python/py-record-btrace.c: Update.
2891         * python/py-record.c: Update.
2892         * ravenscar-thread.c: Update.
2893         * regcache.c: Update.
2894         * remote-sim.c: Update.
2895         * remote.c: Update.
2896         * sol-thread.c: Update.
2897         * solib.c: Update.
2898         * target.c: Update.
2899         * tui/tui-stack.c: Update.
2900         * varobj.c: Update.
2901         * windows-nat.c: Update.
2902         * windows-tdep.c: Update.
2903
2904 2018-07-03  Tom Tromey  <tom@tromey.com>
2905
2906         * common/ptid.c (ptid_match): Remove.
2907         * common/ptid.h (ptid_match): Don't declare.
2908         * fbsd-nat.c: Update.
2909         * infcmd.c: Update.
2910         * infrun.c: Update.
2911         * linux-nat.c: Update.
2912         * record-btrace.c: Update.
2913         * regcache.c: Update.
2914         * remote.c: Update.
2915
2916 2018-07-03  Tom Tromey  <tom@tromey.com>
2917
2918         * common/ptid.c (ptid_tid_p): Remove.
2919         * common/ptid.h (ptid_tid_p): Don't declare.
2920         * sol-thread.c: Update.
2921
2922 2018-07-03  Tom Tromey  <tom@tromey.com>
2923
2924         * common/ptid.c (ptid_lwp_p): Remove.
2925         * common/ptid.h (ptid_lwp_p): Don't declare.
2926         * fbsd-nat.c: Update.
2927         * linux-nat.c: Update.
2928         * nat/linux-procfs.c: Update.
2929         * nat/x86-linux-dregs.c: Update.
2930         * sol-thread.c: Update.
2931
2932 2018-07-03  Tom Tromey  <tom@tromey.com>
2933
2934         * common/ptid.c (ptid_is_pid): Remove.
2935         * common/ptid.h (ptid_is_pid): Don't declare.
2936         * infrun.c: Update.
2937         * linux-nat.c: Update.
2938         * mi/mi-interp.c: Update.
2939         * remote.c: Update.
2940         * thread.c: Update.
2941
2942 2018-07-03  Tom Tromey  <tom@tromey.com>
2943
2944         * common/ptid.c (ptid_get_tid): Remove.
2945         * common/ptid.h (ptid_get_tid): Don't declare.
2946         * ada-tasks.c: Update.
2947         * aix-thread.c: Update.
2948         * bsd-uthread.c: Update.
2949         * darwin-nat.c: Update.
2950         * fbsd-nat.c: Update.
2951         * i386-darwin-nat.c: Update.
2952         * infrun.c: Update.
2953         * linux-tdep.c: Update.
2954         * nto-procfs.c: Update.
2955         * ppc-ravenscar-thread.c: Update.
2956         * python/py-infthread.c: Update.
2957         * ravenscar-thread.c: Update.
2958         * sol-thread.c: Update.
2959         * sparc-ravenscar-thread.c: Update.
2960         * windows-nat.c: Update.
2961
2962 2018-07-03  Tom Tromey  <tom@tromey.com>
2963
2964         * common/ptid.c (ptid_get_lwp): Remove.
2965         * common/ptid.h (ptid_get_lwp): Don't declare.
2966         * aarch64-linux-nat.c: Update.
2967         * ada-tasks.c: Update.
2968         * aix-thread.c: Update.
2969         * amd64-linux-nat.c: Update.
2970         * arm-linux-nat.c: Update.
2971         * corelow.c: Update.
2972         * fbsd-nat.c: Update.
2973         * fbsd-tdep.c: Update.
2974         * gnu-nat.c: Update.
2975         * i386-cygwin-tdep.c: Update.
2976         * i386-gnu-nat.c: Update.
2977         * i386-linux-nat.c: Update.
2978         * ia64-linux-nat.c: Update.
2979         * inf-ptrace.c: Update.
2980         * infrun.c: Update.
2981         * linux-fork.c: Update.
2982         * linux-nat.c: Update.
2983         * linux-tdep.c: Update.
2984         * linux-thread-db.c: Update.
2985         * mips-linux-nat.c: Update.
2986         * nat/aarch64-linux-hw-point.c: Update.
2987         * nat/aarch64-linux.c: Update.
2988         * nat/linux-btrace.c: Update.
2989         * nat/linux-osdata.c: Update.
2990         * nat/linux-procfs.c: Update.
2991         * nat/x86-linux-dregs.c: Update.
2992         * obsd-nat.c: Update.
2993         * ppc-fbsd-nat.c: Update.
2994         * ppc-linux-nat.c: Update.
2995         * procfs.c: Update.
2996         * python/py-infthread.c: Update.
2997         * ravenscar-thread.c: Update.
2998         * remote.c: Update.
2999         * s390-linux-nat.c: Update.
3000         * sol-thread.c: Update.
3001         * sol2-tdep.c: Update.
3002         * spu-linux-nat.c: Update.
3003         * x86-linux-nat.c: Update.
3004         * xtensa-linux-nat.c: Update.
3005
3006 2018-07-03  Tom Tromey  <tom@tromey.com>
3007
3008         * common/ptid.c (ptid_get_pid): Remove.
3009         * common/ptid.h (ptid_get_pid): Don't declare.
3010         * aarch64-linux-nat.c: Update.
3011         * ada-lang.c: Update.
3012         * aix-thread.c: Update.
3013         * alpha-bsd-nat.c: Update.
3014         * amd64-fbsd-nat.c: Update.
3015         * amd64-linux-nat.c: Update.
3016         * arm-linux-nat.c: Update.
3017         * arm-nbsd-nat.c: Update.
3018         * auxv.c: Update.
3019         * break-catch-syscall.c: Update.
3020         * breakpoint.c: Update.
3021         * bsd-uthread.c: Update.
3022         * corelow.c: Update.
3023         * ctf.c: Update.
3024         * darwin-nat.c: Update.
3025         * fbsd-nat.c: Update.
3026         * fbsd-tdep.c: Update.
3027         * gcore.c: Update.
3028         * gnu-nat.c: Update.
3029         * hppa-nbsd-nat.c: Update.
3030         * hppa-obsd-nat.c: Update.
3031         * i386-fbsd-nat.c: Update.
3032         * ia64-linux-nat.c: Update.
3033         * inf-ptrace.c: Update.
3034         * infcmd.c: Update.
3035         * inferior.c: Update.
3036         * inferior.h: Update.
3037         * inflow.c: Update.
3038         * infrun.c: Update.
3039         * linux-fork.c: Update.
3040         * linux-nat.c: Update.
3041         * linux-tdep.c: Update.
3042         * linux-thread-db.c: Update.
3043         * m68k-bsd-nat.c: Update.
3044         * mi/mi-interp.c: Update.
3045         * mi/mi-main.c: Update.
3046         * mips-linux-nat.c: Update.
3047         * mips-nbsd-nat.c: Update.
3048         * mips64-obsd-nat.c: Update.
3049         * nat/aarch64-linux-hw-point.c: Update.
3050         * nat/aarch64-linux.c: Update.
3051         * nat/linux-btrace.c: Update.
3052         * nat/linux-osdata.c: Update.
3053         * nat/linux-procfs.c: Update.
3054         * nat/x86-linux-dregs.c: Update.
3055         * nto-procfs.c: Update.
3056         * obsd-nat.c: Update.
3057         * ppc-linux-nat.c: Update.
3058         * ppc-nbsd-nat.c: Update.
3059         * ppc-obsd-nat.c: Update.
3060         * proc-service.c: Update.
3061         * procfs.c: Update.
3062         * python/py-inferior.c: Update.
3063         * python/py-infthread.c: Update.
3064         * ravenscar-thread.c: Update.
3065         * record.c: Update.
3066         * remote-sim.c: Update.
3067         * remote.c: Update.
3068         * rs6000-nat.c: Update.
3069         * s390-linux-nat.c: Update.
3070         * sh-nbsd-nat.c: Update.
3071         * sol-thread.c: Update.
3072         * sparc-nat.c: Update.
3073         * sparc64-tdep.c: Update.
3074         * spu-linux-nat.c: Update.
3075         * spu-tdep.c: Update.
3076         * target-debug.h: Update.
3077         * target.c: Update.
3078         * thread.c: Update.
3079         * tid-parse.c: Update.
3080         * tracefile-tfile.c: Update.
3081         * vax-bsd-nat.c: Update.
3082         * windows-nat.c: Update.
3083         * x86-linux-nat.c: Update.
3084         * x86-nat.c: Update.
3085
3086 2018-07-03  Tom Tromey  <tom@tromey.com>
3087
3088         * common/ptid.c (pid_to_ptid): Remove.
3089         * common/ptid.h (pid_to_ptid): Don't declare.
3090         * aix-thread.c: Update.
3091         * arm-linux-nat.c: Update.
3092         * common/ptid.c: Update.
3093         * common/ptid.h: Update.
3094         * corelow.c: Update.
3095         * ctf.c: Update.
3096         * darwin-nat.c: Update.
3097         * fbsd-nat.c: Update.
3098         * fork-child.c: Update.
3099         * gnu-nat.c: Update.
3100         * go32-nat.c: Update.
3101         * inf-ptrace.c: Update.
3102         * infcmd.c: Update.
3103         * inferior.c: Update.
3104         * infrun.c: Update.
3105         * linux-fork.c: Update.
3106         * linux-nat.c: Update.
3107         * nat/aarch64-linux-hw-point.c: Update.
3108         * nat/fork-inferior.c: Update.
3109         * nat/x86-linux-dregs.c: Update.
3110         * nto-procfs.c: Update.
3111         * obsd-nat.c: Update.
3112         * procfs.c: Update.
3113         * progspace.c: Update.
3114         * remote.c: Update.
3115         * rs6000-nat.c: Update.
3116         * s390-linux-nat.c: Update.
3117         * sol-thread.c: Update.
3118         * spu-linux-nat.c: Update.
3119         * target.c: Update.
3120         * top.c: Update.
3121         * tracefile-tfile.c: Update.
3122         * windows-nat.c: Update.
3123
3124 2018-07-03  Tom Tromey  <tom@tromey.com>
3125
3126         * common/ptid.h (ptid_build): Don't declare.
3127         * common/ptid.c (ptid_build): Remove.
3128         * aix-thread.c: Update.
3129         * bsd-kvm.c: Update.
3130         * bsd-uthread.c: Update.
3131         * common/agent.c: Update.
3132         * common/ptid.c: Update.
3133         * common/ptid.h: Update.
3134         * corelow.c: Update.
3135         * darwin-nat.c: Update.
3136         * fbsd-nat.c: Update.
3137         * gnu-nat.c: Update.
3138         * linux-fork.c: Update.
3139         * linux-nat.c: Update.
3140         * linux-thread-db.c: Update.
3141         * nat/linux-osdata.c: Update.
3142         * nat/linux-procfs.c: Update.
3143         * nto-procfs.c: Update.
3144         * obsd-nat.c: Update.
3145         * proc-service.c: Update.
3146         * procfs.c: Update.
3147         * ravenscar-thread.c: Update.
3148         * remote-sim.c: Update.
3149         * remote.c: Update.
3150         * sol-thread.c: Update.
3151         * target.c: Update.
3152         * windows-nat.c: Update.
3153
3154 2018-07-03  Tom Tromey  <tom@tromey.com>
3155
3156         * infrun.c (follow_exec): Use exit_inferior_silent.
3157         * inferior.c (exit_inferior_num_silent): Remove.
3158         * inferior.h (exit_inferior_num_silent): Don't declare.
3159
3160 2018-07-03  Tom Tromey  <tom@tromey.com>
3161
3162         PR cli/23340:
3163         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3164         inferior_ptid on error.
3165
3166 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3167             Simon Marchi  <simon.marchi@polymtl.ca>
3168
3169         PR tdep/8282
3170         * disasm.h (gdb_disassembler): Add
3171         `m_disassembler_options_holder'. member
3172         * disasm.c (get_all_disassembler_options): New function.
3173         (gdb_disassembler::gdb_disassembler): Use it.
3174         (gdb_buffered_insn_length_init_dis): Likewise.
3175         (gdb_buffered_insn_length): Adjust accordingly.
3176         (set_disassembler_options): Handle options with arguments.
3177         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3178         line if showing options with descriptions.
3179         (disassembler_options_completer): Adapt to using the
3180         `disasm_options_and_args_t' structure.
3181         * mips-tdep.c (mips_disassembler_options): New variable.
3182         (mips_disassembler_options_o32): Likewise.
3183         (mips_disassembler_options_n32): Likewise.
3184         (mips_disassembler_options_n64): Likewise.
3185         (gdb_print_insn_mips): Don't set `disassembler_options'.
3186         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3187         functions.
3188         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3189         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3190         `gdbarch_disassembler_options_implicit' and
3191         `gdbarch_valid_disassembler_options'.
3192         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3193         `disasm_options_and_args_t' structure.
3194         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3195         method.
3196         (valid_disassembler_options): Switch from `disasm_options_t' to
3197         the `disasm_options_and_args_t' structure.
3198         * NEWS: Document `set disassembler-options' support for the MIPS
3199         target.
3200         * gdbarch.h: Regenerate.
3201         * gdbarch.c: Regenerate.
3202
3203 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3204
3205         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3206
3207 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3208
3209         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3210         parameter in call to amd64_target_description.
3211         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3212         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3213         (amd64fbsd_init_abi): Likewise.
3214         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3215         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3216         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3217         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3218
3219 2018-06-29  Pedro Alves  <palves@redhat.com>
3220
3221         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3222         "segments" parameter.
3223         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3224         (_initialize_amd64_tdep): Update call to
3225         amd64_create_target_description.
3226         (amd64_target_description): Add "segments" parameter.  Adjust
3227         the implementation to use it.
3228         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3229         call to amd64_create_target_description.
3230         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3231         * gdb/arch/amd64.h (amd64_create_target_description): Add
3232         "segments" register.
3233         * gdb/arch/amd64.c (amd64_create_target_description): Add
3234         "segments" parameter.  Call create_feature_i386_64bit_segments
3235         only if SEGMENTS is true.
3236         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3237         call to amd64_create_target_description.
3238
3239 2018-06-29  Pedro Alves  <palves@redhat.com>
3240
3241         * thread.c (thread_target_id_str): New, factored out from ...
3242         (print_thread_info_1): ... here.  Use it to compute the max
3243         "Target Id" column width.
3244
3245 2018-06-29  Pedro Alves  <palves@redhat.com>
3246
3247         * remote.c (remote_target::extra_thread_info): Delete
3248         'display_buf' and 'n' locals.  from the cache, regardless of
3249         packet mechanims is in use.  Use cache for qThreadExtra and qP
3250         methods too.
3251
3252 2018-06-29  Pedro Alves  <palves@redhat.com>
3253
3254         * blockframe.c (find_pc_sect_containing_function): New function.
3255         * breakpoint.c (print_breakpoint_location): Don't call
3256         find_pc_sect_function.
3257         * linespec.c (create_sals_line_offset): Record the location's
3258         symbol in the sal.
3259         * linespec.c (convert_address_location_to_sals): Fill in sal's
3260         symbol with find_pc_sect_containing_function.
3261         * symtab.c (find_function_start_sal): Rename to ...
3262         (find_function_start_sal_1): ... this.
3263         (find_function_start_sal): Reimplement as wrapper around
3264         find_function_start_sal_1, and use
3265         find_pc_sect_containing_function to fill in the sal's symbol.
3266         (find_function_start_sal(symbol*, bool)): Adjust.
3267         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3268         comments.
3269         (find_pc_sect_containing_function): Declare.
3270
3271 2018-06-29  Pedro Alves  <palves@redhat.com>
3272
3273         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3274         true if the the location has no symbol.
3275
3276 2018-06-28  Tom Tromey  <tom@tromey.com>
3277
3278         * NEWS: Mention --enable-codesign.
3279         * silent-rules.mk (ECHO_SIGN): New variable.
3280         * configure.ac: Add --enable-codesign.
3281         * configure: Rebuild.
3282         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3283         (gdb$(EXEEXT)): Optionally invoke codesign.
3284
3285 2018-06-28  Pedro Alves  <palves@redhat.com>
3286
3287         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3288         comments.
3289         (switch_to_thread_no_regs): Adjust comment.
3290         * infcmd.c (stop_pc): Delete.
3291         (post_create_inferior, info_program_command): Replace references
3292         to stop_pc with references to thread_info->suspend.stop_pc.
3293         * inferior.h (stop_pc): Delete declaration.
3294         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3295         (handle_inferior_event_1, handle_signal_stop)
3296         (process_event_stop_test, keep_going_stepped_thread)
3297         (handle_step_into_function, handle_step_into_function_backward)
3298         (print_stop_location): Replace references to stop_pc with
3299         references to thread_info->suspend.stop_pc.
3300         (struct infcall_suspend_state) <stop_pc>: Delete field.
3301         (save_infcall_suspend_state, restore_infcall_suspend_state):
3302         Remove references to inf_stat->stop_pc.
3303         * linux-fork.c (fork_load_infrun_state): Likewise.
3304         * record-btrace.c (record_btrace_set_replay): Likewise.
3305         * record-full.c (record_full_goto_entry): Likewise.
3306         * remote.c (print_one_stopped_thread): Likewise.
3307         * target.c (target_resume): Extend comment.
3308         * thread.c (set_executing_thread): New.
3309         (set_executing): Use it.
3310         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3311         Remove references to stop_pc.
3312
3313 2018-06-28  Pedro Alves  <palves@redhat.com>
3314
3315         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3316         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3317
3318 2018-06-28  Tom Tromey  <tom@tromey.com>
3319
3320         * coffread.c (coff_symfile_finish): Update.
3321         * xcoffread.c (xcoff_symfile_finish): Update.
3322         * elfread.c (elf_symfile_finish): Update.
3323         * symfile.h (dwarf2_free_objfile): Don't declare.
3324         * dwarf2read.c (_initialize_dwarf2_read): Use
3325         register_objfile_data_with_cleanup.
3326         (dwarf2_free_objfile): Now static.  Change signature.
3327
3328 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3329
3330         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3331         option "-o" to add-symbol-file-load to add an offset to each
3332         section's load address.
3333         * symfile.c (set_objfile_default_section_offset): New function.
3334
3335 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3336
3337         * symfile.c (add_symbol_file_command): Make sure that sections
3338         with the same name are sorted in the same order.
3339
3340 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3341
3342         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3343         require the second argument.  If omitted, load sections at the
3344         addresses specified in the file.
3345
3346 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3347
3348         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3349         (_initialize_symfile): Add option "-o" to symbol-file to add an
3350         offset to each section of the symbol file.
3351
3352 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3353
3354         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3355
3356 2018-06-27  Tom Tromey  <tom@tromey.com>
3357
3358         * stack.c (_initialize_stack): Update "func" help text.
3359
3360 2018-06-27  Tom Tromey  <tom@tromey.com>
3361
3362         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3363         std::vector.
3364         (unwind_infopy_str, pyuw_create_unwind_info)
3365         (unwind_infopy_add_saved_register, pyuw_sniffer)
3366         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3367         Update.
3368         (struct saved_reg): Add constructor.
3369         <value>: Now a gdbpy_ref<>.
3370
3371 2018-06-27  Tom Tromey  <tom@tromey.com>
3372
3373         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3374
3375 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3376
3377         * gdb-gdb.py.in: Format using autopep8.
3378
3379 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3380
3381         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3382         (type_lookup_function): Recognize CORE_ADDR values.
3383
3384 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3385
3386         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3387         print tag_name.
3388
3389 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3390
3391         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3392         <__lt__>: Add.
3393
3394 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3395
3396         * gdb-gdb.py: Move to...
3397         * gdb-gdb.py.in: ... here.
3398         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3399         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3400         dependencies.
3401         (distclean): Remove gdb-gdb.py when cleaning.
3402         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3403         * configure: Re-generate.
3404
3405 2018-06-27  Pedro Alves  <palves@redhat.com>
3406
3407         * proc-service.c (get_ps_regcache): New.
3408         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3409         (ps_lsetfpregs): Use it.
3410
3411 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3412
3413         PR gdb/21695
3414         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3415         (dwarf_decode_lines_1): Adjust.
3416
3417 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3418
3419         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3420         override.
3421         <info_proc>: Likewise.
3422
3423 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3424
3425         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3426         to windows_fetch_one_register, and only handle the case of
3427         fetching one register.  Move the code that reloads the context
3428         and iterates over all registers if R is negative to...
3429         (windows_nat_target::fetch_registers): ... here.
3430         (do_windows_store_inferior_registers): Rename to
3431         windows_store_one_register, and only handle the case of storing
3432         one register.  Move the code that handles the case where r is
3433         negative to...
3434         (windows_nat_target::store_registers) ... here.
3435
3436 2018-06-26  Tom Tromey  <tom@tromey.com>
3437
3438         PR rust/22574:
3439         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3440         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3441         Update.
3442         (rust_internal_print_type): Add podata parameter.
3443         (rust_print_type): Update.
3444
3445 2018-06-26  Tom Tromey  <tom@tromey.com>
3446
3447         * typeprint.h (struct print_offset_data) <update, finish,
3448         maybe_print_hole>: New methods.
3449         <indentation>: New constant.
3450         * typeprint.c (print_offset_data::indentation): Define.
3451         (print_offset_data::maybe_print_hole, print_offset_data::update)
3452         (print_offset_data::finish): Move from c-typeprint.c and rename.
3453         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3454         (print_spaces_filtered_with_print_options): Update.
3455         (c_print_type_union_field_offset, maybe_print_hole)
3456         (c_print_type_struct_field_offset): Move to typeprint.c and
3457         rename.
3458         (c_type_print_base_struct_union): Update.
3459
3460 2018-06-25  Pedro Alves  <palves@redhat.com>
3461
3462         * gdbthread.h (thread_info_ref, delete_thread)
3463         (delete_thread_silent, first_thread_of_inferior)
3464         (any_thread_of_inferior, switch_to_thread)
3465         (enable_thread_stack_temporaries)
3466         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3467         (get_last_thread_stack_temporary)
3468         (value_in_thread_stack_temporaries, can_access_registers_thread):
3469         Spell out "struct thread_info" instead of just "thread_info".
3470         * inferior.h (notice_new_inferior): Likewise.
3471
3472 2018-06-25  Pedro Alves  <palves@redhat.com>
3473
3474         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3475         pass thread_info pointer to delete_thread.
3476         (windows_nat_target::detach): Pass inferior pointer to
3477         detach_inferior.
3478         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3479         delete_thread.
3480         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3481         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3482         and pass a thread_info pointer to delete_thread.
3483         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3484         pass thread_info pointer to delete_thread.
3485         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3486         delete_thread_silent call.
3487         * procfs.c (procfs_target::detach): Pass inferior pointer to
3488         detach_inferior.
3489         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3490         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3491         delete_thread_silent call.
3492         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3493         pass thread_info pointer to delete_thread.
3494         (windows_nat_target::detach): Pass inferior pointer to
3495         delete_inferior.
3496
3497 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3498
3499         * regcache.c (readable_regcache::read_part): Fix asserts.
3500         (reg_buffer::raw_collect_part): New function.
3501         (regcache::write_part): Fix asserts.
3502         (reg_buffer::raw_supply_part): New function.
3503         (regcache::transfer_regset_register): New helper function.
3504         (regcache::transfer_regset): Call new functions.
3505         (regcache_supply_regset): Use gdb_byte*.
3506         (regcache::supply_regset): Likewise.
3507         (regcache_collect_regset): Likewise.
3508         (regcache::collect_regset): Likewise.
3509         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3510         (reg_buffer::raw_supply_part): Likewise.
3511         (regcache::transfer_regset_register): Likewise.
3512         (regcache::transfer_regset): Use gdb_byte*.
3513
3514 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3515
3516         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3517
3518 2018-06-21  Pedro Alves  <palves@redhat.com>
3519
3520         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3521         instead of a ptid_t.  All callers adjusted.
3522         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3523         adjusted.
3524         (print_ada_task_info, display_current_task_id, task_command_1):
3525         Adjust.
3526         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3527         inferior_thread.
3528         (breakpoint_kind): Adjust.
3529         (remove_breakpoints_pid): Rename to ...
3530         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3531         pointer.  All callers adjusted.
3532         (bpstat_clear_actions): Use inferior_thread.
3533         (get_bpstat_thread): New.
3534         (bpstat_do_actions): Use it.
3535         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3536         to take a thread_info pointer.  All callers adjusted.
3537         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3538         (breakpoint_re_set_thread): Use inferior_thread.
3539         * breakpoint.h (struct inferior): Forward declare.
3540         (bpstat_stop_status): Update.
3541         (remove_breakpoints_pid): Delete.
3542         (remove_breakpoints_inf): New.
3543         * bsd-uthread.c (bsd_uthread_target::wait)
3544         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3545         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3546         (maint_btrace_packet_history_cmd)
3547         (maint_btrace_clear_packet_history_cmd): Adjust.
3548         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3549         inferior_thread.
3550         * cli/cli-interp.c: Include "inferior.h".
3551         * common/refcounted-object.h (struct
3552         refcounted_object_ref_policy): New.
3553         * compile/compile-object-load.c: Include gdbthread.h.
3554         (store_regs): Use inferior_thread.
3555         * corelow.c (core_target::close): Use current_inferior.
3556         (core_target_open): Adjust to use first_thread_of_inferior and use
3557         the current inferior.
3558         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3559         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3560         <thread>: ... this new field.  All references adjusted.
3561         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3562         Take a thread_info pointer instead of a ptid_t.
3563         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3564         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3565         thread_info pointer instead of a ptid_t.
3566         * elfread.c: Include "inferior.h".
3567         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3568         Use inferior_thread.
3569         * eval.c (evaluate_subexp): Likewise.
3570         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3571         inferior_thread.
3572         * gdb_proc_service.h (struct thread_info): Forward declare.
3573         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3574         <thread>: ... this new field.  All references adjusted.
3575         * gdbarch.h, gdbarch.c: Regenerate.
3576         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3577         'thread' parameter.  All implementations and callers adjusted.
3578         * gdbthread.h (thread_info) <set_running>: New method.
3579         (delete_thread, delete_thread_silent): Take a thread_info pointer
3580         instead of a ptid.
3581         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3582         (first_thread_of_process): Delete, replaced by ...
3583         (first_thread_of_inferior): ... this new function.  All callers
3584         adjusted.
3585         (any_live_thread_of_process): Delete, replaced by ...
3586         (any_live_thread_of_inferior): ... this new function.  All callers
3587         adjusted.
3588         (switch_to_thread, switch_to_no_thread): Declare.
3589         (is_executing): Delete.
3590         (enable_thread_stack_temporaries): Update comment.
3591         <enable_thread_stack_temporaries>: Take a thread_info pointer
3592         instead of a ptid_t.  Incref the thread.
3593         <~enable_thread_stack_temporaries>: Decref the thread.
3594         <m_ptid>: Delete
3595         <m_thr>: New.
3596         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3597         (get_last_thread_stack_temporary)
3598         (value_in_thread_stack_temporaries, can_access_registers_thread):
3599         Take a thread_info pointer instead of a ptid_t.  All callers
3600         adjusted.
3601         * infcall.c (get_call_return_value): Use inferior_thread.
3602         (run_inferior_call): Work with thread pointers instead of ptid_t.
3603         (call_function_by_hand_dummy): Work with thread pointers instead
3604         of ptid_t.  Use thread_info_ref.
3605         * infcmd.c (proceed_thread_callback): Access thread's state
3606         directly.
3607         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3608         access thread's state directly.
3609         (continue_command): Use inferior_thread.
3610         (info_program_command): Use find_thread_ptid and access thread
3611         state directly.
3612         (proceed_after_attach_callback): Use thread state directly.
3613         (notice_new_inferior): Take a thread_info pointer instead of a
3614         ptid_t.  All callers adjusted.
3615         (exit_inferior): Take an inferior pointer instead of a pid.  All
3616         callers adjusted.
3617         (exit_inferior_silent): New.
3618         (detach_inferior): Delete.
3619         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3620         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3621         (detach_inferior_command, kill_inferior_command): Use
3622         find_inferior_id instead of valid_gdb_inferior_id and
3623         gdb_inferior_id_to_pid.
3624         (inferior_command): Use inferior and thread pointers.
3625         * inferior.h (struct thread_info): Forward declare.
3626         (notice_new_inferior): Take a thread_info pointer instead of a
3627         ptid_t.  All callers adjusted.
3628         (detach_inferior): Delete declaration.
3629         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3630         instead of a pid.  All callers adjusted.
3631         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3632         (valid_gdb_inferior_id): Delete.
3633         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3634         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3635         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3636         ...
3637         <inf>: ... this new field.
3638         <step_ptid>: Delete, replaced by ...
3639         <step_thread>: ... this new field.
3640         (get_displaced_stepping_state): Take an inferior pointer instead
3641         of a pid.  All callers adjusted.
3642         (displaced_step_in_progress_any_inferior): Adjust.
3643         (displaced_step_in_progress_thread): Take a thread pointer instead
3644         of a ptid_t.  All callers adjusted.
3645         (displaced_step_in_progress, add_displaced_stepping_state): Take
3646         an inferior pointer instead of a pid.  All callers adjusted.
3647         (get_displaced_step_closure_by_addr): Adjust.
3648         (remove_displaced_stepping_state): Take an inferior pointer
3649         instead of a pid.  All callers adjusted.
3650         (displaced_step_prepare_throw, displaced_step_prepare)
3651         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3652         All callers adjusted.
3653         (start_step_over): Adjust.
3654         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3655         displaced step queue.
3656         (do_target_resume): Adjust.
3657         (fetch_inferior_event): Use inferior_thread.
3658         (context_switch, get_inferior_stop_soon): Take an
3659         execution_control_state pointer instead of a ptid_t.  All callers
3660         adjusted.
3661         (switch_to_thread_cleanup): Delete.
3662         (stop_all_threads): Use scoped_restore_current_thread.
3663         * inline-frame.c: Include "gdbthread.h".
3664         (inline_state) <inline_state>: Take a thread pointer instead of a
3665         ptid_t.  All callers adjusted.
3666         <ptid>: Delete, replaced by ...
3667         <thread>: ... this new field.
3668         (find_inline_frame_state): Take a thread pointer instead of a
3669         ptid_t.  All callers adjusted.
3670         (skip_inline_frames, step_into_inline_frame)
3671         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3672         pointer instead of a ptid_t.  All callers adjusted.
3673         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3674         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3675         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3676         pointers directly.
3677         * linux-nat.c (get_detach_signal): Likewise.
3678         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3679         (thread_db_notice_clone): Adjust.
3680         (thread_db_find_new_threads_silently)
3681         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3682         a thread pointer instead of a ptid_t.  All callers adjusted.
3683         * mi/mi-cmd-var.c: Include "inferior.h".
3684         (mi_cmd_var_update_iter): Update to use thread pointers.
3685         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3686         inferior directly.
3687         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3688         out to ...
3689         (mi_output_running): ... this new function.
3690         (mi_on_resume_1): Adjust to use it.
3691         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3692         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3693         directly.
3694         (interrupt_thread_callback): : Adjust to use thread and inferior
3695         pointers.
3696         * proc-service.c: Include "gdbthread.h".
3697         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3698         * progspace-and-thread.c: Include "inferior.h".
3699         * progspace.c: Include "inferior.h".
3700         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3701         hold a reference to an inferior_object.
3702         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3703         inferior_thread.
3704         * python/py-inferior.c (struct inferior_object): Give the type a
3705         tag name instead of a typedef.
3706         (python_on_normal_stop): No need to check if the current thread is
3707         listed.
3708         (inferior_to_inferior_object): Change return type to
3709         inferior_object.  All callers adjusted.
3710         (find_thread_object): Delete, bits factored out to ...
3711         (thread_to_thread_object): ... this new function.
3712         * python/py-infthread.c (create_thread_object): Use
3713         inferior_to_inferior_object.
3714         (thpy_is_stopped): Use thread pointer directly.
3715         (gdbpy_selected_thread): Use inferior_thread.
3716         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3717         field, replaced with ...
3718         <thread>: ... this new field.  All users adjusted.
3719         (btpy_insn_or_gap_new): Drop const.
3720         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3721         callers adjusted.
3722         * python/py-record.c: Include "gdbthread.h".
3723         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3724         a ptid_t.  All callers adjusted.
3725         (gdbpy_current_recording): Use inferior_thread.
3726         * python/py-record.h (recpy_record_object) <ptid>: Delete
3727         field, replaced with ...
3728         <thread>: ... this new field.  All users adjusted.
3729         (recpy_element_object) <ptid>: Delete
3730         field, replaced with ...
3731         <thread>: ... this new field.  All users adjusted.
3732         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3733         a ptid_t.  All callers adjusted.
3734         * python/py-threadevent.c: Include "gdbthread.h".
3735         (get_event_thread): Use thread_to_thread_object.
3736         * python/python-internal.h (struct inferior_object): Forward
3737         declare.
3738         (find_thread_object, find_inferior_object): Delete declarations.
3739         (thread_to_thread_object, inferior_to_inferior_object): New
3740         declarations.
3741         * record-btrace.c: Include "inferior.h".
3742         (require_btrace_thread): Use inferior_thread.
3743         (record_btrace_frame_sniffer)
3744         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3745         (get_thread_current_frame): Use scoped_restore_current_thread and
3746         switch_to_thread.
3747         (get_thread_current_frame): Use thread pointer directly.
3748         (record_btrace_replay_at_breakpoint): Use thread's inferior
3749         pointer directly.
3750         * record-full.c: Include "inferior.h".
3751         * regcache.c: Include "gdbthread.h".
3752         (get_thread_arch_regcache): Use the inferior's address space
3753         directly.
3754         (get_thread_regcache, registers_changed_thread): New.
3755         * regcache.h (get_thread_regcache(thread_info *thread)): New
3756         overload.
3757         (registers_changed_thread): New.
3758         (remote_target) <remote_detach_1>: Swap order of parameters.
3759         (remote_add_thread): <remote_add_thread>: Return the new thread.
3760         (get_remote_thread_info(ptid_t)): New overload.
3761         (remote_target::remote_notice_new_inferior): Use thread pointers
3762         directly.
3763         (remote_target::process_initial_stop_replies): Use
3764         thread_info::set_running.
3765         (remote_target::remote_detach_1, remote_target::detach)
3766         (extended_remote_target::detach): Adjust.
3767         * stack.c (frame_show_address): Use inferior_thread.
3768         * target-debug.h (target_debug_print_thread_info_pp): New.
3769         * target-delegates.c: Regenerate.
3770         * target.c (default_thread_address_space): Delete.
3771         (memory_xfer_partial_1): Use current_inferior.
3772         (target_detach): Use current_inferior.
3773         (target_thread_address_space): Delete.
3774         (generic_mourn_inferior): Use current_inferior.
3775         * target.h (struct target_ops) <thread_address_space>: Delete.
3776         (target_thread_address_space): Delete.
3777         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3778         pointers directly.
3779         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3780         thread pointer instead of a ptid_t.  Adjust all callers.
3781         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3782         (first_thread_of_process): Delete, replaced by ...
3783         (first_thread_of_inferior): ... this new function.  All callers
3784         adjusted.
3785         (any_thread_of_process): Rename to ...
3786         (any_thread_of_inferior): ... this, and take an inferior pointer.
3787         (any_live_thread_of_process): Rename to ...
3788         (any_live_thread_of_inferior): ... this, and take an inferior
3789         pointer.
3790         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3791         (value_in_thread_stack_temporaries)
3792         (get_last_thread_stack_temporary): Take a thread pointer instead
3793         of a ptid_t.  Adjust all callers.
3794         (thread_info::set_running): New.
3795         (validate_registers_access): Use inferior_thread.
3796         (can_access_registers_ptid): Rename to ...
3797         (can_access_registers_thread): ... this, and take a thread
3798         pointer.
3799         (print_thread_info_1): Adjust to compare thread pointers instead
3800         of ptids.
3801         (switch_to_no_thread, switch_to_thread): Make extern.
3802         (scoped_restore_current_thread::~scoped_restore_current_thread):
3803         Use m_thread pointer directly.
3804         (scoped_restore_current_thread::scoped_restore_current_thread):
3805         Use inferior_thread.
3806         (thread_command): Use thread pointer directly.
3807         (thread_num_make_value_helper): Use inferior_thread.
3808         * top.c (execute_command): Use inferior_thread.
3809         * tui/tui-interp.c: Include "inferior.h".
3810         * varobj.c (varobj_create): Use inferior_thread.
3811         (value_of_root_1): Use find_thread_global_id instead of
3812         global_thread_id_to_ptid.
3813
3814 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3815
3816         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3817         possible.
3818         (regcache::write_part): Likewise.
3819         (readable_regcache::cooked_read_part): Update comment.
3820         (readable_regcache::cooked_write_part): Likewise.
3821         * regcache.h: (readable_regcache::read_part): Likewise.
3822         (regcache::write_part): Likewise.
3823
3824 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3825             Dirk Schubert  <dirk.schubert@arm.com>
3826
3827         * aarch64-linux-nat.c (post_attach): New.
3828         (aarch64_linux_nat_target::post_attach): Override post_attach to
3829         record the number of hardware debug registers.
3830
3831 2018-06-20  Tom Tromey  <tom@tromey.com>
3832
3833         * python/py-param.c (add_setshow_generic): Make parameters const.
3834         (parmpy_init): Update.
3835
3836 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3837
3838         * regcache.h (regcache_cooked_read_ftype): Rename to...
3839         (register_read_ftype): ...this, change type to function_view.
3840         (class reg_buffer) <save>: Remove src parameter.
3841         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3842         parameter non-const in first overload.  Remove src parameter in
3843         second overload.
3844         * regcache.c (do_cooked_read): Remove.
3845         (readonly_detached_regcache::readonly_detached_regcache): Make
3846         parameter non-const, adjust call to other constructor.
3847         (reg_buffer::save): Remove src parameter.
3848         * frame.c (do_frame_register_read): Remove.
3849         (frame_save_as_regcache): Use lambda function.
3850         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3851         parameter to ppu2spu_data *.
3852         (ppu2spu_sniffer): Use lambda function.
3853
3854 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3855
3856         * record-full.c (record_full_target::insert_breakpoint): Remove
3857         "struct" keyword, add const.
3858
3859 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3860
3861         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3862         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3863         * configure.ac: Remove AC_PREREQ, add missing quoting.
3864         * gnulib/configure.ac: Modernize usage of
3865         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3866         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3867         (AUTOMAKE_VERSION): Bump to 1.15.1.
3868         * configure: Re-generate.
3869         * config.in: Re-generate.
3870         * aclocal.m4: Re-generate.
3871         * gnulib/aclocal.m4: Re-generate.
3872         * gnulib/config.in: Re-generate.
3873         * gnulib/configure: Re-generate.
3874         * gnulib/import/Makefile.in: Re-generate.
3875
3876 2018-06-19  Pedro Alves  <palves@redhat.com>
3877
3878         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3879         (lookup_minimal_symbol_by_pc_section): ... here with
3880         gdb_assert_not_reached added.
3881
3882 2018-06-19  Pedro Alves  <palves@redhat.com>
3883
3884         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3885         parameter with a block parameter.  Compare location's block symbol
3886         with the frame's block instead of addresses.
3887         (skip_inline_frames): Pass the current block instead of the
3888         frame's address.  Break out as soon as we determine the frame
3889         should not be skipped.
3890
3891 2018-06-18  Tom Tromey  <tom@tromey.com>
3892
3893         * solib-aix.c (solib_aix_get_section_offsets): Return
3894         unique_xmalloc_ptr.
3895         (solib_aix_solib_create_inferior_hook): Update.
3896
3897 2018-06-18  Tom Tromey  <tom@tromey.com>
3898
3899         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3900
3901 2018-06-18  Tom Tromey  <tom@tromey.com>
3902
3903         * solib-frv.c (frv_relocate_main_executable): Use
3904         unique_xmalloc_ptr.
3905         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3906         unique_xmalloc_ptr.
3907
3908 2018-06-18  Tom Tromey  <tom@tromey.com>
3909
3910         * objfiles.h (inhibit_section_map_updates): Update.
3911         (resume_section_map_updates, resume_section_map_updates_cleanup):
3912         Remove.
3913         * solib-svr4.c (svr4_handle_solib_event): Update.
3914         * objfiles.c (inhibit_section_map_updates): Return
3915         scoped_restore_tmpl<int>.
3916         (resume_section_map_updates, resume_section_map_updates_cleanup):
3917         Remove.
3918
3919 2018-06-18  Tom Tromey  <tom@tromey.com>
3920
3921         * valprint.h (read_string): Update.
3922         * valprint.c (read_string): Change type of "buffer".
3923         (val_print_string): Update.
3924         * python/py-value.c (valpy_string): Update.
3925         * language.h (struct language_defn) <la_get_string>: Change
3926         type of "buffer".
3927         (default_get_string, c_get_string): Update.
3928         * language.c (default_get_string): Change type of "buffer".
3929         * guile/scm-value.c (gdbscm_value_to_string): Update.
3930         * c-lang.c (c_get_string): Change type of "buffer".
3931
3932 2018-06-18  Tom Tromey  <tom@tromey.com>
3933
3934         * ser-mingw.c (struct pipe_state_destroyer): New.
3935         (pipe_state_up): New typedef.
3936         (cleanup_pipe_state): Remove.
3937         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
3938
3939 2018-06-18  Tom Tromey  <tom@tromey.com>
3940
3941         * rust-lang.h (rust_yyerror): Don't declare.
3942         * rust-lang.c (rust_language_defn): Update.
3943         * rust-exp.y (yyerror): Now static.
3944         * parse.c (parse_exp_in_context_1): Update.
3945         * p-lang.h (p_yyerror): Don't declare.
3946         * p-lang.c (p_language_defn): Update.
3947         * p-exp.y (yyerror): Now static.
3948         * opencl-lang.c (opencl_language_defn): Update.
3949         * objc-lang.c (objc_language_defn): Update.
3950         * m2-lang.h (m2_yyerror): Don't declare.
3951         * m2-lang.c (m2_language_defn): Update.
3952         * m2-exp.y (yyerror): Now static.
3953         * language.h (struct language_defn) <la_error>: Remove.
3954         * language.c (unk_lang_error): Remove.
3955         (unknown_language_defn, auto_language_defn): Remove.
3956         * go-lang.h (go_yyerror): Don't declare.
3957         * go-lang.c (go_language_defn): Update.
3958         * go-exp.y (yyerror): Now static.
3959         * f-lang.h (f_yyerror): Don't declare.
3960         * f-lang.c (f_language_defn): Update.
3961         * f-exp.y (yyerror): Now static.
3962         * d-lang.h (d_yyerror): Don't declare.
3963         * d-lang.c (d_language_defn): Update.
3964         * d-exp.y (yyerror): Now static.
3965         * c-lang.h (c_yyerror): Don't declare.
3966         * c-lang.c (c_language_defn, cplus_language_defn)
3967         (asm_language_defn, minimal_language_defn): Update.
3968         * c-exp.y (yyerror): Now static.
3969         * ada-lang.h (ada_yyerror): Don't declare.
3970         * ada-lang.c (ada_language_defn): Update.
3971         * ada-exp.y (yyerror): Now static.
3972
3973 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3974
3975         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3976         (store_sveregs_to_thread): Likewise.
3977         (aarch64_linux_fetch_inferior_registers): Check for SVE.
3978         (aarch64_linux_store_inferior_registers): Likewise.
3979         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3980         function.
3981         (aarch64_sve_regs_copy_to_regcache): Likewise.
3982         (aarch64_sve_regs_copy_from_regcache): Likewise.
3983         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3984         declaration.
3985         (aarch64_sve_regs_copy_to_regcache): Likewise.
3986         (aarch64_sve_regs_copy_from_regcache): Likewise.
3987         (sve_context): Structure from Linux headers.
3988         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3989         (SVE_SIG_ZREG_SIZE): Likewise.
3990         (SVE_SIG_PREG_SIZE): Likewise.
3991         (SVE_SIG_FFR_SIZE): Likewise.
3992         (SVE_SIG_REGS_OFFSET): Likewise.
3993         (SVE_SIG_ZREGS_OFFSET): Likewise.
3994         (SVE_SIG_ZREG_OFFSET): Likewise.
3995         (SVE_SIG_ZREGS_SIZE): Likewise.
3996         (SVE_SIG_PREGS_OFFSET): Likewise.
3997         (SVE_SIG_PREG_OFFSET): Likewise.
3998         (SVE_SIG_PREGS_SIZE): Likewise.
3999         (SVE_SIG_FFR_OFFSET): Likewise.
4000         (SVE_SIG_REGS_SIZE): Likewise.
4001         (SVE_SIG_CONTEXT_SIZE): Likewise.
4002         (SVE_PT_REGS_MASK): Likewise.
4003         (SVE_PT_REGS_FPSIMD): Likewise.
4004         (SVE_PT_REGS_SVE): Likewise.
4005         (SVE_PT_VL_INHERIT): Likewise.
4006         (SVE_PT_VL_ONEXEC): Likewise.
4007         (SVE_PT_REGS_OFFSET): Likewise.
4008         (SVE_PT_FPSIMD_OFFSET): Likewise.
4009         (SVE_PT_FPSIMD_SIZE): Likewise.
4010         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4011         (SVE_PT_SVE_PREG_SIZE): Likewise.
4012         (SVE_PT_SVE_FFR_SIZE): Likewise.
4013         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4014         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4015         (__SVE_SIG_TO_PT): Likewise.
4016         (SVE_PT_SVE_OFFSET): Likewise.
4017         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4018         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4019         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4020         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4021         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4022         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4023         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4024         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4025         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4026         (SVE_PT_SVE_SIZE): Likewise.
4027         (SVE_PT_SIZE): Likewise.
4028         (HAS_SVE_STATE): New define.
4029
4030 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4031
4032         * nat/aarch64-sve-linux-sigcontext.h: New file.
4033         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4034         new files.
4035         (SVE_VQ_MIN): Likewise.
4036         (SVE_VQ_MAX): Likewise.
4037         (SVE_VL_MIN): Likewise.
4038         (SVE_VL_MAX): Likewise.
4039         (SVE_NUM_ZREGS): Likewise.
4040         (SVE_NUM_PREGS): Likewise.
4041         (sve_vl_valid): Likewise.
4042         (struct user_sve_header): Likewise.
4043
4044 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4045             Richard Bunt <Richard.Bunt@arm.com>
4046
4047         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4048         was requested by GDB.
4049
4050 2018-06-15  Tom de Vries  <tdevries@suse.de>
4051
4052         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4053
4054 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4055
4056         * gnulib/update-gnulib.sh: Print expected versions of
4057         autoconf/aclocal.
4058
4059 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4060
4061         * arch-utils.c (default_type_align): Use type_length_units.
4062         * gdbtypes.c (type_align): Use type_length_units.
4063
4064 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4065
4066         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4067         of 'define' command.
4068
4069 2018-06-14  Tom de Vries  <tdevries@suse.de>
4070
4071         PR cli/22573
4072         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4073         get_no_prettyformat_print_options.
4074
4075 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4076
4077         * sparc-nat.h: Include target.h.
4078         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4079         <fetch_registers>: Remove this argument in function call.
4080         <store_registers>: Remove this argument in function call, remove
4081         extra semicolon.
4082         <low_forget_process>: Call sparc64_forget_process instead of
4083         sparc_forget_process.
4084
4085 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4086
4087         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4088         (procfs_target::make_corefile_notes): Adjust to new
4089         target_read_alloc return type.
4090
4091 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4092             Stephen Roberts  <stephen.roberts@arm.com>
4093
4094         PR gdb/22882
4095         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4096         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4097         Move should_notify_stop local into more inner scope.
4098
4099 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4100             Stephen Roberts  <stephen.roberts@arm.com>
4101
4102         PR gdb/22882
4103         * infrun.c (resume_1): Add call to mark_async_event_handler.
4104
4105 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4106
4107         * infrun.c (do_target_wait): Change old version of $pc printed.
4108
4109 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4110
4111         * dwarf2read.c (read_index_from_section): Rename to...
4112         (read_gdb_index_from_section): ... this, update all callers.
4113         (dwarf2_read_index): Rename to...
4114         (dwarf2_read_gdb_index): ... this, update all callers.
4115
4116 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4117
4118         * gdb/hppa-linux-nat.c
4119         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4120         hppa_linux_nat_target::fetch_registers.
4121
4122 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4123
4124         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4125         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4126         (AARCH64_DWARF_SVE_FFR): Likewise.
4127         (AARCH64_DWARF_SVE_P0): Likewise.
4128         (AARCH64_DWARF_SVE_Z0): Likewise.
4129
4130 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4131
4132         * common/common-regcache.h (raw_compare): New function.
4133         * regcache.c (regcache::raw_compare): Likewise.
4134         * regcache.h (regcache::raw_compare): New declaration.
4135
4136 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4137
4138         * common/common-regcache.h (reg_buffer_common): New structure.
4139         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4140         (reg_buffer::raw_supply): Likewise.
4141         (reg_buffer::raw_supply_integer): Likewise.
4142         (reg_buffer::raw_supply_zeroed): Likewise.
4143         (reg_buffer::raw_collect): Likewise.
4144         (reg_buffer::raw_collect_integer): Likewise.
4145         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4146         (reg_buffer::raw_supply): Likewise.
4147         (reg_buffer::raw_supply_integer): Likewise.
4148         (reg_buffer::raw_supply_zeroed): Likewise.
4149         (reg_buffer::raw_collect): Likewise.
4150         (reg_buffer::raw_collect_integer): Likewise.
4151
4152 2018-06-10  Tom Tromey  <tom@tromey.com>
4153
4154         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4155         (class remote_state) <stop_reply_queue>: Now std::vector.
4156         (remote_state::~remote_state)
4157         (remote_target::stop_reply_queue_length): Update.
4158         (struct queue_iter_param, remove_child_of_pending_fork)
4159         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4160         (check_pending_event_prevents_wildcard_vcont_callback)
4161         (remove_stop_reply_for_inferior)
4162         (remove_stop_reply_of_remote_state)
4163         (remote_notif_remove_once_on_match)
4164         (stop_reply_match_ptid_and_ws)
4165         (remote_kill_child_of_pending_fork): Remove.
4166         (remote_target::remove_new_fork_children)
4167         (remote_target::check_pending_events_prevent_wildcard_vcont)
4168         (remote_target::discard_pending_stop_replies)
4169         (remote_target::discard_pending_stop_replies_in_queue)
4170         (remote_target::remote_notif_remove_queued_reply)
4171         (remote_target::queued_stop_reply)
4172         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4173         (remote_target::wait, remote_target::kill_new_fork_children)
4174         (remote_target::async): Update.
4175
4176 2018-06-10  Tom Tromey  <tom@tromey.com>
4177
4178         * record-full.c (record_full_arch_list_cleanups): Remove.
4179         (record_full_message): Use try/catch.
4180         (record_full_wait_cleanups): Remove.
4181         (record_full_wait_1): Use try/catch.
4182         (record_full_restore): Likewise.
4183
4184 2018-06-10  Tom Tromey  <tom@tromey.com>
4185
4186         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4187         declare VEC.  Add constructor.
4188         <in_target_beneath>: Now bool.
4189         (record_full_breakpoints): Now a std::vector, static.
4190         (record_full_sync_record_breakpoints)
4191         (record_full_init_record_breakpoints)
4192         (record_full_target::insert_breakpoint)
4193         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4194
4195 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4196
4197         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4198         * serial.c (serial_interface_lookup): Remove struct keyword.
4199
4200 2018-06-10  Tom Tromey  <tom@tromey.com>
4201
4202         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4203         method.
4204         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4205         a method.
4206         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4207         method.
4208         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4209         "beneath" as a method.
4210         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4211         Use "beneath" as a method.
4212
4213 2018-06-10  Tom Tromey  <tom@tromey.com>
4214
4215         * tracefile.c (struct trace_file_writer_deleter): New.
4216         <operator()>: Rename from trace_file_writer_xfree.
4217         (trace_file_writer_up): New typedef.
4218         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4219
4220 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4221
4222         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4223         <m_registers, m_register_status>: Change type to
4224         std::unique_ptr.
4225         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4226         XCNEWVEC.
4227
4228 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4229
4230         * common/common-regcache.h (enum register_status): Add
4231         underlying type "signed char".
4232         * regcache.h (reg_buffer) <m_register_status>: Change type to
4233         register_status *.
4234         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4235         register_status instead of signed char.
4236         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4237         (reg_buffer::get_register_status): Remove cast.
4238         (readable_regcache::raw_read): Remove cast.
4239         (readable_regcache::cooked_read): Remove cast.
4240
4241 2018-06-09  Tom Tromey  <tom@tromey.com>
4242
4243         * source.c (reverse_search_command, forward_search_command): Use
4244         scoped_fd.
4245
4246 2018-06-09  Tom Tromey  <tom@tromey.com>
4247
4248         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4249         (serial_ops_list): Now static, std::vector.
4250         (serial_interface_lookup, serial_add_interface): Update.
4251
4252 2018-06-09  Tom Tromey  <tom@tromey.com>
4253
4254         * dwarf2read.c (process_cu_includes): Update.
4255         (process_full_comp_unit): Update.
4256         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4257         std::vector.
4258
4259 2018-06-08  Paul Koning  <paul_koning@dell.com>
4260
4261         PR gdb/23252
4262
4263         * python/python.c (do_start_initialization):
4264         Avoid call to internal Python API.
4265         (init__gdb_module): New function.
4266
4267 2018-06-08  Gary Benson <gbenson@redhat.com>
4268
4269         * linux-thread-db.c (valprint.h): New include.
4270         (struct check_thread_db_info): New structure.
4271         (check_thread_db_on_load, tdb_testinfo): New static globals.
4272         (check_thread_db, check_thread_db_callback): New functions.
4273         (try_thread_db_load_1): Run integrity checks if requested.
4274         (maintenance_check_libthread_db): New function.
4275         (_initialize_thread_db): Register "maint check libthread-db"
4276         and "maint set/show check-libthread-db".
4277         * NEWS: Mention the above new commands.
4278
4279 2018-06-08  Tom Tromey  <tom@tromey.com>
4280
4281         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4282         now a method.
4283
4284 2018-06-08  Tom Tromey  <tom@tromey.com>
4285
4286         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4287
4288 2018-06-08  Tom Tromey  <tom@tromey.com>
4289
4290         * common/btrace-common.h (struct btrace_data): Add constructor,
4291         destructor, move assignment operator.
4292         <empty, clear, fini>: New methods.
4293         <format>: Initialize.
4294         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4295         (btrace_data_empty): Don't declare.
4296         * common/btrace-common.c (btrace_data_init): Remove.
4297         (btrace_data::fini): Rename from btrace_data_fini.
4298         (btrace_data::empty): Rename from btrace_data_empty.
4299         (btrace_data::clear): Rename from btrace_data_clear.  Return
4300         bool.
4301         * btrace.h (make_cleanup_btrace_data): Don't declare.
4302         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4303         (parse_xml_btrace): Update.
4304         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4305         (maint_btrace_clear_packet_history_cmd): Update.
4306
4307 2018-06-07  Pedro Alves  <palves@redhat.com>
4308
4309         * target.h (target_ops) <beneath>: Now a method.  All references
4310         updated.
4311         (class target_stack): New.
4312         * target.c (g_target_stack): New.
4313         (g_current_top_target): Delete.
4314         (current_top_target): Get the top target out of g_target_stack.
4315         (target_stack::push, target_stack::unpush): New.
4316         (push_target, unpush_target): Reimplement.
4317         (target_is_pushed): Reimplement in terms of g_target_stack.
4318         (target_ops::beneath, target_stack::find_beneath): New.
4319
4320 2018-06-07  Pedro Alves  <palves@redhat.com>
4321
4322         * target.h (find_target_beneath): Delete declaration.
4323         * target.c (find_target_beneath): Delete definition.
4324         * aix-thread.c: All callers of find_target_beneath adjusted to
4325         call target_ops::beneath instead.
4326         * bsd-uthread.c: Likewise.
4327         * linux-thread-db.c: Likewise.
4328         * ravenscar-thread.c: Likewise.
4329         * sol-thread.c: Likewise.
4330         * spu-multiarch.c: Likewise.
4331
4332 2018-06-07  Pedro Alves  <palves@redhat.com>
4333
4334         * target.h (target_ops) <beneath>: Now a method.  All references
4335         updated.
4336         (target_ops) <m_beneath>: New.
4337         * target.c (target_ops::beneath): New.
4338         * corelow.c: Adjust all references to target_ops::beneath.
4339         * linux-thread-db.c: Likewise.
4340         * make-target-delegates: Likewise.
4341         * record-btrace.c: Likewise.
4342         * record-full.c: Likewise.
4343         * remote.c: Likewise.
4344         * target.c: Likewise.
4345         * target-delegates.c: Regenerate.
4346
4347 2018-06-07  Pedro Alves  <palves@redhat.com>
4348
4349         * target.h (target_stack): Delete.
4350         (current_top_target): Declare function.
4351         * target.c (target_stack): Delete.
4352         (g_current_top_target): New.
4353         (current_top_target): New function.
4354         * auxv.c: Use current_top_target instead of target_stack
4355         throughout.
4356         * avr-tdep.c: Likewise.
4357         * breakpoint.c: Likewise.
4358         * corefile.c: Likewise.
4359         * elfread.c: Likewise.
4360         * eval.c: Likewise.
4361         * exceptions.c: Likewise.
4362         * frame.c: Likewise.
4363         * gdbarch-selftests.c: Likewise.
4364         * gnu-v3-abi.c: Likewise.
4365         * ia64-tdep.c: Likewise.
4366         * ia64-vms-tdep.c: Likewise.
4367         * infcall.c: Likewise.
4368         * infcmd.c: Likewise.
4369         * infrun.c: Likewise.
4370         * linespec.c: Likewise.
4371         * linux-tdep.c: Likewise.
4372         * minsyms.c: Likewise.
4373         * ppc-linux-nat.c: Likewise.
4374         * ppc-linux-tdep.c: Likewise.
4375         * procfs.c: Likewise.
4376         * regcache.c: Likewise.
4377         * remote.c: Likewise.
4378         * rs6000-tdep.c: Likewise.
4379         * s390-linux-nat.c: Likewise.
4380         * s390-tdep.c: Likewise.
4381         * solib-aix.c: Likewise.
4382         * solib-darwin.c: Likewise.
4383         * solib-dsbt.c: Likewise.
4384         * solib-spu.c: Likewise.
4385         * solib-svr4.c: Likewise.
4386         * solib-target.c: Likewise.
4387         * sparc-tdep.c: Likewise.
4388         * sparc64-tdep.c: Likewise.
4389         * spu-tdep.c: Likewise.
4390         * symfile.c: Likewise.
4391         * symtab.c: Likewise.
4392         * target-descriptions.c: Likewise.
4393         * target-memory.c: Likewise.
4394         * target.c: Likewise.
4395         * target.h: Likewise.
4396         * tracefile-tfile.c: Likewise.
4397         * tracepoint.c: Likewise.
4398         * valops.c: Likewise.
4399         * valprint.c: Likewise.
4400         * value.c: Likewise.
4401         * windows-tdep.c: Likewise.
4402         * mi/mi-main.c: Likewise.
4403
4404 2018-06-07  Tom Tromey  <tom@tromey.com>
4405
4406         * valprint.h (build_address_symbolic): Declare.
4407         * printcmd.c (print_address_symbolic): Update.
4408         (build_address_symbolic): Change "name" and "filename" to
4409         std::string.
4410         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4411         Update.
4412         * defs.h (build_address_symbolic): Remove declaration.
4413
4414 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4415
4416         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4417         (aarch64_vnv_type): Add function.
4418         (aarch64_pseudo_register_name): Add V regs for SVE.
4419         (aarch64_pseudo_register_type): Likewise.
4420         (aarch64_pseudo_register_reggroup_p): Likewise.
4421         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4422         (aarch64_pseudo_read_value): Add V regs for SVE.
4423         (aarch64_pseudo_write_2): Use V0 offset for SVE
4424         (aarch64_pseudo_write): Add V regs for SVE.
4425         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4426
4427 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4428
4429         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4430         (sve_vl_from_vq): Likewise.
4431
4432 2018-06-05  Tom Tromey  <tom@tromey.com>
4433
4434         * cli/cli-cmds.c (show_version): Update.
4435         * top.c (print_gdb_version): Add "interactive" parameter.
4436         Update.
4437         * main.c (captured_main_1): Update.
4438         * top.h (print_gdb_version): Add "interactive" parameter and a
4439         comment.
4440
4441 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4442
4443         * common/enum-flags.h: Add trailing semicolon to example in
4444         comment.
4445
4446 2018-06-05  Tom Tromey  <tom@tromey.com>
4447
4448         PR cli/12326:
4449         * NEWS: Add entry about pager.
4450         * utils.c (pagination_disabled_for_command): New global.
4451         (prompt_for_continue): Allow "c" response to prompt.
4452         (reinitialize_more_filter): Clear
4453         pagination_disabled_for_command.
4454         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4455
4456 2018-06-04  Tom Tromey  <tom@tromey.com>
4457
4458         * ada-lang.h (ada_lookup_symbol_list): Update.
4459         * ada-lang.c (resolve_subexp): Update.
4460         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4461         parameter.
4462         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4463         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4464         results parameter to std::vector.
4465         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4466         Update.
4467         * ada-exp.y (block_lookup): Update.
4468         (select_possible_type_sym): Change type of syms.  Remove nsyms
4469         parameter.
4470         (write_var_or_type, write_name_assoc): Update.
4471
4472 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4473
4474         * windows-nat.c (windows_nat_target::xfer_partial): Return
4475         TARGET_XFER_E_IO if we need to delegate to the target beneath
4476         but BENEATH is NULL.
4477
4478 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4479
4480         * Makefile.in (config.status): Add configure.nat as a
4481         dependency.
4482
4483 2018-06-04  Tom Tromey  <tom@tromey.com>
4484
4485         * cp-name-parser.y (cpname_state): Add method declarations.
4486         (HANDLE_QUAL): Update.
4487         (cpname_state::d_grab, cpname_state::fill_comp)
4488         (cpname_state::make_operator, cpname_state::make_dtor)
4489         (cpname_state::make_builtin_type, cpname_state::make_name)
4490         (cpname_state::d_qualify, cpname_state::d_int_type)
4491         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4492         (%union): Move earlier.
4493
4494 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4495
4496         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4497
4498 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4499
4500         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4501         (aarch64_pseudo_write_1): Likewise.
4502         (aarch64_pseudo_read_value): Use helper.
4503         (aarch64_pseudo_write): Likewise.
4504
4505 2018-06-04  Pedro Alves  <palves@redhat.com>
4506
4507         * darwin-nat.c (darwin_ops): Delete.
4508         (darwin_attach_pid): Use get_native_target.
4509
4510 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4511
4512         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4513         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4514
4515 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4516
4517         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4518         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4519         (aarch64_gdbarch_init): Check for SVE.
4520         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4521
4522 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4523
4524         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4525         * aarch64-tdep.h (aarch64_read_description): Likewise.
4526         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4527         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4528         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4529         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4530         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4531
4532 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4533
4534         * value.c (value_fetch_lazy_bitfield): New.
4535         (value_fetch_lazy_memory): New.
4536         (value_fetch_lazy_register): New.
4537         (value_fetch_lazy): Factor out to smaller functions.
4538
4539 2018-06-01  Tom Tromey  <tom@tromey.com>
4540
4541         * cp-name-parser.y (backslashable, represented): Now const.
4542
4543 2018-06-01  Tom Tromey  <tom@tromey.com>
4544
4545         * cp-name-parser.y: Include parser-defs.h.
4546         (parser_fprintf): Remove declaration.
4547
4548 2018-06-01  Tom Tromey  <tom@tromey.com>
4549
4550         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4551         %parse-param.
4552         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4553         (global_result): Remove globals.
4554         (struct cpname_state): New.
4555         (yyparse): Don't declare.
4556         (yylex, yyerror): Move declarations after %union.
4557         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4558         (make_name): Add state parameter.
4559         Update all callers.
4560         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4561         parameter.
4562         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4563         Update.
4564         (yylex): Add lvalp, state parameters.
4565         (yyerror): Add state parameter.
4566         (cp_demangled_name_to_comp): Update.
4567
4568 2018-06-01  Tom Tromey  <tom@tromey.com>
4569
4570         * cp-name-parser.y (parser_fprintf): Declare.
4571         (GDB_YY_REMAP_PREFIX): Define.
4572         Include yy-remap.h.  Don't redefine yy* identifiers.
4573
4574 2018-06-01  Tom Tromey  <tom@tromey.com>
4575
4576         * python/py-type.c (typy_legacy_template_argument): Update.
4577         * cp-support.h (cp_demangled_name_to_comp): Update.
4578         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4579         parameter to be a "std::string *".
4580         (main): Update.
4581
4582 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4583
4584         * ada-lex.l: Include "diagnostics.h" instead of
4585         "common/diagnostics.h".
4586         * unittests/environ-selftests.c: Likewise.
4587         * common/diagnostics.h: Moved to ../include.
4588
4589 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4590
4591         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4592         to language_mode_manual while calling breakpoint_re_set_one.
4593
4594 2018-06-01  Tom Tromey  <tom@tromey.com>
4595
4596         * valops.c (value_cast_structs, destructor_name_p): Update.
4597         * symtab.c (gdb_mangle_name): Update.
4598         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4599         Update.
4600         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4601         (pascal_object_print_value_fields, pascal_object_print_value):
4602         Update.
4603         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4604         * linespec.c (find_methods): Update.
4605         * gdbtypes.h (type_name_no_tag): Remove.
4606         (type_name_or_error): Rename from type_name_no_tag_or_error.
4607         * gdbtypes.c (type_name_no_tag): Remove.
4608         (type_name_or_error): Rename from type_name_no_tag_or_error.
4609         (lookup_struct_elt_type, check_typedef): Update.
4610         * expprint.c (print_subexp_standard): Update.
4611         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4612         * d-namespace.c (d_lookup_nested_symbol): Update.
4613         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4614         (cp_print_class_member): Update.
4615         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4616         * completer.c (add_struct_fields): Update.
4617         * c-typeprint.c (cp_type_print_derivation_info)
4618         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4619         Update.
4620         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4621         (ada_prefer_type, ada_is_exception_sym): Update.
4622
4623 2018-06-01  Tom Tromey  <tom@tromey.com>
4624
4625         * valops.c (enum_constant_from_type, value_namespace_elt)
4626         (value_maybe_namespace_elt): Update.
4627         * valarith.c (find_size_for_pointer_math): Update.
4628         * target-descriptions.c (make_gdb_type): Update.
4629         * symmisc.c (print_symbol): Update.
4630         * stabsread.c (define_symbol, read_type)
4631         (complain_about_struct_wipeout, add_undefined_type)
4632         (cleanup_undefined_types_1): Update.
4633         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4634         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4635         (rust_internal_print_type, rust_composite_type)
4636         (rust_evaluate_funcall, rust_evaluate_subexp)
4637         (rust_inclusive_range_type_p): Update.
4638         * python/py-type.c (typy_get_tag): Update.
4639         * p-typeprint.c (pascal_type_print_base): Update.
4640         * mdebugread.c (parse_symbol, parse_type): Update.
4641         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4642         Update.
4643         * guile/scm-type.c (gdbscm_type_tag): Update.
4644         * go-lang.c (sixg_string_p): Update.
4645         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4646         Update.
4647         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4648         (TYPE_TAG_NAME): Remove.
4649         * gdbtypes.c (type_name_no_tag): Simplify.
4650         (check_typedef, check_types_equal, recursive_dump_type)
4651         (copy_type_recursive, arch_composite_type): Update.
4652         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4653         in summary mode when needed.
4654         * eval.c (evaluate_funcall): Update.
4655         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4656         (process_structure_scope, read_enumeration_type)
4657         (read_namespace_type, read_module_type, determine_prefix): Update.
4658         * cp-support.c (inspect_type): Update.
4659         * coffread.c (process_coff_symbol, decode_base_type): Update.
4660         * c-varobj.c (c_is_path_expr_parent): Update.
4661         * c-typeprint.c (c_type_print_base_struct_union): Update.
4662         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4663         summary when using C language.
4664         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4665         (gen_maybe_namespace_elt): Update.
4666         * ada-lang.c (ada_type_name): Simplify.
4667         (empty_record, ada_template_to_fixed_record_type_1)
4668         (template_to_static_fixed_type)
4669         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4670
4671 2018-06-01  Tom Tromey  <tom@tromey.com>
4672
4673         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4674         c_print_type.
4675         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4676         (c_print_type): Update.
4677         (c_print_type): New overload.
4678         (c_type_print_varspec_prefix, c_type_print_args)
4679         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4680         (c_type_print_base_struct_union, c_type_print_base_1)
4681         (cp_type_print_method_args): Add "language" parameter.
4682         (c_type_print_base): Update.
4683         * c-lang.h (c_print_type): Add new overload.
4684
4685 2018-06-01  Tom Tromey  <tom@tromey.com>
4686
4687         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4688         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4689
4690 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4691
4692         * aarch64-tdep.c (aarch64_sve_register_names): New const
4693         var.
4694         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4695         (AARCH64_SVE_Z_REGS_NUM): New define.
4696         (AARCH64_SVE_P_REGS_NUM): Likewise.
4697         (AARCH64_SVE_NUM_REGS): Likewise.
4698
4699 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4700
4701         * nat/linux-ptrace.h [__alpha__]
4702         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4703         definitions.
4704
4705 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4706
4707         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4708         the endianness selected.
4709         * NEWS: Document `set endian auto' mode operation update.
4710
4711 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4712
4713         * Makefile.in: Add new header.
4714         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4715         (sve_vl_from_vg): Likewise.
4716         (sve_vq_from_vl): Likewise.
4717         (sve_vl_from_vq): Likewise.
4718         (sve_vq_from_vg): Likewise.
4719         (sve_vg_from_vq): Likewise.
4720         * configure.nat: Add new c file.
4721         * nat/aarch64-sve-linux-ptrace.c: New file.
4722         * nat/aarch64-sve-linux-ptrace.h: New file.
4723
4724 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4725
4726         * aarch64-linux-nat.c (aarch64_linux_read_description):
4727         Add parmeter zero.
4728         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4729         Likewise.
4730         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4731         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4732         (aarch64_gdbarch_init): Add parmeter zero.
4733         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4734         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4735         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4736         parmeter.
4737         * doc/gdb.texinfo: Describe SVE feature
4738         * features/aarch64-sve.c: New file.
4739
4740 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4741
4742         PR gdb/23210
4743         * gdbarch.sh (significant_addr_bit): Default to zero when
4744         not set by target architecture.
4745         * gdbarch.c: Re-generated.
4746         * utils.c (address_significant): Update.
4747
4748 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4749
4750         * stack.c (func_command): Remove trailing newline in call to error.
4751
4752 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4753
4754         * regcache.h (regcache_raw_collect): Remove, update callers to
4755         use regcache::raw_collect.
4756         * regcache.c (regcache_raw_collect): Remove.
4757
4758 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4759
4760         * regcache.h (regcache_raw_supply): Remove, update callers to
4761         use detached_regcache::raw_supply.
4762         * regcache.c (regcache_raw_supply): Remove.
4763
4764 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4765
4766         * regcache.h (regcache_cooked_write_part): Remove, update
4767         callers to use regcache::cooked_write_part.
4768         * regcache.c (regcache_cooked_write_part): Remove.
4769
4770 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4771
4772         * regcache.h (regcache_cooked_read_part): Remove, update callers
4773         to use readable_regcache::cooked_read_part.
4774         * regcache.c (regcache_cooked_read_part): Remove.
4775
4776 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4777
4778         * regcache.h (regcache_cooked_read_value): Remove, update
4779         callers to use readable_regcache::cooked_read_value.
4780         * regcache.c (regcache_cooked_read_value): Remove.
4781
4782 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4783
4784         * regcache.h (regcache_cooked_write): Remove, update callers to
4785         use regcache::cooked_write.
4786         * regcache.c (regcache_cooked_write): Remove.
4787
4788 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4789
4790         * regcache.h (regcache_invalidate): Remove, update callers to
4791         use detached_regcache::invalidate instead.
4792         * regcache.c (regcache_invalidate): Remove.
4793
4794 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4795
4796         * regcache.h (regcache_raw_write_part): Remove, update callers
4797         to use regcache::raw_write_part instead.
4798         * regcache.c (regcache_raw_write_part): Remove.
4799
4800 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4801
4802         * regcache.h (regcache_raw_read_part): Remove, update callers to
4803         use readable_regcache::raw_read_part instead.
4804         * regcache.c (regcache_raw_read_part): Remove.
4805
4806 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4807
4808         * regcache.h (regcache_cooked_read): Remove, update callers to
4809         use readable_regcache::cooked_read instead.
4810         * regcache.c (regcache_cooked_read): Remove.
4811
4812 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4813
4814         * regcache.h (regcache_raw_write): Remove, update callers to use
4815         regcache::raw_write instead.
4816         * regcache.c (regcache_raw_write): Remove.
4817
4818 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4819
4820         * regcache.h (regcache_raw_read): Remove, update callers to use
4821         readable_regcache::raw_read instead.
4822         * regcache.c (regcache_raw_read): Remove.
4823
4824 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4825
4826         * regcache.h (regcache_raw_update): Remove, update callers to
4827         use readable_regcache::raw_update instead.
4828         * regcache.c (regcache_raw_update): Remove.
4829
4830 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4831
4832         * regcache.h (regcache_register_status): Remove, update callers
4833         to use reg_buffer::get_register_status directly instead.
4834         * regcache.c (regcache_register_status): Remove.
4835
4836 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4837
4838         * regcache.h (regcache_get_ptid): Remove, update all callers to
4839         call regcache::ptid instead.
4840         * regcache.c (regcache_get_ptid): Remove.
4841
4842 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4843
4844         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4845
4846 2018-05-30  Pedro Alves  <palves@redhat.com>
4847
4848         * common/common-exceptions.h (exception_rethrow): Use
4849         ATTRIBUTE_NORETURN.
4850
4851 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4852
4853         * breakpoint.c (print_solib_event, check_status_catch_solib):
4854         Remove struct keyword in range-based for loops.
4855         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4856         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4857         Likewise.
4858         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4859         Likewise.
4860         * symfile.c (addr_info_make_relative): Likewise.
4861         * thread.c (value_in_thread_stack_temporaries): Likewise.
4862
4863 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4864
4865         PR gdb/16841
4866         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4867         aggregate type to get its real type before accessing it.
4868
4869 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4870
4871         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4872         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4873         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4874         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4875         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4876         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4877         * printcmd.c (info_address_command): Likewise.
4878
4879 2018-05-29  Tom Tromey  <tom@tromey.com>
4880
4881         * windows-nat.c (handle_exception): Update fall-through comment.
4882
4883 2018-05-29  Tom Tromey  <tom@tromey.com>
4884
4885         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4886         (struct program_space) <added_solibs>: Now a std::vector.
4887         * breakpoint.c (print_solib_event): Update.
4888         (check_status_catch_solib): Update.
4889         * progspace.c (clear_program_space_solib_cache): Update.
4890         * solib.c (update_solib_list): Update.
4891
4892 2018-05-29  Tom Tromey  <tom@tromey.com>
4893
4894         * python/py-type.c (typy_richcompare): Update.
4895         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4896         * gdbtypes.h (types_deeply_equal): Return bool.
4897         (types_equal): Likewise.
4898         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4899         declare VEC.
4900         (check_types_equal): Change worklist to std::vector.  Return
4901         bool.
4902         (struct type_equality_entry): Add constructor.
4903         (compare_maybe_null_strings): Return bool.
4904         (check_types_worklist): Return bool.  Change worklist to
4905         std::vector.
4906         (types_deeply_equal): Use std::vector.
4907         (types_equal): Return bool.
4908         (compare_maybe_null_strings): Simplify.
4909
4910 2018-05-29  Tom Tromey  <tom@tromey.com>
4911
4912         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4913
4914 2018-05-29  Tom Tromey  <tom@tromey.com>
4915
4916         * objc-lang.h: Don't include cp-support.h.
4917         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4918         declare VEC.
4919
4920 2018-05-27  Tom Tromey  <tom@tromey.com>
4921
4922         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4923
4924 2018-05-25  Tom Tromey  <tom@tromey.com>
4925
4926         * value.c (value::location): Initialize.
4927
4928 2018-05-25  Tom Tromey  <tom@tromey.com>
4929
4930         * dbxread.c (init_bincl_list): Remove.
4931         (bincl_list): Now a std::vector.
4932         (bincls_allocated, next_bincl): Remove.
4933         (free_bincl_list, do_free_bincl_list_cleanup)
4934         (make_cleanup_free_bincl_list): Remove.
4935         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4936         unique_xmalloc_ptr.
4937         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4938         (struct header_file_location): Add constructor.
4939         (add_bincl_to_list): Remove.
4940
4941 2018-05-25  Tom Tromey  <tom@tromey.com>
4942
4943         * tui/tui.c (tui_enable): Update.
4944         * mi/mi-interp.c (mi_interp::init): Update.
4945         * interps.h (class interp) <name>: New method.
4946         <m_name>: Rename from name.
4947         (~scoped_restore_interp): Update.
4948         * interps.c (interp::interp): Update.
4949         (interp_add, interp_set, interp_lookup_existing)
4950         (current_interp_named_p): Update.
4951
4952 2018-05-25  Tom Tromey  <tom@tromey.com>
4953
4954         * interps.c (interp_name): Remove.
4955         * mi/mi-interp.c (mi_interp::init): Update.
4956         * interps.h (interp_name): Remove.
4957         (~scoped_restore_interp): Update.
4958         * tui/tui.c (tui_enable): Update.
4959
4960 2018-05-25  Tom Tromey  <tom@tromey.com>
4961
4962         * utils.c (fputs_maybe_filtered): Update.
4963         * linespec.c (decode_line_full): Update.
4964         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4965         (mi_print_breakpoint_for_event, mi_solib_loaded)
4966         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4967         (mi_user_selected_context_changed): Update.
4968         * mi/mi-main.c (mi_execute_command): Update.
4969         * cli/cli-script.c (execute_control_command): Update.
4970         * python/python.c (execute_gdb_command): Update.
4971         * solib.c (info_sharedlibrary_command): Update.
4972         * interps.c (interp_ui_out): Remove.
4973         * interps.h (interp_ui_out): Remove.
4974
4975 2018-05-25  Tom Tromey  <tom@tromey.com>
4976
4977         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4978         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4979         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4980
4981 2018-05-25  Tom Tromey  <tom@tromey.com>
4982
4983         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4984         * interps.c (interp_exec): Use scoped_restore.
4985
4986 2018-05-25  Tom Tromey  <tom@tromey.com>
4987
4988         * remote.c (remote_target::remote_file_get): Use
4989         gdb::byte_vector.
4990         (remote_target::remote_file_put): Likewise.
4991
4992 2018-05-25  Tom Tromey  <tom@tromey.com>
4993
4994         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4995         a std::string.
4996         (get_pe_section_index, add_pe_exported_sym): Update.
4997         (read_pe_exported_syms): Use gdb::def_vector.
4998
4999 2018-05-25  Tom Tromey  <tom@tromey.com>
5000
5001         * frame.c (remove_prev_frame): Remove.
5002         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5003
5004 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5005
5006         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5007         Remove prototypes.
5008         * mips-linux-nat.c (supply_fpregset): Always call
5009         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5010         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5011         `mips_fill_fpregset'.
5012         * mips-linux-tdep.c (mips_supply_fpregset)
5013         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5014         (mips_fill_fpregset_wrapper): Remove functions.
5015         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5016         (mips_linux_fpregset): Remove variable.
5017         (mips_linux_iterate_over_regset_sections): Use
5018         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5019         (mips_linux_o32_sigframe_init): Remove comment.
5020
5021 2018-05-25  Pedro Alves  <palves@redhat.com>
5022
5023         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5024         (struct readahead_cache, struct packet_reg, struct
5025         remote_arch_state, class remote_state): Move higher up in the
5026         file.
5027         (remote_target::m_remote_state): Now an object instead of a pointer.
5028         (remote_target::get_remote_state): Adjust.
5029
5030 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5031
5032         * stack.c (select_and_print_frame): Delete.
5033         (struct function_bounds): Move struct within function.
5034         (func_command): Most content moved into new function
5035         find_frame_for_function, use new function, print result, add
5036         function comment.
5037         (find_frame_for_function): New function, now returns a result.
5038
5039 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5040
5041         * stack.c (iterate_over_block_arg_vars): Fix comment.
5042         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5043
5044 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5045
5046         PR gdb/23203
5047         * frame.c
5048         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5049         Define.
5050         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5051         Define.
5052         * frame.h (class scoped_restore_selected_frame): New class.
5053         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5054         of any exception, use scoped_restore_selected_frame to restore the
5055         frame instead.
5056
5057 2018-05-24  Pedro Alves  <palves@redhat.com>
5058
5059         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5060         override.
5061
5062 2018-05-23  Tom Tromey  <tom@tromey.com>
5063
5064         * complaints.c (struct complaints): Remove.
5065         (symfile_complaint_book): Remove.
5066         (series): New global.
5067         (complaint_internal): Update.
5068         (clear_complaints): Update.
5069
5070 2018-05-23  Tom Tromey  <tom@tromey.com>
5071
5072         * complaints.c (counters): New global.
5073         (struct complain): Remove.
5074         (struct complaints) <root>: Remove.
5075         (complaint_sentinel): Remove.
5076         (symfile_complaint_book): Update.
5077         (find_complaint) Remove.
5078         (complaint_internal, clear_complaints): Update.
5079
5080 2018-05-23  Tom Tromey  <tom@tromey.com>
5081
5082         * complaints.c (struct complain) <file, line>: Remove.
5083         (find_complaint): Remove file, line parameters.
5084         (complaint_internal): Update.
5085
5086 2018-05-23  Tom Tromey  <tom@tromey.com>
5087
5088         * complaints.c (vcomplaint): Remove.
5089         (complaint_internal) Merge in contents of vcomplaint.
5090
5091 2018-05-23  Tom Tromey  <tom@tromey.com>
5092
5093         * complaints.c (struct complaints) <explanation>: Remove.
5094         (symfile_explanations): Remove.
5095         (symfile_complaint_book): Update.
5096         (vcomplaint): Update.
5097         (struct explanation): Remove.
5098
5099 2018-05-23  Tom Tromey  <tom@tromey.com>
5100
5101         * complaints.c (symfile_complaints): Remove.
5102         (complaint_internal): Remove "complaints" parameter.
5103         (clear_complaints, vcomplaint): Remove "c" parameter.
5104         (get_complaints): Remove.
5105         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5106         (dwarf2_debug_line_missing_file_complaint)
5107         (dwarf2_debug_line_missing_end_sequence_complaint)
5108         (dwarf2_complex_location_expr_complaint)
5109         (dwarf2_const_value_length_mismatch_complaint)
5110         (dwarf2_section_buffer_overflow_complaint)
5111         (dwarf2_macro_malformed_definition_complaint)
5112         (dwarf2_invalid_attrib_class_complaint)
5113         (create_addrmap_from_index, dw2_symtab_iter_next)
5114         (dw2_expand_marked_cus)
5115         (dw2_debug_names_iterator::find_vec_in_debug_names)
5116         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5117         (create_debug_type_hash_table, init_cutu_and_read_dies)
5118         (partial_die_parent_scope, add_partial_enumeration)
5119         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5120         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5121         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5122         (create_cus_hash_table, create_dwp_hash_table)
5123         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5124         (dwarf2_rnglists_process, dwarf2_ranges_process)
5125         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5126         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5127         (handle_struct_member_die, process_structure_scope)
5128         (read_array_type, read_common_block, read_module_type)
5129         (read_tag_pointer_type, read_typedef, read_base_type)
5130         (read_subrange_type, load_partial_dies, partial_die_info::read)
5131         (partial_die_info::read, partial_die_info::read)
5132         (partial_die_info::read, read_checked_initial_length_and_offset)
5133         (dwarf2_string_attr, read_formatted_entries)
5134         (dwarf_decode_line_header)
5135         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5136         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5137         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5138         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5139         (get_signatured_type, get_DW_AT_signature_type)
5140         (decode_locdesc, file_file_name, consume_improper_spaces)
5141         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5142         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5143         (dwarf2_symbol_mark_computed, set_die_type)
5144         (read_attribute_value): Update.
5145         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5146         Update.
5147         * dbxread.c (unknown_symtype_complaint)
5148         (lbrac_mismatch_complaint, repeated_header_complaint)
5149         (set_namestring, function_outside_compilation_unit_complaint)
5150         (read_dbx_symtab, process_one_symbol): Update.
5151         * gdbtypes.c (stub_noname_complaint): Update.
5152         * windows-nat.c (handle_unload_dll): Update.
5153         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5154         (decode_base_type): Update.
5155         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5156         (eb_complaint, record_include_begin, record_include_end)
5157         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5158         (process_xcoff_symbol, read_symbol)
5159         (function_outside_compilation_unit_complaint)
5160         (scan_xcoff_symtab): Update.
5161         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5162         * buildsym.c (finish_block_internal, make_blockvector)
5163         (end_symtab_get_static_block, augment_type_symtab): Update.
5164         * dtrace-probe.c (dtrace_process_dof)
5165         (dtrace_static_probe_ops::get_probes): Update.
5166         * complaints.h (struct complaint): Don't declare.
5167         (symfile_complaints): Remove.
5168         (complaint_internal): Remove "complaints" parameter.
5169         (complaint): Likewise.
5170         (clear_complaints): Likewise.
5171         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5172         (reread_symbols): Update.
5173         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5174         (dwarf2_frame_cache, decode_frame_entry): Update.
5175         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5176         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5177         (info_selectors_command): Update.
5178         * macrotab.c (macro_include, check_for_redefinition)
5179         (macro_undef): Update.
5180         * objfiles.c (filter_overlapping_sections): Update.
5181         * stabsread.c (invalid_cpp_abbrev_complaint)
5182         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5183         (define_symbol, error_type, read_type, rs6000_builtin_type)
5184         (stabs_method_name_from_physname, read_member_functions)
5185         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5186         (attach_fields_to_type, complain_about_struct_wipeout)
5187         (read_range_type, read_args, common_block_start)
5188         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5189         Update.
5190         * mdebugread.c (index_complaint, unknown_ext_complaint)
5191         (basic_type_complaint, bad_tag_guess_complaint)
5192         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5193         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5194         (parse_procedure, parse_lines)
5195         (function_outside_compilation_unit_complaint)
5196         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5197         (bad_tag_guess_complaint, reg_value_complaint): Update.
5198         * cp-support.c (demangled_name_complaint): Update.
5199         * macroscope.c (sal_macro_scope): Update.
5200         * dwarf-index-write.c (class debug_names): Update.
5201
5202 2018-05-23  Tom Tromey  <tom@tromey.com>
5203
5204         * complaints.c (clear_complaints): Remove "noisy" parameter.
5205         * complaints.h (clear_complaints): Update.
5206         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5207         (reread_symbols): Update.
5208
5209 2018-05-23  Tom Tromey  <tom@tromey.com>
5210
5211         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5212         SUBSEQUENT_MESSAGE.
5213         (vcomplaint, clear_complaints): Update.
5214         (symfile_explanations): Remove some messages.
5215
5216 2018-05-23  Tom Tromey  <tom@tromey.com>
5217
5218         * complaints.c (internal_complaint): Remove.
5219         * complaints.h (internal_complaint): Remove.
5220
5221 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5222
5223         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5224
5225 2018-05-22  Pedro Alves  <palves@redhat.com>
5226
5227         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5228         (remote_fileio_badfd, remote_fileio_return_errno)
5229         (remote_fileio_return_success, remote_fileio_func_open)
5230         (remote_fileio_func_open, remote_fileio_func_close)
5231         (remote_fileio_func_read, remote_fileio_func_write)
5232         (remote_fileio_func_lseek, remote_fileio_func_rename)
5233         (remote_fileio_func_unlink, remote_fileio_func_stat)
5234         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5235         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5236         remote_target parameter.
5237         (remote_fio_func_map) <func>: Add remote_target parameter.
5238         (do_remote_fileio_request, remote_fileio_request):
5239         * remote-fileio.h (remote_fileio_request):
5240         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5241         remote_target parameter.
5242         (remote_notif_process, handle_notification): Adjust to pass down
5243         the remote.
5244         (remote_notif_state_allocate): Add remote_target parameter.  Save
5245         it.
5246         * remote-notif.h (struct remote_target): Forward declare.
5247         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5248         remote_target parameter.
5249         (struct remote_notif_state) <remote>: New field.
5250         (remote_notif_ack, remote_notif_parse): Add remote_target
5251         parameter.
5252         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5253         remote_target parameter.
5254         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5255         (threads_listing_context, rmt_thread_action, protocol_feature)
5256         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5257         (packet_result, struct threads_listing_context, remote_state):
5258         Move definitions and declarations higher up.
5259         (remote_target) <~remote_target>: Declare.
5260         (remote_download_command_source, remote_file_put, remote_file_get)
5261         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5262         (remote_hostio_pread_vFile, remote_hostio_send_command)
5263         (remote_hostio_set_filesystem, remote_hostio_open)
5264         (remote_hostio_close, remote_hostio_unlink, remote_state)
5265         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5266         (get_memory_write_packet_size, get_memory_read_packet_size)
5267         (append_pending_thread_resumptions, remote_detach_1)
5268         (append_resumption, remote_resume_with_vcont)
5269         (add_current_inferior_and_thread, wait_ns, wait_as)
5270         (process_stop_reply, remote_notice_new_inferior)
5271         (process_initial_stop_replies, remote_add_thread)
5272         (btrace_sync_conf, remote_btrace_maybe_reopen)
5273         (remove_new_fork_children, kill_new_fork_children)
5274         (discard_pending_stop_replies, stop_reply_queue_length)
5275         (check_pending_events_prevent_wildcard_vcont)
5276         (discard_pending_stop_replies_in_queue, stop_reply)
5277         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5278         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5279         (remote_interrupt_as, remote_interrupt_ns)
5280         (remote_get_noisy_reply, remote_query_attached)
5281         (remote_add_inferior, remote_current_thread, get_current_thread)
5282         (set_thread, set_general_thread, set_continue_thread)
5283         (set_general_process, write_ptid)
5284         (remote_unpack_thread_info_response, remote_get_threadinfo)
5285         (parse_threadlist_response, remote_get_threadlist)
5286         (remote_threadlist_iterator, remote_get_threads_with_ql)
5287         (remote_get_threads_with_qxfer)
5288         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5289         (get_offsets, remote_check_symbols, remote_supported_packet)
5290         (remote_query_supported, remote_packet_size)
5291         (remote_serial_quit_handler, remote_detach_pid)
5292         (remote_vcont_probe, remote_resume_with_hc)
5293         (send_interrupt_sequence, interrupt_query)
5294         (remote_notif_get_pending_events, fetch_register_using_p)
5295         (send_g_packet, process_g_packet, fetch_registers_using_g)
5296         (store_register_using_P, store_registers_using_G)
5297         (set_remote_traceframe, check_binary_download)
5298         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5299         (remote_xfer_live_readonly_partial, remote_read_bytes)
5300         (remote_send_printf, remote_flash_write, readchar)
5301         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5302         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5303         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5304         (extended_remote_disable_randomization, extended_remote_run)
5305         (send_environment_packet, extended_remote_environment_support)
5306         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5307         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5308         (packet_command): Now methods of ...
5309         (remote_target): ... this class.
5310         (m_remote_state) <remote_target>: New field.
5311         (struct remote_state) <stop_reply_queue,
5312         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5313         fields.
5314         (remote_state::remote_state): Allocate stop_reply_queue.
5315         (remote_state): Delete global.
5316         (get_remote_state_raw): Delete.
5317         (remote_target::get_remote_state): Allocate m_remote_state on
5318         demand.
5319         (get_current_remote_target): New.
5320         (remote_ops, extended_remote_ops): Delete.
5321         (wait_forever_enabled_p, remote_async_inferior_event_token):
5322         Delete, moved to struct remote_state.
5323         (remote_target::close): Delete self.  Destruction bits split to
5324         ...
5325         (remote_target::~remote_target): ... this.
5326         (show_memory_packet_size): Adjust to use
5327         get_current_remote_target.
5328         (struct protocol_feature) <func>: Add remote_target parameter.
5329         All callers adjusted.
5330         (curr_quit_handler_target): New.
5331         (remote_serial_quit_handler): Reimplement.
5332         (remote_target::open_1): Adjust to use get_current_remote_target.
5333         Heap-allocate remote_target/extended_remote_target instances.
5334         (vcont_builder::vcont_builder): Add remote_target parameter, and
5335         save it in m_remote.  All callers adjusted.
5336         (vcont_builder::m_remote): New field.
5337         (vcont_builder::restart, vcont_builder::flush)
5338         (vcont_builder::push_action): Use it.
5339         (remote_target::commit_resume): Use it.
5340         (struct queue_iter_param) <remote>: New field.
5341         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5342         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5343         (check_pending_event_prevents_wildcard_vcont_callback)
5344         (remote_target::check_pending_events_prevent_wildcard_vcont)
5345         (remote_target::discard_pending_stop_replies)
5346         (remote_target::discard_pending_stop_replies_in_queue)
5347         (remote_target::remote_notif_remove_queued_reply): Fill in
5348         'remote' field.
5349         (remote_notif_get_pending_events): New.
5350         (remote_target::readchar, remote_target::remote_serial_write):
5351         Save/restore curr_quit_handler_target.
5352         (putpkt): New.
5353         (kill_new_fork_children): Fill in 'remote' field.
5354         (packet_command): Use get_current_remote_target, defer to
5355         remote_target method of same name.
5356         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5357         parameter, and save it in m_remote.  All callers adjusted.
5358         (scoped_remote_fd::release): Use m_remote.
5359         (scoped_remote_fd::m_remote): New field.
5360         (remote_file_put, remote_file_get, remote_file_delete): Use
5361         get_current_remote_target, defer to remote_target method of same
5362         name.
5363         (remote_btrace_reset): Add remote_state paremeter.  Update all
5364         callers.
5365         (remote_async_inferior_event_handler). Pass down 'data'.
5366         (remote_new_objfile): Use get_current_remote_target.
5367         (remote_target::vcont_r_supported): New.
5368         (set_range_stepping): Use get_current_remote_target and
5369         remote_target::vcont_r_supported.
5370         (_initialize_remote): Don't allocate 'remote_state' and
5371         'stop_reply_queue' globals.
5372         * remote.h (struct remote_target): Forward declare.
5373         (getpkt, putpkt, remote_notif_get_pending_events): Add
5374         'remote_target' parameter.
5375
5376 2018-05-22  Pedro Alves  <palves@redhat.com>
5377
5378         * remote.c (vcont_builder): Now a class.  Make all data members
5379         private.
5380         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5381         Declare methods.
5382         (vcont_builder_restart): Rename to ...
5383         (vcont_builder::restart): ... this.
5384         (vcont_builder_flush): Rename to ...
5385         (vcont_builder::flush): ... this.
5386         (vcont_builder_push_action): Rename to ...
5387         (vcont_builder::push_action): ... this.
5388         (remote_target::commit_resume): Adjust.
5389
5390 2018-05-22  Pedro Alves  <palves@redhat.com>
5391
5392         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5393         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5394         (get_fixed_memory_packet_size): New.
5395         (get_memory_packet_size): Use it.
5396         (set_memory_packet_size): Don't override the config size with
5397         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5398         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5399         Don't refer to get_memory_packet_size if not connected to a remote
5400         target.  Show "(default)" if configured size is 0.
5401
5402 2018-05-22  Pedro Alves  <palves@redhat.com>
5403
5404         * remote.c (remote_target::mourn_inferior): Move
5405         discard_pending_stop_replies call here from ...
5406         (_initialize_remote): ... here.
5407
5408 2018-05-22  Pedro Alves  <palves@redhat.com>
5409
5410         * remote.c (compare_section_command): Remove set_general_process
5411         call.
5412
5413 2018-05-22  Pedro Alves  <palves@redhat.com>
5414
5415         * remote.c (struct packet_reg, struct remote_arch_state):
5416         Move higher up in the file.
5417         (remote_state) <m_arch_states>: Store remote_arch_state values
5418         instead of remote_arch_state pointers.
5419         (remote_state::get_remote_arch_state): Adjust.
5420
5421 2018-05-22  Pedro Alves  <palves@redhat.com>
5422
5423         * remote.c: Include <unordered_map>.
5424         (remote_state): Now a class.
5425         (remote_state) <get_remote_arch_state>: Declare method.
5426         <get_remote_arch_state>: New field.
5427         (remote_arch_state) <remote_arch_state>: Declare ctor.
5428         <regs>: Now a unique_ptr.
5429         (remote_gdbarch_data_handle): Delete.
5430         (get_remote_arch_state): Delete.
5431         (remote_state::get_remote_arch_state): New.
5432         (get_remote_state): Adjust to call remote_state's
5433         get_remote_arch_state method.
5434         (init_remote_state): Delete, bits factored out to ...
5435         (remote_arch_state::remote_arch_state): ... this new method.
5436         (get_remote_packet_size, get_memory_packet_size)
5437         (process_g_packet, remote_target::fetch_registers)
5438         (remote_target::prepare_to_store, store_registers_using_G)
5439         (remote_target::store_registers, remote_target::get_trace_status):
5440         Adjust to call remote_state's method.
5441         (_initialize_remote): Remove reference to
5442         remote_gdbarch_data_handle.
5443
5444 2018-05-22  Pedro Alves  <palves@redhat.com>
5445
5446         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5447         pread>: New method declarations.
5448         (remote_target::open_1): Adjust.
5449         (readahead_cache_invalidate): Rename to ...
5450         (readahead_cache::invalidate): ... this, and adjust to be a class
5451         method.
5452         (readahead_cache_invalidate_fd): Rename to ...
5453         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5454         class method.
5455         (remote_hostio_pwrite): Adjust.
5456         (remote_hostio_pread_from_cache): Rename to ...
5457         (readahead_cache::pread): ... this, and adjust to be a class
5458         method.
5459         (remote_hostio_close): Adjust.
5460
5461 2018-05-22  Pedro Alves  <palves@redhat.com>
5462
5463         * remote.c (remote_hostio_close_cleanup): Delete.
5464         (class scoped_remote_fd): New.
5465         (remote_file_put, remote_file_get): Use it.
5466
5467 2018-05-22  Pedro Alves  <palves@redhat.com>
5468
5469         (struct vCont_action_support): Use bool and initialize all fields.
5470         (struct readahead_cache): Initialize all fields.
5471         (remote_state): Use bool and initialize all fields.
5472         (remote_state::remote_state, remote_state::~remote_state): New.
5473         (new_remote_state): Delete.
5474         (_initialize_remote): Use new to allocate remote_state.
5475
5476 2018-05-22  Pedro Alves  <palves@redhat.com>
5477             張俊芝  <zjz@zjz.name>
5478
5479         PR gdb/22973
5480         * c-exp.y: Include "c-support.h".
5481         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5482         of tolower.  Use c_ident_is_alpha to scan names.
5483         * c-lang.c: Include "c-support.h".
5484         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5485         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5486         * c-support.h: New file, with bits factored out from ...
5487         * cp-name-parser.y: ... this file.
5488         Include "c-support.h".
5489         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5490         c-support.h and renamed.
5491         (symbol_end, yylex): Adjust.
5492
5493 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5494
5495         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5496         parameter type to CORE_ADDR.
5497         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5498         parameter type in declaration to CORE_ADDR.
5499         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5500         target_auxv_search to get AT_HWCAP and use the result to get the
5501         target description.
5502         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5503         to CORE_ADDR. Remove the cast of the return value to unsigned
5504         long. Fix error predicate of target_auxv_search.
5505         (ppc_linux_nat_target::read_description): Change the type of the
5506         hwcap variable to CORE_ADDR.
5507
5508 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5509
5510         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5511         if the size of fpscr is larger than 32 bits.
5512
5513 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5514
5515         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5516         (ppc32_linux_vsxregmap): New global.
5517         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5518         regcache_supply_regset, and regcache_collect_regset.
5519         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5520         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5521         (fetch_vsx_register, store_vsx_register): Remove.
5522         (fetch_vsx_registers): Add regno parameter. Get regset using
5523         ppc_linux_vsxregset. Use regset to supply registers.
5524         (store_vsx_registers): Add regno parameter. Get regset using
5525         ppc_linux_vsxregset. Use regset to collect registers.
5526         (fetch_register): Call fetch_vsx_registers instead of
5527         fetch_vsx_register.
5528         (store_register): Call store_vsx_registers instead of
5529         store_vsx_register.
5530         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5531         new regno parameter.
5532         (store_ppc_registers): Call store_vsx_registers with -1 for the
5533         new regno parameter.
5534         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5535         (ppc_collect_vsxregset): Remove.
5536
5537 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5538
5539         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5540         offset fields.
5541         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5542         for vector register offset fields.
5543         (ppc64_fbsd_reg_offsets): Likewise.
5544         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5545         to vector register offset fields.
5546         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5547         to vector register offset fields.
5548         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5549         vector register offset fields.
5550         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5551         initializers for vector register offset fields.
5552         (rs6000_aix64_reg_offsets): Likewise.
5553         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5554         (ppc_supply_vrregset): Remove.
5555         (ppc_collect_vrregset): Remove.
5556         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5557         (ppc_linux_vrregset) : New function.
5558         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5559         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5560         (ppc32_linux_vrregset): Remove.
5561         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5562         and use result instead of ppc32_linux_vrregset.
5563         (ppc32_linux_reg_offsets): Remove initializers for vector register
5564         offset fields.
5565         (ppc64_linux_reg_offsets): Likewise.
5566         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5567         * ppc-linux-nat.c: Include regset.h.
5568         (gdb_vrregset_t): Adjust comment to account for little-endian
5569         mode.
5570         (supply_vrregset, fill_vrregset): Remove.
5571         (fetch_altivec_register, store_altivec_register): Remove.
5572         (fetch_altivec_registers): Add regno parameter. Get regset using
5573         ppc_linux_vrregset. Use regset to supply registers.
5574         (store_altivec_registers): Add regno parameter. Get regset using
5575         ppc_linux_vrregset. Use regset to collect registers.
5576         (fetch_register): Call fetch_altivec_registers instead of
5577         fetch_altivec_register.
5578         (store_register): Call store_altivec_registers instead of
5579         store_altivec_register.
5580         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5581         the new regno parameter.
5582         (store_ppc_registers): Call store_altivec_registers with -1 for
5583         the new regno parameter.
5584
5585 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5586
5587         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5588         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5589         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5590         (gdb_vrregset_t): Change array type size to
5591         PPC_LINUX_SIZEOF_VRREGSET.
5592         (gdb_vsxregset_t): Change array type size to
5593         PPC_LINUX_SIZEOF_VSXREGSET.
5594         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5595         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5596         PPC_LINUX_SIZEOF_VSXREGSET.
5597
5598 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5599
5600         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5601         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5602         nat/ppc-linux.c.
5603         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5604         ppc_linux_target_wordsize with tid.
5605         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5606         wordsize with tid.
5607         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5608         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5609         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5610         tid parameter. Remove static specifier.
5611         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5612         (ppc_linux_target_wordsize): New declaration.
5613
5614 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5615
5616         * arch/ppc-linux-common.c: New file.
5617         * arch/ppc-linux-common.h: New file.
5618         * arch/ppc-linux-tdesc.h: New file.
5619         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5620         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5621         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5622         arch/ppc-linux-tdesc.h.
5623         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5624         arch/ppc-linux-tdesc.h.
5625         (ppc_linux_nat_target::read_description): Remove target
5626         description matching code. Fill a ppc_linux_features struct and
5627         call ppc_linux_match_description with it. Move comment about ISA
5628         2.05 to ppc-linux-common.c.
5629         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5630         arch/ppc-linux-tdesc.h.
5631         (ppc_linux_core_read_description): Remove target description
5632         matching code. Fill a ppc_linux_features struct and call
5633         ppc_linux_match_description with it.
5634         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5635         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5636         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5637         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5638         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5639         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5640         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5641         (tdesc_powerpc_e500l): Remove.
5642
5643 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5644
5645         * ada-lang.c (catch_assert_command): Pass empty string instead
5646         of NULL for excep_string argument.
5647
5648 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5649
5650         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5651         the width of the requested register exceeds the width of the
5652         `ptrace' data type.
5653
5654 2018-05-21  Tom Tromey  <tom@tromey.com>
5655
5656         * printcmd.c (output_command): Remove.
5657         (output_command_const): Rename to output_command.
5658         * valprint.h (output_command): Rename from output_command_const.
5659         * tracepoint.c (trace_dump_actions): Call output_command.
5660
5661 2018-05-21  Tom Tromey  <tom@tromey.com>
5662
5663         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5664         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5665         * ada-lang.h (create_ada_exception_catchpoint): Update.
5666         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5667         std::string.
5668         (create_excep_cond_exprs, ~ada_catchpoint)
5669         (should_stop_exception, print_one_exception)
5670         (print_mention_exception, print_recreate_exception): Update.
5671         (ada_get_next_arg): Remove.
5672         (catch_ada_exception_command_split): Use std::string.  Change type
5673         of "excep_string", "cond_string".
5674         (catch_ada_exception_command): Update.
5675         (create_ada_exception_catchpoint): Change type of excep_string.
5676         (ada_exception_sal): Remove excep_string parameter.
5677         (~ada_catchpoint): Remove.
5678
5679 2018-05-21  Tom Tromey  <tom@tromey.com>
5680
5681         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5682         cleanup.
5683
5684 2018-05-21  Tom Tromey  <tom@tromey.com>
5685
5686         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5687         Return unique_xmalloc_ptr.
5688         (print_it_exception): Update.
5689
5690 2018-05-21  Tom Tromey  <tom@tromey.com>
5691
5692         * tracepoint.c (trace_dump_actions): Use std::string.
5693
5694 2018-05-21  Tom Tromey  <tom@tromey.com>
5695
5696         * symfile.c (reread_symbols): Use std::string for original_name.
5697
5698 2018-05-21  Tom Tromey  <tom@tromey.com>
5699
5700         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5701         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5702         constructor.
5703
5704 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5705
5706         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5707         instance to...
5708         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5709         * objfiles.c (get_objfile_bfd_data): Allocate
5710         objfile_per_bfd_storage with obstack_new when allocating on
5711         obstack.
5712
5713 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5714
5715         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5716         OBSTACK_ZALLOC.
5717         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5718         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5719         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5720         (add_pending): Likewise.
5721         (parse_symbol): Likewise.
5722         (parse_partial_symbols): Likewise.
5723         (psymtab_to_symtab_1): Likewise.
5724         (new_psymtab): Likewise.
5725         (elfmdebug_build_psymtabs): Likewise.
5726         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5727         * objfiles.c (get_objfile_bfd_data): Likewise.
5728         (objfile_register_static_link): Likewise.
5729         * psymtab.c (allocate_psymtab): Likewise.
5730         * stabsread.c (read_member_functions): Likewise.
5731         * xcoffread.c (xcoff_end_psymtab): Likewise.
5732
5733 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5734
5735         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5736         compiler supports std::is_trivially_constructible.
5737         * common/poison.h: Include obstack.h.
5738         (IsMallocable): Define to is_trivially_constructible if the
5739         compiler supports it, define to true_type otherwise.
5740         (xobnew): New.
5741         (XOBNEW): Redefine.
5742         (xobnewvec): New.
5743         (XOBNEWVEC): Redefine.
5744         * gdb_obstack.h (obstack_zalloc): New.
5745         (OBSTACK_ZALLOC): Redefine.
5746         (obstack_calloc): New.
5747         (OBSTACK_CALLOC): Redefine.
5748         (obstack_new): New.
5749         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5750         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5751         gdbarch.c.
5752         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5753         obstack_calloc/obstack_zalloc.
5754         (gdbarch_obstack_zalloc): Remove.
5755         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5756
5757 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5758
5759         * stack.c (backtrace_command_1): Remove useless variable int i.
5760
5761 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5762
5763         * stack.c (print_frame_info): Fix comment.
5764
5765 2018-05-18  Tom Tromey  <tom@tromey.com>
5766
5767         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5768         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5769         (~dwarf2_per_objfile): Update
5770         (dwarf2_get_dwz_file): Use new.
5771         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5772         unique_ptr.
5773
5774 2018-05-18  Tom Tromey  <tom@tromey.com>
5775
5776         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5777         unique_ptr.
5778         * dwarf2read.c (struct dwp_file): Add constructor and
5779         initializers.
5780         (open_and_init_dwp_file): Return a unique_ptr.
5781         (dwarf2_per_objfile, create_dwp_hash_table)
5782         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5783         (lookup_dwo_unit_in_dwp): Update.
5784         (open_and_init_dwp_file, get_dwp_file): Update.
5785
5786 2018-05-18  Tom Tromey  <tom@tromey.com>
5787
5788         * dwarf2read.c (dwarf2_per_objfile): Update.
5789         (struct mapped_index): Add initializers.
5790         (dwarf2_read_index): Use new.
5791         (dw2_symtab_iter_init): Update.
5792         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5793         unique_ptr.
5794
5795 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5796
5797         * dwarf2read.c (mapped_index) <total_size>: Remove.
5798
5799 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5800
5801         * unittests/format_pieces-selftests.c (test_format_specifier):
5802         Add ARI comments.
5803
5804 2018-05-18  Tom Tromey  <tom@tromey.com>
5805
5806         * c-typeprint.c (maybe_print_hole): New function.
5807         (c_print_type_struct_field_offset): Update.
5808         (c_type_print_base_struct_union): Call maybe_print_hole.
5809
5810 2018-05-17  Keith Seitz  <keiths@redhat.com>
5811
5812         * breakpoint.c (build_bpstat_chain): New function, moved from
5813         bpstat_stop_status.
5814         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5815         If no stop chain is passed, call build_bpstat_chain to build it.
5816         * breakpoint.h (build_bpstat_chain): Declare.
5817         (bpstat_stop_status): Move documentation here from breakpoint.c.
5818         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5819         build the stop chain and pass it to skip_inline_frames.
5820         Pass this stop chain to bpstat_stop_status.
5821         * inline-frame.c: Include breakpoint.h.
5822         (stopped_by_user_bp_inline_frame): New function.
5823         (skip_inline_frames): Add parameter `stop_chain'.
5824         Move documention to inline-frame.h.
5825         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5826         whether the frame should be elided.
5827         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5828         Add moved documentation and update for new parameter.
5829
5830 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5831
5832         PR cli/14975
5833         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5834         unittests/format_pieces-selftests.c.
5835         * common/format.h (format_piece) <operator==>: New.
5836         (format_pieces) <operator[]>: Remove.
5837         * common/format.c (format_pieces::format_pieces): Handle \e.
5838         * unittests/format_pieces-selftests.c: New.
5839
5840 2018-05-17  Tom Tromey  <tom@tromey.com>
5841
5842         PR symtab/23010:
5843         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5844         (dw2_instantiate_symtab): Add skip_partial parameter.
5845         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5846         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5847         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5848         (dw2_expand_symtabs_matching_one)
5849         (dw2_find_pc_sect_compunit_symtab)
5850         (dw2_debug_names_lookup_symbol)
5851         (dw2_debug_names_expand_symtabs_for_function): Update.
5852         (init_cutu_and_read_dies): Add skip_partial parameter.
5853         (process_psymtab_comp_unit, build_type_psymtabs_1)
5854         (process_skeletonless_type_unit, load_partial_comp_unit)
5855         (psymtab_to_symtab_1): Update.
5856         (load_full_comp_unit): Add skip_partial parameter.
5857         (process_imported_unit_die, dwarf2_read_addr_index)
5858         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5859         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5860         (read_signatured_type): Update.
5861
5862 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5863
5864         * value.c (release_value): Remove unused variable.
5865         (record_latest_value): Likewise.
5866         (access_value_history): Likewise.
5867         (preserve_values): Likewise.
5868
5869 2018-05-17  Tom Tromey  <tom@tromey.com>
5870
5871         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5872         Initialize.
5873
5874 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5875
5876         PR gdb/22286
5877         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5878         Also handle registers whose width is not a multiple of
5879         PTRACE_TYPE_RET.
5880         (linux_nat_trad_target::store_register): Likewise.
5881
5882 2018-05-16  Tom Tromey  <tom@tromey.com>
5883
5884         * gdbcore.h (core_bfd): Redefine.
5885         * corelow.c (core_target::close): Update.
5886         (core_target_open): Update.
5887         * progspace.h (struct program_space) <cbfd>: Now a
5888         gdb_bfd_ref_ptr.
5889
5890 2018-05-16  Tom Tromey  <tom@tromey.com>
5891
5892         PR cli/19551:
5893         * symfile-add-flags.h (enum symfile_add_flags)
5894         <SYMFILE_NOT_FILENAME>: New constant.
5895         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5896         objfile name from BFD.
5897         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5898         * minidebug.c (find_separate_debug_file_in_section): Put
5899         ".gnu_debugdata" into BFD's file name.
5900
5901 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5902
5903         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5904         Remove.
5905
5906 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5907
5908         PR binutils/21446
5909         * aarch64-tdep.c (aarch64_analyze_prologue,
5910         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5911         Indicate not interested in errors.
5912
5913 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5914
5915         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5916         Supply the MIPS_ZERO_REGNUM register.
5917
5918 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5919
5920         * mips-tdep.c (mask_address_var): Make variable static.
5921
5922 2018-05-14  Tom Tromey  <tom@tromey.com>
5923
5924         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5925
5926 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
5927
5928         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5929         FXSAVE_ADDR for the mxcsr register.
5930
5931 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
5932
5933         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5934
5935 2018-05-11  Pedro Alves  <palves@redhat.com>
5936
5937         * corelow.c (core_target) <core_target>: No longer inline.
5938         Initialize m_core_gdbarch, m_core_vec and build the section table
5939         here.
5940         <~core_target>: New.
5941         <core_gdbarch, get_core_register_section>: New methods.
5942         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5943         factored out from ...
5944         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5945         (core_ops): Delete.
5946         (sniff_core_bfd): Add gdbarch parameter.
5947         (core_close): Delete, merged into ...
5948         (core_target::close): ... here.  Delete self.
5949         (core_close_cleanup): Delete.
5950         (core_target_open): Allocate a core_target on the heap.  Use a
5951         unique_ptr instead of a cleanup.  Bits moved into the core_target
5952         ctor.  Adjust to use core_target methods instead of globals.
5953         (get_core_register_section): Rename to ...
5954         (core_target::get_core_register_section): ... this and adjust.
5955         (struct get_core_registers_cb_data): New.
5956         (get_core_registers_cb): Use it.  Use bool.
5957         (core_target::fetch_registers, core_target::files_info)
5958         (core_target::xfer_partial, core_target::read_description)
5959         (core_target::pid_to, core_target::thread_name): Adjust to
5960         reference class fields instead of globals.
5961         * target.h (struct target_ops_deleter, target_ops_up): New.
5962
5963 2018-05-11  Pedro Alves  <palves@redhat.com>
5964
5965         * corefile.c (core_file_command): Move to corelow.c.
5966         * corelow.c (the_core_target): Delete.
5967         (core_file_command): Moved from corefile.c.  Check exec_bfd
5968         instead of the_core_target.  Use target_detach instead of calling
5969         into the_core_target directly.
5970         (maybe_say_no_core_file_now): New.
5971         (core_target::detach): Use it.
5972         (_initialize_corelow): Remove references to the_core_target.
5973         * gdbcore.h (the_core_target): Delete.
5974
5975 2018-05-11  Tom Tromey  <tromey@redhat.com>
5976             Pedro Alves  <palves@redhat.com>
5977
5978         * corefile.c (core_bfd): Remove.
5979         * gdbcore.h (core_bfd): Now a macro.
5980         * progspace.h (struct program_space) <cbfd>: New field.
5981
5982 2018-05-11  Tom Tromey  <tom@tromey.com>
5983
5984         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5985         gdb::def_vector.
5986
5987 2018-05-10  Tom Tromey  <tom@tromey.com>
5988
5989         * configure: Rebuild.
5990         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5991
5992 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
5993
5994         PR server/23158:
5995         * regformats/regdat.sh: Adjust script, following the addition
5996         of the new expedite_regs parameter to init_target_desc.
5997
5998 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
5999     
6000         PR gdb/23127
6001         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6002         set_gdbarch_significant_addr_bit.
6003         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6004         set_gdbarch_significant_addr_bit.
6005         * utils.c (address_significant): Update to sign extend addr.
6006
6007 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6008
6009         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6010         (xtensa_linux_init_abi): Limit tdep->num_regs by
6011         tdep->num_nopriv_regs.
6012         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6013         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6014         not initialized.
6015
6016 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6017
6018         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6019
6020 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6021
6022         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6023         (I387_MXCSR_INIT_VAL): New constant.
6024         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6025         buffer if it was supplied by the inferior.
6026         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6027         (i387_xsave_get_clear_bv): New function.
6028         (i387_supply_xsave): Only read x87 control registers from the
6029         xsave buffer if the feature is enabled, and the state will have
6030         been written, otherwise, provide a suitable default.
6031         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6032         including x87 control registers.  Update control registers if they
6033         have changed from the default value, and mark features as enabled
6034         as required.
6035         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6036
6037 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6038
6039         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6040
6041 2018-05-07  Tom Tromey  <tom@tromey.com>
6042
6043         * configure: Rebuild.
6044         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6045
6046 2018-05-07  Tom Tromey  <tom@tromey.com>
6047
6048         PR tdep/20362:
6049         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6050         bit.  Use correct value for VDIV.
6051
6052 2018-05-04  Tom Tromey  <tom@tromey.com>
6053
6054         * configure: Rebuild.
6055         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6056
6057 2018-05-04  Tom Tromey  <tom@tromey.com>
6058
6059         * linux-record.c (record_linux_system_call) <case
6060         RECORD_SYS_RECVFROM>: Add "break".
6061
6062 2018-05-04  Tom Tromey  <tom@tromey.com>
6063
6064         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6065         Add missing "break".
6066         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6067         Add missing "break".
6068
6069 2018-05-04  Tom Tromey  <tom@tromey.com>
6070
6071         * rs6000-tdep.c (ppc_process_record_op4)
6072         (ppc_process_record_op63): Add fall-through comment.
6073
6074 2018-05-04  Tom Tromey  <tom@tromey.com>
6075
6076         * i386-tdep.c (i386_process_record): Add fall-through comment.
6077
6078 2018-05-04  Tom Tromey  <tom@tromey.com>
6079
6080         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6081         comment.
6082
6083 2018-05-04  Tom Tromey  <tom@tromey.com>
6084
6085         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6086         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6087         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6088         comment.
6089         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6090         comment.
6091         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6092         comment.
6093
6094 2018-05-04  Tom Tromey  <tom@tromey.com>
6095
6096         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6097
6098 2018-05-04  Tom Tromey  <tom@tromey.com>
6099
6100         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6101         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6102         * symfile.c (section_is_mapped): Fix fall-through comment.
6103         * stabsread.c (define_symbol, read_member_functions): Fix
6104         fall-through comment.
6105         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6106         comment.
6107         * remote.c (remote_wait_as): Fix fall-through comment.
6108         * p-exp.y (yylex): Fix fall-through comment.
6109         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6110         comment.
6111         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6112         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6113         * jv-exp.y (yylex): Fix fall-through comment.
6114         * go-exp.y (lex_one_token): Fix fall-through comment.
6115         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6116         fall-through comment.
6117         * f-exp.y (yylex): Fix fall-through comment.
6118         * dwarf2read.c (process_die): Fix fall-through comments.
6119         * dbxread.c (process_one_symbol): Fix fall-through comment.
6120         * d-exp.y (lex_one_token): Fix fall-through comment.
6121         * cp-name-parser.y (yylex): Fix fall-through comment.
6122         * coffread.c (coff_symtab_read): Fix fall-through comment.
6123         * c-exp.y (lex_one_token): Fix fall-through comment.
6124         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6125         comment.
6126         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6127         comment.
6128
6129 2018-05-04  Tom Tromey  <tom@tromey.com>
6130
6131         PR python/22730:
6132         * NEWS: Mention gdb.execute change.
6133         * gdbcmd.h (execute_control_command): Don't declare.
6134         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6135         execute_control_commands, execute_control_commands_to_string.
6136         * cli/cli-script.h (execute_control_commands)
6137         (execute_control_commands_to_string): Declare.
6138         (execute_control_command): Add from_tty parameter.
6139         * cli/cli-script.c (execute_control_commands)
6140         (execute_control_commands_to_string): New functions.
6141         (execute_user_command): Use execute_control_commands.
6142         (execute_control_command_1): Add "from_tty" parameter.  Update.
6143         (execute_control_command): Likewise.
6144
6145 2018-05-04  Tom Tromey  <tom@tromey.com>
6146
6147         PR python/22731:
6148         * NEWS: Mention that breakpoint commands are writable.
6149         * python/py-breakpoint.c (bppy_set_commands): New function.
6150         (breakpoint_object_getset) <"commands">: Use it.
6151
6152 2018-05-04  Tom Tromey  <tom@tromey.com>
6153
6154         * tracepoint.c (actions_command): Update.
6155         * mi/mi-cmd-break.c (mi_command_line_array)
6156         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6157         (mi_read_next_line): Remove.
6158         (mi_cmd_break_commands): Update.
6159         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6160         function_view.
6161         * cli/cli-script.c (get_command_line): Update.
6162         (process_next_line): Use function_view.  Constify.
6163         (recurse_read_control_structure, read_command_lines)
6164         (read_command_lines_1): Change argument types to function_view.
6165         (do_define_command, document_command): Update.
6166         * breakpoint.h (check_tracepoint_command): Don't declare.
6167         * breakpoint.c (check_tracepoint_command): Remove.
6168         (commands_command_1, create_tracepoint_from_upload): Update.
6169
6170 2018-05-04  Tom Tromey  <tom@tromey.com>
6171
6172         PR gdb/11750:
6173         * cli/cli-script.h (enum command_control_type) <define_control>:
6174         New constant.
6175         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6176         (build_command_line, execute_control_command_1)
6177         (process_next_line): Likewise.
6178         (do_define_command): New function, extracted from define_command.
6179         (define_command): Use it.
6180
6181 2018-05-04  Tom Tromey  <tom@tromey.com>
6182
6183         * tracepoint.c (actions_command): Update.
6184         * cli/cli-script.h (read_command_lines): Update.
6185         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6186         (MAX_TMPBUF): Remove define.
6187         (define_command): Use string_printf.
6188         (document_command): Likewise.
6189         * breakpoint.c (commands_command_1): Update.
6190
6191 2018-05-04  Tom Tromey  <tom@tromey.com>
6192
6193         * top.c (execute_command): Update.
6194         * cli/cli-script.h (print_command_lines): Now varargs.
6195         * cli/cli-script.c (print_command_lines): Now varargs.
6196         (execute_control_command_1) <case while_control, case if_control>:
6197         Update.
6198
6199 2018-05-04  Tom Tromey  <tom@tromey.com>
6200
6201         * tracepoint.c (all_tracepoint_actions): Rename from
6202         all_tracepoint_actions_and_cleanup.  Change return type.
6203         (actions_command, encode_actions_1, encode_actions)
6204         (trace_dump_actions, tdump_command): Update.
6205         * remote.c (remote_download_command_source): Update.
6206         * python/python.c (gdbpy_eval_from_control_command)
6207         (python_command, python_interactive_command): Update.
6208         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6209         * guile/guile.c (guile_command)
6210         (gdbscm_eval_from_control_command, guile_command): Update.
6211         * compile/compile.c (compile_code_command)
6212         (compile_print_command, compile_to_object): Update.
6213         * cli/cli-script.h (struct command_lines_deleter): New.
6214         (counted_command_line): New typedef.
6215         (struct command_line): Add constructor, destructor.
6216         <body_list>: Remove.
6217         <body_list_0, body_list_1>: New members.
6218         (command_line_up): Remove typedef.
6219         (read_command_lines, read_command_lines_1, get_command_line):
6220         Update.
6221         (copy_command_lines): Don't declare.
6222         * cli/cli-script.c (build_command_line): Use "new".
6223         (get_command_line): Return counted_command_line.
6224         (print_command_lines, execute_user_command)
6225         (execute_control_command_1, while_command, if_command): Update.
6226         (realloc_body_list): Remove.
6227         (process_next_line, recurse_read_control_structure): Update.
6228         (read_command_lines, read_command_lines_1): Return counted_command_line.
6229         (free_command_lines): Use "delete".
6230         (copy_command_lines): Remove.
6231         (define_command, document_command, show_user_1): Update.
6232         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6233         a counted_command_line.
6234         * breakpoint.h (counted_command_line): Remove typedef.
6235         (breakpoint_set_commands): Update.
6236         * breakpoint.c (check_no_tracepoint_commands)
6237         (validate_commands_for_breakpoint): Update.
6238         (breakpoint_set_commands): Change commands to be a
6239         counted_command_line.
6240         (commands_command_1, update_dprintf_command_list)
6241         (create_tracepoint_from_upload): Update.
6242
6243 2018-05-04  Tom Tromey  <tom@tromey.com>
6244
6245         * cli/cli-decode.h (cmd_list_element): New constructor.
6246         (~cmd_list_element): New destructor.
6247         (struct cmd_list_element): Add initializers.
6248         * cli/cli-decode.c (do_add_cmd): Use "new".
6249         (delete_cmd): Use "delete".
6250
6251 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6252             Pedro Alves <palves@redhat.com>
6253
6254         PR breakpoints/19806 and support for PR external/20207.
6255         * NEWS: Mention Aarch64 watchpoint improvements.
6256         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6257         watchpoints and PR external/20207 watchpoints.
6258         * nat/aarch64-linux-hw-point.c
6259         (kernel_supports_any_contiguous_range): New.
6260         (aarch64_watchpoint_offset): New.
6261         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6262         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6263         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6264         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6265         next_addr_orig_p.  Support PR external/20207 watchpoints.
6266         (aarch64_downgrade_regs): New.
6267         (aarch64_dr_state_insert_one_point): New parameters offset and
6268         addr_orig.
6269         (aarch64_dr_state_remove_one_point): Likewise.
6270         (aarch64_handle_breakpoint): Update caller.
6271         (aarch64_handle_aligned_watchpoint): Likewise.
6272         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6273         aligned_offset.
6274         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6275         aarch64_downgrade_regs.
6276         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6277         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6278         (DR_CONTROL_MASK): ... this.
6279         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6280         (unsigned int aarch64_watchpoint_offset): New prototype.
6281         (aarch64_linux_set_debug_regs): Remove const from state.
6282         * utils.c (align_up, align_down): Move to ...
6283         * common/common-utils.c (align_up, align_down): ... here.
6284         * utils.h (align_up, align_down): Move to ...
6285         * common/common-utils.h (align_up, align_down): ... here.
6286
6287 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6288
6289         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6290         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6291         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6292         Re-implement to match the ABI as summarized in GCC's
6293         gcc/config/sparc/sparc.c.  All callers updated.
6294         (sparc32_store_arguments): Remove assertion.
6295
6296 2018-05-04  Tom Tromey  <tom@tromey.com>
6297
6298         * printcmd.c: Don't include tui.h.
6299         (decode_format): Use skip_spaces.
6300
6301 2018-05-04  Tom Tromey  <tom@tromey.com>
6302
6303         PR gdb/22619:
6304         * printcmd.c (last_count): New global.
6305         (x_command): Use saved count when repeating.
6306
6307 2018-05-04  Tom Tromey  <tom@tromey.com>
6308
6309         * nto-procfs.c (do_closedir_cleanup): Remove.
6310         (procfs_pidlist): Use gdb_dir_up.
6311         * procfs.c (do_closedir_cleanup): Remove.
6312         (proc_update_threads): Use gdb_dir_up.
6313         * common/filestuff.h (struct gdb_dir_deleter): New.
6314         (gdb_dir_up): New typedef.
6315
6316 2018-05-04  Tom Tromey  <tom@tromey.com>
6317
6318         * ada-lang.c (print_mention_exception): Use std::string.
6319
6320 2018-05-04  Tom Tromey  <tom@tromey.com>
6321
6322         * ada-lang.c (create_excep_cond_exprs): Update.
6323         (ada_exception_catchpoint_cond_string): Use std::string.
6324
6325 2018-05-04  Tom Tromey  <tom@tromey.com>
6326
6327         * ada-lang.c (xget_renaming_scope): Return std::string.
6328         (old_renaming_is_invisible): Update.
6329
6330 2018-05-04  Tom Tromey  <tom@tromey.com>
6331
6332         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6333         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6334
6335 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6336
6337         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6338
6339 2018-05-04  Tom Tromey  <tom@tromey.com>
6340
6341         * remote.c (remote_query_supported_append): Change type.
6342         (remote_check_symbols): Update.
6343
6344 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6345
6346         PR gdb/11420
6347         * configure.ac: Prepend libpython.
6348         * python/python-config.py: Likewise.
6349         * configure: Regenerate.
6350
6351 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6352
6353         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6354
6355 2018-05-03  Pedro Alves  <palves@redhat.com>
6356
6357         * s390-linux-nat.c
6358         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6359         override.  Write 'true' instead of '1'.
6360         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6361         declaration.
6362
6363 2018-05-02  Pedro Alves  <palves@redhat.com>
6364
6365         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6366         add_inf_child_target.
6367         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6368         add_inf_child_target.
6369         * aix-thread.c (aix_thread_target_info): New.
6370         (aix_thread_target) <shortname, longname, doc>: Delete.
6371         <info>: New.
6372         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6373         add_inf_child_target.
6374         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6375         add_inf_child_target.
6376         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6377         add_inf_child_target.
6378         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6379         add_inf_child_target.
6380         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6381         add_inf_child_target.
6382         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6383         add_inf_child_target.
6384         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6385         add_inf_child_target.
6386         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6387         add_inf_child_target.
6388         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6389         add_inf_child_target.
6390         * bfd-target.c (target_bfd_target_info): New.
6391         (target_bfd) <shortname, longname, doc>: Delete.
6392         <info>: New.
6393         * bsd-kvm.c (bsd_kvm_target_info): New.
6394         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6395         <info>: New.
6396         (bsd_kvm_target::open): Rename to ...
6397         (bsd_kvm_target_open): ... this.  Adjust.
6398         * bsd-uthread.c (bsd_uthread_target_info): New.
6399         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6400         <info>: New.
6401         * corefile.c (core_file_command): Adjust.
6402         * corelow.c (core_target_info): New.
6403         (core_target) <shortname, longname, doc>: Delete.
6404         <info>: New.
6405         (core_target::open): Rename to ...
6406         (core_target_open): ... this.  Adjust.
6407         * ctf.c (ctf_target_info): New.
6408         (ctf_target) <shortname, longname, doc>: Delete.
6409         <info>: New.
6410         (ctf_target::open): Rename to ...
6411         (ctf_target_open): ... this.
6412         (_initialize_ctf): Adjust.
6413         * exec.c (exec_target_info): New.
6414         (exec_target) <shortname, longname, doc>: Delete.
6415         <info>: New.
6416         (exec_target::open): Rename to ...
6417         (exec_target_open): ... this.
6418         * gdbcore.h (core_target_open): Declare.
6419         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6420         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6421         add_inf_child_target.
6422         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6423         add_inf_child_target.
6424         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6425         add_inf_child_target.
6426         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6427         add_inf_child_target.
6428         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6429         add_inf_child_target.
6430         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6431         add_inf_child_target.
6432         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6433         add_inf_child_target.
6434         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6435         add_inf_child_target.
6436         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6437         add_inf_child_target.
6438         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6439         add_inf_child_target.
6440         * inf-child.c (inf_child_target_info): New.
6441         (inf_child_target::info): New.
6442         (inf_child_open_target): Remove 'target' parameter.  Use
6443         get_native_target instead.
6444         (inf_child_target::open): Delete.
6445         (add_inf_child_target): New.
6446         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6447         Delete.
6448         <info>: New.
6449         (add_inf_child_target): Declare.
6450         (inf_child_open_target): Declare.
6451         * linux-thread-db.c (thread_db_target_info): New.
6452         (thread_db_target) <shortname, longname, doc>: Delete.
6453         <info>: New.
6454         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6455         add_inf_child_target.
6456         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6457         add_inf_child_target.
6458         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6459         add_inf_child_target.
6460         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6461         add_inf_child_target.
6462         * make-target-delegates (print_class): Adjust.
6463         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6464         add_inf_child_target.
6465         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6466         add_inf_child_target.
6467         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6468         add_inf_child_target.
6469         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6470         add_inf_child_target.
6471         * nto-procfs.c (nto_native_target_info): New.
6472         (nto_procfs_target_native) <shortname, longname, doc>:
6473         Delete.
6474         <info>: New.
6475         (nto_procfs_target_info): New.
6476         (nto_procfs_target_procfs) <shortname, longname, doc>:
6477         Delete.
6478         <info>: New.
6479         (init_procfs_targets): Adjust.
6480         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6481         add_inf_child_target.
6482         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6483         add_inf_child_target.
6484         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6485         add_inf_child_target.
6486         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6487         add_inf_child_target.
6488         * ravenscar-thread.c (ravenscar_target_info): New.
6489         (ravenscar_thread_target) <shortname, longname, doc>:
6490         Delete.
6491         <info>: New.
6492         * record-btrace.c (record_btrace_target_info):
6493         (record_btrace_target) <shortname, longname, doc>: Delete.
6494         <info>: New.
6495         (record_btrace_target::open): Rename to ...
6496         (record_btrace_target_open): ... this.  Adjust.
6497         * record-full.c (record_longname, record_doc): New.
6498         (record_full_base_target) <shortname, longname, doc>: Delete.
6499         <info>: New.
6500         (record_full_target_info): New.
6501         (record_full_target): <shortname>: Delete.
6502         <info>: New.
6503         (record_full_core_open_1, record_full_open_1): Update comments.
6504         (record_full_base_target::open): Rename to ...
6505         (record_full_open): ... this.
6506         (cmd_record_full_restore): Update.
6507         (_initialize_record_full): Update.
6508         * remote-sim.c (remote_sim_target_info): New.
6509         (gdbsim_target) <shortname, longname, doc>: Delete.
6510         <info>: New.
6511         (gdbsim_target::open): Rename to ...
6512         (gdbsim_target_open): ... this.
6513         (_initialize_remote_sim): Adjust.
6514         * remote.c (remote_doc): New.
6515         (remote_target_info): New.
6516         (remote_target) <shortname, longname, doc>: Delete.
6517         <info>: New.
6518         (extended_remote_target_info): New.
6519         (extended_remote_target) <shortname, longname, doc>: Delete.
6520         <info>: New.
6521         (remote_target::open_1): Make static.  Adjust.
6522         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6523         * s390-linux-nat.c (_initialize_s390_nat): Use
6524         add_inf_child_target.
6525         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6526         add_inf_child_target.
6527         * sol-thread.c (thread_db_target_info): New.
6528         (sol_thread_target) <shortname, longname, doc>: Delete.
6529         <info>: New.
6530         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6531         add_inf_child_target.
6532         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6533         add_inf_child_target.
6534         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6535         add_inf_child_target.
6536         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6537         add_inf_child_target.
6538         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6539         add_inf_child_target.
6540         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6541         add_inf_child_target.
6542         * spu-linux-nat.c (_initialize_spu_nat): Use
6543         add_inf_child_target.
6544         * spu-multiarch.c (spu_multiarch_target_info): New.
6545         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6546         <info>: New.
6547         * target-delegates.c: Regenerate.
6548         * target.c: Include <unordered_map>.
6549         (target_ops_p): Delete.
6550         (DEF_VEC_P(target_ops_p)): Delete.
6551         (target_factories): New.
6552         (test_target_info): New.
6553         (test_target_ops::info): New.
6554         (open_target): Adjust to use target_factories.
6555         (add_target_with_completer): Rename to ...
6556         (add_target): ... this.  Change prototype.  Register target_info
6557         and open callback in target_factories.  Register target_info in
6558         command context instead of target_ops.
6559         (add_target): Delete old implementation.
6560         (add_deprecated_target_alias): Change prototype.  Adjust.
6561         (the_native_target): New.
6562         (set_native_target, get_native_target): New.
6563         (find_default_run_target): Use the_native_target.
6564         (find_attach_target, find_run_target): Simplify.
6565         (target_ops::open): Delete.
6566         (dummy_target_info): New.
6567         (dummy_target::shortname, dummy_target::longname)
6568         (dummy_target::doc): Delete.
6569         (dummy_target::info): New.
6570         (debug_target::shortname, debug_target::longname)
6571         (debug_target::doc): Delete.
6572         (debug_target::info): New.
6573         * target.h (struct target_info): New.
6574         (target_ops::~target_ops): Add comment.
6575         (target_ops::info): New.
6576         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6577         longer virtual.  Implement in terms of target_info.
6578         (set_native_target, get_native_target): Declare.
6579         (target_open_ftype): New.
6580         (add_target, add_target_with_completer)
6581         (add_deprecated_target_alias): Change prototype.
6582         (test_target) <shortname, longname, doc>: Delete.
6583         <info>: New.
6584         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6585         add_inf_child_target.
6586         * tracefile-tfile.c (tfile_target_info): New.
6587         (tfile_target) <shortname, longname, doc>: Delete.
6588         <info>: New.
6589         (tfile_target::open): Rename to ...
6590         (tfile_target_open): ... this.
6591         (_initialize_tracefile_tfile): Adjust.
6592         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6593         add_inf_child_target.
6594         * windows-nat.c (_initialize_windows_nat): Use
6595         add_inf_child_target.
6596         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6597         add_inf_child_target.
6598
6599 2018-05-02  Pedro Alves  <palves@redhat.com>
6600
6601         * linux-nat.h (linux_nat_target) <low_new_thread,
6602         low_delete_thread, low_new_fork, low_forget_process,
6603         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6604         New virtual methods.
6605         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6606         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6607         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6608         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6609         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6610         Delete.
6611         * linux-fork.c (delete_fork): Adjust to call low method.
6612         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6613         (linux_nat_new_fork, linux_nat_forget_process_hook)
6614         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6615         (linux_nat_status_is_event):
6616         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6617         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6618         to call low method.
6619         (sigtrap_is_event): Rename to ...
6620         (linux_nat_target::low_status_is_event): ... this.
6621         (linux_nat_set_status_is_event): Delete.
6622         (save_stop_reason, linux_nat_wait_1)
6623         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6624         low methods.
6625         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6626         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6627         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6628         (linux_nat_set_prepare_to_resume): Delete.
6629         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6630         low virtual methods.
6631         * amd64-linux-nat.c: Likewise.
6632         * arm-linux-nat.c: Likewise.
6633         * i386-linux-nat.c: Likewise.
6634         * ia64-linux-nat.c: Likewise.
6635         * mips-linux-nat.c: Likewise.
6636         * ppc-linux-nat.c: Likewise.
6637         * s390-linux-nat.c: Likewise.
6638         * sparc64-linux-nat.c: Likewise.
6639         * x86-linux-nat.c: Likewise.
6640         * x86-linux-nat.h: Include "nat/x86-linux.h".
6641         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6642         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6643         Override methods.
6644
6645 2018-05-02  Pedro Alves  <palves@redhat.com>
6646
6647         * target.h (target_ops)
6648         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6649         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6650         stopped_by_watchpoint, have_continuable_watchpoint,
6651         stopped_data_address, watchpoint_addr_within_range,
6652         can_accel_watchpoint_condition, can_run, thread_alive,
6653         has_all_memory, has_memory, has_stack, has_registers,
6654         has_execution, can_async_p, is_async_p, supports_non_stop,
6655         always_non_stop_p, can_execute_reverse, supports_multi_process,
6656         supports_enable_disable_tracepoint,
6657         supports_disable_randomization, supports_string_tracing,
6658         supports_evaluation_of_breakpoint_conditions,
6659         can_run_breakpoint_commands, filesystem_is_local,
6660         can_download_tracepoint, get_trace_state_variable_value,
6661         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6662         record_is_replaying, record_will_replay,
6663         augmented_libraries_svr4_read>: Adjust to return bool.
6664         * aarch64-linux-nat.c: All implementations adjusted.
6665         * aix-thread.c: All implementations adjusted.
6666         * arm-linux-nat.c: All implementations adjusted.
6667         * breakpoint.c: All implementations adjusted.
6668         * bsd-kvm.c: All implementations adjusted.
6669         * bsd-uthread.c: All implementations adjusted.
6670         * corelow.c: All implementations adjusted.
6671         * ctf.c: All implementations adjusted.
6672         * darwin-nat.c: All implementations adjusted.
6673         * darwin-nat.h: All implementations adjusted.
6674         * exec.c: All implementations adjusted.
6675         * fbsd-nat.c: All implementations adjusted.
6676         * fbsd-nat.h: All implementations adjusted.
6677         * gnu-nat.c: All implementations adjusted.
6678         * gnu-nat.h: All implementations adjusted.
6679         * go32-nat.c: All implementations adjusted.
6680         * ia64-linux-nat.c: All implementations adjusted.
6681         * inf-child.c: All implementations adjusted.
6682         * inf-child.h: All implementations adjusted.
6683         * inf-ptrace.c: All implementations adjusted.
6684         * inf-ptrace.h: All implementations adjusted.
6685         * linux-nat.c: All implementations adjusted.
6686         * linux-nat.h: All implementations adjusted.
6687         * mips-linux-nat.c: All implementations adjusted.
6688         * nto-procfs.c: All implementations adjusted.
6689         * ppc-linux-nat.c: All implementations adjusted.
6690         * procfs.c: All implementations adjusted.
6691         * ravenscar-thread.c: All implementations adjusted.
6692         * record-btrace.c: All implementations adjusted.
6693         * record-full.c: All implementations adjusted.
6694         * remote-sim.c: All implementations adjusted.
6695         * remote.c: All implementations adjusted.
6696         * s390-linux-nat.c: All implementations adjusted.
6697         * sol-thread.c: All implementations adjusted.
6698         * spu-multiarch.c: All implementations adjusted.
6699         * target-delegates.c: All implementations adjusted.
6700         * target.c: All implementations adjusted.
6701         * target.h: All implementations adjusted.
6702         * tracefile-tfile.c: All implementations adjusted.
6703         * tracefile.c: All implementations adjusted.
6704         * tracefile.h: All implementations adjusted.
6705         * windows-nat.c: All implementations adjusted.
6706         * x86-linux-nat.h: All implementations adjusted.
6707         * x86-nat.h: All implementations adjusted.
6708
6709 2018-05-02  Pedro Alves  <palves@redhat.com>
6710
6711         * make-target-delegates (scan_target_h): Don't trim lines here.
6712         Replace sequences of tabs and/or whitespace with a single
6713         whitespace.
6714         (top level, parsing methods): Trim each line before processing it
6715         here.
6716
6717 2018-05-02  Pedro Alves  <palves@redhat.com>
6718             John Baldwin  <jhb@freebsd.org>
6719
6720         * target.h (enum strata) <debug_stratum>: New.
6721         (struct target_ops) <all delegation methods>: Replace by C++
6722         virtual methods, and drop "to_" prefix.  All references updated
6723         throughout.
6724         <to_shortname, to_longname, to_doc, to_data,
6725         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6726         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6727         virtual methods.  All references updated throughout.
6728         <can_attach, supports_terminal_ours, can_create_inferior,
6729         get_thread_control_capabilities, attach_no_wait>: New
6730         virtual methods.
6731         <insert_breakpoint, remove_breakpoint>: Now
6732         TARGET_DEFAULT_NORETURN methods.
6733         <info_proc>: Now returns bool.
6734         <to_magic>: Delete.
6735         (OPS_MAGIC): Delete.
6736         (current_target): Delete.  All references replaced by references
6737         to ...
6738         (target_stack): ... this.  New.
6739         (target_shortname, target_longname): Adjust.
6740         (target_can_run): Now a function declaration.
6741         (default_child_has_all_memory, default_child_has_memory)
6742         (default_child_has_stack, default_child_has_registers)
6743         (default_child_has_execution): Remove target_ops parameter.
6744         (complete_target_initialization): Delete.
6745         (memory_breakpoint_target): New template class.
6746         (test_target_ops): Refactor as a C++ class with virtual methods.
6747         * make-target-delegates (NAME_PART): Tighten.
6748         (POINTER_PART, CP_SYMBOL): New.
6749         (SIMPLE_RETURN_PART): Reimplement.
6750         (VEC_RETURN_PART): Expect less.
6751         (RETURN_PART, VIRTUAL_PART): New.
6752         (METHOD): Adjust to C++ virtual methods.
6753         (scan_target_h): Remove reference to C99.
6754         (dname): Output "target_ops::" prefix.
6755         (write_function_header): Adjust to output a C++ class method.
6756         (write_declaration): New.
6757         (write_delegator): Adjust to output a C++ class method.
6758         (tdname): Output "dummy_target::" prefix.
6759         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6760         method.
6761         (tdefault_names, debug_names): Delete.
6762         (return_types, tdefaults, styles, argtypes_array): New.
6763         (top level): All methods are delegators.
6764         (print_class): New.
6765         (top level): Print dummy_target and debug_target classes.
6766         * target-delegates.c: Regenerate.
6767         * target-debug.h (target_debug_print_enum_info_proc_what)
6768         (target_debug_print_thread_control_capabilities)
6769         (target_debug_print_thread_info_p): New.
6770         * target.c (dummy_target): Delete.
6771         (the_dummy_target, the_debug_target): New.
6772         (target_stack): Now extern.
6773         (set_targetdebug): Push/unpush debug target.
6774         (default_child_has_all_memory, default_child_has_memory)
6775         (default_child_has_stack, default_child_has_registers)
6776         (default_child_has_execution): Remove target_ops parameter.
6777         (complete_target_initialization): Delete.
6778         (add_target_with_completer): No longer call
6779         complete_target_initialization.
6780         (target_supports_terminal_ours): Use regular delegation.
6781         (update_current_target): Delete.
6782         (push_target): No longer check magic number.  Don't call
6783         update_current_target.
6784         (unpush_target): Don't call update_current_target.
6785         (target_is_pushed): No longer check magic number.
6786         (target_require_runnable): Skip for all stratums over
6787         process_stratum.
6788         (target_ops::info_proc): New.
6789         (target_info_proc): Use find_target_at and
6790         find_default_run_target.
6791         (target_supports_disable_randomization): Use regular delegation.
6792         (target_get_osdata): Use find_target_at.
6793         (target_ops::open, target_ops::close, target_ops::can_attach)
6794         (target_ops::attach, target_ops::can_create_inferior)
6795         (target_ops::create_inferior, target_ops::can_run)
6796         (target_can_run): New.
6797         (default_fileio_target): Use regular delegation.
6798         (target_ops::fileio_open, target_ops::fileio_pwrite)
6799         (target_ops::fileio_pread, target_ops::fileio_fstat)
6800         (target_ops::fileio_close, target_ops::fileio_unlink)
6801         (target_ops::fileio_readlink): New.
6802         (target_fileio_open_1, target_fileio_unlink)
6803         (target_fileio_readlink): Always call the target method.  Handle
6804         FILEIO_ENOSYS.
6805         (return_zero, return_zero_has_execution): Delete.
6806         (init_dummy_target): Delete.
6807         (dummy_target::dummy_target, dummy_target::shortname)
6808         (dummy_target::longname, dummy_target::doc)
6809         (debug_target::debug_target, debug_target::shortname)
6810         (debug_target::longname, debug_target::doc): New.
6811         (target_supports_delete_record): Use regular delegation.
6812         (setup_target_debug): Delete.
6813         (maintenance_print_target_stack): Skip debug_stratum.
6814         (initialize_targets): Instantiate the_dummy_target and
6815         the_debug_target.
6816         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6817         use target_stack.
6818         (target_auxv_search, fprint_target_auxv): Adjust.
6819         (info_auxv_command): Adjust to use target_stack.
6820         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6821         * exceptions.c (print_flush): Handle a NULL target_stack.
6822         * regcache.c (target_ops_no_register): Refactor as class with
6823         virtual methods.
6824
6825         * exec.c (exec_target): New class.
6826         (exec_ops): Now an exec_target.
6827         (exec_open, exec_close_1, exec_get_section_table)
6828         (exec_xfer_partial, exec_files_info, exec_has_memory)
6829         (exec_make_note_section): Refactor as exec_target methods.
6830         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6831         Delete.
6832         (exec_target::find_memory_regions): New.
6833         (_initialize_exec): Don't call init_exec_ops.
6834         * gdbcore.h (exec_file_clear): Delete.
6835
6836         * corefile.c (core_target): Delete.
6837         (core_file_command): Adjust.
6838         * corelow.c (core_target): New class.
6839         (the_core_target): New.
6840         (core_close): Remove target_ops parameter.
6841         (core_close_cleanup): Adjust.
6842         (core_target::close): New.
6843         (core_open, core_detach, get_core_registers, core_files_info)
6844         (core_xfer_partial, core_thread_alive, core_read_description)
6845         (core_pid_to_str, core_thread_name, core_has_memory)
6846         (core_has_stack, core_has_registers, core_info_proc): Rework as
6847         core_target methods.
6848         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6849         (_initialize_corelow): Initialize the_core_target.
6850         * gdbcore.h (core_target): Delete.
6851         (the_core_target): New.
6852
6853         * ctf.c: (ctf_target): New class.
6854         (ctf_ops): Now a ctf_target.
6855         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6856         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6857         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6858         methods.
6859         (init_ctf_ops): Delete.
6860         (_initialize_ctf): Don't call it.
6861         * tracefile-tfile.c (tfile_target): New class.
6862         (tfile_ops): Now a tfile_target.
6863         (tfile_open, tfile_close, tfile_files_info)
6864         (tfile_get_tracepoint_status, tfile_trace_find)
6865         (tfile_fetch_registers, tfile_xfer_partial)
6866         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6867         Refactor as tfile_target methods.
6868         (tfile_xfer_partial_features): Remove target_ops parameter.
6869         (init_tfile_ops): Delete.
6870         (_initialize_tracefile_tfile): Don't call it.
6871         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6872         (tracefile_has_stack, tracefile_has_registers)
6873         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6874         tracefile_target methods.
6875         (init_tracefile_ops): Delete.
6876         (tracefile_target::tracefile_target): New.
6877         * tracefile.h: Include "target.h".
6878         (tracefile_target): New class.
6879         (init_tracefile_ops): Delete.
6880
6881         * spu-multiarch.c (spu_multiarch_target): New class.
6882         (spu_ops): Now a spu_multiarch_target.
6883         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6884         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6885         (spu_search_memory, spu_mourn_inferior): Refactor as
6886         spu_multiarch_target methods.
6887         (init_spu_ops): Delete.
6888         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6889         complete_target_initialization.
6890
6891         * ravenscar-thread.c (ravenscar_thread_target): New class.
6892         (ravenscar_ops): Now a ravenscar_thread_target.
6893         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6894         (ravenscar_thread_alive, ravenscar_pid_to_str)
6895         (ravenscar_fetch_registers, ravenscar_store_registers)
6896         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6897         (ravenscar_stopped_by_hw_breakpoint)
6898         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6899         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6900         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6901         methods.
6902         (init_ravenscar_thread_ops): Delete.
6903         (_initialize_ravenscar): Remove references to
6904         init_ravenscar_thread_ops and complete_target_initialization.
6905
6906         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6907         (bsd_uthread_target): New class.
6908         (bsd_uthread_ops): Now a bsd_uthread_target.
6909         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6910         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6911         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6912         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6913         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6914         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6915         (bsd_uthread_target): Delete function.
6916         (_initialize_bsd_uthread): Remove reference to
6917         complete_target_initialization.
6918
6919         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6920         (target_bfd): ... this new class.
6921         (target_bfd_xfer_partial, target_bfd_get_section_table)
6922         (target_bfd_close): Refactor as target_bfd methods.
6923         (target_bfd::~target_bfd): New.
6924         (target_bfd_reopen): Adjust.
6925         (target_bfd::close): New.
6926
6927         * record-btrace.c (record_btrace_target): New class.
6928         (record_btrace_ops): Now a record_btrace_target.
6929         (record_btrace_open, record_btrace_stop_recording)
6930         (record_btrace_disconnect, record_btrace_close)
6931         (record_btrace_async, record_btrace_info)
6932         (record_btrace_insn_history, record_btrace_insn_history_range)
6933         (record_btrace_insn_history_from, record_btrace_call_history)
6934         (record_btrace_call_history_range)
6935         (record_btrace_call_history_from, record_btrace_record_method)
6936         (record_btrace_is_replaying, record_btrace_will_replay)
6937         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6938         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6939         (record_btrace_store_registers, record_btrace_prepare_to_store)
6940         (record_btrace_to_get_unwinder)
6941         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6942         (record_btrace_commit_resume, record_btrace_wait)
6943         (record_btrace_stop, record_btrace_can_execute_reverse)
6944         (record_btrace_stopped_by_sw_breakpoint)
6945         (record_btrace_supports_stopped_by_sw_breakpoint)
6946         (record_btrace_stopped_by_hw_breakpoint)
6947         (record_btrace_supports_stopped_by_hw_breakpoint)
6948         (record_btrace_update_thread_list, record_btrace_thread_alive)
6949         (record_btrace_goto_begin, record_btrace_goto_end)
6950         (record_btrace_goto, record_btrace_stop_replaying_all)
6951         (record_btrace_execution_direction)
6952         (record_btrace_prepare_to_generate_core)
6953         (record_btrace_done_generating_core): Refactor as
6954         record_btrace_target methods.
6955         (init_record_btrace_ops): Delete.
6956         (_initialize_record_btrace): Remove reference to
6957         init_record_btrace_ops.
6958         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6959         the execution_direction global.
6960         (record_full_base_target, record_full_target)
6961         (record_full_core_target): New classes.
6962         (record_full_ops): Now a record_full_target.
6963         (record_full_core_ops): Now a record_full_core_target.
6964         (record_full_target::detach, record_full_target::disconnect)
6965         (record_full_core_target::disconnect)
6966         (record_full_target::mourn_inferior, record_full_target::kill):
6967         New.
6968         (record_full_open, record_full_close, record_full_async): Refactor
6969         as methods of the record_full_base_target class.
6970         (record_full_resume, record_full_commit_resume): Refactor
6971         as methods of the record_full_target class.
6972         (record_full_wait, record_full_stopped_by_watchpoint)
6973         (record_full_stopped_data_address)
6974         (record_full_stopped_by_sw_breakpoint)
6975         (record_full_supports_stopped_by_sw_breakpoint)
6976         (record_full_stopped_by_hw_breakpoint)
6977         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6978         methods of the record_full_base_target class.
6979         (record_full_store_registers, record_full_xfer_partial)
6980         (record_full_insert_breakpoint, record_full_remove_breakpoint):
6981         Refactor as methods of the record_full_target class.
6982         (record_full_can_execute_reverse, record_full_get_bookmark)
6983         (record_full_goto_bookmark, record_full_execution_direction)
6984         (record_full_record_method, record_full_info, record_full_delete)
6985         (record_full_is_replaying, record_full_will_replay)
6986         (record_full_goto_begin, record_full_goto_end, record_full_goto)
6987         (record_full_stop_replaying): Refactor as methods of the
6988         record_full_base_target class.
6989         (record_full_core_resume, record_full_core_kill)
6990         (record_full_core_fetch_registers)
6991         (record_full_core_prepare_to_store)
6992         (record_full_core_store_registers, record_full_core_xfer_partial)
6993         (record_full_core_insert_breakpoint)
6994         (record_full_core_remove_breakpoint)
6995         (record_full_core_has_execution): Refactor
6996         as methods of the record_full_core_target class.
6997         (record_full_base_target::supports_delete_record): New.
6998         (init_record_full_ops): Delete.
6999         (init_record_full_core_ops): Delete.
7000         (record_full_save): Refactor as method of the
7001         record_full_base_target class.
7002         (_initialize_record_full): Remove references to
7003         init_record_full_ops and init_record_full_core_ops.
7004
7005         * remote.c (remote_target, extended_remote_target): New classes.
7006         (remote_ops): Now a remote_target.
7007         (extended_remote_ops): Now an extended_remote_target.
7008         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7009         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7010         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7011         (remote_pass_signals, remote_set_syscall_catchpoint)
7012         (remote_program_signals, )
7013         (remote_thread_always_alive): Remove target_ops parameter.
7014         (remote_thread_alive, remote_thread_name)
7015         (remote_update_thread_list, remote_threads_extra_info)
7016         (remote_static_tracepoint_marker_at)
7017         (remote_static_tracepoint_markers_by_strid)
7018         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7019         (remote_open): Refactor as methods of remote_target.
7020         (extended_remote_open, extended_remote_detach)
7021         (extended_remote_attach, extended_remote_post_attach):
7022         (extended_remote_supports_disable_randomization)
7023         (extended_remote_create_inferior): : Refactor as method of
7024         extended_remote_target.
7025         (remote_set_permissions, remote_open_1, remote_detach)
7026         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7027         (remote_resume, remote_commit_resume, remote_stop)
7028         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7029         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7030         (remote_prepare_to_store, remote_store_registers)
7031         (remote_flash_erase, remote_flash_done, remote_files_info)
7032         (remote_kill, remote_mourn, remote_insert_breakpoint)
7033         (remote_remove_breakpoint, remote_insert_watchpoint)
7034         (remote_watchpoint_addr_within_range)
7035         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7036         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7037         (remote_supports_stopped_by_sw_breakpoint)
7038         (remote_stopped_by_hw_breakpoint)
7039         (remote_supports_stopped_by_hw_breakpoint)
7040         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7041         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7042         (remote_verify_memory): Refactor as methods of remote_target.
7043         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7044         parameter.
7045         (remote_xfer_partial, remote_get_memory_xfer_limit)
7046         (remote_search_memory, remote_rcmd, remote_memory_map)
7047         (remote_pid_to_str, remote_get_thread_local_address)
7048         (remote_get_tib_address, remote_read_description): Refactor as
7049         methods of remote_target.
7050         (remote_target::fileio_open, remote_target::fileio_pwrite)
7051         (remote_target::fileio_pread, remote_target::fileio_close): New.
7052         (remote_hostio_readlink, remote_hostio_fstat)
7053         (remote_filesystem_is_local, remote_can_execute_reverse)
7054         (remote_supports_non_stop, remote_supports_disable_randomization)
7055         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7056         (remote_supports_enable_disable_tracepoint)
7057         (remote_supports_string_tracing)
7058         (remote_can_run_breakpoint_commands, remote_trace_init)
7059         (remote_download_tracepoint, remote_can_download_tracepoint)
7060         (remote_download_trace_state_variable, remote_enable_tracepoint)
7061         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7062         (remote_trace_start, remote_get_trace_status)
7063         (remote_get_tracepoint_status, remote_trace_stop)
7064         (remote_trace_find, remote_get_trace_state_variable_value)
7065         (remote_save_trace_data, remote_get_raw_trace_data)
7066         (remote_set_disconnected_tracing, remote_core_of_thread)
7067         (remote_set_circular_trace_buffer, remote_traceframe_info)
7068         (remote_get_min_fast_tracepoint_insn_len)
7069         (remote_set_trace_buffer_size, remote_set_trace_notes)
7070         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7071         (remote_disable_btrace, remote_teardown_btrace)
7072         (remote_read_btrace, remote_btrace_conf)
7073         (remote_augmented_libraries_svr4_read, remote_load)
7074         (remote_pid_to_exec_file, remote_can_do_single_step)
7075         (remote_execution_direction, remote_thread_handle_to_thread_info):
7076         Refactor as methods of remote_target.
7077         (init_remote_ops, init_extended_remote_ops): Delete.
7078         (remote_can_async_p, remote_is_async_p, remote_async)
7079         (remote_thread_events, remote_upload_tracepoints)
7080         (remote_upload_trace_state_variables): Refactor as methods of
7081         remote_target.
7082         (_initialize_remote): Remove references to init_remote_ops and
7083         init_extended_remote_ops.
7084
7085         * remote-sim.c (gdbsim_target): New class.
7086         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7087         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7088         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7089         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7090         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7091         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7092         Refactor as methods of gdbsim_target.
7093         (gdbsim_ops): Now a gdbsim_target.
7094         (init_gdbsim_ops): Delete.
7095         (gdbsim_cntrl_c): Adjust.
7096         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7097
7098         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7099         (the_amd64_linux_nat_target): New.
7100         (amd64_linux_fetch_inferior_registers)
7101         (amd64_linux_store_inferior_registers): Refactor as methods of
7102         amd64_linux_nat_target.
7103         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7104         * i386-linux-nat.c: Don't include "linux-nat.h".
7105         (i386_linux_nat_target): New class.
7106         (the_i386_linux_nat_target): New.
7107         (i386_linux_fetch_inferior_registers)
7108         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7109         as methods of i386_linux_nat_target.
7110         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7111         * inf-child.c (inf_child_ops): Delete.
7112         (inf_child_fetch_inferior_registers)
7113         (inf_child_store_inferior_registers): Delete.
7114         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7115         methods of inf_child_target.
7116         (inf_child_target::supports_terminal_ours)
7117         (inf_child_target::terminal_init)
7118         (inf_child_target::terminal_inferior)
7119         (inf_child_target::terminal_ours_for_output)
7120         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7121         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7122         New.
7123         (inf_child_open, inf_child_disconnect, inf_child_close)
7124         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7125         (inf_child_post_startup_inferior, inf_child_can_run)
7126         (inf_child_pid_to_exec_file): Refactor as methods of
7127         inf_child_target.
7128         (inf_child_follow_fork): Delete.
7129         (inf_child_target::can_create_inferior)
7130         (inf_child_target::can_attach): New.
7131         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7132         (inf_child_target::has_stack, inf_child_target::has_registers)
7133         (inf_child_target::has_execution): New.
7134         (inf_child_fileio_open, inf_child_fileio_pwrite)
7135         (inf_child_fileio_pread, inf_child_fileio_fstat)
7136         (inf_child_fileio_close, inf_child_fileio_unlink)
7137         (inf_child_fileio_readlink, inf_child_use_agent)
7138         (inf_child_can_use_agent): Refactor as methods of
7139         inf_child_target.
7140         (return_zero, inf_child_target): Delete.
7141         (inf_child_target::inf_child_target): New.
7142         * inf-child.h: Include "target.h".
7143         (inf_child_target): Delete function prototype.
7144         (inf_child_target): New class.
7145         (inf_child_open_target, inf_child_mourn_inferior)
7146         (inf_child_maybe_unpush_target): Delete.
7147         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7148         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7149         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7150         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7151         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7152         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7153         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7154         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7155         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7156         methods of inf_ptrace_target.
7157         (inf_ptrace_target): Delete function.
7158         * inf-ptrace.h: Include "inf-child.h".
7159         (inf_ptrace_target): Delete function declaration.
7160         (inf_ptrace_target): New class.
7161         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7162         * linux-nat.c (linux_target): New.
7163         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7164         (linux_nat_target::~linux_nat_target): New.
7165         (linux_child_post_attach, linux_child_post_startup_inferior)
7166         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7167         (linux_child_remove_fork_catchpoint)
7168         (linux_child_insert_vfork_catchpoint)
7169         (linux_child_remove_vfork_catchpoint)
7170         (linux_child_insert_exec_catchpoint)
7171         (linux_child_remove_exec_catchpoint)
7172         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7173         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7174         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7175         (linux_nat_stopped_data_address)
7176         (linux_nat_stopped_by_sw_breakpoint)
7177         (linux_nat_supports_stopped_by_sw_breakpoint)
7178         (linux_nat_stopped_by_hw_breakpoint)
7179         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7180         (linux_nat_kill, linux_nat_mourn_inferior)
7181         (linux_nat_xfer_partial, linux_nat_thread_alive)
7182         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7183         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7184         (linux_child_static_tracepoint_markers_by_strid)
7185         (linux_nat_is_async_p, linux_nat_can_async_p)
7186         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7187         (linux_nat_supports_multi_process)
7188         (linux_nat_supports_disable_randomization, linux_nat_async)
7189         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7190         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7191         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7192         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7193         methods of linux_nat_target.
7194         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7195         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7196         parameter.
7197         (check_stopped_by_watchpoint): Adjust.
7198         (linux_xfer_partial): Delete.
7199         (linux_target_install_ops, linux_target, linux_nat_add_target):
7200         Delete.
7201         (linux_nat_target::linux_nat_target): New.
7202         * linux-nat.h: Include "inf-ptrace.h".
7203         (linux_nat_target): New.
7204         (linux_target, linux_target_install_ops, linux_nat_add_target):
7205         Delete function declarations.
7206         (linux_target): Declare global.
7207         * linux-thread-db.c (thread_db_target): New.
7208         (thread_db_target::thread_db_target): New.
7209         (thread_db_ops): Delete.
7210         (the_thread_db_target): New.
7211         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7212         (thread_db_update_thread_list, thread_db_pid_to_str)
7213         (thread_db_extra_thread_info)
7214         (thread_db_thread_handle_to_thread_info)
7215         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7216         (thread_db_resume): Refactor as methods of thread_db_target.
7217         (init_thread_db_ops): Delete.
7218         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7219         * x86-linux-nat.c: Don't include "linux-nat.h".
7220         (super_post_startup_inferior): Delete.
7221         (x86_linux_nat_target::~x86_linux_nat_target): New.
7222         (x86_linux_child_post_startup_inferior)
7223         (x86_linux_read_description, x86_linux_enable_btrace)
7224         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7225         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7226         methods of x86_linux_nat_target.
7227         (x86_linux_create_target): Delete.  Bits folded ...
7228         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7229         pointer.
7230         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7231         (x86_linux_nat_target): New class.
7232         (x86_linux_create_target): Delete.
7233         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7234         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7235         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7236         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7237         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7238         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7239         make extern.
7240         (x86_use_watchpoints): Delete.
7241         * x86-nat.h: Include "breakpoint.h" and "target.h".
7242         (x86_use_watchpoints): Delete.
7243         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7244         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7245         (x86_insert_watchpoint, x86_remove_watchpoint)
7246         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7247         (x86_stopped_by_hw_breakpoint): New declarations.
7248         (x86_nat_target): New template class.
7249
7250         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7251         (the_ppc_linux_nat_target): New.
7252         (ppc_linux_fetch_inferior_registers)
7253         (ppc_linux_can_use_hw_breakpoint)
7254         (ppc_linux_region_ok_for_hw_watchpoint)
7255         (ppc_linux_ranged_break_num_registers)
7256         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7257         (ppc_linux_insert_mask_watchpoint)
7258         (ppc_linux_remove_mask_watchpoint)
7259         (ppc_linux_can_accel_watchpoint_condition)
7260         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7261         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7262         (ppc_linux_watchpoint_addr_within_range)
7263         (ppc_linux_masked_watch_num_registers)
7264         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7265         (ppc_linux_read_description): Refactor as methods of
7266         ppc_linux_nat_target.
7267         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7268
7269         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7270         (procfs_target): New class.
7271         (the_procfs_target): New.
7272         (procfs_target): Delete function.
7273         (procfs_auxv_parse, procfs_attach, procfs_detach)
7274         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7275         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7276         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7277         (procfs_create_inferior, procfs_update_thread_list)
7278         (procfs_thread_alive, procfs_pid_to_str)
7279         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7280         (procfs_stopped_data_address, procfs_insert_watchpoint)
7281         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7282         (proc_find_memory_regions, procfs_info_proc)
7283         (procfs_make_note_section): Refactor as methods of procfs_target.
7284         (_initialize_procfs): Adjust.
7285         * sol-thread.c (sol_thread_target): New class.
7286         (sol_thread_ops): Now a sol_thread_target.
7287         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7288         (sol_thread_fetch_registers, sol_thread_store_registers)
7289         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7290         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7291         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7292         (init_sol_thread_ops): Delete.
7293         (_initialize_sol_thread): Adjust.  Remove references to
7294         init_sol_thread_ops and complete_target_initialization.
7295
7296         * windows-nat.c (windows_nat_target): New class.
7297         (windows_fetch_inferior_registers)
7298         (windows_store_inferior_registers, windows_resume, windows_wait)
7299         (windows_attach, windows_detach, windows_pid_to_exec_file)
7300         (windows_files_info, windows_create_inferior)
7301         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7302         (windows_close, windows_pid_to_str, windows_xfer_partial)
7303         (windows_get_tib_address, windows_get_ada_task_ptid)
7304         (windows_thread_name, windows_thread_alive): Refactor as
7305         windows_nat_target methods.
7306         (do_initial_windows_stuff): Adjust.
7307         (windows_target): Delete function.
7308         (_initialize_windows_nat): Adjust.
7309
7310         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7311         (darwin_mourn_inferior, darwin_kill_inferior)
7312         (darwin_create_inferior, darwin_attach, darwin_detach)
7313         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7314         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7315         (darwin_supports_multi_process): Refactor as darwin_nat_target
7316         methods.
7317         (darwin_resume_to, darwin_files_info): Delete.
7318         (_initialize_darwin_inferior): Rename to ...
7319         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7320         * darwin-nat.h: Include "inf-child.h".
7321         (darwin_nat_target): New class.
7322         (darwin_complete_target): Delete.
7323         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7324         (darwin_target): New.
7325         (i386_darwin_fetch_inferior_registers)
7326         (i386_darwin_store_inferior_registers): Refactor as methods of
7327         darwin_nat_target.
7328         (darwin_complete_target): Delete, with ...
7329         (_initialize_i386_darwin_nat): ... bits factored out here.
7330
7331         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7332         (the_alpha_linux_nat_target): New.
7333         (alpha_linux_register_u_offset): Refactor as
7334         alpha_linux_nat_target method.
7335         (_initialize_alpha_linux_nat): Adjust.
7336         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7337         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7338         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7339         methods of linux_nat_trad_target.
7340         (linux_trad_target): Delete.
7341         * linux-nat-trad.h (linux_trad_target): Delete function.
7342         (linux_nat_trad_target): New class.
7343         * mips-linux-nat.c (mips_linux_nat_target): New class.
7344         (super_fetch_registers, super_store_registers, super_close):
7345         Delete.
7346         (the_mips_linux_nat_target): New.
7347         (mips64_linux_regsets_fetch_registers)
7348         (mips64_linux_regsets_store_registers)
7349         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7350         (mips_linux_register_u_offset, mips_linux_read_description)
7351         (mips_linux_can_use_hw_breakpoint)
7352         (mips_linux_stopped_by_watchpoint)
7353         (mips_linux_stopped_data_address)
7354         (mips_linux_region_ok_for_hw_watchpoint)
7355         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7356         (mips_linux_close): Refactor as methods of mips_linux_nat.
7357         (_initialize_mips_linux_nat): Adjust to C++ification.
7358
7359         * aix-thread.c (aix_thread_target): New class.
7360         (aix_thread_ops): Now an aix_thread_target.
7361         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7362         (aix_thread_fetch_registers, aix_thread_store_registers)
7363         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7364         (aix_thread_thread_alive, aix_thread_pid_to_str)
7365         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7366         Refactor as methods of aix_thread_target.
7367         (init_aix_thread_ops): Delete.
7368         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7369         and complete_target_initialization.
7370         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7371         (rs6000_nat_target): New class.
7372         (the_rs6000_nat_target): New.
7373         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7374         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7375         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7376         (super_create_inferior): Delete.
7377         (_initialize_rs6000_nat): Adjust to C++ification.
7378
7379         * arm-linux-nat.c (arm_linux_nat_target): New class.
7380         (the_arm_linux_nat_target): New.
7381         (arm_linux_fetch_inferior_registers)
7382         (arm_linux_store_inferior_registers, arm_linux_read_description)
7383         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7384         (arm_linux_remove_hw_breakpoint)
7385         (arm_linux_region_ok_for_hw_watchpoint)
7386         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7387         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7388         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7389         arm_linux_nat_target.
7390         (_initialize_arm_linux_nat): Adjust to C++ification.
7391
7392         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7393         (the_aarch64_linux_nat_target): New.
7394         (aarch64_linux_fetch_inferior_registers)
7395         (aarch64_linux_store_inferior_registers)
7396         (aarch64_linux_child_post_startup_inferior)
7397         (aarch64_linux_read_description)
7398         (aarch64_linux_can_use_hw_breakpoint)
7399         (aarch64_linux_insert_hw_breakpoint)
7400         (aarch64_linux_remove_hw_breakpoint)
7401         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7402         (aarch64_linux_region_ok_for_hw_watchpoint)
7403         (aarch64_linux_stopped_data_address)
7404         (aarch64_linux_stopped_by_watchpoint)
7405         (aarch64_linux_watchpoint_addr_within_range)
7406         (aarch64_linux_can_do_single_step): Refactor as methods of
7407         aarch64_linux_nat_target.
7408         (super_post_startup_inferior): Delete.
7409         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7410
7411         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7412         (the_hppa_linux_nat_target): New.
7413         (hppa_linux_fetch_inferior_registers)
7414         (hppa_linux_store_inferior_registers): Refactor as methods of
7415         hppa_linux_nat_target.
7416         (_initialize_hppa_linux_nat): Adjust to C++ification.
7417
7418         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7419         (the_ia64_linux_nat_target): New.
7420         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7421         (ia64_linux_stopped_data_address)
7422         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7423         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7424         ia64_linux_nat_target methods.
7425         (super_xfer_partial): Delete.
7426         (_initialize_ia64_linux_nat): Adjust to C++ification.
7427
7428         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7429         (the_m32r_linux_nat_target): New.
7430         (m32r_linux_fetch_inferior_registers)
7431         (m32r_linux_store_inferior_registers): Refactor as
7432         m32r_linux_nat_target methods.
7433         (_initialize_m32r_linux_nat): Adjust to C++ification.
7434
7435         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7436         (the_m68k_linux_nat_target): New.
7437         (m68k_linux_fetch_inferior_registers)
7438         (m68k_linux_store_inferior_registers): Refactor as
7439         m68k_linux_nat_target methods.
7440         (_initialize_m68k_linux_nat): Adjust to C++ification.
7441
7442         * s390-linux-nat.c (s390_linux_nat_target): New class.
7443         (the_s390_linux_nat_target): New.
7444         (s390_linux_fetch_inferior_registers)
7445         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7446         (s390_insert_watchpoint, s390_remove_watchpoint)
7447         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7448         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7449         (s390_auxv_parse, s390_read_description): Refactor as methods of
7450         s390_linux_nat_target.
7451         (_initialize_s390_nat): Adjust to C++ification.
7452
7453         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7454         (the_sparc_linux_nat_target): New.
7455         (_initialize_sparc_linux_nat): Adjust to C++ification.
7456         * sparc-nat.c (sparc_fetch_inferior_registers)
7457         (sparc_store_inferior_registers): Remove target_ops parameter.
7458         * sparc-nat.h (sparc_fetch_inferior_registers)
7459         (sparc_store_inferior_registers): Remove target_ops parameter.
7460         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7461         (the_sparc64_linux_nat_target): New.
7462         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7463
7464         * spu-linux-nat.c (spu_linux_nat_target): New class.
7465         (the_spu_linux_nat_target): New.
7466         (spu_child_post_startup_inferior, spu_child_post_attach)
7467         (spu_child_wait, spu_fetch_inferior_registers)
7468         (spu_store_inferior_registers, spu_xfer_partial)
7469         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7470         methods.
7471         (_initialize_spu_nat): Adjust to C++ification.
7472
7473         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7474         (the_tilegx_linux_nat_target): New.
7475         (fetch_inferior_registers, store_inferior_registers):
7476         Refactor as methods.
7477         (_initialize_tile_linux_nat): Adjust to C++ification.
7478
7479         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7480         (the_xtensa_linux_nat_target): New.
7481         (xtensa_linux_fetch_inferior_registers)
7482         (xtensa_linux_store_inferior_registers): Refactor as
7483         xtensa_linux_nat_target methods.
7484         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7485
7486         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7487         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7488         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7489         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7490         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7491         (fbsd_stopped_by_sw_breakpoint)
7492         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7493         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7494         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7495         (fbsd_post_startup_inferior, fbsd_post_attach)
7496         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7497         (fbsd_set_syscall_catchpoint)
7498         (super_xfer_partial, super_resume, super_wait)
7499         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7500         (fbsd_handle_debug_trap): Remove target_ops parameter.
7501         (fbsd_nat_add_target): Delete.
7502         * fbsd-nat.h: Include "inf-ptrace.h".
7503         (fbsd_nat_add_target): Delete.
7504         (USE_SIGTRAP_SIGINFO): Define.
7505         (fbsd_nat_target): New class.
7506
7507         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7508         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7509         (amd64bsd_target): Delete.
7510         * amd64-bsd-nat.h: New file.
7511         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7512         "x86-bsd-nat.h".
7513         (amd64_fbsd_nat_target): New class.
7514         (the_amd64_fbsd_nat_target): New.
7515         (amd64fbsd_read_description): Refactor as method of
7516         amd64_fbsd_nat_target.
7517         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7518         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7519         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7520         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7521         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7522         (i386bsd_target): Delete.
7523         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7524         (i386bsd_fetch_inferior_registers)
7525         (i386bsd_store_inferior_registers): Declare.
7526         (i386_bsd_nat_target): New class.
7527         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7528         (the_i386_fbsd_nat_target): New.
7529         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7530         i386_fbsd_nat_target methods.
7531         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7532         (_initialize_i386fbsd_nat): Adjust to C++ification.
7533         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7534         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7535         (_initialize_x86_bsd_nat): Adjust to C++ification.
7536         * x86-bsd-nat.h: Include "x86-nat.h".
7537         (x86bsd_target): Delete declaration.
7538         (x86bsd_nat_target): New class.
7539
7540         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7541         (the_aarch64_fbsd_nat_target): New.
7542         (aarch64_fbsd_fetch_inferior_registers)
7543         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7544         aarch64_fbsd_nat_target.
7545         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7546         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7547         (the_alpha_bsd_nat_target): New.
7548         (alphabsd_fetch_inferior_registers)
7549         (alphabsd_store_inferior_registers): Refactor as
7550         alpha_bsd_nat_target methods.
7551         (_initialize_alphabsd_nat): Refactor as methods of
7552         alpha_bsd_nat_target.
7553         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7554         (the_amd64_nbsd_nat_target): New.
7555         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7556         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7557         (the_amd64_obsd_nat_target): New.
7558         (_initialize_amd64obsd_nat): Adjust to C++ification.
7559         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7560         (the_arm_fbsd_nat_target): New.
7561         (arm_fbsd_fetch_inferior_registers)
7562         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7563         (_initialize_arm_fbsd_nat): Refactor as methods of
7564         arm_fbsd_nat_target.
7565         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7566         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7567         (the_arm_netbsd_nat_target): New.
7568         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7569         arm_netbsd_nat_target.
7570         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7571         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7572         (the_hppa_nbsd_nat_target): New.
7573         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7574         hppa_nbsd_nat_target methods.
7575         (_initialize_hppanbsd_nat): Adjust to C++ification.
7576         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7577         (the_hppa_obsd_nat_target): New.
7578         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7579         methods of hppa_obsd_nat_target.
7580         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7581         add_target.
7582         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7583         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7584         add_target.
7585         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7586         (_initialize_i386obsd_nat): Use add_target.
7587         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7588         (the_m68k_bsd_nat_target): New.
7589         (m68kbsd_fetch_inferior_registers)
7590         (m68kbsd_store_inferior_registers): Refactor as methods of
7591         m68k_bsd_nat_target.
7592         (_initialize_m68kbsd_nat): Adjust to C++ification.
7593         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7594         (the_mips_fbsd_nat_target): New.
7595         (mips_fbsd_fetch_inferior_registers)
7596         (mips_fbsd_store_inferior_registers): Refactor as methods of
7597         mips_fbsd_nat_target.
7598         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7599         add_target.
7600         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7601         (the_mips_nbsd_nat_target): New.
7602         (mipsnbsd_fetch_inferior_registers)
7603         (mipsnbsd_store_inferior_registers): Refactor as methods of
7604         mips_nbsd_nat_target.
7605         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7606         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7607         (the_mips64_obsd_nat_target): New.
7608         (mips64obsd_fetch_inferior_registers)
7609         (mips64obsd_store_inferior_registers): Refactor as methods of
7610         mips64_obsd_nat_target.
7611         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7612         add_target.
7613         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7614         nbsd_nat_target.
7615         * nbsd-nat.h: Include "inf-ptrace.h".
7616         (nbsd_nat_target): New class.
7617         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7618         (obsd_wait): Refactor as methods of obsd_nat_target.
7619         (obsd_add_target): Delete.
7620         * obsd-nat.h: Include "inf-ptrace.h".
7621         (obsd_nat_target): New class.
7622         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7623         (the_ppc_fbsd_nat_target): New.
7624         (ppcfbsd_fetch_inferior_registers)
7625         (ppcfbsd_store_inferior_registers): Refactor as methods of
7626         ppc_fbsd_nat_target.
7627         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7628         add_target.
7629         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7630         (the_ppc_nbsd_nat_target): New.
7631         (ppcnbsd_fetch_inferior_registers)
7632         (ppcnbsd_store_inferior_registers): Refactor as methods of
7633         ppc_nbsd_nat_target.
7634         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7635         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7636         (the_ppc_obsd_nat_target): New.
7637         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7638         methods of ppc_obsd_nat_target.
7639         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7640         add_target.
7641         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7642         (the_sh_nbsd_nat_target): New.
7643         (shnbsd_fetch_inferior_registers)
7644         (shnbsd_store_inferior_registers): Refactor as methods of
7645         sh_nbsd_nat_target.
7646         (_initialize_shnbsd_nat): Adjust to C++ification.
7647         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7648         (inf_ptrace_xfer_partial): Delete.
7649         (sparc_xfer_partial, sparc_target): Delete.
7650         * sparc-nat.h (sparc_fetch_inferior_registers)
7651         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7652         (sparc_target): Delete function declaration.
7653         (sparc_target): New template class.
7654         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7655         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7656         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7657         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7658         add_target.
7659         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7660         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7661         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7662         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7663         add_target.
7664         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7665         (the_vax_bsd_nat_target): New.
7666         (vaxbsd_fetch_inferior_registers)
7667         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7668         methods.
7669         (_initialize_vaxbsd_nat): Adjust to C++ification.
7670
7671         * bsd-kvm.c (bsd_kvm_target): New class.
7672         (bsd_kvm_ops): Now a bsd_kvm_target.
7673         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7674         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7675         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7676         bsd_kvm_target.
7677         (bsd_kvm_return_one): Delete.
7678         (bsd_kvm_add_target): Adjust to C++ification.
7679
7680         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7681         (nto_procfs_target_procfs): New classes.
7682         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7683         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7684         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7685         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7686         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7687         (procfs_remove_hw_breakpoint, procfs_resume)
7688         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7689         (procfs_kill_inferior, procfs_store_registers)
7690         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7691         as methods of nto_procfs_target.
7692         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7693         (nto_native_ops): Delete.
7694         (procfs_open, procfs_native_open): Delete.
7695         (nto_native_ops): Now an nto_procfs_target_native.
7696         (init_procfs_targets): Adjust to C++ification.
7697         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7698         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7699         Refactor as methods of nto_procfs_target.
7700
7701         * go32-nat.c (go32_nat_target): New class.
7702         (the_go32_nat_target): New.
7703         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7704         (go32_store_registers, go32_xfer_partial, go32_files_info)
7705         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7706         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7707         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7708         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7709         (go32_target): Delete.
7710         (_initialize_go32_nat): Adjust to C++ification.
7711
7712         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7713         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7714         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7715         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7716         gnu_nat_target.
7717         (gnu_target): Delete.
7718         * gnu-nat.h (gnu_target): Delete.
7719         (gnu_nat_target): New class.
7720         * i386-gnu-nat.c (gnu_base_target): New.
7721         (i386_gnu_nat_target): New class.
7722         (the_i386_gnu_nat_target): New.
7723         (_initialize_i386gnu_nat): Adjust to C++ification.
7724
7725 2018-05-02  Pedro Alves  <palves@redhat.com>
7726
7727         * bfd-target.c (target_bfd_xclose): Rename to ...
7728         (target_bfd_close): ... this.
7729         (target_bfd_reopen): Adjust.
7730         * target.c (target_close): Remove references to to_xclose.
7731         * target.h (target_ops::to_xclose): Delete.
7732         (target_ops::to_close): Update comments.
7733
7734 2018-05-02  Pedro Alves  <palves@redhat.com>
7735
7736         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7737         "linux-nat.h".
7738         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7739         * inf-ptrace.c (inf_ptrace_register_u_offset)
7740         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7741         (inf_ptrace_store_register, inf_ptrace_store_registers)
7742         (inf_ptrace_trad_target): Move to ...
7743         * linux-nat-trad.c: ... this new file.
7744         * linux-nat-trad.h: New file.
7745         * linux-nat.c (linux_target_install_ops): Make extern.
7746         (linux_trad_target): Delete.
7747         * linux-nat.h (linux_trad_target): Delete declaration.
7748         (linux_target_install_ops): Declare.
7749         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7750         "linux-nat.h".
7751
7752 2018-05-02  Pedro Alves  <palves@redhat.com>
7753
7754         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7755         procfs_target/add_target here.
7756         * procfs.c (procfs_target): Make static.
7757         (_initialize_procfs): Call add_target here.
7758         * procfs.h (struct target_ops): Remove forward declaration.
7759         (procfs_target): Remove declaration.
7760         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7761
7762 2018-05-02  Pedro Alves  <palves@redhat.com>
7763
7764         * procfs.c (procfs_stopped_by_watchpoint)
7765         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7766         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7767         Forward declare.
7768         (procfs_use_watchpoints): Delete, move contents...
7769         (procfs_target): ... here.
7770         * procfs.h (procfs_use_watchpoints): Delete declaration.
7771         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7772         procfs_use_watchpoints.
7773         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7774         procfs_use_watchpoints.
7775
7776 2018-05-02  Tom Tromey  <tom@tromey.com>
7777
7778         PR python/20084:
7779         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7780         and var_zuinteger_unlimited.
7781         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7782         and PARAM_ZUINTEGER_UNLIMITED.
7783         (set_parameter_value): Handle var_zuinteger and
7784         var_zuinteger_unlimited.
7785         (add_setshow_generic): Likewise.
7786         (parmpy_init): Likewise.
7787
7788 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7789
7790         PR rust/23124
7791         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7792         pointer is not null before dereferencing it.
7793
7794 2018-04-30  Tom Tromey  <tom@tromey.com>
7795
7796         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7797         is_mi_like_p.
7798
7799 2018-04-30  Tom Tromey  <tom@tromey.com>
7800
7801         * breakpoint.c (mention): Remove use of is_mi_like_p.
7802         (print_mention_ranged_breakpoint): Likewise.
7803         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7804         of is_mi_like_p.
7805
7806 2018-04-30  Tom Tromey  <tom@tromey.com>
7807
7808         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7809
7810 2018-04-30  Tom Tromey  <tom@tromey.com>
7811
7812         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7813         (info_spu_event_command): Remove some uses of is_mi_like_p.
7814
7815 2018-04-30  Tom Tromey  <tom@tromey.com>
7816
7817         * python/py-framefilter.c (py_print_single_arg)
7818         (enumerate_locals, py_print_args, py_print_frame): Remove some
7819         uses of is_mi_like_p.
7820
7821 2018-04-30  Tom Tromey  <tom@tromey.com>
7822
7823         * ui-out.c: Update.
7824         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7825         * ui-out.h (ui_out::is_mi_like_p): Now const.
7826         (ui_out::do_is_mi_like_p): Now const.
7827         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7828
7829 2018-04-30  Tom Tromey  <tom@tromey.com>
7830
7831         * varobj.c (varobj_set_visualizer): Use new_reference.
7832         * python/python.c (gdbpy_decode_line): Use new_reference.
7833         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7834         new_reference.
7835
7836 2018-04-30  Tom Tromey  <tom@tromey.com>
7837
7838         * varobj.c (install_new_value): Use new_reference.
7839         * value.h (value_incref): Return void.  Swap intro comment with
7840         value_decref.
7841         * value.c (set_value_parent): Use new_reference.
7842         (value_incref): Return void.  Update intro comment.
7843         (release_value): Use new_reference.
7844         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7845
7846 2018-04-30  Tom Tromey  <tom@tromey.com>
7847
7848         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7849         * gdb_bfd.h (new_bfd_ref): Remove.
7850         (gdb_bfd_open): Update comment.
7851         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7852         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7853         (gdb_bfd_fdopenr): Use new_reference.
7854         * exec.c (exec_file_attach): Use new_reference.
7855
7856 2018-04-30  Tom Tromey  <tom@tromey.com>
7857
7858         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7859         method.
7860
7861 2018-04-30  Tom Tromey  <tom@tromey.com>
7862
7863         * jit.c (jit_read_code_entry): Use type_align.
7864         * i386-tdep.c (i386_gdbarch_init): Don't call
7865         set_gdbarch_long_long_align_bit.
7866         * gdbarch.sh: Remove long_long_align_bit.
7867         * gdbarch.c, gdbarch.h: Rebuild.
7868         * arc-tdep.c (arc_type_align): New function.
7869         (arc_gdbarch_init): Use arc_type_align.  Don't call
7870         set_gdbarch_long_long_align_bit.
7871
7872 2018-04-30  Tom Tromey  <tom@tromey.com>
7873
7874         * rust-lang.c (rust_type_alignment): Remove.
7875         (rust_composite_type): Use type_align.
7876
7877 2018-04-30  Tom Tromey  <tom@tromey.com>
7878
7879         * NEWS: Mention Type.align.
7880         * python/py-type.c (typy_get_alignof): New function.
7881         (type_object_getset): Add "alignof".
7882
7883 2018-04-30  Tom Tromey  <tom@tromey.com>
7884
7885         PR exp/17095:
7886         * NEWS: Update.
7887         * std-operator.def (UNOP_ALIGNOF): New operator.
7888         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7889         New.
7890         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7891         * c-lang.c (c_op_print_tab): Add alignof.
7892         * c-exp.y (ALIGNOF): New token.
7893         (exp): Add "ALIGNOF" production.
7894         (ident_tokens): Add _Alignof and alignof.
7895
7896 2018-04-30  Tom Tromey  <tom@tromey.com>
7897
7898         * i386-tdep.c (i386_type_align): New function.
7899         (i386_gdbarch_init): Update.
7900         * gdbarch.sh (type_align): New method.
7901         * gdbarch.c, gdbarch.h: Rebuild.
7902         * arch-utils.h (default_type_align): Declare.
7903         * arch-utils.c (default_type_align): New function.
7904         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7905         (struct type) <align_log2>: New field.
7906         <instance_flags>: Now a bitfield.
7907         (TYPE_RAW_ALIGN): New macro.
7908         (type_align, type_raw_align, set_type_align): Declare.
7909         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7910         functions.
7911         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7912         (get_alignment, maybe_set_alignment): New functions.
7913         (read_structure_type, read_enumeration_type, read_array_type)
7914         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7915         (read_subrange_type, read_base_type): Set type alignment.
7916
7917 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
7918
7919         * dwarf2read.c (read_index_from_section): Use bool.
7920
7921 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
7922
7923         PR gdb/22950
7924         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7925         with #ifdef.
7926
7927 2018-04-29  John Reiser  <jreiser@BitWagon.com>
7928
7929         PR build/22873
7930         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7931         last step, and do it atomically.
7932
7933 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
7934
7935         * compile/compile-c-types.c (convert_int, convert_float):
7936         Update for C FE v1.
7937
7938 2018-04-27  Tom Tromey  <tom@tromey.com>
7939
7940         PR rust/22545:
7941         * rust-lang.c (rust_inclusive_range_type_p): New function.
7942         (rust_range): Handle inclusive ranges.
7943         (rust_compute_range): Likewise.
7944         * rust-exp.y (struct rust_op) <inclusive>: New field.
7945         (DOTDOTEQ): New constant.
7946         (range_expr): Add "..=" productions.
7947         (operator_tokens): Add "..=" token.
7948         (ast_range): Add "inclusive" parameter.
7949         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7950         ranges.
7951         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7952         bounds values.
7953         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7954         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7955         Update comments.
7956         * expprint.c (print_subexp_standard): Handle new bounds values.
7957         (dump_subexp_body_standard): Likewise.
7958
7959 2018-04-27  Tom Tromey  <tom@tromey.com>
7960
7961         * configure: Rebuild.
7962         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7963         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7964         "OVERRIDE".
7965         (class symbol_needs_eval_context): Likewise.
7966         * dwarf2read.c (mock_mapped_index::symbol_name_count)
7967         (mock_mapped_index::symbol_name_at): Use "override".  Remove
7968         "virtual".
7969         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7970         "override".
7971         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7972         * aarch64-tdep.c (instruction_reader::read): Use "override".
7973         (instruction_reader_test::read): Likewise.
7974         * arm-tdep.c (instruction_reader::read): Use "override".
7975         (instruction_reader_thumb::read): Likewise.
7976
7977 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
7978
7979         PR remote/9665
7980         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7981         instead of remote_send.
7982         (remote_send): Remove.
7983
7984 2018-04-26  Pedro Alves  <palves@redhat.com>
7985
7986         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7987         find_function_start_sal instead of find_pc_line.
7988
7989 2018-04-26  Pedro Alves  <palves@redhat.com>
7990
7991         * breakpoint.c (set_breakpoint_location_function): Handle
7992         mst_data_gnu_ifunc.
7993         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7994         * elfread.c (elf_symtab_read): Give data symbols with
7995         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7996         (elf_rel_plt_read): Update comment.
7997         * linespec.c (convert_linespec_to_sals): Handle
7998         mst_data_gnu_ifunc.
7999         (minsym_found): Handle mst_data_gnu_ifunc.
8000         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8001         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8002         * parse.c (find_minsym_type_and_address): Handle
8003         mst_data_gnu_ifunc.
8004         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8005         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8006         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8007         comment.
8008         <mst_data_gnu_ifunc>: New enumerator.
8009
8010 2018-04-26  Pedro Alves  <palves@redhat.com>
8011
8012         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8013         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8014         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8015         Handle it.
8016         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8017         (lookup_minimal_symbol_by_pc): Adjust.
8018         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8019         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8020         * minsyms.h (lookup_msym_prefer): New enum.
8021         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8022         parameter by a lookup_msym_prefer parameter.
8023
8024 2018-04-26  Pedro Alves  <palves@redhat.com>
8025
8026         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8027         ends in "@plt" instead of looking at the symbol's section.
8028
8029 2018-04-26  Pedro Alves  <palves@redhat.com>
8030
8031         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8032         all references.
8033         (find_pc_partial_function_gnu_ifunc): Rename to ...
8034         (find_pc_partial_function): ... this, and remove references to
8035         'is_gnu_ifunc_p'.
8036         (find_pc_partial_function): Delete old implementation.
8037         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8038
8039 2018-04-26  Pedro Alves  <palves@redhat.com>
8040
8041         * linespec.c (struct bound_minimal_symbol_search_key): New.
8042         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8043         skip first line if we found a GNU ifunc minimal symbol by name.
8044         (compare_msymbols): Change parameters to work with a destructured
8045         lhs minsym.
8046         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8047         functions.
8048
8049 2018-04-26  Pedro Alves  <palves@redhat.com>
8050
8051         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8052         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8053         address/name.
8054         (add_location_to_breakpoint): Store the minsym and the objfile in
8055         the breakpoint location.
8056         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8057         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8058         Record the minsym in the sal.
8059         * symtab.h (symtab_and_line) <msymbol>: New field.
8060
8061 2018-04-26  Pedro Alves  <palves@redhat.com>
8062
8063         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8064         unless we actually resolved the ifunc.
8065
8066 2018-04-26  Pedro Alves  <palves@redhat.com>
8067
8068         * c-exp.y (variable production): Prefer ifunc minsyms over
8069         regular function symbols.
8070         * symtab.c (find_gnu_ifunc): New function.
8071         * minsyms.h (lookup_msym_prefer): New enum.
8072         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8073         parameter by a lookup_msym_prefer parameter.
8074         * symtab.h (find_gnu_ifunc): New declaration.
8075
8076 2018-04-26  Pedro Alves  <palves@redhat.com>
8077
8078         * blockframe.c (find_gnu_ifunc_target_type): New function.
8079         (find_function_type): New.
8080         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8081         return a value with a memory address.
8082         (eval_call): For calls to GNU ifunc functions, try to find the
8083         type of the target function from the type that the resolver
8084         returns.
8085         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8086         symbols.
8087         * infcall.c (find_function_return_type): Delete.
8088         (find_function_addr): Add 'function_type' parameter.  For calls to
8089         GNU ifunc functions, try to find the type of the target function
8090         from the type that the resolver returns, and return it via
8091         FUNCTION_TYPE.
8092         (call_function_by_hand_dummy): Adjust to use the function type
8093         returned by find_function_addr.
8094         (find_function_addr): Add 'function_type' parameter and move
8095         description here.
8096         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8097         declarations.
8098
8099 2018-04-26  Pedro Alves  <palves@redhat.com>
8100
8101         * c-exp.y (variable production): Skip finding an alias for ifunc
8102         symbols.
8103
8104 2018-04-26  Pedro Alves  <palves@redhat.com>
8105
8106         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8107
8108 2018-04-25  Pedro Alves  <palves@redhat.com>
8109
8110         * infcmd.c (kill_command): Print the pid as string, not the whole
8111         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8112         message.
8113         * remote.c (remote_detach_1): Print the pid as string, not the
8114         whole thread's ptid.
8115
8116 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8117             Sergio Durigan Junior  <sergiodj@redhat.com>
8118             Pedro Alves  <palves@redhat.com>
8119
8120         * infcmd.c (kill_command): Print message when inferior has
8121         been killed.
8122         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8123         '1'.
8124         (add_inferior): Improve message printed when
8125         'print_inferior_events' is on.
8126         (exit_inferior): Remove message printed when
8127         'print_inferior_events' is on.
8128         (detach_inferior): Improve message printed when
8129         'print_inferior_events' is on.
8130         (initialize_inferiors): Use 'add_inferior_silent' to set
8131         'current_inferior_'.
8132         * inferior.h (print_inferior_events): Declare here as
8133         'extern'.
8134         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8135         '[Detaching...]' messages when 'print_inferior_events' is on.
8136         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8137         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8138         'Detaching after fork from child...', replace it by '... from
8139         parent...'.
8140         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8141         prefix/suffix when printing 'Detaching...' messages.  Print
8142         them when 'print_inferior_events' is on.
8143         * remote.c (remote_detach_1): Print message when detaching
8144         from inferior and '!is_fork_parent'.
8145
8146 2018-04-24  Tom Tromey  <tom@tromey.com>
8147
8148         * cli-out.h: Reindent.
8149
8150 2018-04-24  Tom Tromey  <tom@tromey.com>
8151
8152         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8153         (cli_ui_out::do_field_string): Use fputs_filtered.
8154         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8155
8156 2018-04-23  Tom Tromey  <tom@tromey.com>
8157
8158         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8159         gdb::unique_xmalloc_ptr.
8160
8161 2018-04-23  Tom Tromey  <tom@tromey.com>
8162
8163         * configure: Rebuild.
8164
8165 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8166
8167         PR gdb/23095
8168         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8169         prepare_for_testing.  Set normal_bp to r_debug_state if target
8170         is bsd.
8171
8172 2018-04-21  Pedro Alves  <palves@redhat.com>
8173             Rajendra SY  <rajendra.sy@gmail.com>
8174
8175         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8176         * remote.c (extended_remote_attach): In all-stop mode, mark the
8177         thread as executing.
8178
8179 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8180
8181         * thread.c (thread_apply_all_command): Fix comment.
8182         (thread_command): Fix comment.
8183
8184 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8185
8186         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8187         parameter.
8188         * features/aarch64-core.c (create_feature_aarch64_core):
8189         Regenerate.
8190         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8191         Likewise.
8192         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8193         Likewise.
8194         * features/i386/32bit-avx512.c
8195         (create_feature_i386_32bit_avx512): Likewise.
8196         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8197         Likewise.
8198         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8199         Likewise.
8200         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8201         Likewise.
8202         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8203         Likewise.
8204         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8205         Likewise.
8206         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8207         Likewise.
8208         * features/i386/64bit-avx512.c
8209         (create_feature_i386_64bit_avx512): Likewise.
8210         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8211         Likewise.
8212         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8213         Likewise.
8214         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8215         Likewise.
8216         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8217         Likewise.
8218         * features/i386/64bit-segments.c
8219         (create_feature_i386_64bit_segments): Likewise.
8220         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8221         Likewise.
8222         * features/i386/x32-core.c
8223         (create_feature_i386_x32_core): Likewise.
8224         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8225         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8226         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8227         * target-descriptions.c: In generated code, don't pass xml
8228         filename.
8229
8230 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8231
8232         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8233         (print_xml_feature::visit_post): Likewise.
8234         (print_xml_feature::visit): Likewise.
8235         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8236         (print_xml_feature): Add new class.
8237         * regformats/regdat.sh: Null xmltarget on feature targets.
8238         * target-descriptions.c (struct target_desc): Add xmltarget.
8239         (maintenance_check_tdesc_xml_convert): Add unittest function.
8240         (tdesc_get_features_xml): Add function to get xml.
8241         (maintenance_check_xml_descriptions): Test xml generation.
8242         * xml-tdesc.c (string_read_description_xml): Add function.
8243         * xml-tdesc.h (string_read_description_xml): Add declaration.
8244
8245 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8246
8247         * features/Makefile: Add feature marker to targets with new style
8248         target descriptions.
8249         * regformats/aarch64.dat: Regenerate.
8250         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8251         * regformats/i386/amd64-avx-linux.dat: Likewise.
8252         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8253         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8254         * regformats/i386/amd64-linux.dat: Likewise.
8255         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8256         * regformats/i386/amd64.dat: Likewise.
8257         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8258         * regformats/i386/i386-avx-linux.dat: Likewise.
8259         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8260         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8261         * regformats/i386/i386-linux.dat: Likewise.
8262         * regformats/i386/i386-mmx-linux.dat: Likewise.
8263         * regformats/i386/i386-mpx-linux.dat: Likewise.
8264         * regformats/i386/i386.dat: Likewise.
8265         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8266         * regformats/i386/x32-avx-linux.dat: Likewise.
8267         * regformats/i386/x32-linux.dat: Likewise.
8268         * regformats/tic6x-c62x-linux.dat: Likewise.
8269         * regformats/tic6x-c64x-linux.dat: Likewise.
8270         * regformats/tic6x-c64xp-linux.dat: Likewise.
8271         * regformats/regdat.sh: Parse feature marker.
8272
8273 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8274
8275         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8276         (tdesc_osabi_name): Likewise.
8277         * target-descriptions.c (tdesc_architecture_name): Add new
8278         function.
8279         (tdesc_osabi_name): Likewise.
8280
8281 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8282
8283         * common/tdesc.c (tdesc_predefined_type): Move to here.
8284         (tdesc_named_type): Likewise.
8285         (tdesc_create_vector): Likewise.
8286         (tdesc_create_struct): Likewise.
8287         (tdesc_set_struct_size): Likewise.
8288         (tdesc_create_union): Likewise.
8289         (tdesc_create_flags): Likewise.
8290         (tdesc_create_enum): Likewise.
8291         (tdesc_add_field): Likewise.
8292         (tdesc_add_typed_bitfield): Likewise.
8293         (tdesc_add_bitfield): Likewise.
8294         (tdesc_add_flag): Likewise.
8295         (tdesc_add_enum_value): Likewise.
8296         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8297         (struct tdesc_type_vector): Likewise.
8298         (struct tdesc_type_field): Likewise.
8299         (struct tdesc_type_with_fields): Likewise.
8300         (tdesc_create_enum): Add declaration.
8301         (tdesc_add_typed_bitfield): Likewise.
8302         (tdesc_add_enum_value): Likewise.
8303         * target-descriptions.c (tdesc_type_field): Move from here.
8304         (tdesc_type_builtin): Likewise.
8305         (tdesc_type_vector): Likewise.
8306         (tdesc_type_with_fields): Likewise.
8307         (tdesc_predefined_types): Likewise.
8308         (tdesc_named_type): Likewise.
8309         (tdesc_create_vector): Likewise.
8310         (tdesc_create_struct): Likewise.
8311         (tdesc_set_struct_size): Likewise.
8312         (tdesc_create_union): Likewise.
8313         (tdesc_create_flags): Likewise.
8314         (tdesc_create_enum): Likewise.
8315         (tdesc_add_field): Likewise.
8316         (tdesc_add_typed_bitfield): Likewise.
8317         (tdesc_add_bitfield): Likewise.
8318         (tdesc_add_flag): Likewise.
8319         (tdesc_add_enum_value): Likewise.
8320         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8321         (tdesc_add_typed_bitfield): Likewise.
8322         (tdesc_add_enum_value): Likewise.
8323
8324 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8325
8326         * common/tdesc.c (tdesc_feature::accept): Move to here.
8327         (tdesc_feature::operator==): Likewise.
8328         (tdesc_create_reg): Likewise.
8329         * common/tdesc.h (tdesc_type_kind): Likewise.
8330         (struct tdesc_type): Likewise.
8331         (struct tdesc_feature): Likewise.
8332         * regformats/regdat.sh: Create a feature.
8333         * target-descriptions.c (tdesc_type_kind): Move from here.
8334         (tdesc_type): Likewise.
8335         (tdesc_type_up): Likewise.
8336         (tdesc_feature): Likewise.
8337         (tdesc_create_reg): Likewise.
8338
8339 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8340
8341         * Makefile.in: Add arch/tdesc.c
8342         * common/tdesc.c: New file.
8343         * common/tdesc.h (tdesc_element_visitor): Move to here.
8344         (tdesc_element): Likewise.
8345         (tdesc_reg): Likewise.
8346         (tdesc_reg_up): Likewise.
8347         * regformats/regdef.h (reg): Add offset to constructors.
8348         * target-descriptions.c (tdesc_element_visitor): Move from here.
8349         (tdesc_element): Likewise.
8350         (tdesc_reg): Likewise.
8351         (tdesc_reg_up): Likewise.
8352
8353 2018-04-17  Tom Tromey  <tom@tromey.com>
8354
8355         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8356         discriminant field.
8357
8358 2018-04-17  Tom Tromey  <tom@tromey.com>
8359
8360         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8361
8362 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8363
8364         * symtab.c (print_symbol_info): Skip printing filename and line
8365         number when `last' is NULL.
8366         (symtab_symbol_info): Use empty string instead of NULL for first
8367         invocation of print_symbol_info.
8368         (rbreak_command): Pass NULL to `last' parameter of
8369         print_symbol_info.
8370
8371 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8372
8373         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8374         instead of nullptr.
8375
8376 2018-04-16  Pedro Alves  <palves@redhat.com>
8377
8378         * MAINTAINERS (sh): Remove.
8379         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8380         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8381         (ALLDEPFILES): Remove sh64-tdep.c.
8382         * NEWS: Mentions that support for SH-5/SH64 is removed.
8383         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8384         (sh*-*-openbsd*): Ditto.
8385         (sh64-*-elf*): Remove.
8386         (sh*): Remove.
8387         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8388         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8389         * sh-tdep.c: No longer include "sh64-tdep.h".
8390         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8391         * sh64-tdep.c, sh64-tdep.h: Remove files.
8392
8393 2018-04-16  Pedro Alves  <palves@redhat.com>
8394
8395         * MAINTAINERS: Remove m88k.
8396         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8397         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8398         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8399         * NEWS: Mention that support for m88k was removed.
8400         * configure.host (m88*-*-*): Remove support.
8401         * configure.nat (m88k-*-*): Remove support.
8402         * configure.tgt (m88*-*-openbsd*): Remove.
8403         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8404
8405 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8406
8407         * configure.tgt (x86_tobjs): New variable.
8408         (amd64_tobjs, i386_tobjs): Use it.
8409
8410 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8411
8412         * symtab.c (print_symbol_info): Precede the symbol definition by
8413         the line number when available.
8414         * NEWS: Advertise this enhancement.
8415
8416 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8417
8418         * NEWS (New options): announce set/show record btrace cpu.
8419         * btrace.c: Include record-btrace.h.
8420         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8421         the vendor is unknown.
8422         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8423         Maybe overwrite the btrace configuration's cpu.
8424         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8425         (btrace_fetch): Add cpu parameter.  Update callers.
8426         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8427         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8428         errata workarounds if the vendor is unknown.
8429         * python/py-record-btrace.c: Include record-btrace.h.
8430         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8431         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8432         * record-btrace.c (record_btrace_cpu_state_kind): New.
8433         (record_btrace_cpu): New.
8434         (set_record_btrace_cpu_cmdlist): New.
8435         (record_btrace_get_cpu): New.
8436         (require_btrace_thread, record_btrace_info)
8437         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8438         (cmd_set_record_btrace_cpu_none): New.
8439         (cmd_set_record_btrace_cpu_auto): New.
8440         (cmd_set_record_btrace_cpu): New.
8441         (cmd_show_record_btrace_cpu): New.
8442         (_initialize_record_btrace): Initialize set/show record btrace cpu
8443         commands.
8444         * record-btrace.h (record_btrace_get_cpu): New.
8445
8446 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8447
8448         * record.c (set_record_command): Fix typo in message.
8449
8450 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8451
8452         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8453
8454 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8455
8456         * infrun.c (process_event_stop_test): Call
8457         gdbarch_in_indirect_branch_thunk.
8458         * gdbarch.sh (in_indirect_branch_thunk): New.
8459         * gdbarch.c: Regenerated.
8460         * gdbarch.h: Regenerated.
8461         * x86-tdep.h: New.
8462         * x86-tdep.c: New.
8463         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8464         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8465         (ALLDEPFILES): Add x86-tdep.c.
8466         * arch-utils.h (default_in_indirect_branch_thunk): New.
8467         * arch-utils.c (default_in_indirect_branch_thunk): New.
8468         * i386-tdep: Include x86-tdep.h.
8469         (i386_in_indirect_branch_thunk): New.
8470         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8471         function.
8472         * amd64-tdep: Include x86-tdep.h.
8473         (amd64_in_indirect_branch_thunk): New.
8474         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8475
8476 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8477
8478         PR gdb/23053
8479         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8480         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8481         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8482         regression.
8483
8484 2018-04-12  Tom Tromey  <tom@tromey.com>
8485
8486         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8487         (rust_evaluate_subexp): Likewise.
8488
8489 2018-04-12  Pedro Alves  <palves@redhat.com>
8490
8491         * procfs.c (procfs_detach): Make forward declaration's prototype
8492         match definition's protototype.
8493         (proc_get_LDT_entry): Remove stale do_cleanups call.
8494
8495 2018-04-12  Pedro Alves  <palves@redhat.com>
8496
8497         * target.h (target_ops::to_has_exited): Delete.
8498         (target_has_exited): Delete.
8499         * target-delegates.c: Regenerate.
8500
8501 2018-04-11  Pedro Alves  <palves@redhat.com>
8502
8503         * target.c (fileio_fh_t::t): Add comment.
8504         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8505         (target_fileio_close): Handle a NULL target.
8506         (invalidate_fileio_fh): New.
8507         (target_close): Call it.
8508         * remote.c (remote_hostio_send_command): No longer check whether
8509         remote_desc is open.
8510
8511 2018-04-11  Pedro Alves  <palves@redhat.com>
8512
8513         * target.c (fileio_fh_t): Make it a named struct instead of a
8514         typedef.
8515         (fileio_fh_t::is_closed): New method.
8516         (DEF_VEC_O (fileio_fh_t)): Remove.
8517         (fileio_fhandles): Now a std::vector.
8518         (is_closed_fileio_fh): Delete.
8519         (acquire_fileio_fd): Adjust.  Rename parameters.
8520         (release_fileio_fd): Adjust.
8521         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8522         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8523         (target_fileio_close): Adjust.
8524
8525 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8526
8527         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8528         index.
8529
8530 2018-04-10  Pedro Alves  <palves@redhat.com>
8531
8532         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8533         (scoped_finish_thread_state): New class.
8534         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8535         cleanup.
8536         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8537         (fetch_inferior_event, normal_stop): Likewise.
8538         * thread.c (finish_thread_state_cleanup): Delete.
8539
8540 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8541             Pedro Alves  <palves@redhat.com>
8542
8543         * value.c: Include "selftest.h" and "common/array-view.h".
8544         (struct range) <operator ==>: New.
8545         (test_ranges_contain): New.
8546         (check_ranges_vector): New.
8547         (test_insert_into_bit_range_vector): New.
8548         (_initialize_values): Register selftests.
8549         * common/array-view.h (operator==, operator!=): New.
8550
8551 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8552
8553         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8554         an iterator.
8555         * inline-frame.c: Include <algorithm>.
8556         (struct inline_state): Add constructor.
8557         (inline_state_s): Remove.
8558         (DEF_VEC_O(inline_state_s)): Remove.
8559         (inline_states): Change type to std::vector.
8560         (find_inline_frame_state): Adjust to std::vector.
8561         (allocate_inline_frame_state): Remove.
8562         (clear_inline_frame_state): Adjust to std::vector.
8563         (skip_inline_frames): Adjust to std::vector.
8564
8565 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8566
8567         * tracepoint.h (struct trace_state_variable): Add constructor.
8568         <name>: Change type to std::string.
8569         * tracepoint.c (tsv_s): Remove.
8570         (DEF_VEC_O(tsv_s)): Remove.
8571         (tvariables): Change to std::vector.
8572         (create_trace_state_variable): Adjust to std::vector.
8573         (find_trace_state_variable): Likewise.
8574         (find_trace_state_variable_by_number): Likewise.
8575         (delete_trace_state_variable): Likewise.
8576         (trace_variable_command): Adjust to std::string.
8577         (delete_trace_variable_command): Likewise.
8578         (tvariables_info_1): Adjust to std::vector.
8579         (save_trace_state_variables): Likewise.
8580         (start_tracing): Likewise.
8581         (merge_uploaded_trace_state_variables): Adjust to std::vector
8582         and std::string.
8583         * target.h (struct target_ops)
8584         <to_download_trace_state_variable>: Pass reference to
8585         trace_state_variable.
8586         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8587         * target-delegates.c: Re-generate.
8588         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8589         (mi_tsv_deleted): Likewise.
8590         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8591         * remote.c (remote_download_trace_state_variable): Change
8592         pointer to reference and adjust.
8593         * make-target-delegates (parse_argtypes): Handle references.
8594         (write_function_header): Likewise.
8595         (munge_type): Likewise.
8596
8597 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8598
8599         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8600         string_view-selftests.c.
8601         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8602         testsuite.
8603         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8604         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8605         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8606         * unittests/basic_string_view/element_access/char/1.cc:
8607         Likewise.
8608         * unittests/basic_string_view/element_access/char/empty.cc:
8609         Likewise.
8610         * unittests/basic_string_view/element_access/char/front_back.cc:
8611         Likewise.
8612         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8613         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8614         Likewise.
8615         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8616         Likewise.
8617         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8618         Likewise.
8619         * unittests/basic_string_view/operations/compare/char/1.cc:
8620         Likewise.
8621         * unittests/basic_string_view/operations/compare/char/13650.cc:
8622         Likewise.
8623         * unittests/basic_string_view/operations/copy/char/1.cc:
8624         Likewise.
8625         * unittests/basic_string_view/operations/data/char/1.cc:
8626         Likewise.
8627         * unittests/basic_string_view/operations/find/char/1.cc:
8628         Likewise.
8629         * unittests/basic_string_view/operations/find/char/2.cc:
8630         Likewise.
8631         * unittests/basic_string_view/operations/find/char/3.cc:
8632         Likewise.
8633         * unittests/basic_string_view/operations/find/char/4.cc:
8634         Likewise.
8635         * unittests/basic_string_view/operations/rfind/char/1.cc:
8636         Likewise.
8637         * unittests/basic_string_view/operations/rfind/char/2.cc:
8638         Likewise.
8639         * unittests/basic_string_view/operations/rfind/char/3.cc:
8640         Likewise.
8641         * unittests/basic_string_view/operations/substr/char/1.cc:
8642         Likewise.
8643         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8644         * unittests/string_view-selftests.c: New file.
8645
8646 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8647
8648         * unittests/basic_string_view/capacity/1.cc: New file.
8649         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8650         * unittests/basic_string_view/cons/char/1.cc: New file.
8651         * unittests/basic_string_view/cons/char/2.cc: New file.
8652         * unittests/basic_string_view/cons/char/3.cc: New file.
8653         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8654         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8655         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8656         * unittests/basic_string_view/element_access/char/1.cc: New file.
8657         * unittests/basic_string_view/element_access/char/2.cc: New file.
8658         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8659         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8660         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8661         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8662         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8663         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8664         * unittests/basic_string_view/include.cc: New file.
8665         * unittests/basic_string_view/inserters/char/1.cc: New file.
8666         * unittests/basic_string_view/inserters/char/2.cc: New file.
8667         * unittests/basic_string_view/inserters/char/3.cc: New file.
8668         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8669         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8670         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8671         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8672         * unittests/basic_string_view/literals/types.cc: New file.
8673         * unittests/basic_string_view/literals/values.cc: New file.
8674         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8675         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8676         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8677         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8678         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8679         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8680         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8681         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8682         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8683         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8684         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8685         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8686         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8687         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8688         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8689         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8690         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8691         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8692         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8693         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8694         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8695         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8696         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8697         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8698         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8699         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8700         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8701         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8702         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8703         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8704         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8705         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8706         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8707         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8708         * unittests/basic_string_view/operators/char/2.cc: New file.
8709         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8710         * unittests/basic_string_view/range_access/char/1.cc: New file.
8711         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8712         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8713         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8714         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8715         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8716         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8717         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8718         * unittests/basic_string_view/typedefs.cc: New file.
8719         * unittests/basic_string_view/types/1.cc: New file.
8720
8721 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8722
8723         * common/gdb_string_view.h: Remove libstdc++ implementation
8724         details, adjust to gdb reality.
8725         * common/gdb_string_view.tcc: Likewise.
8726         * cli/cli-script.c (struct string_view): Remove.
8727         (user_args) <m_args>: Change element type to gdb::string_view.
8728         (user_args::insert_args): Adjust.
8729
8730 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8731
8732         * common/gdb_string_view.h: New file.
8733         * common/gdb_string_view.tcc: New file.
8734
8735 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8736
8737         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8738         * configure: Re-generate.
8739
8740 2018-04-09  Pedro Alves  <palves@redhat.com>
8741
8742         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8743         (set_target_gdbarch): Call
8744         gdb::observers::architecture_changed.notify instead of
8745         observer_notify_architecture_changed.
8746
8747 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8748
8749         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8750         (do_restore_current_traceframe_cleanup): Remove.
8751         (restore_current_traceframe_cleanup_dtor): Remove.
8752         (make_cleanup_restore_current_traceframe): Remove.
8753         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8754         New.
8755         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8756         * infrun.c (fetch_inferior_event): Use
8757         scoped_restore_current_traceframe.
8758
8759 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8760
8761         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8762         Remove.
8763         <n_allocated_type_units>: Remove.
8764         <all_type_units>: Change to std::vector.
8765         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8766         to std::vector change.
8767         (dwarf2_per_objfile::get_cutu): Likewise.
8768         (dwarf2_per_objfile::get_tu): Likewise.
8769         (create_signatured_type_table_from_index): Likewise.
8770         (create_signatured_type_table_from_debug_names): Likewise.
8771         (dw2_symtab_iter_next): Likewise.
8772         (dw2_print_stats): Likewise.
8773         (dw2_expand_all_symtabs): Likewise.
8774         (dw2_expand_marked_cus): Likewise.
8775         (dw2_debug_names_iterator::next): Likewise.
8776         (dwarf2_initialize_objfile): Likewise.
8777         (add_signatured_type_cu_to_table): Likewise.
8778         (create_all_type_units): Likewise.
8779         (add_type_unit): Likewise.
8780         (struct tu_abbrev_offset): Add constructor.
8781         (build_type_psymtabs_1): Adjust to std::vector change.
8782         (print_tu_stats): Likewise.
8783         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8784         (write_debug_names): Likewise.
8785
8786 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8787
8788         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8789         Make an std::vector.
8790         <n_comp_units>: Remove.
8791         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8792         to std::vector change.
8793         (dwarf2_per_objfile::get_cutu): Likewise.
8794         (dwarf2_per_objfile::get_cu): Likewise.
8795         (create_cus_from_index): Likewise.
8796         (create_addrmap_from_index): Likewise.
8797         (create_addrmap_from_aranges): Likewise.
8798         (dwarf2_read_index): Likewise.
8799         (dw2_find_last_source_symtab): Likewise.
8800         (dw2_map_symtabs_matching_filename): Likewise.
8801         (dw2_symtab_iter_next): Likewise.
8802         (dw2_print_stats): Likewise.
8803         (dw2_expand_all_symtabs): Likewise.
8804         (dw2_expand_symtabs_with_fullname): Likewise.
8805         (dw2_expand_marked_cus): Likewise.
8806         (dw2_map_symbol_filenames): Likewise.
8807         (create_cus_from_debug_names): Likewise.
8808         (dwarf2_read_debug_names): Likewise.
8809         (dw2_debug_names_iterator::next): Likewise.
8810         (dwarf2_initialize_objfile): Likewise.
8811         (set_partial_user): Likewise.
8812         (dwarf2_build_psymtabs_hard): Likewise.
8813         (read_comp_units_from_section): Remove arguments, adjust to
8814         std::vector change.
8815         (create_all_comp_units): Adjust to std::vector and
8816         read_comp_units_from_section changes.
8817         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8818         change.
8819         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8820         (psyms_seen_size): Likewise.
8821         (write_gdbindex): Likewise.
8822         (write_debug_names): Likewise.
8823
8824 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8825
8826         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8827         with dwarf2_per_objfile.
8828         (create_cus_from_index): Likewise.
8829         (create_signatured_type_table_from_index): Likewise.
8830         (dwarf2_read_index): Likewise.
8831         (dwarf2_initialize_objfile): Likewise.
8832         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8833         per_cu rather than get_dwarf2_per_objfile.
8834
8835 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8836
8837         * dwarf2read.h (struct signatured_type): Forward declare.
8838         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8839         New methods.
8840         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8841         (dw2_get_cutu): ...this.
8842         (dwarf2_per_objfile::get_cu): Rename from...
8843         (dw2_get_cu): ...this.
8844         (dwarf2_per_objfile::get_tu): New.
8845         (create_addrmap_from_index): Adjust.
8846         (create_addrmap_from_aranges): Adjust.
8847         (dw2_find_last_source_symtab): Adjust.
8848         (dw2_map_symtabs_matching_filename): Adjust.
8849         (dw2_symtab_iter_next): Adjust.
8850         (dw2_print_stats): Adjust.
8851         (dw2_expand_all_symtabs): Adjust.
8852         (dw2_expand_symtabs_with_fullname): Adjust.
8853         (dw2_expand_marked_cus): Adjust.
8854         (dw_expand_symtabs_matching_file_matcher): Adjust.
8855         (dw2_map_symbol_filenames): Adjust.
8856         (dw2_debug_names_iterator::next): Adjust.
8857         (dwarf2_initialize_objfile): Adjust.
8858         (set_partial_user): Adjust.
8859         (dwarf2_build_psymtabs_hard): Adjust.
8860
8861 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8862
8863         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8864         Remove unused variables.
8865         (dw2_map_symtabs_matching_filename): Likewise.
8866         (dwarf2_record_block_ranges): Likewise.
8867         (dwarf2_read_addr_index): Likewise.
8868         (follow_die_offset): Likewise.
8869
8870 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8871
8872         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8873         to symbol_file_add_main.
8874
8875 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8876
8877         PR mi/22299
8878         * mi/mi-console.c (do_fputc_async_safe): New.
8879         (mi_console_file::write_async_safe): New.
8880         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8881         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8882         New.
8883         * ui-file.c (ui_file::putstrn): Adjust call to
8884         fputstrn_unfiltered.
8885         * utils.c (printchar): Replace do_fputs and do_fprintf
8886         parameters by do_fputc.
8887         (fputstr_filtered): Adjust call to printchar.
8888         (fputstr_unfiltered): Likewise.
8889         (fputstrn_filtered): Likewise.
8890         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8891         printchar.
8892         * utils.h (do_fputc_ftype): New typedef.
8893         (fputstrn_unfiltered): Add do_fputc parameter.
8894
8895 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8896
8897         * regformats/i386/i386-avx.dat: Remove.
8898
8899 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8900
8901         PR gdb/22979
8902         * amd64-tdep.c (amd64_none_init_abi): New function.
8903         (amd64_x32_none_init_abi): New function.
8904         (_initialize_amd64_tdep): Register handlers for x86-64 and
8905         x64_32 with GDB_OSABI_NONE.
8906         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8907         GDB_OSABI_NONE osabi.
8908
8909 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8910
8911         PR gdb/22980
8912         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8913         GDB_OSABI_NONE.
8914         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8915         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8916
8917 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8918
8919         * common/byte-vector.h (char_vector): New type.
8920         * target.h (target_read_alloc): Return
8921         gdb::optional<byte_vector>.
8922         (target_read_stralloc): Return gdb::optional<char_vector>.
8923         (target_get_osdata): Return gdb::optional<char_vector>.
8924         * target.c (target_read_alloc_1): Templatize.  Replacement
8925         manual memory management with vector.
8926         (target_read_alloc): Change return type, adjust.
8927         (target_read_stralloc): Change return type, adjust.
8928         (target_get_osdata): Change return type, adjust.
8929         * auxv.c (struct auxv_info) <length>: Remove.
8930         <data>: Change type to gdb::optional<byte_vector>.
8931         (auxv_inferior_data_cleanup): Free auxv_info with delete.
8932         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8933         (target_auxv_search): Adjust.
8934         (fprint_target_auxv): Adjust.
8935         * avr-tdep.c (avr_io_reg_read_command): Adjust.
8936         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8937         (linux_make_corefile_notes): Adjust.
8938         * osdata.c (get_osdata): Adjust.
8939         * remote.c (remote_get_threads_with_qxfer): Adjust.
8940         (remote_memory_map): Adjust.
8941         (remote_traceframe_info): Adjust.
8942         (btrace_read_config): Adjust.
8943         (remote_read_btrace): Adjust.
8944         (remote_pid_to_exec_file): Adjust.
8945         * solib-aix.c (solib_aix_get_library_list): Adjust.
8946         * solib-dsbt.c (decode_loadmap): Don't free buf.
8947         (dsbt_get_initial_loadmaps): Adjust.
8948         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8949         * solib-target.c (solib_target_current_sos): Adjust.
8950         * tracepoint.c (sdata_make_value): Adjust.
8951         * xml-support.c (xinclude_start_include): Adjust.
8952         (xml_fetch_content_from_file): Adjust.
8953         * xml-support.h (xml_fetch_another): Change return type.
8954         (xml_fetch_content_from_file): Change return type.
8955         * xml-syscall.c (xml_init_syscalls_info): Adjust.
8956         * xml-tdesc.c (file_read_description_xml): Adjust.
8957         (fetch_available_features_from_target): Change return type.
8958         (target_fetch_description_xml): Adjust.
8959         (target_read_description_xml): Adjust.
8960
8961 2018-04-06  Tom Tromey  <tom@tromey.com>
8962
8963         * value.c (~value): Update.
8964         (struct value) <contents>: Now unique_xmalloc_ptr.
8965         (value_contents_bits_eq, allocate_value_contents)
8966         (value_contents_raw, value_contents_all_raw)
8967         (value_contents_for_printing, value_contents_for_printing_const)
8968         (set_value_enclosing_type): Update.
8969
8970 2018-04-06  Tom Tromey  <tom@tromey.com>
8971
8972         * value.c (range_s): Remove typedef, VEC.
8973         (struct range): Add operator<.
8974         (range_lessthan): Remove.
8975         (ranges_contain): Change type.
8976         (~value): Update.
8977         (struct value) <unavailable, optimized_out>: Now std::vector.
8978         (value_entirely_available)
8979         (value_entirely_covered_by_range_vector)
8980         (value_entirely_unavailable, value_entirely_optimized_out):
8981         Update.
8982         (insert_into_bit_range_vector): Change argument type.
8983         (find_first_range_overlap): Likewise.
8984         (struct ranges_and_idx, value_contents_bits_eq)
8985         (require_not_optimized_out, require_available): Update.
8986         (ranges_copy_adjusted): Change argument types.
8987         (value_optimized_out, value_copy, value_fetch_lazy): Update.
8988
8989 2018-04-06  Tom Tromey  <tom@tromey.com>
8990
8991         * value.c (~value): Update.
8992         (struct value) <parent>: Now a value_ref_ptr.
8993         (value_parent, set_value_parent, value_address, value_copy):
8994         Update.
8995
8996 2018-04-06  Tom Tromey  <tom@tromey.com>
8997
8998         * value.c (struct value): Add constructor, destructor, and member
8999         initializers.
9000         (allocate_value_lazy, value_decref): Update.
9001
9002 2018-04-06  Tom Tromey  <tom@tromey.com>
9003
9004         * value.c (struct value) <released, next>: Remove.
9005         (all_values): Now a std::vector.
9006         (allocate_value_lazy): Update.
9007         (value_next): Remove.
9008         (value_mark, value_free_to_mark, release_value)
9009         (value_release_to_mark): Update.
9010
9011 2018-04-06  Tom Tromey  <tom@tromey.com>
9012
9013         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9014         (free_value_chain): Remove.
9015         * value.c (free_value_chain): Remove.
9016         (value_release_to_mark): Return a std::vector.
9017         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9018         std::vector.
9019         (check_condition): Update.
9020         * eval.c (fetch_subexp_value): Change "val_chain" to a
9021         std::vector.
9022         * breakpoint.c (update_watchpoint): Update.
9023         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9024
9025 2018-04-06  Tom Tromey  <tom@tromey.com>
9026
9027         * value.h (free_all_values): Remove.
9028         * value.c (free_all_values): Remove.
9029
9030 2018-04-06  Tom Tromey  <tom@tromey.com>
9031
9032         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9033         (value_history_chain, value_history_count): Remove.
9034         (value_history): New global.
9035         (record_latest_value, access_value_history, show_values)
9036         (preserve_values): Update.
9037
9038 2018-04-06  Tom Tromey  <tom@tromey.com>
9039
9040         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9041         * varobj.c (varobj_set_display_format, varobj_set_value)
9042         (install_default_visualizer, construct_visualizer)
9043         (install_new_value, ~varobj, varobj_get_value_type)
9044         (my_value_of_variable, varobj_editable_p): Update.
9045         * c-varobj.c (c_describe_child, c_value_of_variable)
9046         (cplus_number_of_children, cplus_describe_child): Update.
9047         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9048         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9049         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9050
9051 2018-04-06  Tom Tromey  <tom@tromey.com>
9052
9053         * printcmd.c (last_examine_address): Change type to
9054         value_ref_ptr.
9055         (do_examine, x_command): Update.
9056
9057 2018-04-06  Tom Tromey  <tom@tromey.com>
9058
9059         * value.c (release_value): Update.
9060         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9061         (struct bpstats) <val>: Now a value_ref_ptr.
9062         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9063         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9064         (~watchpoint, print_it_watchpoint, watch_command_1)
9065         (invalidate_bp_value_on_memory_change): Update.
9066
9067 2018-04-06  Tom Tromey  <tom@tromey.com>
9068
9069         * varobj.c (varobj_clear_saved_item)
9070         (update_dynamic_varobj_children, install_new_value, ~varobj):
9071         Update.
9072         * value.h (value_incref): Move declaration earlier.
9073         (value_decref): Rename from value_free.
9074         (struct value_ref_policy): New.
9075         (value_ref_ptr): New typedef.
9076         (struct value_deleter): Remove.
9077         (gdb_value_up): Remove typedef.
9078         (release_value): Change return type.
9079         (release_value_or_incref): Remove.
9080         * value.c (set_value_parent): Update.
9081         (value_incref): Change return type.
9082         (value_decref): Rename from value_free.
9083         (value_free_to_mark, free_all_values, free_value_chain): Update.
9084         (release_value): Return value_ref_ptr.
9085         (release_value_or_incref): Remove.
9086         (record_latest_value, set_internalvar, clear_internalvar):
9087         Update.
9088         * stack.c (info_frame_command): Don't call value_free.
9089         * python/py-value.c (valpy_dealloc, valpy_new)
9090         (value_to_value_object): Update.
9091         * printcmd.c (do_examine): Update.
9092         * opencl-lang.c (lval_func_free_closure): Update.
9093         * mi/mi-main.c (register_changed_p): Don't call value_free.
9094         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9095         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9096         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9097         value_free.
9098         * guile/scm-value.c (vlscm_free_value_smob)
9099         (vlscm_scm_from_value): Update.
9100         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9101         (frame_unwind_register_unsigned, get_frame_register_bytes)
9102         (put_frame_register_bytes): Don't call value_free.
9103         * findvar.c (address_from_register): Don't call value_free.
9104         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9105         * dwarf2loc.c (entry_data_value_free_closure)
9106         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9107         (dwarf2_evaluate_loc_desc_full): Update.
9108         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9109         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9110         (~watchpoint, watch_command_1)
9111         (invalidate_bp_value_on_memory_change): Update.
9112         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9113
9114 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9115
9116         PR gdb/23022
9117         * warning.m4: Add -Wno-error=deprecated-register.
9118         * configure: Re-generate.
9119
9120 2018-04-05  Tom Tromey  <tom@tromey.com>
9121
9122         * linespec.h: Remove include of "vec.h".
9123
9124 2018-04-05  Tom Tromey  <tom@tromey.com>
9125
9126         * linespec.c (typep): Remove typedef.
9127         (find_methods, find_superclass_methods): Take a std::vector.
9128         (find_method): Use std::vector.
9129
9130 2018-04-05  Tom Tromey  <tom@tromey.com>
9131
9132         * utils.c (compare_strings): Remove.
9133         * utils.h (compare_strings): Remove.
9134         * objc-lang.h (find_imps): Update.
9135         * objc-lang.c (find_methods): Take a std::vector.
9136         (uniquify_strings, find_imps): Likewise.
9137         * linespec.c (find_methods): Take a std::vector.
9138         (decode_objc): Use std::vector.
9139         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9140         a std::vector.
9141         (find_method, find_function_symbols): Use std::vector.
9142
9143 2018-04-05  Tom Tromey  <tom@tromey.com>
9144
9145         * completer.c (completion_tracker::completion_tracker): Remove
9146         cast.
9147         (completion_tracker::discard_completions): Likewise.
9148         * breakpoint.c (ambiguous_names_p): Remove cast.
9149         * ada-lang.c (_initialize_ada_language): Remove cast.
9150         * utils.h (streq): Update.
9151         (streq_hash): Add new declaration.
9152         * utils.c (streq): Return bool.
9153         (streq_hash): New function.
9154
9155 2018-04-05  Tom Tromey  <tom@tromey.com>
9156
9157         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9158         Remove a string copy.
9159
9160 2018-04-05  Tom Tromey  <tom@tromey.com>
9161
9162         * linespec.c (filter_results): Use std::vector.
9163         (decode_line_2, decode_line_full): Update.
9164
9165 2018-04-05  Tom Tromey  <tom@tromey.com>
9166
9167         * linespec.c (canonical_to_fullform): Return std::string.
9168         (filter_results): Update.
9169         (struct decode_line_2_item): Add constructor.
9170         <fullform, displayform>: Now std::string.
9171         (decode_line_2_compare_items): Now a std::sort comparator.
9172         (decode_line_2): Update.
9173
9174 2018-04-05  Tom Tromey  <tom@tromey.com>
9175
9176         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9177         (unexpected_linespec_error): Update.
9178         (linespec_parse_basic, parse_linespec): Update.
9179
9180 2018-04-05  Tom Tromey  <tom@tromey.com>
9181
9182         * linespec.c (linespec_parse_basic): Reindent.
9183
9184 2018-04-05  Tom Tromey  <tom@tromey.com>
9185
9186         * minsyms.h (iterate_over_minimal_symbols): Update.
9187         * minsyms.c (iterate_over_minimal_symbols): Take a
9188         gdb::function_view.
9189         * linespec.c (struct collect_minsyms): Remove.
9190         (compare_msyms): Now a std::sort comparator.
9191         (add_minsym): Add parameters.
9192         (search_minsyms_for_name): Update.  Use std::vector.
9193
9194 2018-04-03  Tom Tromey  <tom@tromey.com>
9195
9196         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9197         gdb::byte_vector.
9198
9199 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9200
9201         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9202
9203 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9204
9205         PR gdb/16959
9206         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9207         printing static type.
9208
9209 2018-04-01  Tom Tromey  <tom@tromey.com>
9210
9211         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9212         (rs6000_xfer_shared_libraries): Update.
9213
9214 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9215
9216         * common/gdb_vecs.h (char_ptr): Remove.
9217         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9218
9219 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9220
9221         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9222         with std::vector.
9223         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9224
9225 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9226
9227         * tracepoint.h (struct uploaded_tp): Initialize fields.
9228         <actions, step_actions, cmd_strings>: Change type to
9229         std::vector<char *>.
9230         * tracepoint.c (get_uploaded_tp): Allocate with new.
9231         (free_uploaded_tps): Free with delete.
9232         (parse_tracepoint_definition): Adjust to std::vector change.
9233         * breakpoint.c (read_uploaded_action): Likewise.
9234         (create_tracepoint_from_upload): Likewise.
9235         * ctf.c (ctf_write_uploaded_tp): Likewise.
9236         (SET_ARRAY_FIELD): Likewise.
9237         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9238
9239 2018-03-30  Tom Tromey  <tom@tromey.com>
9240
9241         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9242         std::unique_ptr.
9243         (svr4_keep_data_in_core): Update.
9244         (svr4_read_so_list): Update.
9245
9246 2018-03-30  Tom Tromey  <tom@tromey.com>
9247
9248         * windows-nat.c (handle_output_debug_string, handle_exception):
9249         Update.
9250         * target.h (target_read_string): Update.
9251         * target.c (target_read_string): Change "string" to
9252         unique_xmalloc_ptr.
9253         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9254         Update.
9255         * solib-frv.c (frv_current_sos): Update.
9256         * solib-dsbt.c (dsbt_current_sos): Update.
9257         * solib-darwin.c (darwin_current_sos): Update.
9258         * linux-thread-db.c (inferior_has_bug): Update.
9259         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9260         Update.  Remove alloca.
9261         * ada-lang.c (ada_main_name): Update.
9262
9263 2018-03-30  Tom Tromey  <tom@tromey.com>
9264
9265         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9266         (struct dwo_file_deleter): New.
9267         (dwo_file_up): New typedef.
9268         (open_and_init_dwo_file): Use dwo_file_up.
9269         (free_dwo_file_cleanup): Remove.
9270
9271 2018-03-30  Tom Tromey  <tom@tromey.com>
9272
9273         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9274         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9275
9276 2018-03-30  Tom Tromey  <tom@tromey.com>
9277
9278         * dwarf2read.c (class free_cached_comp_units): New class.
9279         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9280         (free_cached_comp_units): Remove function.
9281
9282 2018-03-30  Tom Tromey  <tom@tromey.com>
9283
9284         * utils.h (make_cleanup_unpush_target): Remove.
9285         * inf-ptrace.c (struct target_unpusher): New.
9286         (target_unpush_up) New typedef.
9287         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9288         target_unpush_up.
9289         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9290
9291 2018-03-27  Tom Tromey  <tom@tromey.com>
9292
9293         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9294
9295 2018-03-27  Pedro Alves  <palves@redhat.com>
9296             Tom Tromey  <tom@tromey.com>
9297
9298         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9299         destructor.  Now a class.
9300         (gdb_readline_wrapper_cleanup): Remove function.
9301         (gdb_readline_wrapper): Remove cleanups.
9302
9303 2018-03-27  Tom Tromey  <tom@tromey.com>
9304
9305         * typeprint.h (struct type_print_options) <local_typedefs,
9306         global_typedefs>: Remove "struct" keyword.
9307         (class typedef_hash_table): New class.
9308         (recursively_update_typedef_hash, add_template_parameters)
9309         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9310         (find_typedef_in_hash): Don't declare.
9311         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9312         (typedef_hash_table::recursively_update): Rename from
9313         recursively_update_typedef_hash.  Now a member.
9314         (typedef_hash_table::add_template_parameters): Rename from
9315         add_template_parameters.  Now a member.
9316         (typedef_hash_table::typedef_hash_table): Now a constructor;
9317         rename from create_typedef_hash.
9318         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9319         rename from free_typedef_hash.
9320         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9321         (do_free_global_table): Remove.
9322         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9323         from copy_type_recursive.
9324         (create_global_typedef_table): Remove.
9325         (typedef_hash_table::find_global_typedef): Now a member of
9326         typedef_hash_table.
9327         (typedef_hash_table::find_typedef): Rename from
9328         find_typedef_in_hash; now a member.
9329         (whatis_exp): Update.
9330         * extension.h (struct ext_lang_type_printers): Add constructor and
9331         destructor.
9332         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9333         declare.
9334         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9335         Now a constructor; rename from start_ext_lang_type_printers.
9336         (ext_lang_type_printers): Now a destructor; rename from
9337         free_ext_lang_type_printers.
9338         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9339         Update.
9340         (c_type_print_base_struct_union): Update.  Remove cleanups.
9341
9342 2018-03-27  Tom Tromey  <tom@tromey.com>
9343
9344         * dwarf-index-write.c: Include <cmath>.
9345
9346 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9347
9348         * NEWS: Add entry describing new "set|show varsize-limit" command.
9349         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9350         command.
9351         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9352         "set variable".
9353
9354 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9355
9356         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9357         dwarf-index-write.c
9358         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9359         * dwarf-index-common.c: New file.
9360         * dwarf-index-common.h: New file.
9361         * dwarf-index-write.c: New file.
9362         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9363         (struct dwarf2_section_info): Move from here.
9364         (dwarf2_section_info_def): Likewise.
9365         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9366         (offset_type): Likewise.
9367         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9368         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9369         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9370         (byte_swap): Likewise.
9371         (MAYBE_SWAP): Likewise.
9372         (dwarf2_per_cu_ptr): Likewise.
9373         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9374         (struct tu_stats): Likewise.
9375         (struct dwarf2_per_objfile): Likewise.
9376         (struct dwarf2_per_cu_data): Likewise.
9377         (struct signatured_type): Likewise.
9378         (sig_type_ptr): Likewise.
9379         (DEF_VEC_P (sig_type_ptr)): Likewise.
9380         (INDEX4_SUFFIX): Likewise.
9381         (INDEX5_SUFFIX): Likewise.
9382         (DEBUG_STR_SUFFIX): Likewise.
9383         (dwarf2_read_section): Make non-static.
9384         (mapped_index_string_hash): Move from here.
9385         (dwarf5_djb_hash): Likewise.
9386         (file_write): Likewise.
9387         (class data_buf): Likewise.
9388         (struct symtab_index_entry): Likewise.
9389         (struct mapped_symtab): Likewise.
9390         (find_slot): Likewise.
9391         (hash_expand): Likewise.
9392         (add_index_entry): Likewise.
9393         (uniquify_cu_indices): Likewise.
9394         (class c_str_view): Likewise.
9395         (class c_str_view_hasher): Likewise.
9396         (class vector_hasher): Likewise.
9397         (write_hash_table): Likewise.
9398         (psym_index_map): Likewise.
9399         (struct addrmap_index_data): Likewise.
9400         (add_address_entry): Likewise.
9401         (add_address_entry_worker): Likewise.
9402         (write_address_map): Likewise.
9403         (symbol_kind): Likewise.
9404         (write_psymbols): Likewise.
9405         (struct signatured_type_index_data): Likewise.
9406         (write_one_signatured_type): Likewise.
9407         (recursively_count_psymbols): Likewise.
9408         (recursively_write_psymbols): Likewise.
9409         (class debug_names): Likewise.
9410         (check_dwarf64_offsets): Likewise.
9411         (psyms_seen_size): Likewise.
9412         (write_gdbindex): Likewise.
9413         (write_debug_names): Likewise.
9414         (assert_file_size): Likewise.
9415         (write_psymtabs_to_index): Likewise.
9416         (save_gdb_index_command): Likewise.
9417         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9418         command.
9419         * dwarf2read.h: New file.
9420
9421 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9422
9423         PR gdb/22670
9424         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9425         symbol name if the CU's language stores symbol names in linkage
9426         format.
9427         * language.h (struct language_defn)
9428         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9429         all instances of this struct.
9430
9431 2018-03-26  Tom Tromey  <tom@tromey.com>
9432
9433         * stack.c (backtrace_command_1): Remove verbose code.
9434
9435 2018-03-26  Tom Tromey  <tom@tromey.com>
9436
9437         * python/py-framefilter.c (py_print_type): Don't catch
9438         exceptions.  Return void.
9439         (py_print_value): Likewise.
9440         (py_print_single_arg): Likewise.
9441         (enumerate_args): Don't catch exceptions.
9442         (py_print_args): Likewise.
9443         (py_print_frame): Likewise.
9444         (gdbpy_apply_frame_filter): Catch exceptions here.
9445
9446 2018-03-26  Tom Tromey  <tom@tromey.com>
9447
9448         * stack.c (_initialize_stack): Remove trailing newlines from help
9449         text.  Add "Usage" line to "backtrace" help.
9450
9451 2018-03-26  Tom Tromey  <tom@tromey.com>
9452
9453         PR python/16486:
9454         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9455
9456 2018-03-26  Tom Tromey  <tom@tromey.com>
9457
9458         * python/py-framefilter.c (py_print_single_arg): Return
9459         EXT_LANG_BT_ERROR from catch.
9460
9461 2018-03-26  Tom Tromey  <tom@tromey.com>
9462
9463         PR backtrace/15584:
9464         * stack.c (backtrace_command_1): Move some code into no-filters
9465         "if".
9466
9467 2018-03-26  Tom Tromey  <tom@tromey.com>
9468
9469         * python/py-framefilter.c (throw_quit_or_print_exception): New
9470         function.
9471         (gdbpy_apply_frame_filter): Use it.
9472
9473 2018-03-26  Tom Tromey  <tom@tromey.com>
9474
9475         PR cli/17716:
9476         * python/py-framefilter.c (py_print_type, py_print_value)
9477         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9478         RETURN_MASK_ERROR.
9479
9480 2018-03-26  Tom Tromey  <tom@tromey.com>
9481
9482         * python/py-framefilter.c (enumerate_args): Use
9483         gdb::unique_xmalloc_ptr.
9484
9485 2018-03-26  Tom Tromey  <tom@tromey.com>
9486
9487         * python/py-framefilter.c (py_print_frame): Return
9488         EXT_LANG_BT_OK.
9489         (gdbpy_apply_frame_filter): Update comment.
9490         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9491         Remove.
9492         <EXT_LANG_BT_NO_FILTERS>: Change value.
9493
9494 2018-03-26  Tom Tromey  <tom@tromey.com>
9495
9496         PR backtrace/15582:
9497         * stack.c (backtrace_command): Parse "hide" argument.
9498         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9499         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9500         constant.
9501
9502 2018-03-26  Tom Tromey  <tom@tromey.com>
9503
9504         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9505         add "flags".
9506         (backtrace_command): Remove "fulltrace", add "flags".
9507
9508 2018-03-26  Tom Tromey  <tom@tromey.com>
9509
9510         * stack.c (backtrace_command): Rewrite command line parsing.
9511
9512 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9513
9514         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9515
9516 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9517
9518         * filename-seen-cache.h: Add include guard.
9519
9520 2018-03-26  Keith Seitz  <keiths@redhat.com>
9521
9522         * symfile.c (place_section): Remove "struct" from section_addr_info
9523         in comment.
9524         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9525         "struct" keyword from section_addr_info.
9526
9527 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9528
9529         * regformats/regdef.h (reg): Add constructors.
9530
9531 2018-03-25  Pedro Alves  <palves@redhat.com>
9532
9533         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9534         if then/else bodies in var_func_name extraction.
9535
9536 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9537
9538         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9539         lookup_minimal_symbol() to find symbol entry.
9540         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9541
9542 2018-03-23  Keith Seitz  <keiths@redhat.com>
9543
9544         PR c++/22968
9545         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9546         nested type definitions for C++, too.
9547
9548 2018-03-23  Tom Tromey  <tom@tromey.com>
9549
9550         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9551         a typedef.
9552         (macho_register_oso): Remove.
9553         (macho_symtab_read): Take a std::vector.
9554         (oso_el_compare_name): Now a std::sort comparator.
9555         (macho_symfile_read_all_oso): Take a std::vector.
9556         (macho_symfile_read): Use std::vector.  Remove cleanups.
9557
9558 2018-03-22  Tom Tromey  <tom@tromey.com>
9559
9560         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9561         (record_full_goto_bookmark): Use std::string.
9562
9563 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9564
9565         PR tdep/18295
9566         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9567         a single mask.
9568
9569 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9570
9571         * rs6000-tdep.c (store_insn_p): New function.
9572         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9573         and cr_reg to their unshifted values. Use store_insn_p to
9574         match LR saves using either R1 or fdata->alloca_reg. Use
9575         store_insn_p to match CR saves. Set alloca_reg_offset
9576         when alloca_reg and framep are set. Remove lr_reg shift
9577         when assigning to fdata->lr_register.
9578
9579 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9580
9581         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9582         command line args instead of emitting a warning.
9583
9584 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9585
9586         * tracepoint.h (struct static_tracepoint_marker): Initialize
9587         fields, define default constructor, move constructor and move
9588         assignment, disable the rest.
9589         <str_id, extra>: Make std::string.
9590         (release_static_tracepoint_marker): Remove.
9591         (free_current_marker): Remove.
9592         * tracepoint.c (free_current_marker): Remove.
9593         (parse_static_tracepoint_marker_definition): Adjust to
9594         std::string, use new hex2str overload.
9595         (release_static_tracepoint_marker): Remove.
9596         (print_one_static_tracepoint_marker): Get marker by reference
9597         and adjust to std::string.
9598         (info_static_tracepoint_markers_command): Adjust to std::vector
9599         changes
9600         * target.h (static_tracepoint_marker_p): Remove typedef.
9601         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9602         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9603         bool.
9604         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9605         * target-debug.h
9606         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9607         (target_debug_print_std_vector_static_tracepoint_marker): New.
9608         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9609         to...
9610         (target_debug_print_static_tracepoint_marker_p): ... this.
9611         * target-delegates.c: Re-generate.
9612         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9613         Make std::string.
9614         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9615         (decode_static_tracepoint_spec): Adjust to std::vector.
9616         (tracepoint_print_one_detail): Adjust to std::string.
9617         (strace_marker_decode_location): Adjust to std::string.
9618         (update_static_tracepoint): Adjust to std::string, remove call
9619         to release_static_tracepoint_marker.
9620         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9621         Adjust to std::vector.
9622         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9623         (remote_static_tracepoint_markers_by_strid): Adjust to
9624         std::vector.
9625         * common/rsp-low.h (hex2str): New overload with explicit count
9626         of bytes.
9627         * common/rsp-low.c (hex2str): New overload with explicit count
9628         of bytes.
9629         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9630         (_initialize_rsp_low_selftests): Add test_hex2str test.
9631         * unittests/tracepoint-selftests.c
9632         (test_parse_static_tracepoint_marker_definition): Adjust to
9633         std::string.
9634
9635 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9636
9637         * tracepoint.c (parse_static_tracepoint_marker_definition):
9638         Consider case where the definition is followed by more
9639         definitions.
9640         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9641         tracepoint-selftests.c.
9642         * unittests/tracepoint-selftests.c: New.
9643
9644 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9645
9646         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9647         Carvalho.
9648
9649 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9650
9651         * symtab.c (find_pc_sect_line): fixed indentation.
9652
9653 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9654
9655         * symtab.c (find_pc_sect_line): now uses binary search.
9656
9657 2018-03-19  Tom Tromey  <tom@tromey.com>
9658
9659         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9660         "IDENT" production.
9661
9662 2018-03-19  Pedro Alves  <palves@redhat.com>
9663             Tom Tromey  <tom@tromey.com>
9664
9665         * unittests/observable-selftests.c: New file.
9666         * common/observable.h: New file.
9667         * observable.h: New file.
9668         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9669         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9670         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9671         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9672         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9673         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9674         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9675         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9676         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9677         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9678         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9679         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9680         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9681         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9682         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9683         tui/tui-interp.c, valops.c: Update all users.
9684         * tui/tui-hooks.c (tui_bp_created_observer)
9685         (tui_bp_deleted_observer, tui_bp_modified_observer)
9686         (tui_inferior_exit_observer, tui_before_prompt_observer)
9687         (tui_normal_stop_observer, tui_register_changed_observer):
9688         Remove.
9689         (tui_observers_token): New global.
9690         (attach_or_detach, tui_attach_detach_observers): New functions.
9691         (tui_install_hooks, tui_remove_hooks): Use
9692         tui_attach_detach_observers.
9693         * record-btrace.c (record_btrace_thread_observer): Remove.
9694         (record_btrace_thread_observer_token): New global.
9695         * observer.sh: Remove.
9696         * observer.c: Rename to observable.c.
9697         * observable.c (namespace gdb_observers): Define new objects.
9698         (observer_debug): Move into gdb_observers namespace.
9699         (struct observer, struct observer_list, xalloc_observer_list_node)
9700         (xfree_observer_list_node, generic_observer_attach)
9701         (generic_observer_detach, generic_observer_notify): Remove.
9702         (_initialize_observer): Update.
9703         Don't include observer.inc.
9704         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9705         (clean mostlyclean): Likewise.
9706         (observer.h, observer.inc): Remove targets.
9707         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9708         (COMMON_SFILES): Use observable.c, not observer.c.
9709         * .gitignore: Remove observer.h.
9710
9711 2018-03-18  Tom Tromey  <tom@tromey.com>
9712
9713         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9714         gdb::def_vector.
9715         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9716
9717 2018-03-17  Tom Tromey  <tom@tromey.com>
9718
9719         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9720
9721 2018-03-17  Tom Tromey  <tom@tromey.com>
9722
9723         * target.c (class scoped_target_fd): New.
9724         (target_fileio_close_cleanup): Remove.
9725         (target_fileio_read_alloc_1): Use scoped_target_fd.
9726
9727 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9728
9729         * silent-rules.mk: New.
9730         * Makefile.in: Include silent-rules.mk
9731         (srcdir, VPATH, top_srcdir): Move up.
9732         (COMPILE): Add ECHO_CXX.
9733         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9734         (init.c): Add ECHO_INIT_C.
9735         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9736         (version.c): Add ECHO_GEN.
9737         (printcmd.o): Add ECHO_CXX.
9738         (target-float.o): Add ECHO_CXX.
9739         (ada-exp.o): Add ECHO_CXX.
9740         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9741         (insight$(EXEEXT)): Add ECHO_CXXLD.
9742         * gnulib/configure.ac: Add AM_SILENT_RULES.
9743         * gnulib/aclocal.m4: Re-generate.
9744         * gnulib/configure: Re-generate.
9745         * gnulib/import/Makefile.in: Re-generate.
9746
9747 2018-03-16  Tom Tromey  <tom@tromey.com>
9748
9749         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9750         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9751         * utils.c (do_free_section_addr_info)
9752         (make_cleanup_free_section_addr_info): Remove.
9753         * symfile.h (struct other_sections): Add constructor.
9754         (struct section_addr_info): Remove.
9755         (section_addr_info): New typedef.
9756         (struct sym_fns) <sym_offsets>: Change type of parameter.
9757         (build_section_addr_info_from_objfile)
9758         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9759         (default_symfile_offsets, symbol_file_add)
9760         (symbol_file_add_from_bfd)
9761         (build_section_addr_info_from_section_table): Update.
9762         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9763         * symfile.c (alloc_section_addr_info): Remove.
9764         (build_section_addr_info_from_section_table): Change return type.
9765         Update.
9766         (build_section_addr_info_from_bfd)
9767         (build_section_addr_info_from_objfile): Likewise.
9768         (free_section_addr_info): Remove.
9769         (relative_addr_info_to_section_offsets): Change type of "addrs".
9770         (addrs_section_compar): Now a std::sort comparator.
9771         (addrs_section_sort): Change return type.
9772         (addr_info_make_relative): Change type of "addrs".  Update.
9773         (default_symfile_offsets, syms_from_objfile_1)
9774         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9775         (symbol_file_add_separate): Update.
9776         (symbol_file_add): Change type of "addrs".  Update.
9777         (add_symbol_file_command): Update.  Remove cleanups.
9778         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9779         cleanups.
9780         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9781         * solib.c (solib_read_symbols): Update.
9782         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9783         * machoread.c (macho_symfile_offsets): Update.
9784         * jit.c (jit_bfd_try_read_symtab): Update.
9785
9786 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9787
9788         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9789         unittests/utils-selftests.c.
9790         * unittests/utils-selftests.c: New file.
9791
9792 2018-03-14  Tom Tromey  <tom@tromey.com>
9793
9794         PR cli/14977:
9795         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9796         for NULL.
9797
9798 2018-03-14  Tom Tromey  <tom@tromey.com>
9799
9800         PR cli/19918:
9801         * printcmd.c (printf_pointer): Allow "-" in format.
9802
9803 2018-03-14  Tom Tromey  <tom@tromey.com>
9804
9805         * printcmd.c (_initialize_printcmd): Add usage to printf.
9806
9807 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9808
9809         * MAINTAINERS: Update my email address.
9810
9811 2018-03-13  Tom Tromey  <tom@tromey.com>
9812
9813         * machoread.c (macho_check_dsym): Change filenamep to a
9814         std::string*.
9815         (macho_symfile_read): Update.
9816         * symfile.c (load_command): Use std::string.
9817
9818 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9819
9820         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9821         to error message string.
9822         (riscv_register_name): Use xsnprintf instead of sprintf.
9823         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9824         internal_error.
9825         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9826         error.
9827         (riscv_push_dummy_call): Likewise.
9828
9829 2018-03-12  Tom Tromey  <tom@tromey.com>
9830
9831         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9832         Use gdb::byte_vector.
9833         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9834
9835 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9836
9837         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9838         parameter type to readable_regcache.
9839         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9840         the declaration.
9841
9842 2018-03-11  Tom Tromey  <tom@tromey.com>
9843
9844         * dwarf2read.c (struct nextfield): Add initializers.
9845         (struct nextfnfield): Remove.
9846         (struct fnfieldlist): Add initializers.  Remove "length" and
9847         "head", use std::vector.
9848         (struct decl_field_list): Remove.
9849         (struct field_info): Add initializers.
9850         <fields, baseclasses>: Now std::vector.
9851         <nbaseclasses, nfnfields, typedef_field_list_count,
9852         nested_types_list_count>: Remove.
9853         (dwarf2_add_field, dwarf2_add_type_defn)
9854         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9855         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9856         (process_structure_scope): Update.
9857
9858 2018-03-11  Tom Tromey  <tom@tromey.com>
9859
9860         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9861         for use by std::sort.
9862         (build_type_psymtabs_1): Use std::vector.
9863
9864 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9865
9866         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9867         and LIBMPFR in the printed configuration.
9868
9869 2018-03-08  Tom Tromey  <tom@tromey.com>
9870
9871         * source.c (get_filename_and_charpos): Use scoped_fd.
9872         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9873         (procfs_pidlist): Likewise.
9874         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9875         (iterate_over_mappings): Likewise.
9876
9877 2018-03-08  Tom Tromey  <tom@tromey.com>
9878
9879         * infcall.c (struct call_return_meta_info)
9880         <stack_temporaries_enabled>: Remove.
9881         (get_call_return_value, call_function_by_hand_dummy): Update.
9882         * thread.c (disable_thread_stack_temporaries): Remove.
9883         (enable_thread_stack_temporaries): Remove.
9884         (thread_stack_temporaries_enabled_p): Return bool.
9885         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9886         (get_last_thread_stack_temporary): Update.
9887         * eval.c (evaluate_subexp): Update.
9888         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9889         class, not a function.
9890         (value_ptr, value_vec): Remove typedefs.
9891         (class thread_info) <stack_temporaries_enabled>: Now bool.
9892         <stack_temporaries>: Now a std::vector.
9893         (thread_stack_temporaries_enabled_p)
9894         (value_in_thread_stack_temporaries): Return bool.
9895
9896 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9897
9898         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9899         (getpkt_or_notif_sane_1): Likewise.
9900
9901 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9902
9903         * build-id.c (build_id_to_debug_bfd): Use std::string.
9904
9905 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9906
9907         * build-id.c (find_separate_debug_file_by_buildid): Return
9908         std::string.
9909         * build-id.h (find_separate_debug_file_by_buildid): Return
9910         std::string.
9911         * coffread.c (coff_symfile_read): Adjust to std::string.
9912         * elfread.c (elf_symfile_read): Adjust to std::string.
9913         * symfile.c (separate_debug_file_exists): Change parameter to
9914         std::string.
9915         (find_separate_debug_file): Return std::string.
9916         (find_separate_debug_file_by_debuglink): Return std::string.
9917         * symfile.h (find_separate_debug_file_by_debuglink): Return
9918         std::string.
9919
9920 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9921
9922         * common/xml-utils.c (xml_escape_text): Move code to...
9923         (xml_escape_text_append): ... this new function.
9924         * common/xml-utils.h (xml_escape_text_append): New declaration.
9925         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9926         New function.
9927         (_initialize_xml_utils): register test_xml_escape_text_append as
9928         a selftest.
9929
9930 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
9931
9932         * defs.h: Remove MAX_REGISTER_SIZE.
9933         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9934         asserts.
9935         * python/py-unwind.c (pyuw_sniffer): Likewise.
9936
9937 2018-03-07  Tom Tromey  <tom@tromey.com>
9938
9939         * linux-tdep.c (linux_info_proc): Update.
9940         * target.h (struct target_ops) <to_fileio_readlink>: Return
9941         optional<string>.
9942         (target_fileio_readlink): Return optional<string>.
9943         * remote.c (remote_hostio_readlink): Return optional<string>.
9944         * inf-child.c (inf_child_fileio_readlink): Return
9945         optional<string>.
9946         * target.c (target_fileio_readlink): Return optional<string>.
9947
9948 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
9949
9950         * regcache.c (cooked_read_test): Add riscv to the list of
9951         architectures that have a save_reggroup.
9952
9953 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9954
9955         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9956         value is not a dynamic class object.
9957
9958 2018-03-06  Tom Tromey  <tom@tromey.com>
9959
9960         * rust-exp.y: Formatting fixes.
9961
9962 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9963
9964         * riscv-tdep.c (riscv_register_name): Remove target description
9965         support.
9966         (riscv_gdbarch_init): Remove target description check.
9967
9968 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9969
9970         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9971         comment.
9972         * riscv-tdep.h: Likewise.
9973
9974 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9975
9976         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9977         (riscv_pseudo_register_write): Delete.
9978         (riscv_gdbarch_init): Remove all use of pseudo registers.
9979
9980 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9981
9982         * record-btrace.c (btrace_print_lines): Replace cleanup
9983         parameter with RAII equivalents.
9984         (btrace_insn_history): Replace cleanup with RAII equivalents.
9985         * ui-out.h (make_cleanup_ui_out_list_begin_end,
9986         make_cleanup_ui_out_tuple_begin_end): Remove.
9987         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9988         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9989         make_cleanup_ui_out_list_begin_end): Remove.
9990
9991 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9992
9993         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9994         parameter types to std::vector.  Use bool.
9995         (record_btrace_wait): Replace VEC(tp_t) with
9996         std::vector<thread_info *>.
9997         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9998
9999 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10000
10001         * record-btrace.c (record_btrace_disable_callback): Remove.
10002         (struct scoped_btrace_disable): New.
10003         (record_btrace_open): Use scoped_btrace_disable.
10004
10005 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10006
10007         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10008         reading values from registers.
10009
10010 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10011
10012         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10013         where appropriate.
10014
10015 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10016
10017         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10018         change parameter type.  Use GDB's print functions, and use
10019         core_addr_to_string where appropriate.
10020         (riscv_push_dummy_call): Use core_addr_to_string where
10021         appropriate, update call to riscv_print_arg_location, and reindent
10022         a few lines.
10023         (riscv_return_value): Update call to riscv_print_arg_location.
10024
10025 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10026             Tim Newsome <tim@sifive.com>
10027             Albert Ou <a0u@eecs.berkeley.edu>
10028             Darius Rad <darius@bluespec.com>
10029
10030         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10031         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10032         (ALLDEPFILES): Add riscv-tdep.c
10033         * configure.tgt: Add riscv support.
10034         * riscv-tdep.c: New file.
10035         * riscv-tdep.h: New file.
10036         * NEWS: Mention new target.
10037         * MAINTAINERS: Add entry for riscv.
10038
10039 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10040
10041         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10042         fields within aggregates.
10043
10044 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10045
10046         * record-btrace.c (btrace_print_lines): Change type of flags to
10047         gdb_disassembly_flags.
10048
10049 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10050
10051         * fbsd-nat.c: Include "inf-ptrace.h".
10052         (USE_SIGTRAP_SIGINFO): Conditionally define.
10053         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10054         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10055         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10056         function.
10057         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10058         Likewise.
10059         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10060         Likewise.
10061         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10062         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10063         "supports_stopped_by_hw_breakpoint" target methods.
10064
10065 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10066
10067         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10068         * fbsd-nat.c (debug_fbsd_nat): New variable.
10069         (show_fbsd_nat_debug): New function.
10070         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10071         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10072
10073 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10074
10075         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10076         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10077         prototype.
10078         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10079         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10080         method.
10081
10082 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10083
10084         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10085         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10086
10087 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10088
10089         * charset.c (struct charset_vector): New.
10090         (charsets): Change type to charset_vector.
10091         (find_charset_names): Adjust.
10092         (add_one): Adjust.
10093         (_initialize_charset): Adjust.
10094
10095 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10096
10097         * progspace.h (struct program_space) <deleted_solibs>: Change
10098         type to std::vector<std::string>.
10099         * progspace.c (clear_program_space_solib_cache): Adjust.
10100         * breakpoint.c (print_solib_event): Adjust.
10101         (check_status_catch_solib): Adjust.
10102         * solib.c (update_solib_list): Adjust.
10103         * ui-out.h (class ui_out) <field_string>: New overload.
10104         * ui-out.c (ui_out::field_string): New overload.
10105
10106 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10107
10108         * progspace.h (struct program_space): Add constructor and
10109         destructor, initialize fields.
10110         (add_program_space): Remove.
10111         * progspace.c (add_program_space): Rename to...
10112         (program_space::program_space): ... this.
10113         (release_program_space): Rename to...
10114         (program_space::~program_space): ... this.
10115         (delete_program_space): Use delete to delete program_space.
10116         (initialize_progspace): Use new to allocate program_space.
10117         * inferior.c (add_inferior_with_spaces): Likewise.
10118         (clone_inferior_command): Likewise.
10119         * infrun.c (follow_fork_inferior): Likewise.
10120         (handle_vfork_child_exec_or_exit): Likewise.
10121
10122 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10123
10124         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10125         (delim_string_to_char_ptr_vec): Return std::vector of
10126         gdb::unique_xmalloc_ptr.
10127         (dirnames_to_char_ptr_vec_append): Take std::vector of
10128         gdb::unique_xmalloc_ptr.
10129         (dirnames_to_char_ptr_vec): Return std::vector of
10130         gdb::unique_xmalloc_ptr.
10131         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10132         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10133         (delim_string_to_char_ptr_vec): Return an std::vector of
10134         gdb::unique_xmalloc_ptr, adjust the code.
10135         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10136         gdb::unique_xmalloc_ptr, adjust the code.
10137         (dirnames_to_char_ptr_vec): Return an std::vector of
10138         gdb::unique_xmalloc_ptr, adjust the code.
10139         * auto-load.c (auto_load_safe_path_vec): Change type to
10140         std::vector of gdb::unique_xmalloc_ptr.
10141         (auto_load_expand_dir_vars): Return an std::vector of
10142         gdb::unique_xmalloc_ptr, adjust the code.
10143         (auto_load_safe_path_vec_update): Adjust.
10144         (filename_is_in_auto_load_safe_path_vec): Adjust.
10145         (auto_load_objfile_script_1): Adjust.
10146         * build-id.c (build_id_to_debug_bfd): Adjust.
10147         * linux-thread-db.c (thread_db_load_search): Adjust.
10148         * source.c (add_path): Adjust.
10149         (openp): Adjust.
10150         * symfile.c (find_separate_debug_file): Adjust.
10151         * utils.c (do_free_char_ptr_vec): Remove.
10152         (make_cleanup_free_char_ptr_vec): Remove.
10153
10154 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10155
10156         PR gdb/22907
10157         * common/pathstuff.c: Conditionally include "<windows.h>".
10158
10159 2018-03-01  Georg Sauthoff  <mail@georg.so>
10160
10161         PR gdb/22888
10162         * gcore.in: Quote variables and switch interpreter to bash.
10163
10164 2018-03-01  Tom Tromey  <tom@tromey.com>
10165
10166         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10167         assertion.  Add assertion for discriminant_index.
10168         (quirk_rust_enum): Use correct base type name in univariant case.
10169
10170 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10171
10172         * record.c (get_call_history_modifiers): Return a
10173         record_print_flags.
10174         (cmd_record_call_history): Adjust.
10175         * record-btrace.c (record_btrace_call_history): Adjust.
10176         (record_btrace_call_history_range): Adjust.
10177         (record_btrace_call_history_from): Adjust.
10178         * target-debug.h (target_debug_print_record_print_flags): New.
10179         * target-delegates.c: Re-generate.
10180         * target.c (target_call_history): Change flags type.
10181         (target_call_history_from): Likewise.
10182         (target_call_history_range): Likewise.
10183         * target.h (struct target_ops) <target_call_history>: Likewise.
10184         (target_call_history_from): Likewise.
10185         (target_call_history_range): Likewise.
10186
10187 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10188             Simon Marchi  <simon.marchi@polymtl.ca>
10189
10190         * common/common-utils.c: Include "sys/stat.h".
10191         (is_regular_file): Move here from "source.c"; change return
10192         type to "bool".
10193         * common/common-utils.h (is_regular_file): New prototype.
10194         * common/pathstuff.c (contains_dir_separator): New function.
10195         * common/pathstuff.h (contains_dir_separator): New prototype.
10196         * source.c: Don't include "sys/stat.h".
10197         (is_regular_file): Move to "common/common-utils.c".
10198
10199 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10200
10201         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10202         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10203         * auto-load.c: Include "common/pathstuff.h".
10204         * common/common-def.h (current_directory): Move here.
10205         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10206         function.
10207         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10208         prototype.
10209         * common/pathstuff.c: New file.
10210         * common/pathstuff.h: New file.
10211         * compile/compile.c: Include "common/pathstuff.h".
10212         * defs.h (current_directory): Move to "common/common-defs.h".
10213         * dwarf2read.c: Include "common/pathstuff.h".
10214         * exec.c: Likewise.
10215         * guile/scm-safe-call.c: Likewise.
10216         * linux-thread-db.c: Likewise.
10217         * main.c: Likewise.
10218         * nto-tdep.c: Likewise.
10219         * objfiles.c: Likewise.
10220         * source.c: Likewise.
10221         * symtab.c: Likewise.
10222         * utils.c: Include "common/pathstuff.h".
10223         (gdb_realpath): Move to "common/pathstuff.c".
10224         (gdb_realpath_keepfile): Likewise.
10225         (gdb_abspath): Likewise.
10226         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10227         (gdb_realpath_keepfile): Likewise.
10228         (gdb_abspath): Likewise.
10229
10230 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10231
10232         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10233         wildcard process pid for super_resume for kernels with a
10234         specific bug.
10235
10236 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10237
10238         * compile/compile.c (get_args): Add additional comments
10239         explaining function.
10240
10241 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10242             Tom Tromey  <tom@tromey.com>
10243
10244         * target.h (memory_write_request_s): Remove typedef.  Don't define
10245         VEC.
10246         (target_write_memory_blocks): Change argument to std::vector.
10247         (struct memory_write_request): Add constructor.
10248         * target-memory.c (compare_block_starting_address): Return bool.
10249         Change argument types.
10250         (claim_memory): Change arguments to use std::vector.
10251         (split_regular_and_flash_blocks, blocks_to_erase)
10252         (compute_garbled_blocks): Likewise.
10253         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10254         (target_write_memory_blocks): Change argument to std::vector.
10255         * symfile.c (struct load_section_data): Add constructor and
10256         destructor.  Use std::vector for "requests".
10257         (struct load_progress_data): Add initializers.
10258         (load_section_callback): Update.  Use "new".
10259         (clear_memory_write_data): Remove.
10260         (generic_load): Update.
10261
10262 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10263
10264         * arch/aarch64.h: Use common/tdesc.h.
10265
10266 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10267
10268         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10269         architecture with a 64-bit ABI.
10270
10271 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10272
10273         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10274         ahead of target description loading.
10275
10276 2018-02-26  Tom Tromey  <tom@tromey.com>
10277
10278         * stack.c (backtrace_command_1): Update.
10279         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10280         of "flags".
10281         * python/py-framefilter.c (py_print_frame)
10282         (gdbpy_apply_frame_filter): Change type of "flags".
10283         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10284         of "flags".
10285         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10286         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10287         * extension.h (enum frame_filter_flag): Rename from
10288         frame_filter_flags.
10289         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10290         (apply_ext_lang_frame_filter): Change type of "flags".
10291         * extension.c (apply_ext_lang_frame_filter): Change type of
10292         "flags".
10293         * extension-priv.h (struct extension_language_ops)
10294         <apply_frame_filter>: Change type of "flags".
10295
10296 2018-02-26  Tom Tromey  <tom@tromey.com>
10297
10298         PR python/16497:
10299         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10300         off-by-one in py_end computation.
10301         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10302         PRINT_MORE_FRAMES.
10303         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10304         constant.
10305
10306 2018-02-26  Tom Tromey  <tom@tromey.com>
10307
10308         * dwarf2read.c (struct variant_field): New.
10309         (struct nextfield) <variant>: New field.
10310         (dwarf2_add_field): Handle DW_TAG_variant_part.
10311         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10312         discriminated union.
10313         (read_structure_type): Handle DW_TAG_variant_part.
10314         (handle_struct_member_die): New function, extracted from
10315         process_structure_scope.  Handle DW_TAG_variant.
10316         (process_structure_scope): Handle discriminated unions.  Call
10317         handle_struct_member_die.
10318
10319 2018-02-26  Tom Tromey  <tom@tromey.com>
10320
10321         * rust-lang.h (rust_last_path_segment): Declare.
10322         * rust-lang.c (rust_last_path_segment): Now public.  Change
10323         contract.
10324         (struct disr_info): Remove.
10325         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10326         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10327         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10328         (rust_enum_p, rust_enum_variant): New function.
10329         (rust_underscore_fields): Remove "offset" parameter.
10330         (rust_print_enum): New function.
10331         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10332         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10333         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10334         enums.
10335         (rust_internal_print_type): New function, from rust_print_type.
10336         Remove enum code.
10337         (rust_print_type): Call rust_internal_print_type.
10338         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10339         Update enum handling.
10340         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10341         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10342         (rust_union_quirks): New functions.
10343         (process_full_comp_unit, process_full_type_unit): Call
10344         rust_union_quirks.
10345         (process_structure_scope): Update rust_unions if necessary.
10346
10347 2018-02-26  Tom Tromey  <tom@tromey.com>
10348
10349         * value.h (value_union_variant): Declare.
10350         * valops.c (value_union_variant): New function.
10351         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10352         (struct discriminant_info): New.
10353         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10354         enumerator.
10355         (struct main_type) <flag_discriminated_union>: New field.
10356
10357 2018-02-26  Tom Tromey  <tom@tromey.com>
10358
10359         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10360         unittests/unpack-selftests.c.
10361         * unittests/unpack-selftests.c: New file.
10362         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10363
10364 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10365
10366         * dwarf2read.c (struct partial_die_info) <read>: New method.
10367         (read_partial_die): Remove the declaration.
10368         (load_partial_dies): Update.
10369         (partial_die_info::partial_die_info):
10370         (read_partial_die): Change it to partial_die_info::read.
10371
10372 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10373
10374         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10375         (fixup_partial_die): Remove declaration.
10376         (scan_partial_symbols): Update.
10377         (partial_die_parent_scope): Likewise.
10378         (partial_die_full_name): Likewise.
10379         (fixup_partial_die): Change it to partial_die_info::fixup.
10380
10381 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10382
10383         * dwarf2read.c (read_partial_die): Update the declaration.
10384         (load_partial_dies): Caller update.
10385         (read_partial_die): Remove one argument abbrev_len.
10386
10387 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10388
10389         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10390         assignment operator.
10391         (load_partial_dies): Use ctor and copy ctor.
10392         (read_partial_die): Update.
10393         (dwarf2_cu::find_partial_die): Use ctor.
10394
10395 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10396
10397         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10398         (find_partial_die_in_comp_unit): Change it to
10399         dwarf2_cu::find_partial_die.
10400         (find_partial_die): Update.
10401
10402 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10403
10404         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10405         is NULL.
10406
10407 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10408
10409         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10410
10411 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10412
10413         * arch/amd64.h: Use common/tdesc.h.
10414         * arch/i386.c: Likewise.
10415         * arch/i386.h: Likewise.
10416         * arch/tic6x.c: Likewise.
10417         * arch/tdesc.h: Move file from here...
10418         * common/tdesc.h: ...to here.
10419         * features/aarch64-core.c: Regenerate.
10420         * features/aarch64-fpu.c: Regenerate.
10421         * features/i386/32bit-avx.c: Regenerate.
10422         * features/i386/32bit-avx512.c: Regenerate.
10423         * features/i386/32bit-core.c: Regenerate.
10424         * features/i386/32bit-linux.c: Regenerate.
10425         * features/i386/32bit-mpx.c: Regenerate.
10426         * features/i386/32bit-pkeys.c: Regenerate.
10427         * features/i386/32bit-sse.c: Regenerate.
10428         * features/i386/64bit-avx.c: Regenerate.
10429         * features/i386/64bit-avx512.c: Regenerate.
10430         * features/i386/64bit-core.c: Regenerate.
10431         * features/i386/64bit-linux.c: Regenerate.
10432         * features/i386/64bit-mpx.c: Regenerate.
10433         * features/i386/64bit-pkeys.c: Regenerate.
10434         * features/i386/64bit-segments.c: Regenerate.
10435         * features/i386/64bit-sse.c: Regenerate.
10436         * features/i386/x32-core.c: Regenerate.
10437         * features/tic6x-c6xp.c: Regenerate.
10438         * features/tic6x-core.c: Regenerate.
10439         * features/tic6x-gp.c: Regenerate.
10440         * target-descriptions.c: Use common/tdesc.h.
10441         * target-descriptions.h: Likewise.
10442
10443 2018-02-24  Tom Tromey  <tom@tromey.com>
10444
10445         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10446         (try_thread_db_load_from_dir, thread_db_load_search): Use
10447         std::string.
10448         (info_auto_load_libthread_db_compare): Return bool.  Change
10449         argument types.
10450         (info_auto_load_libthread_db): Use std::vector, std::string.
10451         Remove cleanups.
10452
10453 2018-02-24  Tom Tromey  <tom@tromey.com>
10454
10455         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10456         std::string.
10457         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10458         std::string*.
10459         * gdbarch.c: Rebuild.
10460         * gdbarch.h: Rebuild.
10461         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10462         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10463         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10464         std::string*.
10465
10466 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10467
10468         * gdbtypes.h (sect_offset): Change type to uint64_t.
10469         (sect_offset_str): New function.
10470         * dwarf2read.c (create_addrmap_from_aranges): Use
10471         sect_offset_str.
10472         (error_check_comp_unit_head): Likewise.
10473         (create_debug_type_hash_table): Likewise.
10474         (read_cutu_die_from_dwo): Likewise.
10475         (init_cutu_and_read_dies): Likewise.
10476         (init_cutu_and_read_dies_no_follow): Likewise.
10477         (process_psymtab_comp_unit_reader): Likewise.
10478         (partial_die_parent_scope): Likewise.
10479         (peek_die_abbrev): Likewise.
10480         (process_queue): Likewise.
10481         (dwarf2_physname): Likewise.
10482         (read_namespace_alias): Likewise.
10483         (read_import_statement): Likewise.
10484         (create_dwo_cu_reader): Likewise.
10485         (create_cus_hash_table): Likewise.
10486         (lookup_dwo_cutu): Likewise.
10487         (inherit_abstract_dies): Likewise.
10488         (read_func_scope): Likewise.
10489         (read_call_site_scope): Likewise.
10490         (dwarf2_add_member_fn): Likewise.
10491         (read_common_block): Likewise.
10492         (read_module_type): Likewise.
10493         (read_typedef): Likewise.
10494         (read_subrange_type): Likewise.
10495         (load_partial_dies): Likewise.
10496         (read_partial_die): Likewise.
10497         (find_partial_die): Likewise.
10498         (read_str_index): Likewise.
10499         (dwarf2_string_attr): Likewise.
10500         (build_error_marker_type): Likewise.
10501         (lookup_die_type): Likewise.
10502         (dump_die_shallow): Likewise.
10503         (follow_die_ref): Likewise.
10504         (dwarf2_fetch_die_loc_sect_off): Likewise.
10505         (dwarf2_fetch_constant_bytes): Likewise.
10506         (follow_die_sig): Likewise.
10507         (get_signatured_type): Likewise.
10508         (get_DW_AT_signature_type): Likewise.
10509         (dwarf2_find_containing_comp_unit): Likewise.
10510         (set_die_type): Likewise.
10511
10512 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10513
10514         * arch/aarch64.c: Include "common-defs.h".
10515         * arch/amd64.c: Likewise.
10516         * arch/i386.c: Likewise.
10517
10518 2018-02-21  Tom Tromey  <tom@tromey.com>
10519
10520         * value.h: (extract_field_op): Update.
10521         * eval.c (extract_field_op): Return a const char *.
10522         * expression.h (parse_expression_for_completion): Update.
10523         * completer.c (complete_expression): Update.
10524         (add_struct_fields): Make fieldname const.
10525         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10526         (mark_completion_tag, parse_exp_in_context_1): Update.
10527         (parse_expression_for_completion): Change "name" to
10528         unique_xmalloc_ptr*.
10529
10530 2018-02-21  Tom Tromey  <tom@tromey.com>
10531
10532         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10533
10534 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10535
10536         * avr-tdep.c (avr_read_pc): Change parameter type to
10537         readable_regcache.
10538         * gdbarch.sh (read_pc): Likewise.
10539         * gdbarch.c: Re-generated.
10540         * gdbarch.h: Re-generated.
10541         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10542         readable_regcache.
10543         * ia64-tdep.c (ia64_read_pc): Likewise.
10544         * mips-tdep.c (mips_read_pc): Likewise.
10545         * spu-tdep.c (spu_read_pc): Likewise.
10546
10547 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10548
10549         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10550         * regcache-dump.c: New file.
10551         * regcache.c: Move register_dump to regcache-dump.c.
10552         (maintenance_print_registers): Likewise.
10553         (maintenance_print_raw_registers): Likewise.
10554         (maintenance_print_cooked_registers): Likewise.
10555         (maintenance_print_register_groups): Likewise.
10556         (maintenance_print_remote_registers): Likewise.
10557         (_initialize_regcache): Likewise.
10558         * regcache.h (register_dump): Moved from regcache.c.
10559
10560 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10561
10562         * regcache.c (regcache::regcache): Update.
10563         (regcache::invalidate): Move it to detached_regcache::invalidate.
10564         (get_thread_arch_aspace_regcache): Update.
10565         (regcache::raw_update): Update.
10566         (regcache::cooked_read): Remove some code.
10567         (regcache::cooked_read_value): Likewise.
10568         (regcache::raw_write): Remove assert on m_readonly_p.
10569         (regcache::raw_supply_integer): Move it to
10570         detached_regcache::raw_supply_integer.
10571         (regcache::raw_supply_zeroed): Likewise.
10572         * regcache.h (detached_regcache) <raw_supply_integer>: New
10573         declaration.
10574         <raw_supply_zeroed, invalidate>: Likewise.
10575         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10576         <invalidate>: Likewise.
10577         <m_readonly_p>: Removed.
10578
10579 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10580
10581         * infcmd.c (get_return_value): Let stop_regs point to
10582         get_current_regcache.
10583         * regcache.c (regcache::regcache): Remove.
10584         (register_dump_reg_buffer): New class.
10585         (regcache_print): Adjust.
10586         * regcache.h (regcache): Remove constructors.
10587
10588 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10589
10590         * regcache.c (class register_dump): New class.
10591         (register_dump_regcache, register_dump_none): New class.
10592         (register_dump_remote, register_dump_groups): New class.
10593         (regcache_print): Update.
10594         * regcache.h (regcache_dump_what): Move it to regcache.c.
10595         (regcache) <dump>: Remove.
10596
10597 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10598
10599         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10600          reg_buffer_rw *.
10601         (jit_unwind_reg_set_impl): Call raw_supply.
10602         (jit_frame_sniffer): Use reg_buffer_rw.
10603         * record-full.c (record_full_core_regbuf): Change its type.
10604         (record_full_core_open_1): Use reg_buffer_rw.
10605         (record_full_close): Likewise.
10606         (record_full_core_fetch_registers): Use regcache->raw_supply.
10607         (record_full_core_store_registers): Likewise.
10608         * regcache.c (regcache::get_register_status): Move it to
10609         reg_buffer.
10610         (regcache_raw_set_cached_value): Remove.
10611         (regcache::raw_set_cached_value): Remove.
10612         (regcache::raw_write): Call raw_supply.
10613         (regcache::raw_supply): Move it to reg_buffer_rw.
10614         * regcache.h (regcache_raw_set_cached_value): Remove.
10615         (reg_buffer_rw): New class.
10616
10617 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10618
10619         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10620         readonly_detached_regcache.
10621         (dummy_frame_prev_register): Use regcache->cooked_read.
10622         * frame.c (frame_save_as_regcache): Change return type.
10623         (frame_pop): Update.
10624         * frame.h (frame_save_as_regcache): Update declaration.
10625         * inferior.h (get_infcall_suspend_state_regcache): Update
10626         declaration.
10627         * infrun.c (infcall_suspend_state) <registers>: use
10628         readonly_detached_regcache.
10629         (save_infcall_suspend_state): Don't use regcache_dup.
10630         (get_infcall_suspend_state_regcache): Change return type.
10631         * linux-fork.c (struct fork_info) <savedregs>: Change to
10632         readonly_detached_regcache.
10633         <pc>: New field.
10634         (fork_save_infrun_state): Don't use regcache_dup.
10635         (info_checkpoints_command): Adjust.
10636         * mi/mi-main.c (register_changed_p): Update declaration.
10637         (mi_cmd_data_list_changed_registers): Use
10638         readonly_detached_regcache.
10639         (register_changed_p): Change parameter type to
10640         readonly_detached_regcache.
10641         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10642         readonly_detached_regcache.
10643         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10644         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10645         New.
10646         (regcache::save): Move it to reg_buffer.
10647         (regcache::restore): Change parameter type.
10648         (regcache_dup): Remove.
10649         * regcache.h (reg_buffer) <save>: New method.
10650         (readonly_detached_regcache): New class.
10651         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10652         readonly_detached_regcache.
10653         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10654
10655 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10656
10657         * frame.c (frame_save_as_regcache): Use regcache method save.
10658         (frame_pop): Use regcache method restore.
10659         * infrun.c (restore_infcall_suspend_state): Likewise.
10660         * linux-fork.c (fork_load_infrun_state): Likewise.
10661         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10662         save.
10663         * regcache.c (regcache_save): Remove.
10664         (regcache::restore): More asserts.
10665         (regcache_cpy): Remove.
10666         * regcache.h (regcache_save): Remove the declaration.
10667         (regcache::restore): Move from private to public.
10668         Remove the friend declaration of regcache_cpy.
10669         (regcache_cpy): Remove declaration.
10670
10671 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10672
10673         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10674         parameter type to 'readable_regcache *'.
10675         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10676         * arm-tdep.c (arm_neon_quad_read): Likewise.
10677         (arm_pseudo_read): Likewise.
10678         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10679         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10680         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10681         * gdbarch.c: Re-generated.
10682         * gdbarch.h: Re-generated.
10683         * gdbarch.sh (pseudo_register_read): Change parameter type to
10684         'readable_regcache *'.
10685         (pseudo_register_read_value): Likewise.
10686         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10687         (h8300_pseudo_register_read): Likewise.
10688         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10689         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10690         (i386_pseudo_register_read_into_value): Likewise.
10691         (i386_pseudo_register_read_value): Likewise.
10692         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10693         declaration.
10694         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10695         * m32c-tdep.c (m32c_raw_read): Likewise.
10696         (m32c_read_flg): Likewise.
10697         (m32c_banked_register): Likewise.
10698         (m32c_banked_read): Likewise.
10699         (m32c_sb_read): Likewise.
10700         (m32c_part_read): Likewise.
10701         (m32c_cat_read): Likewise.
10702         (m32c_r3r2r1r0_read): Likewise.
10703         (m32c_pseudo_register_read): Likewise.
10704         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10705         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10706         (mep_pseudo_cr64_read): Likewise.
10707         (mep_pseudo_register_read): Likewise.
10708         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10709         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10710         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10711         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10712         (regcache::cooked_read): Likewise.
10713         (regcache::cooked_read_value): Likewise.
10714         (regcache_cooked_read_signed):
10715         (regcache::cooked_read): Likewise.
10716         * regcache.h (readable_regcache): New class.
10717         (regcache): Inherit readable_regcache.  Move some methods to
10718         readable_regcache.
10719         * rl78-tdep.c (rl78_pseudo_register_read): Change
10720         parameter type to 'readable_regcache *'.
10721         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10722         (e500_pseudo_register_read): Change parameter type to
10723         'readable_regcache *'.
10724         (dfp_pseudo_register_read): Likewise.
10725         (vsx_pseudo_register_read): Likewise.
10726         (efpr_pseudo_register_read): Likewise.
10727         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10728         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10729         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10730         (sh64_pseudo_register_read): Likewise.
10731         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10732         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10733         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10734         (spu_pseudo_register_read): Likewise.
10735         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10736         (xtensa_pseudo_register_read): Likewise.
10737
10738 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10739
10740         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10741         (regcache::arch): Move it to reg_buffer::arch.
10742         (regcache::register_buffer): Likewise.
10743         (regcache::assert_regnum): Likewise.
10744         (regcache::num_raw_registers): Likewise.
10745         * regcache.h (reg_buffer): New class.
10746         (regcache): Inherit reg_buffer.
10747
10748 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10749
10750         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10751         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10752
10753 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10754
10755         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10756
10757 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10758
10759         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10760         (SFILES): Remove common/*.c files.
10761         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10762         * common/common.host: Add common reference.
10763         * configure.ac: Likewise.
10764         * configure: Regenerate.
10765
10766 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10767
10768         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10769         (block_initialize_namespace): Use new.
10770         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10771         (dwarf2_free_objfile): Use delete.
10772         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10773         (copy_type_recursive): Use new.
10774         * gdb_obstack.h (allocate_on_obstack): New.
10775
10776 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10777
10778         PR gdb/22849
10779         * inferior.c (exit_inferior_1): Reset inf->control.
10780
10781 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10782
10783         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10784         declaration.
10785
10786 2018-02-14  Pedro Alves  <palves@redhat.com>
10787
10788         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10789         frame_cleanup_after_sniffer on exception.
10790
10791 2018-02-14  Tom Tromey  <tom@tromey.com>
10792
10793         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10794         const.
10795         (solib_bfd_open): Make pathname const.
10796         * solib.c (solib_bfd_open): Make pathname const.
10797         * solib-spu.c (spu_bfd_fopen): Make name const.
10798         (spu_bfd_open): Make pathname const.
10799         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10800         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10801
10802 2018-02-14  Tom Tromey  <tom@tromey.com>
10803
10804         * symfile.c (symfile_bfd_open): Update.
10805         * source.h (openp, source_full_path_of, find_and_open_source):
10806         Change argument type to unique_xmalloc_ptr.
10807         * source.c (openp): Take a unique_xmalloc_ptr.
10808         (source_full_path_of, find_and_open_source): Likewise.
10809         (open_source_file, symtab_to_fullname): Update.
10810         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10811         unique_xmalloc_ptr.
10812         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10813         (exec_file_find): Update.
10814         * psymtab.c (psymtab_to_fullname): Update.
10815         * nto-tdep.h (nto_find_and_open_solib): Update.
10816         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10817         unique_xmalloc_ptr.
10818         * exec.c (exec_file_attach): Update.
10819         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10820         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10821
10822 2018-02-14  Tom Tromey  <tom@tromey.com>
10823
10824         * solib.c: Include source.h.
10825         * nto-tdep.c: Include source.h.
10826         * mi/mi-cmd-env.c: Include source.h.
10827         * infcmd.c: Include source.h.
10828         * exec.c: Include source.h.
10829         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10830         (add_path, directory_switch, source_path, init_source_path): Move
10831         declarations...
10832         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10833         (add_path, directory_switch, source_path, init_source_path):
10834         ...here.
10835
10836 2018-02-14  Tom Tromey  <tom@tromey.com>
10837
10838         * solist.h (exec_file_find, solib_find): Return
10839         unique_xmalloc_ptr.
10840         (solib_bfd_fopen): Take a const char *.
10841         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10842         (exec_file_find, solib_find): Likewise.
10843         (solib_bfd_fopen): Do not take ownership of "pathname".
10844         (solib_bfd_open): Use unique_xmalloc_ptr.
10845         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10846         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10847         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10848         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10849
10850 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10851
10852         * ada-lang.c (name_match_type_from_name): Remove reference to
10853         ada_name_for_lookup in function's documentation.
10854         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10855
10856 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10857
10858         * defs.h (enum openp_flags): New enum.
10859         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10860         Move to enum openp_flags.
10861         (openp_flags): New enum flags.
10862         (openp): Change parameter type to openp_flags.
10863         * source.c (openp): Change parameter type to openp_flags.
10864         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10865         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10866
10867 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10868
10869         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10870         per-command.
10871
10872 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10873
10874         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10875         into...
10876         (class dwarf2_queue_guard): ...the destructor of this new class.
10877         (dw2_do_instantiate_symtab): Create instance of the new class
10878         dwarf2_queue_guard, remove cleanup.
10879
10880 2018-02-09  Tom Tromey  <tom@tromey.com>
10881
10882         * source.c (find_source_lines): Don't reference past the end of
10883         the vector.
10884
10885 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10886
10887         * remote.c (remote_btrace_maybe_reopen): Change error message.
10888         * btrace.c (btrace_enable): Likewise.
10889         (parse_xml_btrace): Likewise.
10890         (parse_xml_btrace_conf): Likewise.
10891
10892 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10893
10894         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10895         (linux_enable_pt, linux_enable_bts): Call
10896         diagnose_perf_event_open_fail.
10897
10898 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10899
10900         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10901         Remove parameter and change return type.  Update callers.  Move it.
10902         (linux_enable_bts, linux_enable_pt): Improve error message.
10903         (linux_enable_pt): Remove zero buffer size check.
10904         (linux_enable_btrace): Improve error messages.  Remove NULL return
10905         check.
10906
10907 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10908
10909         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10910         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10911         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10912         (linux_supports_pt, linux_supports_btrace): Remove.
10913         (linux_enable_bts): Call cpu_supports_bts.
10914         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10915         * remote.c (remote_supports_btrace): Remove.
10916         (init_remote_ops): Remove remote_supports_btrace.
10917         * target-delegates.c: Regenerated.
10918         * target.c (target_supports_btrace): Remove.
10919         * target.h (target_ops) <to_supports_btrace>: Remove
10920         (target_supports_btrace): Remove.
10921         * x86-linux-nat.c (x86_linux_create_target): Remove
10922         linux_supports_btrace.
10923
10924 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10925
10926         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10927         btrace failed.
10928         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10929         exception and use message in own exception.
10930
10931 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10932
10933         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10934         (perf_event_pt_event_type): Use gdb_file_up.
10935         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10936         scoped_fd, and scoped_mmap.
10937
10938 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10939
10940         * common/scoped_mmap.h: New.
10941         * unittests/scoped_mmap-selftest.c: New.
10942         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10943         unittests/scoped_mmap-selftest.c.
10944
10945 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10946
10947         * common/scoped_fd.h: New.
10948         * unittests/scoped_fd-selftest.c: New.
10949         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10950         unittests/scoped_fd-selftest.c.
10951
10952 2018-02-09  Tom Tromey  <tom@tromey.com>
10953
10954         * auto-load.c (auto_load_section_scripts): Use
10955         gdb::unique_xmalloc_ptr.
10956
10957 2018-02-09  Tom Tromey  <tom@tromey.com>
10958
10959         * auto-load.c (execute_script_contents): Use std::string.
10960
10961 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
10962
10963         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10964         Python function, rather than a new command.
10965
10966 2018-02-08  Tom Tromey  <tom@tromey.com>
10967
10968         * solib.c (solib_find_1): Use std::string.
10969         (solib_bfd_fopen): Use unique_xmalloc_ptr.
10970
10971 2018-02-08  Tom Tromey  <tom@tromey.com>
10972
10973         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10974
10975 2018-02-08  Tom Tromey  <tom@tromey.com>
10976
10977         * source.c (find_source_lines): Use gdb::def_vector.
10978
10979 2018-02-08  Tom Tromey  <tom@tromey.com>
10980
10981         * macrocmd.c (struct temporary_macro_definition): New.
10982         (macro_define_command): Use temporary_macro_definition.  Remove
10983         cleanups.
10984         (free_macro_definition_ptr): Remove.
10985
10986 2018-02-08  Tom Tromey  <tom@tromey.com>
10987
10988         * macroexp.c (maybe_expand): Use std::string.
10989
10990 2018-02-08  Tom Tromey  <tom@tromey.com>
10991
10992         * macroexp.c (struct macro_buffer): Add initializers for some
10993         members.
10994         (init_buffer, init_shared_buffer, free_buffer)
10995         (free_buffer_return_text): Remove.
10996         (macro_buffer): New constructors.
10997         (~macro_buffer): New destructor.
10998         (macro_buffer::set_shared): New method.
10999         (macro_buffer::resize_buffer, macro_buffer::appendc)
11000         (macro_buffer::appendmem): Now methods, not free functions.
11001         (set_token, append_tokens_without_splicing, stringify)
11002         (macro_stringify): Update.
11003         (gather_arguments): Change return type.  Remove argc_p argument,
11004         add args_ptr argument.  Use std::vector.
11005         (substitute_args): Remove argc argument.  Accept std::vector.
11006         (expand): Update.  Use std::vector.
11007         (scan, macro_expand, macro_expand_next): Update.
11008
11009 2018-02-08  Tom Tromey  <tom@tromey.com>
11010
11011         * symtab.c (default_collect_symbol_completion_matches_break_on):
11012         Use unique_xmalloc_ptr.
11013         * macroscope.h: (sal_macro_scope, user_macro_scope)
11014         (default_macro_scope): Return unique_xmalloc_ptr.
11015         * macroscope.c (sal_macro_scope, user_macro_scope)
11016         (default_macro_scope): Return unique_xmalloc_ptr.
11017         * macroexp.h (macro_expand, macro_expand_once): Return
11018         unique_xmalloc_ptr.
11019         * macroexp.c (macro_expand, macro_expand_once): Return
11020         unique_xmalloc_ptr.
11021         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11022         (info_macro_command, info_macros_command): Use
11023         unique_xmalloc_ptr.
11024         * compile/compile-c-support.c (write_macro_definitions): Use
11025         unique_xmalloc_ptr.
11026         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11027
11028 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11029
11030         * value.c (value_static_field): Assign field type instead of
11031         containing type when returning an optimized out value.
11032
11033 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11034
11035         * ft32-tdep.c (ft32_read_pc): Remove.
11036         (ft32_write_pc): Remove.
11037         (ft32_gdbarch_init): Update.
11038         * m32r-tdep.c (m32r_read_pc): Remove.
11039         (m32r_gdbarch_init): Update.
11040         * mep-tdep.c (mep_read_pc): Remove.
11041         (mep_gdbarch_init): Update.
11042         * microblaze-tdep.c (microblaze_write_pc): Remove.
11043         (microblaze_gdbarch_init): Update.
11044         * mn10300-tdep.c (mn10300_read_pc): Remove.
11045         (mn10300_write_pc): Remove.
11046         (mn10300_gdbarch_init): Update.
11047         * moxie-tdep.c (moxie_read_pc): Remove.
11048         (moxie_write_pc): Remove.
11049         (moxie_gdbarch_init): Update.
11050
11051 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11052
11053         * expprint.c (print_subexp_standard): Handle
11054         OP_F77_UNDETERMINED_ARGLIST.
11055         (dump_subexp_body_standard): Likewise.
11056
11057 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11058
11059         * target-descriptions.c (tdesc_element_visitor) Add empty
11060         implementations.
11061         (tdesc_type): Move make_gdb_type from here.
11062         (tdesc_type_builtin): Likewise.
11063         (tdesc_type_vector): Likewise.
11064         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11065         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11066         (make_gdb_type_union): Likewise.
11067         (make_gdb_type_flags): Likewise.
11068         (make_gdb_type_enum): Likewise.
11069         (make_gdb_type): New function.
11070         (tdesc_register_type): Use static make_gdb_type.
11071
11072 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11073
11074         * infcmd.c (default_print_one_register_info): Align natural-format
11075         column values consistently one under another.
11076         (pad_to_column): New function.
11077
11078 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11079
11080         * dwarf2read.c (dwarf2_physname): Move commment.
11081
11082 2018-02-01  Leszek Swirski  <leszeks@google.com>
11083
11084         * varobj.c (varobj_formatted_print_options): Allow recursive
11085         pretty printing if pretty printing is enabled.
11086
11087 2018-02-01  Leszek Swirski  <leszeks@google.com>
11088
11089         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11090         names after a structop as a filename.
11091
11092 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11093
11094         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11095         (arm_record_coproc_data_proc): Likewise.
11096
11097 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11098
11099         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11100
11101 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11102
11103         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11104         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11105
11106 2018-01-31  Pedro Alves  <palves@redhat.com>
11107
11108         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11109         * inflow.c (child_terminal_save_inferior): Wrap reference to
11110         tcgetpgrp in HAVE_TERMIOS_H.
11111         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11112         _WIN32.
11113         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11114         always iterate over all inferiors.
11115         (gdbsim_cntrl_c): Adjust.
11116         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11117
11118 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11119
11120         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11121         index type is objfile-owned if the element type is as well.
11122
11123 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11124
11125         GDB 8.1 released.
11126
11127 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11128
11129         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11130         "features/s390x-linux64.c".
11131         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11132         s390_linux32 and s390x_linux64.
11133         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11134         default tdesc.
11135         * s390-tdep.c: Include "features/s390-linux32.c" and
11136         "features/s390x-linux64.c".
11137         (s390_tdesc_valid): Add check for tdesc_has_registers.
11138         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11139         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11140         tdesc_s390x_linux64.
11141         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11142         tdesc_s390x_linux64 to...
11143         * s390-tdep.h: ...here.
11144
11145 2018-01-30  Pedro Alves  <palves@redhat.com>
11146
11147         PR gdb/13211
11148         * config.in, configure: Regenerate.
11149         * configure.ac: Check for getpgid.
11150         * go32-nat.c (go32_pass_ctrlc): New.
11151         (go32_target): Install it.
11152         * inf-child.c (inf_child_target): Install
11153         child_terminal_save_inferior, child_pass_ctrlc and
11154         child_interrupt.
11155         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11156         (inf_ptrace_target): No longer install it.
11157         * infcmd.c (interrupt_target_1): Adjust.
11158         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11159         (child_interrupt): Declare.
11160         (inferior::terminal_state): New.
11161         * inflow.c (struct terminal_info): Update comments.
11162         (inferior_process_group): Delete.
11163         (terminal_is_ours): Delete.
11164         (gdb_tty_state): New.
11165         (child_terminal_init): Adjust.
11166         (is_gdb_terminal, sharing_input_terminal_1)
11167         (sharing_input_terminal): New functions.
11168         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11169         Set the process's actual process group in the foreground if
11170         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11171         mark terminal as the inferior's if not sharing GDB's terminal.
11172         Don't check attach_flag.
11173         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11174         pass down a target_terminal_state.
11175         (child_terminal_save_inferior): New, factored out from ...
11176         (child_terminal_ours_1): ... this.  Handle
11177         target_terminal_state::is_ours_for_output.
11178         (child_interrupt, child_pass_ctrlc): New.
11179         (inflow_inferior_exit): Clear the inferior's terminal_state.
11180         (copy_terminal_info): Copy the inferior's terminal state.
11181         (_initialize_inflow): Remove reference to terminal_is_ours.
11182         * inflow.h (inferior_process_group): Delete.
11183         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11184         * procfs.c (procfs_target): Don't install procfs_interrupt.
11185         (procfs_interrupt): Delete.
11186         * remote.c (remote_serial_quit_handler): Adjust.
11187         (remote_interrupt): Remove ptid parameter.  Adjust.
11188         * target-delegates.c: Regenerate.
11189         * target.c: Include "terminal.h".
11190         (target_terminal::terminal_state): Rename to ...
11191         (target_terminal::m_terminal_state): ... this.
11192         (target_terminal::init): Adjust.
11193         (target_terminal::inferior): Adjust to per-inferior
11194         terminal_state.
11195         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11196         (target_terminal::ours, target_terminal::ours_for_output): Use
11197         target_terminal_is_ours_kind.
11198         (target_interrupt): Remove ptid parameter.  Adjust.
11199         (default_target_pass_ctrlc): Adjust.
11200         * target.h (target_ops::to_terminal_save_inferior): New field.
11201         (target_ops::to_interrupt): Remove ptid_t parameter.
11202         (target_interrupt): Remove ptid_t parameter.  Update comment.
11203         (target_pass_ctrlc): Update comment.
11204         * target/target.h (target_terminal_state): New scoped enum,
11205         factored out of ...
11206         (target_terminal::terminal_state): ... here.
11207         (target_terminal::inferior): Update comments.
11208         (target_terminal::restore_inferior): New.
11209         (target_terminal::is_inferior, target_terminal::is_ours)
11210         (target_terminal::is_ours_for_output): Adjust.
11211         (target_terminal::scoped_restore_terminal_state): Adjust to
11212         rename, and call restore_inferior() instead of inferior().
11213         (target_terminal::scoped_restore_terminal_state::m_state): Change
11214         type.
11215         (target_terminal::terminal_state): Rename to ...
11216         (target_terminal::m_terminal_state): ... this and change type.
11217
11218 2018-01-30  Pedro Alves  <palves@redhat.com>
11219
11220         * linux-nat.c (wait_for_signal): New function.
11221         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11222         directly.
11223         (async_terminal_is_ours)
11224         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11225         (linux_nat_add_target): Don't override
11226         to_terminal_inferior/to_terminal_ours.
11227
11228 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11229
11230         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11231
11232 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11233
11234         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11235         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11236         dwarf2_per_objfile_free here.
11237         (dwarf2_per_objfile_free): Remove.
11238         (_initialize_dwarf2_read): Don't register
11239         dwarf2_per_objfile_free as a registry cleanup.
11240
11241 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11242
11243         Avoid compilation errors in MinGW native builds
11244
11245         The error is triggered by including python-internal.h, and the
11246         error message is:
11247
11248              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11249                       from build-gnulib/import/math.h:27,
11250                       from d:/usr/Python26/include/pyport.h:235,
11251                       from d:/usr/Python26/include/Python.h:58,
11252                       from python/python-internal.h:94,
11253                       from python/py-arch.c:24:
11254              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11255         using ::hypot;
11256                 ^~~~~
11257
11258         This happens because Python headers define 'hypot' to expand t
11259         '_hypot' in the Windows builds.
11260         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11261         'hypoth'.  This avoids a compilation error.
11262
11263 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11264
11265         * MAINTAINERS (Write After Approval): Fix ordering.
11266
11267 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11268
11269         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11270
11271 2018-01-26  Alan Modra  <amodra@gmail.com>
11272
11273         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11274         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11275         Remove nop.  Make const.  Comment.
11276         (powerpc32_plt_stub_so_2): New.
11277         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11278         Correct count.  Update uses.
11279         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11280         Move common code reading PLT entry word.  Correct
11281         powerpc32_plt_stub PLT address calculation.
11282         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11283         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11284         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11285         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11286         (ppc64_standard_linkage8): Likewise.
11287         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11288         Correct insns description.
11289         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11290
11291 2018-01-24  Pedro Alves  <palves@redhat.com>
11292
11293         GCC PR libstdc++/83906
11294         * gdbtypes.c (operator==(const dynamic_prop &,
11295         const dynamic_prop &)): New.
11296         (operator==(const range_bounds &, const range_bounds &)): New.
11297         (check_types_equal): Use them instead of memcmp.
11298         * gdbtypes.h (operator==(const dynamic_prop &,
11299         const dynamic_prop &)): Declare.
11300         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11301         (operator==(const range_bounds &, const range_bounds &)): Declare.
11302         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11303
11304 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11305
11306         * s390-linux-tdep.c (s390_record_address_mask)
11307         (s390_record_calc_disp_common, s390_record_calc_disp)
11308         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11309         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11310         (s390_process_record): Move to s390-tdep.c.
11311         (s390_linux_init_abi_any): Adjust.
11312         * s390-tdep.c (s390_record_address_mask)
11313         (s390_record_calc_disp_common, s390_record_calc_disp)
11314         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11315         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11316         (s390_process_record): Moved from s390-linux-tdep.c
11317         (s390_gdbarch_init): Adjust.
11318
11319 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11320
11321         * s390-linux-nat.c (s390-tdep.h): New include.
11322         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11323         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11324         (ALLDEPFILES): Add s390-tdep.c.
11325         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11326         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11327         * s390-tdep.h: ...this.  New file.
11328         * s390-linux-tdep.c (s390-tdep.h): New include.
11329         (_initialize_s390_tdep): Rename to...
11330         (_initialize_s390_linux_tdep): ...this and adjust.
11331         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11332         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11333         s390-tdep.h.
11334         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11335         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11336         (s390_is_partial_instruction, s390_software_single_step)
11337         (is_non_branch_ril, s390_displaced_step_copy_insn)
11338         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11339         (s390_prologue_data, s390_addr, s390_store, s390_load)
11340         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11341         (s390_register_call_saved, s390_guess_tracepoint_registers)
11342         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11343         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11344         (s390_pseudo_register_name, s390_pseudo_register_type)
11345         (s390_pseudo_register_read, s390_pseudo_register_write)
11346         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11347         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11348         (s390_addr_bits_remove, s390_address_class_type_flags)
11349         (s390_address_class_type_flags_to_name)
11350         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11351         (s390_function_arg_float, s390_function_arg_vector)
11352         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11353         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11354         (s390_frame_align, s390_register_return_value, s390_return_value)
11355         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11356         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11357         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11358         (s390_trad_frame_prev_register, s390_unwind_cache)
11359         (s390_prologue_frame_unwind_cache)
11360         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11361         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11362         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11363         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11364         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11365         (s390_frame_base_address, s390_local_base_address)
11366         (s390_frame_base, s390_gcc_target_options)
11367         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11368         (s390_validate_reg_range, s390_tdesc_valid)
11369         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11370         * s390-tdep.c: ...this.  New file.
11371
11372 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11373
11374         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11375         (s390_process_record, s390_gdbarch_tdep_alloc)
11376         (s390_linux_init_abi_any): Use/set new hook.
11377
11378 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11379
11380         * s390-linux-tdep.c (osabi.h): New include.
11381         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11382         (s390_linux_init_abi_any): New functions.
11383         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11384
11385 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11386
11387         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11388         tdesc_has_registers check
11389
11390 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11391
11392         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11393         (s390_validate_reg_range): New macro.
11394         (s390_gdbarch_init): Adjust.
11395
11396 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11397
11398         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11399         (s390_gdbarch_tdep_alloc): Adjust.
11400         (s390_gdbarch_init): Adjust.
11401
11402 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11403
11404         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11405         <have_tdb>: Change type to bool.
11406         (s390_gdbarch_tdep_alloc): Adjust.
11407         (s390_gdbarch_init): Adjust.
11408
11409 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11410
11411         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11412         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11413         (s390_gdbarch_tdep_alloc): New function.
11414         (s390_gdbarch_init): Allocate tdep at start and use its fields
11415         instead of separate variables.
11416
11417 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11418
11419         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11420         when looking for cached gdbarch and add comment for remaining.
11421
11422 2018-01-22  Pedro Alves  <palves@redhat.com>
11423             Sergio Durigan Junior  <sergiodj@redhat.com>
11424
11425         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11426         case.
11427
11428 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11429
11430         * MAINTAINERS: Update my company e-mail address.
11431
11432 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11433
11434         * regcache.c (cooked_write_test): New function.
11435         (_initialize_regcache): Register the test.
11436
11437 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11438
11439         * ia64-tdep.c (ia64_pseudo_register_read): Call
11440         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11441         * m32c-tdep.c (m32c_cat_read): Likewise.
11442         (m32c_r3r2r1r0_read): Likewise.
11443         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11444         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11445
11446 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11447
11448         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11449         method raw_read instead of regcache_raw_read.
11450         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11451         * arm-tdep.c (arm_neon_quad_read): Likewise.
11452         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11453         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11454         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11455         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11456         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11457         (i386_pseudo_register_read_into_value): Likewise.
11458         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11459         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11460         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11461         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11462         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11463         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11464         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11465         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11466         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11467
11468 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11469
11470         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11471         * configure.tgt: Remove target mt.
11472         * mt-tdep.c: Remove.
11473         * regcache.c (cooked_read_test): Remove the check for mt.
11474
11475 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11476
11477         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11478         instead of gdbarch_pseudo_register_read_value.
11479
11480 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11481
11482         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11483         language is Ada.
11484
11485 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11486
11487         * linespec.c (create_sals_line_offset): Remove code that preserved
11488         the symtab_and_line's line number.
11489
11490 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11491
11492         * varobj.c (varobj_create): Don't set valid_block when creating a
11493         floating varobj.
11494
11495 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11496
11497         * varobj.c (varobj_create): Remove out of date comment.
11498
11499 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11500
11501         PR mi/20395
11502         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11503         updating innermost block.
11504         * parse.c (innermost_block_tracker::update): Take extra type
11505         parameter, and check types match before updating innermost block.
11506         (write_dollar_variable): Update innermost block for registers.
11507         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11508         (innermost_block_tracker::innermost_block_tracker): Initialise
11509         m_types member.
11510         (innermost_block_tracker::reset): Take type parameter.
11511         (innermost_block_tracker::update): Take type parameter, and pass
11512         type through as needed.
11513         (innermost_block_tracker::m_types): New member.
11514         * varobj.c (varobj_create): Pass type when reseting innermost
11515         block.
11516
11517 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11518
11519         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11520         * ada-lang.c (resolve_subexp): Likewise.
11521         * breakpoint.c (set_breakpoint_condition) Likewise.
11522         (watch_command_1) Likewise.
11523         * c-exp.y (variable): Likewise.
11524         * d-exp.y (PrimaryExpression): Likewise.
11525         * f-exp.y (variable): Likewise.
11526         * go-exp.y (variable): Likewise.
11527         * m2-exp.y (variable): Likewise.
11528         * objfiles.c (objfile::~objfile): Likewise.
11529         * p-exp.y (variable): Likewise.
11530         * parse.c (innermost_block): Change type.
11531         * parser-defs.h (class innermost_block_tracker): New.
11532         (innermost_block): Change to innermost_block_tracker.
11533         * printcmd.c (display_command): Switch to innermost_block API.
11534         (do_one_display): Likewise.
11535         * rust-exp.y (do_one_display): Likewise.
11536         * symfile.c (clear_symtab_users): Likewise.
11537         * varobj.c (varobj_create): Switch to innermost_block API, replace
11538         use of innermost_block with block stored on varobj object.
11539
11540 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11541
11542         * expression.h (innermost_block): Remove declaration.
11543         * varobj.c: Add 'parser-defs.h' include.
11544
11545 2018-01-19  Tom Tromey  <tom@tromey.com>
11546
11547         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11548         symbols in the static and global blocks.
11549
11550 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11551
11552         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11553         gdb_ptrace.h, and move including gdb_wait.h ...
11554         * nat/linux-ptrace.h: ... to here.
11555
11556 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11557
11558         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11559         inf_ptrace_detach_success.
11560         (inf_ptrace_detach_success): Add inferior parameter, use it
11561         instead of inferior_ptid, pass it to detach_inferior.
11562         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11563         parameter.
11564         * inferior.c (detach_inferior): Add overload that takes an
11565         inferior object.
11566         * inferior.h (detach_inferior): Likewise.
11567         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11568         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11569         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11570
11571 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11572
11573         * target.h (struct target_ops) <to_detach>: Add inferior
11574         parameter.
11575         (target_detach): Likewise.
11576         * target.c (dispose_inferior): Pass inferior down.
11577         (target_detach): Pass inferior down.  Assert that it is equal to
11578         the current inferior.
11579         * aix-thread.c (aix_thread_detach): Pass inferior down.
11580         * corefile.c (core_file_command): Pass current_inferior() down.
11581         * corelow.c (core_detach): Add inferior parameter.
11582         * darwin-nat.c (darwin_detach): Likewise.
11583         * gnu-nat.c (gnu_detach): Likewise.
11584         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11585         * infcmd.c (detach_command): Pass current_inferior() down to
11586         target_detach.
11587         * infrun.c (follow_fork_inferior): Pass parent_inf to
11588         target_detach.
11589         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11590         target_detach.
11591         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11592         * linux-thread-db.c (thread_db_detach): Likewise.
11593         * nto-procfs.c (procfs_detach): Likewise.
11594         * procfs.c (procfs_detach): Likewise.
11595         * record.c (record_detach): Likewise.
11596         * record.h (struct inferior): Forward-declare.
11597         (record_detach): Add inferior parameter.
11598         * remote-sim.c (gdbsim_detach): Likewise.
11599         * remote.c (remote_detach_1): Likewise.
11600         (remote_detach): Likewise.
11601         (extended_remote_detach): Likewise.
11602         * sol-thread.c (sol_thread_detach): Likewise.
11603         * target-debug.h (target_debug_print_inferior_p): New macro.
11604         * target-delegates.c: Re-generate.
11605         * top.c (kill_or_detach): Pass inferior down to target_detach.
11606         * windows-nat.c (windows_detach): Add inferior parameter.
11607
11608 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11609
11610         * target.h (struct target_ops) <to_detach>: Remove args
11611         parameter.
11612         (target_detach): Likewise.
11613         * target.c (dispose_inferior): Adjust.
11614         (target_detach): Remove args parameter, adjust.
11615         * aix-thread.c (aix_thread_detach): Adjust.
11616         * corefile.c (core_file_command): Adjust.
11617         * corelow.c (core_detach): Adjust.
11618         * darwin-nat.c (darwin_detach): Adjust.
11619         * gnu-nat.c (gnu_detach): Adjust.
11620         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11621         * infcmd.c (detach_command): Adjust
11622         * infrun.c (follow_fork_inferior): Adjust.
11623         (handle_vfork_child_exec_or_exit): Adjust.
11624         * linux-fork.c (linux_fork_detach): Remove args parameter.
11625         * linux-fork.h (linux_fork_detach): Likewise.
11626         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11627         * linux-thread-db.c (thread_db_detach): Likewise.
11628         * nto-procfs.c (procfs_detach): Likewise.
11629         * procfs.c (procfs_detach): Likewise.
11630         (do_detach): Remove signo parameter.
11631         * record.c (record_detach): Remove args parameter.
11632         * record.h (record_detach): Likewise.
11633         * remote-sim.c (gdbsim_detach): Likewise.
11634         * remote.c (remote_detach_1): Likewise.
11635         (remote_detach): Likewise.
11636         (extended_remote_detach): Likewise.
11637         * sol-thread.c (sol_thread_detach): Likewise.
11638         * target-delegates.c: Re-generate.
11639         * top.c (struct qt_args) <args>: Remove field.
11640         (kill_or_detach): Don't pass args.
11641         (quit_force): Don't set args.
11642         * windows-nat.c (windows_detach): Remove args parameter.
11643
11644 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11645
11646         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11647         (arm_linux_init_abi): Install it.
11648
11649 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11650
11651         * osabi.c (gdb_osabi_names): Extend the regexp for
11652         arm-linux-gnueabihf.
11653
11654 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11655
11656         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11657         m_abbrevs.
11658         (abbrev_table::add_abbrev): Update.
11659         (abbrev_table::lookup_abbrev): Update.
11660
11661 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11662
11663         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11664
11665 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11666
11667         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11668         to "std::string".
11669
11670 2018-01-17  Tom Tromey  <tom@tromey.com>
11671
11672         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11673
11674 2018-01-17  Tom Tromey  <tom@tromey.com>
11675
11676         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11677         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11678         (create_array_type_with_stride): Update.
11679         * dwarf2read.c (set_die_type): Update.
11680
11681 2018-01-17  Tom Tromey  <tom@tromey.com>
11682
11683         * dwarf2read.c (delayed_method_info): Remove typedef.
11684         (dwarf2_cu::method_info): Now a std::vector.
11685         (add_to_method_list): Update.
11686         (free_delayed_list): Remove.
11687         (compute_delayed_physnames): Update.
11688         (process_full_comp_unit, process_full_type_unit): Clear the method
11689         list.  Remove cleanups.
11690         (psymtab_include_file_name): Add name_holder parameter.  Use
11691         unique_xmalloc_ptr.
11692         (dwarf_decode_lines): Update.
11693
11694 2018-01-17  Tom Tromey  <tom@tromey.com>
11695             Simon Marchi  <simon.marchi@ericsson.com>
11696
11697         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11698         (dwarf2_per_objfile::free_cached_comp_units)
11699         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11700         (init_cutu_and_read_dies_no_follow): Update.
11701         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11702         (dwarf2_cu::~dwarf2_cu): New.
11703         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11704         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11705
11706 2018-01-17  Tom Tromey  <tom@tromey.com>
11707             Simon Marchi  <simon.marchi@ericsson.com>
11708
11709         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11710         (struct die_reader_specs) <abbrev_table>: New member.
11711         (struct abbrev_table): Add constructor.
11712         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11713         <abbrev_obstack>: Now an auto_obstack.
11714         (abbrev_table_up): New typedef.
11715         (init_cu_die_reader): Add abbrev_table parameter.
11716         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11717         Add result_dwo_abbrev_table.
11718         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11719         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11720         Update.
11721         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11722         parameter.
11723         (skip_children): Update.
11724         (abbrev_table::alloc_abbrev): Rename from
11725         abbrev_table_alloc_abbrev.
11726         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11727         (abbrev_table::lookup_abbrev): Rename from
11728         abbrev_table_lookup_abbrev.
11729         (abbrev_table_read_table): Return abbrev_table_up.
11730         (abbrev_table_free, abbrev_table_free_cleanup)
11731         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11732         (load_partial_dies): Update.
11733
11734 2018-01-17  Tom Tromey  <tom@tromey.com>
11735
11736         * dwarf2read.c (dwarf2_compute_name): Update comment.
11737         (read_func_scope, read_variable): Update.
11738         (new_symbol): Remove.
11739         (new_symbol_full): Rename to new_symbol.
11740
11741 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11742
11743         PR gdb/16577
11744         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11745         a warning instead of throwing an error, set section size to 0 and return
11746         NULL.
11747         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11748
11749 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11750
11751         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11752         std::string.
11753         (linux_ptrace_attach_fail_reason_string): Likewise.
11754         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11755         Likewise.
11756         (linux_ptrace_attach_fail_reason_string): Likewise.
11757         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11758
11759 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11760
11761         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11762
11763 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11764
11765         PR gdb/21559
11766         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11767         checking for fs_base/gs_base fields in struct user_regs_struct.
11768         * configure: Regenerate.
11769
11770 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11771
11772         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11773         function.
11774         (aarch64_linux_init_abi): Install it to gdbarch hook
11775         gcc_target_options.
11776
11777 2018-01-15  Pedro Alves  <palves@redhat.com>
11778
11779         * common/signals-state-save-restore.c
11780         (save_original_signals_state): Fix typos.
11781
11782 2017-01-12  Tom Tromey  <tom@tromey.com>
11783             Sergio Durigan Junior  <sergiodj@redhat.com>
11784
11785         * Makefile.in (install-only): Install gdb-add-index.
11786
11787 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11788
11789         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11790
11791 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11792
11793         * infrun.c (keep_going_pass_signal): Clear step-over info when
11794         insert_breakpoints fails.
11795
11796 2018-01-11  Pedro Alves  <palves@redhat.com>
11797
11798         PR gdb/22583
11799         * infrun.c (resume): Rename to ...
11800         (resume_1): ... this.
11801         (resume): Reimplement as wrapper around resume_1.
11802
11803 2018-01-11  Pedro Alves  <palves@redhat.com>
11804
11805         PR remote/22597
11806         * remote.c (remote_parse_stop_reply): Default to the last-set
11807         general thread instead of to 'magic_null_ptid'.
11808
11809 2018-01-10  Pedro Alves  <palves@redhat.com>
11810
11811         * language.h (language_get_symbol_name_matcher): Rename ...
11812         (get_symbol_name_matcher): ... this.
11813         * language.c (language_get_symbol_name_matcher): Ditto.
11814         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11815         callers adjusted.
11816
11817 2018-01-10  Pedro Alves  <palves@redhat.com>
11818
11819         PR gdb/22670
11820         * dwarf2read.c
11821         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11822         Adjust to use language_get_symbol_name_matcher instead of
11823         language_defn::la_get_symbol_name_matcher.
11824         * language.c (language_get_symbol_name_matcher): If in Ada mode
11825         and the lookup name is a verbatim match, return Ada's matcher.
11826         * language.h (language_get_symbol_name_matcher): Adjust comment.
11827         (ada_lookup_name_info::verbatim_p):: New method.
11828
11829 2018-01-10  Pedro Alves  <palves@redhat.com>
11830
11831         PR gdb/22670
11832         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11833         minsym's language is language_auto or language_cplus, pass down
11834         language_ada instead.
11835         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11836
11837 2018-01-10  Pedro Alves  <palves@redhat.com>
11838
11839         PR gdb/22670
11840         * minsyms.c (linkage_name_str): New function.
11841         (iterate_over_minimal_symbols): Use it.
11842
11843 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11844
11845         * NEWS: Document that 'info proc' now works on FreeBSD.
11846
11847 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11848
11849         * configure.ac: Check for kinfo_getfile in libutil.
11850         * configure: Regenerate.
11851         * config.in: Regenerate.
11852         * fbsd-nat.c: Include "fbsd-tdep.h".
11853         (fbsd_fetch_cmdline): New.
11854         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11855         rather than calling error.
11856         (fbsd_info_proc): New.
11857         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11858         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11859         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11860
11861 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11862
11863         * fbsd-nat.c (struct free_deleter): Remove.
11864         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11865
11866 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11867
11868         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11869         NULL for an empty pathname.
11870
11871 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11872
11873         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11874         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11875         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11876         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11877         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11878         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11879         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11880         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11881         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11882         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11883         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11884         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11885         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11886         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11887         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11888
11889 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11890
11891         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11892         (gnu_xfer_auxv): New function.
11893         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11894         TARGET_OBJECT_AUXV.
11895
11896 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11897             Simon Marchi  <simon.marchi@ericsson.com>
11898
11899         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11900         common/selftest.c.
11901         (COMMON_OBS): Remove selftest.o.
11902         * configure.ac: Append selftest-arch.c and common/selftest.c to
11903         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11904         * configure: Re-generated.
11905         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11906         GDB_SELF_TEST.
11907         (maintenance_info_selftests): Likewise.
11908
11909 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11910
11911         * ada-valprint.c (val_print_packed_array_elements): Use
11912         proper number of elements when printing an array indexed
11913         by an enumeration type.
11914
11915 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11916
11917         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11918         (dw2_get_file_names_reader): Adjust.
11919         (lookup_dwo_signatured_type): Adjust.
11920         (lookup_dwp_signatured_type): Adjust.
11921         (lookup_signatured_type): Adjust.
11922         (create_type_unit_group): Adjust.
11923         (get_type_unit_group): Adjust.
11924         (process_psymtab_comp_unit_reader): Adjust.
11925         (build_type_psymtabs_reader): Adjust.
11926         (scan_partial_symbols): Adjust.
11927         (add_partial_symbol): Adjust.
11928         (add_partial_subprogram): Adjust.
11929         (peek_die_abbrev): Adjust.
11930         (fixup_go_packaging): Adjust.
11931         (process_imported_unit_die): Adjust.
11932         (dwarf2_compute_name): Adjust.
11933         (dwarf2_physname): Adjust.
11934         (read_import_statement): Adjust.
11935         (handle_DW_AT_stmt_list): Adjust.
11936         (read_file_scope): Adjust.
11937         (read_func_scope): Adjust.
11938         (read_lexical_block_scope): Adjust.
11939         (read_call_site_scope): Adjust.
11940         (read_variable): Adjust.
11941         (dwarf2_rnglists_process): Adjust.
11942         (dwarf2_ranges_process): Adjust.
11943         (dwarf2_ranges_read): Adjust.
11944         (dwarf2_get_pc_bounds): Adjust.
11945         (dwarf2_record_block_ranges): Adjust.
11946         (dwarf2_add_field): Adjust.
11947         (dwarf2_add_member_fn): Adjust.
11948         (read_structure_type): Adjust.
11949         (process_structure_scope): Adjust.
11950         (read_enumeration_type): Adjust.
11951         (read_array_type): Adjust.
11952         (mark_common_block_symbol_computed): Adjust.
11953         (read_common_block): Adjust.
11954         (read_namespace_type): Adjust.
11955         (read_namespace): Adjust.
11956         (read_module_type): Adjust.
11957         (read_tag_pointer_type): Adjust.
11958         (read_tag_ptr_to_member_type): Adjust.
11959         (read_tag_string_type): Adjust.
11960         (read_subroutine_type): Adjust.
11961         (read_typedef): Adjust.
11962         (read_base_type): Adjust.
11963         (attr_to_dynamic_prop): Adjust.
11964         (read_subrange_type): Adjust.
11965         (read_unspecified_type): Adjust.
11966         (dwarf2_read_abbrevs): Adjust.
11967         (load_partial_dies): Adjust.
11968         (read_partial_die): Adjust.
11969         (find_partial_die): Adjust.
11970         (guess_partial_die_structure_name): Adjust.
11971         (fixup_partial_die): Adjust.
11972         (read_attribute_value): Adjust.
11973         (read_addr_index): Adjust.
11974         (read_addr_index_from_leb128): Adjust.
11975         (read_str_index): Adjust.
11976         (dwarf2_string_attr): Adjust.
11977         (get_debug_line_section): Adjust.
11978         (dwarf_decode_line_header): Adjust.
11979         (lnp_state_machine::check_line_address): Adjust.
11980         (dwarf_decode_lines_1): Adjust.
11981         (dwarf_decode_lines): Adjust.
11982         (dwarf2_start_symtab): Adjust.
11983         (var_decode_location): Adjust.
11984         (new_symbol_full): Adjust.
11985         (dwarf2_const_value_data): Adjust.
11986         (dwarf2_const_value_attr): Adjust.
11987         (dwarf2_const_value): Adjust.
11988         (die_type): Adjust.
11989         (die_containing_type): Adjust.
11990         (build_error_marker_type): Adjust.
11991         (lookup_die_type): Adjust.
11992         (guess_full_die_structure_name): Adjust.
11993         (anonymous_struct_prefix): Adjust.
11994         (determine_prefix): Adjust.
11995         (dwarf2_name): Adjust.
11996         (follow_die_ref_or_sig): Adjust.
11997         (follow_die_offset): Adjust.
11998         (follow_die_ref): Adjust.
11999         (follow_die_sig_1): Adjust.
12000         (follow_die_sig): Adjust.
12001         (get_signatured_type): Adjust.
12002         (get_DW_AT_signature_type): Adjust.
12003         (decode_locdesc): Adjust.
12004         (dwarf_decode_macros): Adjust.
12005         (cu_debug_loc_section): Adjust.
12006         (fill_in_loclist_baton): Adjust.
12007         (dwarf2_symbol_mark_computed): Adjust.
12008         (init_one_comp_unit): Don't assign
12009         dwarf2_cu::dwarf2_per_objfile.
12010         (set_die_type): Adjust.
12011
12012 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12013
12014         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12015         <dwarf2_per_objfile>: New field.
12016         (dwarf2_per_objfile): Remove global.
12017         (get_dwarf2_per_objfile): New function.
12018         (set_dwarf2_per_objfile): New function.
12019         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12020         dwarf2_per_objfile.
12021         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12022         (read_abbrev_offset): Likewise.
12023         (read_indirect_string): Likewise.
12024         (read_indirect_line_string): Likewise.
12025         (read_indirect_string_at_offset): Likewise.
12026         (read_indirect_string_from_dwz): Likewise.
12027         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12028         dwarf2_per_objfile.
12029         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12030         (create_all_comp_units): Change objfile parameter to
12031         dwarf2_per_objfile.
12032         (create_all_type_units): Likewise.
12033         (process_queue): Add dwarf2_per_objfile parameter.
12034         (read_and_check_comp_unit_head): Likewise.
12035         (lookup_dwo_unit_in_dwp): Likewise.
12036         (get_dwp_file): Likewise.
12037         (process_cu_includes): Likewise.
12038         (struct free_dwo_file_cleanup_data): New struct.
12039         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12040         set_dwarf2_per_objfile.
12041         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12042         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12043         context, adjust calls.
12044         (dw2_instantiate_symtab): Likewise.
12045         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12046         (dw2_get_cu): Likewise.
12047         (create_cu_from_index_list): Change objfile parameter to
12048         dwarf2_per_objfile.
12049         (create_cus_from_index_list): Get dwarf2_per_objfile from
12050         context, adjust calls.
12051         (create_cus_from_index): Likewise.
12052         (create_signatured_type_table_from_index): Change objfile
12053         parameter to dwarf2_per_objfile.
12054         (create_signatured_type_table_from_debug_names): Change objfile
12055         parameter to dwarf2_per_objfile.
12056         (create_addrmap_from_index): Likewise.
12057         (create_addrmap_from_aranges): Likewise.
12058         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12059         (dw2_setup): Remove.
12060         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12061         context.
12062         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12063         get_dwarf2_per_objfile.
12064         (dw2_forget_cached_source_info): Likewise.
12065         (dw2_map_symtabs_matching_filename): Likewise.
12066         (struct dw2_symtab_iterator) <index>: Remove.
12067         <dwarf2_per_objfile>: New field.
12068         (dw2_symtab_iter_init): Replace index parameter with
12069         dwarf2_per_objfile.
12070         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12071         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12072         (dw2_print_stats): Likewise.
12073         (dw2_dump): Likewise.
12074         (dw2_expand_symtabs_for_function): Likewise.
12075         (dw2_expand_all_symtabs): Likewise.
12076         (dw2_expand_symtabs_with_fullname): Likewise.
12077         (dw2_expand_marked_cus): Replace index and objfile parameters
12078         with dwarf2_per_objfile.
12079         (dw_expand_symtabs_matching_file_matcher): Add
12080         dwarf2_per_objfile parameter and adjust calls.
12081         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12082         adjust calls.
12083         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12084         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12085         adjust calls.
12086         (create_cus_from_debug_names_list): Replace objfile parameter
12087         with dwarf2_per_objfile and adjust calls.
12088         (create_cus_from_debug_names): Likewise.
12089         (dwarf2_read_debug_names): Likewise.
12090         (mapped_debug_names::namei_to_name): Adjust call.
12091         (dw2_debug_names_iterator::next): Likewise.
12092         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12093         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12094         (dw2_debug_names_dump): Likewise.
12095         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12096         (dw2_debug_names_expand_symtabs_matching): Likewise.
12097         (dwarf2_initialize_objfile): Likewise.
12098         (dwarf2_build_psymtabs): Likewise.
12099         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12100         this_cu.
12101         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12102         (read_and_check_comp_unit_head): Likewise.
12103         (read_abbrev_offset): Likewise.
12104         (create_debug_type_hash_table): Likewise.
12105         (create_debug_types_hash_table): Likewise.
12106         (create_all_type_units): Replace objfile parameter with
12107         dwarf2_per_objfile.
12108         (add_type_unit): Add dwarf2_per_objfile parameter.
12109         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12110         with dwarf2_per_objfile.
12111         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12112         (lookup_dwp_signatured_type): Likewise.
12113         (lookup_signatured_type): Likewise.
12114         (read_cutu_die_from_dwo): Likewise.
12115         (init_tu_and_read_dwo_dies): Likewise.
12116         (init_cutu_and_read_dies): Likewise.
12117         (init_cutu_and_read_dies_no_follow): Likewise.
12118         (allocate_type_unit_groups_table): Add objfile parameter.
12119         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12120         (get_type_unit_group): Likewise.
12121         (process_psymtab_comp_unit): Update call.
12122         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12123         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12124         (print_tu_stats): Likewise.
12125         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12126         in void* parameter.
12127         (build_type_psymtabs): Change objfile parameter to
12128         dwarf2_per_objfile.
12129         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12130         passed in void* parameter.
12131         (process_skeletonless_type_units): Change objfile parameter to
12132         dwarf2_per_objfile.
12133         (set_partial_user): Likewise.
12134         (dwarf2_build_psymtabs_hard): Likewise.
12135         (read_comp_units_from_section): Likewise.
12136         (create_all_comp_units): Likewise.
12137         (scan_partial_symbols): Update calls.
12138         (add_partial_symbol): Likewise.
12139         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12140         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12141         (process_queue): Add dwarf2_per_objfile parameter.
12142         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12143         (compute_compunit_symtab_includes): Likewise.
12144         (process_cu_includes): Add dwarf2_per_objfile parameter.
12145         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12146         (process_full_type_unit): Likewise.
12147         (process_imported_unit_die): Update call.
12148         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12149         (read_file_scope): Likewise.
12150         (allocate_dwo_file_hash_table): Add objfile parameter.
12151         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12152         (create_cus_hash_table): Likewise.
12153         (create_dwp_hash_table): Likewise.
12154         (create_dwo_unit_in_dwp_v1): Likewise.
12155         (create_dwp_v2_section): Likewise.
12156         (create_dwo_unit_in_dwp_v2): Likewise.
12157         (lookup_dwo_unit_in_dwp): Likewise.
12158         (try_open_dwop_file): Likewise.
12159         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12160         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12161         cleanup to include a reference to dwarf2_per_objfile.
12162         (open_dwp_file): Add dwarf2_per_objfile parameter.
12163         (open_and_init_dwp_file): Likewise.
12164         (get_dwp_file): Likewise.
12165         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12166         (queue_and_load_all_dwo_tus): Update call.
12167         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12168         data.
12169         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12170         (dwarf2_ranges_process): Likewise.
12171         (dwarf2_get_pc_bounds): Likewise.
12172         (mark_common_block_symbol_computed): Likewise.
12173         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12174         (dwarf2_read_abbrevs): Update call.
12175         (read_partial_die): Use dwarf2_per_objfile from cu.
12176         (find_partial_die): Likewise.
12177         (fixup_partial_die): Likewise.
12178         (read_attribute_value): Likewise.
12179         (read_indirect_string_at_offset_from): Add objfile parameter.
12180         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12181         parameter.
12182         (read_indirect_string_from_dwz): Add objfile parameter.
12183         (read_indirect_string): Add objfile parameter.
12184         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12185         (read_addr_index): Use dwarf2_per_objfile from cu.
12186         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12187         call dw2_setup.
12188         (read_str_index): Use dwarf2_per_objfile from cu.
12189         (get_debug_line_section): Likewise.
12190         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12191         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12192         (new_symbol_full): Use dwarf2_per_objfile from cu.
12193         (build_error_marker_type): Likewise.
12194         (lookup_die_type): Likewise.
12195         (determine_prefix): Likewise.
12196         (follow_die_offset): Likewise.
12197         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12198         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12199         (dwarf2_fetch_die_type_sect_off): Likewise.
12200         (dwarf2_get_die_type): Likewise.
12201         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12202         (get_signatured_type): Likewise.
12203         (get_DW_AT_signature_type): Likewise.
12204         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12205         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12206         (cu_debug_loc_section): Likewise.
12207         (fill_in_loclist_baton): Likewise.
12208         (dwarf2_symbol_mark_computed): Likewise.
12209         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12210         dwarf2_per_objfile.
12211         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12212         parameter.
12213         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12214         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12215         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12216         (set_die_type): Use dwarf2_free_objfile from cu.
12217         (get_die_type_at_offset): Likewise.
12218         (dwarf2_per_objfile_free): Don't assign global variable.
12219         (debug_names) <constructor>: Add dwarf2_per_objfile
12220         parameter, update m_debugstrlookup construction.
12221         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12222         parameter.
12223         <m_dwarf2_per_objfile>: New field.
12224         <lookup>: Use m_dwarf2_per_objfile.
12225         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12226         (psyms_seen_size): Likewise.
12227         (write_gdbindex): Replace objfile parameter with
12228         dwarf2_per_objfile.
12229         (write_debug_names): Likewise.
12230         (write_psymtabs_to_index): Likewise.
12231         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12232         calls.
12233
12234 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12235
12236         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12237         <dwarf2_per_objfile>: New field.
12238         (struct dwarf2_per_cu_data) <objfile>: Remove.
12239         <dwarf2_per_objfile>: New field.
12240         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12241         of objfile.
12242         (create_signatured_type_table_from_index): Likewise.
12243         (create_debug_type_hash_table): Likewise.
12244         (fill_in_sig_entry_from_dwo_entry): Likewise.
12245         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12246         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12247         objfile.
12248         (create_partial_symtab): Access objfile through
12249         dwarf2_per_objfile.
12250         (process_psymtab_comp_unit_reader): Likewise.
12251         (read_comp_units_from_section): Likewise.
12252         (scan_partial_symbols): Likewise.
12253         (add_partial_symbol): Likewise.
12254         (add_partial_subprogram): Likewise.
12255         (peek_die_abbrev): Likewise.
12256         (fixup_go_packaging): Likewise.
12257         (process_full_comp_unit): Likewise.
12258         (process_full_type_unit): Likewise.
12259         (process_imported_unit_die): Likewise.
12260         (dwarf2_compute_name): Likewise.
12261         (dwarf2_physname): Likewise.
12262         (read_import_statement): Likewise.
12263         (create_cus_hash_table): Assign dwarf2_physname instead of
12264         objfile.
12265         (read_func_scope): Access objfile through dwarf2_per_objfile.
12266         (read_lexical_block_scope): Likewise.
12267         (read_call_site_scope): Likewise.
12268         (read_variable): Likewise.
12269         (dwarf2_rnglists_process): Likewise.
12270         (dwarf2_ranges_process): Likewise.
12271         (dwarf2_ranges_read): Likewise.
12272         (dwarf2_record_block_ranges): Likewise.
12273         (dwarf2_add_field): Likewise.
12274         (dwarf2_add_member_fn): Likewise.
12275         (read_structure_type): Likewise.
12276         (process_structure_scope): Likewise.
12277         (read_enumeration_type): Likewise.
12278         (read_array_type): Likewise.
12279         (read_common_block): Likewise.
12280         (read_namespace_type): Likewise.
12281         (read_namespace): Likewise.
12282         (read_module_type): Likewise.
12283         (read_tag_pointer_type): Likewise.
12284         (read_tag_ptr_to_member_type): Likewise.
12285         (read_tag_string_type): Likewise.
12286         (read_subroutine_type): Likewise.
12287         (read_typedef): Likewise.
12288         (read_base_type): Likewise.
12289         (attr_to_dynamic_prop): Likewise.
12290         (read_subrange_type): Likewise.
12291         (read_unspecified_type): Likewise.
12292         (load_partial_dies): Likewise.
12293         (read_partial_die): Likewise.
12294         (find_partial_die): Likewise.
12295         (guess_partial_die_structure_name): Likewise.
12296         (fixup_partial_die): Likewise.
12297         (read_attribute_value): Likewise.
12298         (read_addr_index_from_leb128): Likewise.
12299         (dwarf2_read_addr_index): Likewise.
12300         (dwarf2_string_attr): Likewise.
12301         (lnp_state_machine::check_line_address): Likewise.
12302         (dwarf_decode_lines_1): Likewise.
12303         (dwarf_decode_lines): Likewise.
12304         (dwarf2_start_symtab): Likewise.
12305         (var_decode_location): Likewise.
12306         (new_symbol_full): Likewise.
12307         (dwarf2_const_value_data): Likewise.
12308         (dwarf2_const_value_attr): Likewise.
12309         (dwarf2_const_value): Likewise.
12310         (die_type): Likewise.
12311         (die_containing_type): Likewise.
12312         (lookup_die_type): Likewise.
12313         (guess_full_die_structure_name): Likewise.
12314         (anonymous_struct_prefix): Likewise.
12315         (dwarf2_name): Likewise.
12316         (follow_die_ref_or_sig): Likewise.
12317         (follow_die_offset): Likewise.
12318         (follow_die_ref): Likewise.
12319         (dwarf2_fetch_die_loc_sect_off): Likewise.
12320         (dwarf2_fetch_constant_bytes): Likewise.
12321         (dwarf2_fetch_die_type_sect_off): Likewise.
12322         (dwarf2_get_die_type): Likewise.
12323         (follow_die_sig): Likewise.
12324         (decode_locdesc): Likewise.
12325         (dwarf2_per_cu_objfile): Likewise.
12326         (dwarf2_per_cu_text_offset): Likewise.
12327         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12328         objfile.
12329         (set_die_type): Access objfile through
12330         dwarf2_per_objfile.
12331
12332 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12333
12334         * valprint.c (converted_character_d): Remove typedef.
12335         (DEF_VEC_O (converted_character_d)): Remove.
12336         (count_next_character): Use std::vector.
12337         (print_converted_chars_to_obstack): Likewise.
12338         (generic_printstr): Likewise.
12339
12340 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12341
12342         * xml-support.h (struct gdb_xml_value): Add constructor.
12343         <value>: Change type to unique_xmalloc_ptr.
12344         (gdb_xml_value_s): Remove typedef.
12345         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12346         (gdb_xml_element_start_handler): Change parameter type to
12347         std::vector.
12348         (xml_find_attribute): Likewise.
12349         * xml-support.c (xml_find_attribute): Change parameter type to
12350         std::vector and adjust.
12351         (gdb_xml_values_cleanup): Remove.
12352         (gdb_xml_parser::start_element): Adjust to std::vector.
12353         (xinclude_start_include): Change paraeter type to std::vector
12354         and adjust.
12355         * btrace.c (check_xml_btrace_version): Likewise.
12356         (parse_xml_btrace_block): Likewise.
12357         (parse_xml_btrace_pt_config_cpu): Likewise.
12358         (parse_xml_btrace_pt): Likewise.
12359         (parse_xml_btrace_conf_bts): Likewise.
12360         (parse_xml_btrace_conf_pt): Likewise.
12361         * memory-map.c (memory_map_start_memory): Likewise.
12362         (memory_map_start_property): Likewise.
12363         * osdata.c (osdata_start_osdata): Likewise.
12364         (osdata_start_item): Likewise.
12365         (osdata_start_column): Likewise.
12366         * remote.c (start_thread): Likewise.
12367         * solib-aix.c (library_list_start_library): Likewise.
12368         (library_list_start_list): Likewise.
12369         * solib-svr4.c (library_list_start_library): Likewise.
12370         (svr4_library_list_start_list): Likewise.
12371         * solib-target.c (library_list_start_segment): Likewise.
12372         (library_list_start_section): Likewise.
12373         (library_list_start_library): Likewise.
12374         (library_list_start_list): Likewise.
12375         * tracepoint.c (traceframe_info_start_memory): Likewise.
12376         (traceframe_info_start_tvar): Likewise.
12377         * xml-syscall.c (syscall_start_syscall): Likewise.
12378         * xml-tdesc.c (tdesc_start_target): Likewise.
12379         (tdesc_start_feature): Likewise.
12380         (tdesc_start_reg): Likewise.
12381         (tdesc_start_union): Likewise.
12382         (tdesc_start_struct): Likewise.
12383         (tdesc_start_flags): Likewise.
12384         (tdesc_start_enum): Likewise.
12385         (tdesc_start_field): Likewise.
12386         (tdesc_start_enum_value): Likewise.
12387         (tdesc_start_vector): Likewise.
12388
12389 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12390
12391         * extension.h (struct xmethod_worker) <clone>: Remove.
12392         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12393         Remove.
12394         (python_xmethod_worker::clone): Remove.
12395         * valops.c (find_overload_match): Use std::move instead of
12396         clone.
12397
12398 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12399
12400         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12401         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12402         <free_xmethod_worker_data>: Remove.
12403         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12404         <get_xmethod_arg_types>: Remove.
12405         <get_xmethod_result_type>: Remove.
12406         <invoke_xmethod>: Remove.
12407         * extension.c (new_xmethod_worker): Remove.
12408         (clone_xmethod_worker): Remove.
12409         (get_matching_xmethod_workers): Return void, pass std::vector by
12410         pointer.
12411         (get_xmethod_arg_types): Rename to...
12412         (xmethod_worker::get_arg_types): ... this, and adjust.
12413         (get_xmethod_result_type): Rename to...
12414         (xmethod_worker::get_result_type): ... this, and adjust.
12415         (invoke_xmethod): Remove.
12416         (free_xmethod_worker): Remove.
12417         (free_xmethod_worker_vec): Remove.
12418         * extension.h (enum ext_lang_rc): Move here from
12419         extension-priv.h.
12420         (struct xmethod_worker): Add constructor and destructor.
12421         <data>: Remove.
12422         <value>: Remove.
12423         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12424         virtual pure methods.
12425         <get_arg_types, get_result_type>: New methods.
12426         (xmethod_worker_ptr): Remove typedef.
12427         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12428         (xmethod_worker_vec): Remove typedef.
12429         (xmethod_worker_up): New typedef.
12430         (invoke_xmethod): Remove.
12431         (clone_xmethod_worker): Remove.
12432         (free_xmethod_worker): Remove.
12433         (free_xmethod_worker_vec): Remove.
12434         (get_xmethod_arg_types): Remove.
12435         (get_xmethod_result_type): Remove.
12436         * valops.c (find_method_list): Use std::vector, don't use
12437         intermediate vector.
12438         (value_find_oload_method_list): Use std::vector.
12439         (find_overload_match): Use std::vector.
12440         (find_oload_champ): Use std::vector.
12441         * value.c (value_free): Use operator delete.
12442         (value_of_xmethod): Rename to...
12443         (value_from_xmethod): ... this.  Don't assign
12444         xmethod_worker::value, take rvalue-reference.
12445         (result_type_of_xmethod): Adjust.
12446         (call_xmethod): Adjust.
12447         * value.h: Include extension.h.
12448         (struct xmethod_worker): Don't forward-declare.
12449         (value_of_xmethod): Rename to...
12450         (value_from_xmethod): ... this, take rvalue-reference.
12451         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12452         (struct python_xmethod_worker): ... this, add constructor and
12453         destructor.
12454         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12455         (gdbpy_free_xmethod_worker_data): Rename to...
12456         (python_xmethod_worker::~python_xmethod_worker): ... this and
12457         adjust.
12458         (gdbpy_clone_xmethod_worker_data): Rename to...
12459         (python_xmethod_worker::clone): ... this and adjust.
12460         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12461         temporary vector.
12462         (gdbpy_get_xmethod_arg_types): Rename to...
12463         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12464         (gdbpy_get_xmethod_result_type): Rename to...
12465         (python_xmethod_worker::do_get_result_type): ... this and
12466         adjust.
12467         (gdbpy_invoke_xmethod): Rename to...
12468         (python_xmethod_worker::invoke): ... this and adjust.
12469         (new_python_xmethod_worker): Rename to...
12470         (python_xmethod_worker::python_xmethod_worker): ... this and
12471         adjust.
12472         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12473         Remove.
12474         (gdbpy_free_xmethod_worker_data): Remove.
12475         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12476         (gdbpy_get_xmethod_arg_types): Remove.
12477         (gdbpy_get_xmethod_result_type): Remove.
12478         (gdbpy_invoke_xmethod): Remove.
12479         * python/python.c (python_extension_ops): Remove obsolete
12480         callbacks.
12481
12482 2018-01-05  Pedro Alves  <palves@redhat.com>
12483
12484         PR gdb/18653
12485         * common/signals-state-save-restore.c
12486         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12487         find a custom handler preinstalled, instead of internal erroring.
12488         But only warn if !quiet.
12489         * common/signals-state-save-restore.h
12490         (save_original_signals_state): New parameter 'quiet'.
12491         * main.c (captured_main_1): Move save_original_signals_state call
12492         after option handling, and pass QUIET.
12493
12494 2018-01-05  Pedro Alves  <palves@redhat.com>
12495
12496         * spu-tdep.c (spu_catch_start): Pass
12497         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12498
12499 2018-01-05  Pedro Alves  <palves@redhat.com>
12500
12501         PR gdb/22670
12502         * ada-lang.c (literal_symbol_name_matcher): New function.
12503         (ada_get_symbol_name_matcher): Use it for
12504         symbol_name_match_type::SEARCH_NAME.
12505         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12506         it down instead of assuming symbol_name_match_type::FULL.
12507         * block.h (block_lookup_symbol): New parameter 'match_type'.
12508         * c-valprint.c (print_unpacked_pointer): Use
12509         lookup_symbol_search_name instead of lookup_symbol.
12510         * compile/compile-object-load.c (get_out_value_type): Pass down
12511         symbol_name_match_type::SEARCH_NAME.
12512         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12513         symbol_name_match_type::FULL.
12514         * cp-support.c (cp_get_symbol_name_matcher): Handle
12515         symbol_name_match_type::SEARCH_NAME.
12516         * infrun.c (insert_exception_resume_breakpoint): Use
12517         lookup_symbol_search_name.
12518         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12519         * psymtab.c (maintenance_check_psymtabs): Use
12520         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12521         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12522         SYMBOL_SEARCH_NAME.
12523         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12524         if symbol_name_match_type::SEARCH_NAME.
12525         (lookup_symbol_in_language): Pass down
12526         symbol_name_match_type::FULL.
12527         (lookup_symbol_search_name): New.
12528         (lookup_language_this): Pass down
12529         symbol_name_match_type::SEARCH_NAME.
12530         (lookup_symbol_aux, lookup_local_symbol): New parameter
12531         'match_type'.  Pass it down.
12532         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12533         (lookup_symbol_search_name): New declaration.
12534         (lookup_symbol_in_block): New 'match_type' parameter.
12535
12536 2018-01-05  Pedro Alves  <palves@redhat.com>
12537
12538         PR gdb/22670
12539         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12540         ada_lookup_symbol.
12541         (ada_lookup_symbol): Reimplement in terms of
12542         ada_lookup_symbol_list, bits factored out from
12543         ada_lookup_encoded_symbol.
12544
12545 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12546
12547         * ada-exp.y (write_object_renaming): When subscripting an array
12548         using a symbol as the index, pass the block in call to
12549         ada_lookup_encoded_symbol when looking that symbol up.
12550
12551 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12552
12553         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12554         TYPE_INDEX_TYPE.
12555
12556 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12557
12558         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12559         the case where VALUE_LVAL (val0) is not lval_memory.
12560
12561 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12562
12563         * ada-valprint.c (print_optional_low_bound): Handle
12564         character-indexed array printing like boolean-indexed array
12565         printing.
12566
12567 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12568
12569         * NEWS: Create a new section for the next release branch.
12570         Rename the section of the current branch, now that it has
12571         been cut.
12572
12573 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12574
12575         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12576         * version.in: Bump version to 8.1.50.DATE-git.
12577
12578 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12579
12580         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12581         Add field.
12582         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12583         Add field.
12584         (default_exception_support_info) <catch_handlers_sym>: Add field.
12585         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12586         (ada_exception_name_addr_1): Add "catch handlers" handling.
12587         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12588         Update all callers.
12589         (create_excep_cond_exprs) <ex>: Add parameter.
12590         (re_set_exception): Update create_excep_cond_exprs call.
12591         (print_it_exception, print_one_exception, print_mention_exception)
12592         (print_recreate_exception): Add "catch handler" handling.
12593         (allocate_location_catch_handlers, re_set_catch_handlers)
12594         (check_status_catch_handlers, print_it_catch_handlers)
12595         (print_one_catch_handlers, print_mention_catch_handlers)
12596         (print_recreate_catch_handlers): New function.
12597         (catch_handlers_breakpoint_ops): New variable.
12598         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12599         Add parameter.  Add "catch handler" handling.
12600         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12601         Add "catch handler" handling.
12602         (ada_exception_catchpoint_cond_string): Add "catch handler"
12603         handling.
12604         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12605         call.
12606         (catch_ada_handlers_command): New function.
12607         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12608         operations structure.
12609         (_initialize_ada_language): Add "catch handlers" command entry.
12610         * NEWS: Document "catch handlers" feature.
12611
12612 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12613
12614         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12615         account when creating the array type of the slice.
12616         (ada_value_slice): Likewise.
12617
12618 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12619
12620         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12621         New enum value.
12622         (create_array_type_with_stride): Add byte_stride_prop parameter.
12623         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12624         New parameter.  Update all callers in this file.
12625         (array_type_has_dynamic_stride): New function.
12626         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12627         of arrays with dynamic byte strides.
12628         * dwarf2read.c (read_array_type): Add support for dynamic
12629         DW_AT_byte_stride attributes.
12630
12631 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12632
12633         * dwarf2read.c (read_unspecified_type): Treat
12634         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12635
12636 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12637
12638         Update copyright year range in all GDB files.
12639
12640 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12641
12642         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12643         and gdb/testsuite/gdb.base/step-line.c.
12644
12645 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12646
12647         * copyright.py (main): Dump the contents of
12648         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12649         even if BY_HAND is empty.
12650
12651 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12652
12653         * top.c (print_gdb_version): Update Copyright year in version
12654         message.
12655
12656 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12657
12658         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12659
12660 For older changes see ChangeLog-2017.
12661 \f
12662 Local Variables:
12663 mode: change-log
12664 left-margin: 8
12665 fill-column: 74
12666 version-control: never
12667 coding: utf-8
12668 End: