Update gnulib/Makefile.in:aclocal_m4_deps
[external/binutils.git] / gdb / ChangeLog
1 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2
3         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4         the files present in "gnulib/import/m4/".
5
6 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
7
8         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
9         c.sw, c.swsp, and c.sdsp.
10
11 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
12
13         * riscv-tdep.c (struct riscv_inferior_data): Delete.
14         (riscv_read_misa_reg): Don't cache value read into inferior data.
15         (riscv_new_inferior_data): Delete.
16         (riscv_inferior_data_cleanup): Delete.
17         (riscv_inferior_data): Delete.
18         (riscv_invalidate_inferior_data): Delete.
19         (_initialize_riscv_tdep): Remove initialisation of inferior data.
20
21 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
22
23         * compile/compile-cplus-types.c
24         (compile_cplus_instance::leave_scope): Take the address of scope
25         object.
26         (compile_cplus_instance::convert_qualified_base): Compare quals
27         to 0.
28
29 2018-08-30  Keith Seitz  <keiths@redhat.com>
30
31         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
32         Use "%s" and host_address_to_string instead of "%p" in printf.
33
34 2018-08-29  Keith Seitz  <keiths@redhat.com>
35
36         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
37         and compile-cplus-types.c.
38         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
39         * c-lang.c (cplus_language_defn): Set C++ compile functions.
40         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
41         Declare.
42         * compile/compile-c-support.c: Include compile-cplus.h.
43         (load_libcompile): Templatize.
44         (get_compile_context): "New" function.
45         (c_get_compile_context): Use get_compile_context.
46         (cplus_get_compile_context): New function.
47         (cplus_push_user_expression, cplus_pop_user_expression)
48         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
49         (cplus_compute_program): Define new structs/functions.
50         * compile/compile-cplus-symmbols.c: New file.
51         * compile/compile-cplus-types.c: New file.
52         * compile/compile-cplus.h: New file.
53         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
54         Declare.
55         * compile/compile-object-load.c (get_out_value_type): Use
56         strncmp_iw when comparing symbol names.
57         (compile_object_load): Add mst_bss and mst_data.
58         * compile/compile.c (_initialize_compile): Remove
59         -Wno-implicit-function-declaration from `compile_args'.
60         * compile/gcc-cp-plugin.h: New file.
61         * NEWS: Mention C++ compile support and new debug options.
62
63 2018-08-29  Keith Seitz  <keiths@redhat.com>
64
65         * linespec.c (collect_info::add_symbol): Make virtual.
66         (struct symbol_searcher_collect_info): New struct.
67         (symbol_searcher::find_all_symbols): New method.
68         * symtab.h (class symbol_searcher): New class.
69
70 2018-08-29  Keith Seitz  <keiths@redhat.com>
71
72         * linespec.c (struct linespec) <function_symbols, label_symbols>:
73         Change to vector of block_symbol.  Update all users.
74         (struct collect_info) <symbols>: Likewise.
75         (collect_info::add_symbol): Take block_symbol as argument.
76         Update all callers.
77         (decode_compound_collector) <m_symbols>: Change type to vector
78         of block_symbol.  Update all users.
79         (decode_compound_collector::operator ()): Change parameter type
80         to block_symbol.
81         (find_method, find_function_symbols, find_linespec_symbols)
82         (find_label_symbols_in_block, find_label_symbols): Change symbol
83         vectors to block_symbol vectors.
84         * symtab.h (symbol_found_callback_ftype): Change parameter type to
85         block_symbol.
86
87 2018-08-29  Keith Seitz  <keiths@redhat.com>
88
89         * linespec.c (symbolp): Remove typedef and VEC definitions.
90         (bound_minimal_symbol_d): Likewise.
91
92 2018-08-29  Keith Seitz  <keiths@redhat.com>
93
94         * linespec.c (decode_compound_collector::decode_compound_collector):
95         Remove initialization for `m_symtabs'.
96         (decode_compound_collector::release_symbols): Change return type
97         to std::vector.  Update all callers.
98         (class decode_compound_collector) <m_symbols>: Change type to
99         std::vector.
100         (lookup_prefix_sym): Change return type to std::vector.  Update all
101         callers.
102         (compare_symbols): Remove.
103         (std_compare_symbols): Rename to `compare_symbols'.
104         (find_method): Change `sym_classes' parameter to std::vector.
105         Update all callers.  Use std::sort to sort sym_classes.
106         (find_linespec_symbols): Remove cleanup.
107
108 2018-08-29  Keith Seitz  <keiths@redhat.com>
109
110         * linespec.c (struct linespec) <minimal_symbols>: Change type to
111         std::vector.  Update all users.
112         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
113         (struct collect_info) <minimal_symbols>: Likewise.
114         (compare_msymbols): Return bool.  Change parameters to const
115         bound_minimal_symbol references.
116         (find_method, find_function_symbols, find_linespec_symbols): Change
117         `minsyms' parameter to std::vector.  Update all callers.
118
119 2018-08-29  Keith Seitz  <keiths@redhat.com>
120
121         * linespec.c (struct linespec) <label_symbols>: Change type to
122         std::vector.  Update all users.
123         (find_label_symbols_in_block): Change `result' parameter to
124         std::vector.  Update all callers.
125         (find_label_symbols): Return std::vector.  Update all callers.
126
127 2018-08-29  Keith Seitz  <keiths@redhat.com>
128
129         * linespec.c (struct linespec) <function_symbols>: Change type to
130         std::vector.  Update all users.
131         (struct collect_info) <function_symbols>: Likewise.
132         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
133         (std_compare_symbols): New function.
134         (find_method, find_function_symbols, find_linespec_symbols)
135         (find_label_symbols_in_block): Change `symbols' parameter to
136         std::vector.  Update all callers.
137         (find_label_symbols): Likewise for `function_symbols' and
138         `label_funcs_ret'.
139
140 2018-08-29  Keith Seitz  <keiths@redhat.com>
141
142         * linespec.c (symtab_vector_up): Define.
143         (struct linespec) <file_symtabs>: Change type to std::vector *.
144         Update all uses.
145         (struct collect_info) <file_symtabs>: Likewise.
146         (collect_symtabs_from_filename): Return symtab_vector_up.
147         Update all callers.
148         (decode_objc): Remove cleanup.
149         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
150         (symtab_collector::release_symtabs): Return symtab_vector_up.
151         Update all callers.
152         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
153         Update all users.
154         (collect_symtabs_from_filename, symtabs_from_filename): Return
155         symtab_vector_up.  Update all callers.
156
157 2018-08-29  Tom Tromey  <tom@tromey.com>
158
159         * csky-tdep.c (csky_analyze_prologue): Use
160         core_addr_to_string_nz.
161
162 2018-08-29  Tom Tromey  <tom@tromey.com>
163
164         * windows-nat.c (struct xlate_exception) <them>: Change type to
165         DWORD.
166         (xlate): Fix formatting.  Remove last entry.
167         (struct xlate_exception, xlate): Comment out.
168         (windows_nat_target::resume): Use ranged for.
169
170 2018-08-29  Jim Wilson  <jimw@sifive.com>
171
172         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
173         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
174         of NT_PRFPREG.
175         (riscv_linux_nat_target::store_registers): Likewise.
176
177 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
178
179         PR gdb/23555
180         PR gdb/23558
181         * gnulib/aclocal.m4: Regenerate.
182         * gnulib/config.in: Regenerate.
183         * gnulib/configure: Regenerate.
184         * gnulib/import/Makefile.am: Update.
185         * gnulib/import/Makefile.in: Update.
186         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
187         * gnulib/import/_Noreturn.h: ... this.
188         * gnulib/import/alloca.in.h: Update.
189         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
190         * gnulib/import/arg-nonnull.h: ... this.
191         * gnulib/import/assure.h: Update.
192         * gnulib/import/at-func.c: Update.
193         * gnulib/import/basename-lgpl.c: Update.
194         * gnulib/import/extra/snippet/c++defs.h: Rename to...
195         * gnulib/import/c++defs.h: ... this.
196         * gnulib/import/canonicalize-lgpl.c: Update.
197         * gnulib/import/cdefs.h: Update.
198         * gnulib/import/chdir-long.c: Update.
199         * gnulib/import/chdir-long.h: Update.
200         * gnulib/import/cloexec.c: Update.
201         * gnulib/import/cloexec.h: Update.
202         * gnulib/import/close.c: Update.
203         * gnulib/import/closedir.c: Update.
204         * gnulib/import/config.charset: Update.
205         * gnulib/import/dirent-private.h: Update.
206         * gnulib/import/dirent.in.h: Update.
207         * gnulib/import/dirfd.c: Update.
208         * gnulib/import/dirname-lgpl.c: Update.
209         * gnulib/import/dirname.h: Update.
210         * gnulib/import/dosname.h: Update.
211         * gnulib/import/dup-safer-flag.c: Update.
212         * gnulib/import/dup-safer.c: Update.
213         * gnulib/import/dup.c: Update.
214         * gnulib/import/dup2.c: Update.
215         * gnulib/import/errno.in.h: Update.
216         * gnulib/import/error.c: Update.
217         * gnulib/import/error.h: Update.
218         * gnulib/import/exitfail.c: Update.
219         * gnulib/import/exitfail.h: Update.
220         * gnulib/import/extra/update-copyright: Update.
221         * gnulib/import/fchdir.c: Update.
222         * gnulib/import/fcntl.c: Update.
223         * gnulib/import/fcntl.in.h: Update.
224         * gnulib/import/fd-hook.c: Update.
225         * gnulib/import/fd-hook.h: Update.
226         * gnulib/import/fd-safer-flag.c: Update.
227         * gnulib/import/fd-safer.c: Update.
228         * gnulib/import/fdopendir.c: Update.
229         * gnulib/import/filename.h: Update.
230         * gnulib/import/filenamecat-lgpl.c: Update.
231         * gnulib/import/filenamecat.h: Update.
232         * gnulib/import/flexmember.h: Update.
233         * gnulib/import/float+.h: Update.
234         * gnulib/import/float.c: Update.
235         * gnulib/import/float.in.h: Update.
236         * gnulib/import/fnmatch.c: Update.
237         * gnulib/import/fnmatch.in.h: Update.
238         * gnulib/import/fnmatch_loop.c: Update.
239         * gnulib/import/fpucw.h: Update.
240         * gnulib/import/frexp.c: Update.
241         * gnulib/import/frexpl.c: Update.
242         * gnulib/import/fstat.c: Update.
243         * gnulib/import/fstatat.c: Update.
244         * gnulib/import/getcwd-lgpl.c: Update.
245         * gnulib/import/getcwd.c: Update.
246         * gnulib/import/getdtablesize.c: Update.
247         * gnulib/import/getlogin_r.c: Update.
248         * gnulib/import/getprogname.c: Update.
249         * gnulib/import/getprogname.h: Update.
250         * gnulib/import/gettext.h: Update.
251         * gnulib/import/gettimeofday.c: Update.
252         * gnulib/import/glob-libc.h: Update.
253         * gnulib/import/glob.c: Update.
254         * gnulib/import/glob.in.h: Update.
255         * gnulib/import/glob_internal.h: Update.
256         * gnulib/import/glob_pattern_p.c: Update.
257         * gnulib/import/globfree.c: Update.
258         * gnulib/import/hard-locale.c: Update.
259         * gnulib/import/hard-locale.h: Update.
260         * gnulib/import/intprops.h: Update.
261         * gnulib/import/inttypes.in.h: Update.
262         * gnulib/import/isnan.c: Update.
263         * gnulib/import/isnand-nolibm.h: Update.
264         * gnulib/import/isnand.c: Update.
265         * gnulib/import/isnanl-nolibm.h: Update.
266         * gnulib/import/isnanl.c: Update.
267         * gnulib/import/itold.c: Update.
268         * gnulib/import/libc-config.h: Update.
269         * gnulib/import/limits.in.h: Update.
270         * gnulib/import/localcharset.c: Update.
271         * gnulib/import/localcharset.h: Update.
272         * gnulib/import/localtime-buffer.c: Update.
273         * gnulib/import/localtime-buffer.h: Update.
274         * gnulib/import/lstat.c: Update.
275         * gnulib/import/m4/00gnulib.m4: Update.
276         * gnulib/import/m4/__inline.m4: Update.
277         * gnulib/import/m4/absolute-header.m4: Update.
278         * gnulib/import/m4/alloca.m4: Update.
279         * gnulib/import/m4/builtin-expect.m4: Update.
280         * gnulib/import/m4/canonicalize.m4: Update.
281         * gnulib/import/m4/chdir-long.m4: Update.
282         * gnulib/import/m4/close.m4: Update.
283         * gnulib/import/m4/closedir.m4: Update.
284         * gnulib/import/m4/configmake.m4: Update.
285         * gnulib/import/m4/d-ino.m4: Update.
286         * gnulib/import/m4/d-type.m4: Update.
287         * gnulib/import/m4/dirent_h.m4: Update.
288         * gnulib/import/m4/dirfd.m4: Update.
289         * gnulib/import/m4/dirname.m4: Update.
290         * gnulib/import/m4/double-slash-root.m4: Update.
291         * gnulib/import/m4/dup.m4: Update.
292         * gnulib/import/m4/dup2.m4: Update.
293         * gnulib/import/m4/eealloc.m4: Update.
294         * gnulib/import/m4/environ.m4: Update.
295         * gnulib/import/m4/errno_h.m4: Update.
296         * gnulib/import/m4/error.m4: Update.
297         * gnulib/import/m4/exponentd.m4: Update.
298         * gnulib/import/m4/exponentl.m4: Update.
299         * gnulib/import/m4/extensions.m4: Update.
300         * gnulib/import/m4/extern-inline.m4: Update.
301         * gnulib/import/m4/fchdir.m4: Update.
302         * gnulib/import/m4/fcntl-o.m4: Update.
303         * gnulib/import/m4/fcntl.m4: Update.
304         * gnulib/import/m4/fcntl_h.m4: Update.
305         * gnulib/import/m4/fdopendir.m4: Update.
306         * gnulib/import/m4/filenamecat.m4: Update.
307         * gnulib/import/m4/flexmember.m4: Update.
308         * gnulib/import/m4/float_h.m4: Update.
309         * gnulib/import/m4/fnmatch.m4: Update.
310         * gnulib/import/m4/fnmatch_h.m4: Update.
311         * gnulib/import/m4/fpieee.m4: Update.
312         * gnulib/import/m4/frexp.m4: Update.
313         * gnulib/import/m4/frexpl.m4: Update.
314         * gnulib/import/m4/fstat.m4: Update.
315         * gnulib/import/m4/fstatat.m4: Update.
316         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
317         * gnulib/import/m4/getcwd-path-max.m4: Update.
318         * gnulib/import/m4/getcwd.m4: Update.
319         * gnulib/import/m4/getdtablesize.m4: Update.
320         * gnulib/import/m4/getlogin.m4: Update.
321         * gnulib/import/m4/getlogin_r.m4: Update.
322         * gnulib/import/m4/getpagesize.m4: Update.
323         * gnulib/import/m4/getprogname.m4: Update.
324         * gnulib/import/m4/gettimeofday.m4: Update.
325         * gnulib/import/m4/glibc21.m4: Update.
326         * gnulib/import/m4/glob.m4: Update.
327         * gnulib/import/m4/glob_h.m4: Update.
328         * gnulib/import/m4/gnulib-cache.m4: Update.
329         * gnulib/import/m4/gnulib-common.m4: Update.
330         * gnulib/import/m4/gnulib-comp.m4: Update.
331         * gnulib/import/m4/gnulib-tool.m4: Update.
332         * gnulib/import/m4/hard-locale.m4: Update.
333         * gnulib/import/m4/include_next.m4: Update.
334         * gnulib/import/m4/inttypes-pri.m4: Update.
335         * gnulib/import/m4/inttypes.m4: Update.
336         * gnulib/import/m4/isnand.m4: Update.
337         * gnulib/import/m4/isnanl.m4: Update.
338         * gnulib/import/m4/largefile.m4: Update.
339         * gnulib/import/m4/limits-h.m4: Update.
340         * gnulib/import/m4/localcharset.m4: Update.
341         * gnulib/import/m4/locale-fr.m4: Update.
342         * gnulib/import/m4/locale-ja.m4: Update.
343         * gnulib/import/m4/locale-zh.m4: Update.
344         * gnulib/import/m4/localtime-buffer.m4: Update.
345         * gnulib/import/m4/longlong.m4: Update.
346         * gnulib/import/m4/lstat.m4: Update.
347         * gnulib/import/m4/malloc.m4: Update.
348         * gnulib/import/m4/malloca.m4: Update.
349         * gnulib/import/m4/math_h.m4: Update.
350         * gnulib/import/m4/mbrtowc.m4: Update.
351         * gnulib/import/m4/mbsinit.m4: Update.
352         * gnulib/import/m4/mbsrtowcs.m4: Update.
353         * gnulib/import/m4/mbstate_t.m4: Update.
354         * gnulib/import/m4/memchr.m4: Update.
355         * gnulib/import/m4/memmem.m4: Update.
356         * gnulib/import/m4/mempcpy.m4: Update.
357         * gnulib/import/m4/memrchr.m4: Update.
358         * gnulib/import/m4/mkdir.m4: Update.
359         * gnulib/import/m4/mkstemp.m4: Update.
360         * gnulib/import/m4/mmap-anon.m4: Update.
361         * gnulib/import/m4/mode_t.m4: Update.
362         * gnulib/import/m4/msvc-inval.m4: Update.
363         * gnulib/import/m4/msvc-nothrow.m4: Update.
364         * gnulib/import/m4/multiarch.m4: Update.
365         * gnulib/import/m4/nocrash.m4: Update.
366         * gnulib/import/m4/off_t.m4: Update.
367         * gnulib/import/m4/onceonly.m4: Update.
368         * gnulib/import/m4/open-cloexec.m4: Update.
369         * gnulib/import/m4/open.m4: Update.
370         * gnulib/import/m4/openat.m4: Update.
371         * gnulib/import/m4/opendir.m4: Update.
372         * gnulib/import/m4/pathmax.m4: Update.
373         * gnulib/import/m4/rawmemchr.m4: Update.
374         * gnulib/import/m4/readdir.m4: Update.
375         * gnulib/import/m4/readlink.m4: Update.
376         * gnulib/import/m4/realloc.m4: Update.
377         * gnulib/import/m4/rename.m4: Update.
378         * gnulib/import/m4/rewinddir.m4: Update.
379         * gnulib/import/m4/rmdir.m4: Update.
380         * gnulib/import/m4/save-cwd.m4: Update.
381         * gnulib/import/m4/secure_getenv.m4: Update.
382         * gnulib/import/m4/setenv.m4: Update.
383         * gnulib/import/m4/signal_h.m4: Update.
384         * gnulib/import/m4/ssize_t.m4: Update.
385         * gnulib/import/m4/stat-time.m4: Update.
386         * gnulib/import/m4/stat.m4: Update.
387         * gnulib/import/m4/std-gnu11.m4: Update.
388         * gnulib/import/m4/stdbool.m4: Update.
389         * gnulib/import/m4/stddef_h.m4: Update.
390         * gnulib/import/m4/stdint.m4: Update.
391         * gnulib/import/m4/stdio_h.m4: Update.
392         * gnulib/import/m4/stdlib_h.m4: Update.
393         * gnulib/import/m4/strchrnul.m4: Update.
394         * gnulib/import/m4/strdup.m4: Update.
395         * gnulib/import/m4/strerror.m4: Update.
396         * gnulib/import/m4/string_h.m4: Update.
397         * gnulib/import/m4/strstr.m4: Update.
398         * gnulib/import/m4/strtok_r.m4: Update.
399         * gnulib/import/m4/sys_socket_h.m4: Update.
400         * gnulib/import/m4/sys_stat_h.m4: Update.
401         * gnulib/import/m4/sys_time_h.m4: Update.
402         * gnulib/import/m4/sys_types_h.m4: Update.
403         * gnulib/import/m4/tempname.m4: Update.
404         * gnulib/import/m4/time_h.m4: Update.
405         * gnulib/import/m4/unistd-safer.m4: Update.
406         * gnulib/import/m4/unistd_h.m4: Update.
407         * gnulib/import/m4/warn-on-use.m4: Update.
408         * gnulib/import/m4/wchar_h.m4: Update.
409         * gnulib/import/m4/wchar_t.m4: Update.
410         * gnulib/import/m4/wctype_h.m4: Update.
411         * gnulib/import/m4/wint_t.m4: Update.
412         * gnulib/import/malloc.c: Update.
413         * gnulib/import/malloc/scratch_buffer.h: Update.
414         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
415         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
416         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
417         * gnulib/import/malloca.c: Update.
418         * gnulib/import/malloca.h: Update.
419         * gnulib/import/malloca.valgrind: Update.
420         * gnulib/import/math.in.h: Update.
421         * gnulib/import/mbrtowc.c: Update.
422         * gnulib/import/mbsinit.c: Update.
423         * gnulib/import/mbsrtowcs-impl.h: Update.
424         * gnulib/import/mbsrtowcs-state.c: Update.
425         * gnulib/import/mbsrtowcs.c: Update.
426         * gnulib/import/memchr.c: Update.
427         * gnulib/import/memmem.c: Update.
428         * gnulib/import/mempcpy.c: Update.
429         * gnulib/import/memrchr.c: Update.
430         * gnulib/import/mkdir.c: Update.
431         * gnulib/import/mkstemp.c: Update.
432         * gnulib/import/msvc-inval.c: Update.
433         * gnulib/import/msvc-inval.h: Update.
434         * gnulib/import/msvc-nothrow.c: Update.
435         * gnulib/import/msvc-nothrow.h: Update.
436         * gnulib/import/open.c: Update.
437         * gnulib/import/openat-die.c: Update.
438         * gnulib/import/openat-priv.h: Update.
439         * gnulib/import/openat-proc.c: Update.
440         * gnulib/import/openat.c: Update.
441         * gnulib/import/openat.h: Update.
442         * gnulib/import/opendir.c: Update.
443         * gnulib/import/pathmax.h: Update.
444         * gnulib/import/pipe-safer.c: Update.
445         * gnulib/import/rawmemchr.c: Update.
446         * gnulib/import/readdir.c: Update.
447         * gnulib/import/readlink.c: Update.
448         * gnulib/import/realloc.c: Update.
449         * gnulib/import/ref-add.sin: Update.
450         * gnulib/import/ref-del.sin: Update.
451         * gnulib/import/rename.c: Update.
452         * gnulib/import/rewinddir.c: Update.
453         * gnulib/import/rmdir.c: Update.
454         * gnulib/import/same-inode.h: Update.
455         * gnulib/import/save-cwd.c: Update.
456         * gnulib/import/save-cwd.h: Update.
457         * gnulib/import/scratch_buffer.h: Update.
458         * gnulib/import/secure_getenv.c: Update.
459         * gnulib/import/setenv.c: Update.
460         * gnulib/import/signal.in.h: Update.
461         * gnulib/import/stat-time.c: Update.
462         * gnulib/import/stat-time.h: Update.
463         * gnulib/import/stat-w32.c: Update.
464         * gnulib/import/stat-w32.h: Update.
465         * gnulib/import/stat.c: Update.
466         * gnulib/import/stdbool.in.h: Update.
467         * gnulib/import/stddef.in.h: Update.
468         * gnulib/import/stdint.in.h: Update.
469         * gnulib/import/stdio.in.h: Update.
470         * gnulib/import/stdlib.in.h: Update.
471         * gnulib/import/str-two-way.h: Update.
472         * gnulib/import/strchrnul.c: Update.
473         * gnulib/import/strdup.c: Update.
474         * gnulib/import/streq.h: Update.
475         * gnulib/import/strerror-override.c: Update.
476         * gnulib/import/strerror-override.h: Update.
477         * gnulib/import/strerror.c: Update.
478         * gnulib/import/string.in.h: Update.
479         * gnulib/import/stripslash.c: Update.
480         * gnulib/import/strnlen1.c: Update.
481         * gnulib/import/strnlen1.h: Update.
482         * gnulib/import/strstr.c: Update.
483         * gnulib/import/strtok_r.c: Update.
484         * gnulib/import/sys_stat.in.h: Update.
485         * gnulib/import/sys_time.in.h: Update.
486         * gnulib/import/sys_types.in.h: Update.
487         * gnulib/import/tempname.c: Update.
488         * gnulib/import/tempname.h: Update.
489         * gnulib/import/time.in.h: Update.
490         * gnulib/import/unistd--.h: Update.
491         * gnulib/import/unistd-safer.h: Update.
492         * gnulib/import/unistd.in.h: Update.
493         * gnulib/import/unsetenv.c: Update.
494         * gnulib/import/verify.h: Update.
495         * gnulib/import/extra/snippet/warn-on-use.h: Update.
496         * gnulib/import/wchar.in.h: Update.
497         * gnulib/import/wctype.in.h: Update.
498         * gnulib/import/xalloc-oversized.h: Update.
499         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
500         "53e2c179f26a890fa6685af4b6c1397ee370433b".
501
502 2018-08-16  Gary Benson <gbenson@redhat.com>
503
504         PR gdb/13000:
505         * gdb/main.c (captured_main_1): Exit with nonzero status
506         in batch mode if the last command to be executed failed.
507         * NEWS: Mention the above.
508
509 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
510
511         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
512         end of warning message.
513
514 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
515
516         PR gdb/22943:
517         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
518         (aarch64_extract_return_value): Use
519         aapcs_is_vfp_call_or_return_candidate.
520         (aarch64_return_in_memory): Likewise.
521         (aarch64_store_return_value): Likewise.
522
523 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
524
525         * aarch64-tdep.c
526         (aapcs_is_vfp_call_or_return_candidate): Make static
527         (pass_in_v_or_stack): Remove function.
528         (pass_in_v_vfp_candidate): New function.
529         (aarch64_push_dummy_call): Check for float register candidates.
530
531 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
532
533         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
534         (aapcs_is_vfp_call_or_return_candidate_1): New function.
535         (aapcs_is_vfp_call_or_return_candidate): Likewise.
536
537 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
538
539         PR build/23399
540         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
541         (struct ipa_sym_addresses): Rename to...
542         (struct ipa_sym_addresses_common): ... this.
543         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
544
545 2018-08-28  Tom Tromey  <tom@tromey.com>
546
547         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
548         (token_fifo): Now a std::vector.
549         (yylex, c_parse): Update.
550         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
551         (token_fifo): Now a std::vector.
552         (yylex, d_parse): Update.
553         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
554         (token_fifo): Now a std::vector.
555         (yylex, go_parse): Update.
556
557 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
558
559         * parser-defs.h (struct type_stack) <elements>: Change type to
560         std::vector<union type_stack_elt>.
561         <depth, size>: Remove.
562         * parse.c (parse_exp_in_context_1): Adjust.
563         (type_stack_reserve): Remove.
564         (check_type_stack_depth): Remove.
565         (insert_into_type_stack): Adjust to std::vector.
566         (insert_type): Likewise.
567         (push_type): Likewise.
568         (push_type_int): Likewise.
569         (insert_type_address_space): Likewise.
570         (pop_type): Likewise.
571         (pop_type_int): Likewise.
572         (pop_typelist): Likewise.
573         (pop_type_stack): Likewise.
574         (append_type_stack): Likewise.
575         (push_type_stack): Likewise.
576         (get_type_stack): Likewise.
577         (type_stack_cleanup): Likewise.
578         (push_typelist): Likewise.
579         (follow_types): Likewise.
580         (_initialize_parse): Likewise.
581
582 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
583
584         * NEWS: Mention csky target.
585
586 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
587             Hafiz Abid Qadeer  <abidh@codesourcery.com>
588             Don Breazeal  <donb@codesourcery.com>
589
590         * csky-linux-tdep.c: New file.
591         * csky-tdep.c: Likewise.
592         * csky-tdep.h: Likewise.
593         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
594         csky-tdep.o.
595         (HFILES_NO_SRCDIR): Add csky-tdep.h.
596         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
597         * configure.tgt: Add csky support.
598
599 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
600
601         * python/py-framefilter.c (py_print_frame): Print frame architecture
602         when printing on an MI output.
603
604 2018-08-27  Tom Tromey  <tom@tromey.com>
605
606         PR build/23087:
607         * configure: Rebuild.
608         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
609
610 2018-08-27  Tom Tromey  <tom@tromey.com>
611
612         * aarch64-linux-tdep.c
613         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
614         casts to int.
615
616 2018-08-27  Tom Tromey  <tom@tromey.com>
617
618         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
619         unsigned.
620         (ppc64_standard_linkage1, ppc64_standard_linkage2)
621         (ppc64_standard_linkage3, ppc64_standard_linkage4)
622         (ppc64_standard_linkage5, ppc64_standard_linkage6)
623         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
624         unsigned.
625
626 2018-08-27  Tom Tromey  <tom@tromey.com>
627
628         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
629         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
630
631 2018-08-27  Tom Tromey  <tom@tromey.com>
632
633         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
634         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
635         ULONGEST_MAX.
636         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
637         ULONGEST_MAX.
638         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
639         ULONGEST_MAX.
640         * sparc-linux-tdep.c (sparc32_linux_sigframe)
641         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
642         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
643         ULONGEST_MAX.
644         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
645         (ppc64_linux_sigaction_tramp_frame)
646         (ppc32_linux_sighandler_tramp_frame)
647         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
648         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
649         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
650         * mn10300-linux-tdep.c (am33_linux_sigframe)
651         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
652         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
653         * mips-linux-tdep.c (mips_linux_o32_sigframe)
654         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
655         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
656         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
657         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
658         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
659         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
660         * microblaze-linux-tdep.c
661         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
662         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
663         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
664         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
665         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
666         * common/common-types.h (ULONGEST_MAX): New define.
667         (CORE_ADDR_MAX): Fix formatting.
668         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
669         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
670         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
671         (arm_linux_rt_sigreturn_tramp_frame)
672         (arm_eabi_linux_sigreturn_tramp_frame)
673         (arm_eabi_linux_rt_sigreturn_tramp_frame)
674         (thumb2_eabi_linux_sigreturn_tramp_frame)
675         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
676         (arm_linux_restart_syscall_tramp_frame)
677         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
678         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
679         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
680         ULONGEST_MAX.
681         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
682
683 2018-08-27  Tom Tromey  <tom@tromey.com>
684
685         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
686         CORE_ADDR_MAX.
687         * mips-tdep.c (mips_deal_with_atomic_sequence)
688         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
689         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
690         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
691         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
692         CORE_ADDR_MAX.
693         * aarch64-tdep.c (aarch64_software_single_step): Use
694         CORE_ADDR_MAX.
695
696 2018-08-27  Tom Tromey  <tom@tromey.com>
697
698         * linespec.c (complete_linespec_component): Add cast to "char".
699         * completer.c (completion_tracker::build_completion_result): Add
700         cast to "char".
701
702 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
703
704         * solist.h (struct solist, struct target_so_ops): Fix
705         indentation.
706
707 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
708
709         * ada-tasks.c (ada_task_info_s): Remove typedef.
710         (DEF_VEC_O(ada_task_info_s)): Remove.
711         (struct ada_tasks_inferior_data): Initialize fields.
712         <task_list>: Make an std::vector.
713         (get_ada_tasks_inferior_data): Allocate with new.
714         (ada_get_task_number): Adjust.
715         (get_task_number_from_id): Likewise.
716         (valid_task_id): Likewise.
717         (ada_get_task_info_from_ptid): Likewise.
718         (iterate_over_live_ada_tasks): Likewise.
719         (add_ada_task): Likewise.
720         (read_known_tasks): Likewise.
721         (ada_build_task_list): Likewise.
722         (print_ada_task_info): Likewise.
723         (info_task): Likewise.
724         (task_command_1): Likewise.
725
726 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
727
728         * ada-lang.c (add_angle_brackets): Return std::string.
729
730 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
731
732         * python/py-threadevent.c (py_get_event_thread): Initialize
733         pythread.
734
735 2018-08-24  Pedro Alves  <palves@redhat.com>
736
737         * python/py-bpevent.c (create_breakpoint_event_object): Use
738         copy-initialization.
739         * python/py-continueevent.c (emit_continue_event): Use
740         copy-initialization.
741         * python/py-exitedevent.c (create_exited_event_object): Return a
742         gdbpy_ref<>.
743         (emit_exited_event): Use copy-initialization.
744         * python/py-inferior.c (python_new_inferior)
745         (python_inferior_deleted, add_thread_object): Use
746         copy-initialization.
747         * python/py-infevents.c (create_inferior_call_event_object)
748         (create_register_changed_event_object)
749         (create_memory_changed_event_object): Return a gdbpy_ref<>.
750         (emit_inferior_call_event, emit_memory_changed_event)
751         (emit_register_changed_event): Use copy-initialization.
752         * python/py-newobjfileevent.c (create_new_objfile_event_object):
753         Return a gdbpy_ref<>.
754         (emit_new_objfile_event): Use copy-initialization.
755         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
756         (emit_clear_objfiles_event): Use copy-initialization.
757         * python/py-signalevent.c (create_signal_event_object): Use
758         copy-initialization.
759         * python/py-threadevent.c (create_thread_event_object): Use
760         copy-initialization.
761
762 2018-08-24  Pedro Alves  <palves@redhat.com>
763             Simon Marchi  <simon.marchi@ericsson.com>
764
765         PR gdb/23379
766         * python/py-continueevent.c: Include "gdbthread.h".
767         (create_continue_event_object): Add intro comment.  Add 'ptid'
768         parameter.  Use it to find thread to pass to
769         create_thread_event_object.
770         (emit_continue_event): Pass PTID down to
771         create_continue_event_object.
772         * python/py-event.h (py_get_event_thread): Declare.
773         (create_thread_event_object): Remove default from 'thread'
774         parameter.
775         * python/py-stopevent.c (create_stop_event_object): Use
776         py_get_event_thread.
777         * python/py-threadevent.c (get_event_thread): Rename to ...
778         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
779         and use it to find the thread.
780         (create_thread_event_object): Assert that THREAD isn't null.
781         Don't find the event thread here.
782
783 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
784
785         * block.h (blockrange, blockranges): New struct declarations.
786         (struct block): Add new field named `ranges'.
787         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
788         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
789         macros for accessing ranges in struct block.
790         (make_blockranges): New declaration.
791         block.c (make_blockranges): New function.
792         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
793         for block.
794         * symtab.h (find_pc_partial_function): Add new parameter `block'.
795         * blockframe.c (cache_pc_function_block): New static global.
796         (clear_pc_function_cache): Clear cache_pc_function_block.
797         (find_pc_partial_function): Move comment to symtab.h.  Add
798         support for non-contiguous blocks.
799         * cli/cli-cmds.c (block.h): Include.
800         (print_disassembly): Handle printing of non-contiguous blocks.
801         (disassemble_current_function): Likewise.
802         (disassemble_command): Likewise.
803
804         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
805         BLOCK_START.
806         * blockframe.c (get_pc_function_start): Likewise.
807         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
808         (gcc_symbol_address): Likewise.
809         * compile/compile-object-run.c (compile_object_run): Likewise.
810         * compile/compile.c (get_expr_block_and_pc): Likewise.
811         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
812         (func_addr_to_tail_call_list): Likewise.
813         * findvar.c (default_read_var_value): Likewise.
814         * inline-frame.c (inline_frame_this_id): Likewise.
815         (skip-inline_frames): Likewise.
816         * infcmd.c (until_next_command): Likewise.
817         * linespec.c (convert_linespec_to_sals): Likewise.
818         * parse.c (parse_exp_in_context_1): Likewise.
819         * printcmd.c (build_address_symbolic): likewise.
820         (info_address_command): Likewise.
821         symtab.c (find_function_start_sal): Likewise.
822         (skip_prologue_sal): Likewise.
823         (find_function_alias_target): Likewise.
824         (find_gnu_ifunc): Likewise.
825         * stack.c (find_frame_funname): Likewise.
826         * symtab.c (fixup_symbol_section): Likewise.
827         (find_function_start_sal): Likewise.
828         (skip_prologue_sal): Likewsie.
829         (find_function_alias_target): Likewise.
830         (find_gnu_ifunc): Likewise.
831         * tracepoint.c (info_scope_command): Likewise.
832         * value.c (value_fn_field): Likewise.
833
834         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
835         in place of find_pc_partial_function.
836         * blockframe.c (find_function_entry_range_from_pc): New function.
837         * symtab.h (find_function_entry_range_from_pc): Declare and document.
838         * objfiles.c (objfile_relocate1): Relocate start and end addresses
839         for each range in a block.
840
841
842 2018-08-23  Xavier Roirand  <roirand@adacore.com>
843
844         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
845         incrementation.
846
847 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
848
849         * solib-svr4.c (read_program_headers_from_bfd): Return
850         gdb::optional<gdb::byte_vector>.
851         (svr4_exec_displacement): Adjust.
852
853 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
854
855         * solib-svr4.c (read_program_header): Return
856         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
857         (find_program_interpreter): Return
858         gdb::optional<gdb::byte_vector>.
859         (scan_dyntag_auxv): Adjust.
860         (enable_break): Adjust.
861         (svr4_exec_displacement): Adjust.
862
863 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
864
865         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
866         * inf-child.c (inf_child_target::terminal_save_inferior): New.
867
868 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
869
870         * guile/scm-string.c (gdbscm_scm_from_printf): Use
871         string_vprintf.
872         * guile/scm-utils.c (gdbscm_printf): Likewise.
873         * serial.c (serial_printf): Likewise.
874         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
875
876 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
877
878         * stack.c (print_frame): Print frame architecture when printing on
879         an MI output.
880         * NEWS: Mention new "arch" attribute in frame output.
881
882 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
883
884         * arch/aarch64.h (aarch64_regnum): Update comment.
885
886 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
887
888         * NEWS: Add SVE to 8.2 section.
889
890 2018-08-21  Pedro Alves  <palves@redhat.com>
891
892         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
893         out from gdbscm_parse_function_args.
894         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
895         gdbscm_parse_function_args_1.
896
897 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
898
899         PR gdb/17816
900         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
901         operator.
902
903 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
904
905         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
906
907 2018-08-19  Michael Spang  <spang@google.com>
908
909         PR gdb/11786
910         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
911         for PT_TLS segments.
912
913 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
914
915         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
916         dwarf_variable_value.
917         * dwarf2-frame.c (class dwarf_expr_executor):
918         Add override for dwarf_variable_value.
919         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
920         (class symbol_needs_eval_context): Likewise.
921         (indirect_synthetic_pointer): Add forward declaration.
922         (sect_variable_value): New function.
923         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
924         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
925         for DW_OP_GNU_variable_value.
926
927 2018-08-16  Tom Tromey  <tom@tromey.com>
928
929         * top.c (read_command_file): Update.
930         (command_line_input): Remove "repeat" argument.
931         * ada-lang.c (get_selections): Update.
932         * linespec.c (decode_line_2): Update.
933         * defs.h (command_line_input): Remove argument.
934         * cli/cli-script.c (read_next_line): Update.
935         * python/py-gdb-readline.c: Update.
936
937 2018-08-17  Tom Tromey  <tom@tromey.com>
938
939         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
940         command_line_input.
941
942 2018-08-15  Tom Tromey  <tom@tromey.com>
943
944         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
945
946 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
947
948         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
949         If used, use find_pc_partial_function to find address range
950         to disassemble.
951         * mi/mi-main.c (mi_cmd_list_features): Report
952         "data-disassemble-a-option" feature.
953         * NEWS: Mention new -data-disassemble option -a.
954
955 2018-08-13  Tom Tromey  <tom@tromey.com>
956
957         * common/common-defs.h (_FORTIFY_SOURCE): Define.
958
959 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
960
961         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
962         (aarch64_linux_collect_sve_regset): Likewise.
963         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
964         * regcache.h (regcache_map_entry_size): New function.
965
966 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
967
968         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
969         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
970         (SVE_HEADER_VL_LENGTH): Likewise.
971         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
972         (SVE_HEADER_FLAGS_LENGTH): Likewise.
973         (SVE_HEADER_RESERVED_LENGTH): Likewise.
974         (SVE_HEADER_SIZE_OFFSET): Likewise.
975         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
976         (SVE_HEADER_VL_OFFSET): Likewise.
977         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
978         (SVE_HEADER_FLAGS_OFFSET): Likewise.
979         (SVE_HEADER_RESERVED_OFFSET): Likewise.
980         (SVE_HEADER_SIZE): Likewise.
981         (aarch64_linux_core_read_vq): Add function.
982         (aarch64_linux_core_read_description): Check for SVE section.
983
984 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
985
986         * aarch64-fbsd-tdep.c
987         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
988         collect_size.
989         * aarch64-linux-tdep.c
990         (aarch64_linux_iterate_over_regset_sections): Likewise.
991         * alpha-linux-tdep.c
992         (alpha_linux_iterate_over_regset_sections):
993         * alpha-nbsd-tdep.c
994         (alphanbsd_iterate_over_regset_sections): Likewise.
995         * amd64-fbsd-tdep.c
996         (amd64fbsd_iterate_over_regset_sections): Likewise.
997         * amd64-linux-tdep.c
998         (amd64_linux_iterate_over_regset_sections): Likewise.
999         * arm-bsd-tdep.c
1000         (armbsd_iterate_over_regset_sections): Likewise.
1001         * arm-fbsd-tdep.c
1002         (arm_fbsd_iterate_over_regset_sections): Likewise.
1003         * arm-linux-tdep.c
1004         (arm_linux_iterate_over_regset_sections): Likewise.
1005         * corelow.c (get_core_registers_cb): Likewise.
1006         (core_target::fetch_registers): Likewise.
1007         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1008         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1009         * gdbarch.h (void): Regenerate.
1010         * gdbarch.sh: Add supply_size and collect_size.
1011         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1012         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1013         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1014         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1015         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1016         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1017         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1018         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1019         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1020         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1021         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1022         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1023         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1024         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1025         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1026         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1027         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1028         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1029         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1030         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1031         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1032         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1033         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1034         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1035         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1036         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1037         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1038         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1039         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1040         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1041
1042 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1043
1044         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1045         with string_printf.
1046
1047 2018-08-10  Keith Seitz  <keiths@redhat.com>
1048
1049         * compile/compile-c-support.c (add_code_header, add_code_footer):
1050         Move into policy class.
1051         (c_push_user_expression, pop_user_expression_nop)
1052         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1053         (compile_program): New host class.
1054         (c_compile_program): New typedef.
1055         (c_compute_porgram): Use c_compile_program.
1056
1057 2018-08-10  Keith Seitz  <keiths@redhat.com>
1058
1059         * compile/compile-internal.h (compile_instance::~compile_instance):
1060         Remove calls to htab_delete.
1061         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1062         * compile.c (compile_instance::compile_instance): Initialize
1063         htab unique pointers.
1064         (compile_instance::get_cached_type, compile_instance::insert_type)
1065         (compile_instance::error_symbol_once): Update for unique_ptr.
1066
1067 2018-08-10  Keith Seitz  <keiths@redhat.com>
1068
1069         * compile/compile-c-symbols.c (struct symbol_error)
1070         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1071         (compile_instance::insert_symbol_error)
1072         (compile_instance::error_symbol_once): Move to ...
1073         * compile/compile.c: ... here.
1074
1075 2018-08-10  Keith Seitz  <keiths@redhat.com>
1076
1077         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1078         instead of `new_compile_instance'.
1079         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1080         Update description.
1081         If the symbol error map is not initialized, create it.
1082         (generate_c_for_for_one_symbol): Do not check/initialize
1083         the symbol error map.
1084         * compile/compile-c-types.c (compile_c_instance): Make a class.
1085         Update all callers.
1086         (compile_instance::compile_instance): Initialize the type cache.
1087         (get_cached_type): New function.
1088         (insert_type): Update description.
1089         (compile_c_instance::m_default_cflags): Define.
1090         (convert_type): Update description.  Use get_cached_type.
1091         (delete_instance): Moved to destructor.
1092         (new_compile_instance): Moved to constructor.
1093         * compile/compile-c.h (compile_c_instance): Make class inheriting
1094         from compile_instance.
1095         <base>: Remove field.
1096         <type_map, symbol_err_map>: Move to base class.
1097         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1098         * compile/compile-internal.h (compile_instance): Make class.
1099         <type_map_t, symbol_err_map_t>: Define.
1100         <fe>: Rename to `m_gcc_fe'.
1101         <scope, block, gcc_target_options>: Add `m_' prefix.
1102         <m_type_map, m_symbol_err_map>: New fields, moved from
1103         compile_c_instance.
1104         <destroy>: Remove.
1105         (convert_type, new_compile_instance): Remove.
1106         * compile/compile.c (cleanup_compile_instance): Remove.
1107         (compile_to_object): Use unique_ptr to eliminate cleanups.
1108         (compile_instance::set_print_callback, compile_instance::version)
1109         (compile_instance::set_verbose)
1110         (compile_instance::set_driver_filename)
1111         (compile_instance::set_triplet_regexp)
1112         (compile_instance::set_arguments)
1113         (compile_instance::set_source_file)
1114         (compile_instance::compile): Define.
1115
1116 2018-08-10  Keith Seitz  <keiths@redhat.com>
1117
1118         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1119         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1120         gcc-c-fe.def to define C plugin.
1121         (delete_instance): Delete `c_plugin'.
1122         (new_compile_instance): Initialize `c_plugin'.
1123         * compile/compile-c.h: Include gcc_c_plugin.h.
1124         (struct compile_c_instance) <c_plugin>: New member.
1125         * gcc-c-plugin.h: New file.
1126         Update all callers with API change.
1127
1128 2018-08-10  Keith Seitz  <keiths@redhat.com>
1129
1130         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1131         (HFILES_NO_SRCDIR): ... to here.
1132         Add compile-internal.h and compile-c.h.
1133         * compile/compile-c-support.c: Include compile-c.h.
1134         * compile/compile-c-symbols.c: Include compile-c.h.
1135         (generate_c_for_variable_locations): Update comment.
1136         * compile/compile-c-types.c: Include compile-c.h.
1137         * compile/compile-c.h: New file -- moved C language declarations
1138         from other files here.
1139         * compile/compile-internal.h: Do not include hashtab.h or
1140         common/enum-flags.h.
1141         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1142         (gcc_convert_symbol, gcc_symbol_address)
1143         (generate_c_for_variable_locations, c_get_mode_for_size)
1144         (c_get_range_decl_name): Definitions moved to compile-c.h.
1145         * compile/compile-loc2c.c: Include compile-c.h.
1146
1147 2018-08-10  Keith Seitz  <keiths@redhat.com>
1148
1149         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1150         (c_symbol_substitution_name): ... this.
1151         Update all callers.
1152
1153 2018-08-10  Keith Seitz  <keiths@redhat.com>
1154
1155         * compile/compile-c-support.c (c_compute_program): Use
1156         unique_xmalloc_ptr to eliminate cleanup.
1157         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1158         Return a unique_xmalloc_ptr and eliminate cleanup.
1159         * compile/compile-internal.h (generate_c_for_variable_locations):
1160         Return unique_xmalloc_ptr and update description.
1161
1162 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1163
1164         * corelow.c (core_target::get_core_register_section): Rename
1165         min_size to section_min_size.
1166
1167 2018-08-09  Jim Wilson  <jimw@sifive.com>
1168
1169         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1170         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1171         * NEWS: Mention new GNU/Linux RISC-V target.
1172         * configure.host: Add riscv*-*-linux*.
1173         * configure.nat: Add riscv*.
1174         * configure.tgt: Add riscv*-*-linux*.
1175         * riscv-linux-nat.c: New file.
1176         * riscv-linux-tdep.c: New file.
1177
1178 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1179
1180         * infrun.c (resume): Make static, add forward declaration.
1181         (proceed): Update header comment.
1182         * infrun.h (resume): Delete declaration.
1183
1184 2018-08-09  Tom Tromey  <tom@tromey.com>
1185
1186         * riscv-tdep.h: Minor formatting fixes.
1187
1188 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1189
1190         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1191         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1192         (test_mkdir_recursive): Likewise.
1193         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1194
1195 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1196
1197         * valarith.c (value_subscripted_rvalue): If an array is not in
1198         memory, and we don't know the upper bound, then we can't know that
1199         the requested element exists or not.
1200
1201 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1202
1203         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1204         (target_options_to_string): Add comment.
1205
1206 2018-08-08  Tom Tromey  <tom@tromey.com>
1207
1208         * unittests/scoped_mmap-selftests.c: Check result of "write".
1209
1210 2018-08-08  Jim Wilson  <jimw@sifive.com>
1211
1212         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1213         (decode_register_index_short): New.
1214         (decode_j_type_insn, decode_cj_type_insn): New.
1215         (decode_b_type_insn, decode_cb_type_insn): New.
1216         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1217         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1218         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1219         is_c_sw_insn instead of is_sw_insn.
1220         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1221         (riscv_software_single_step): New.
1222         * riscv-tdep.h (riscv_software_single_step): Declare.
1223
1224         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1225         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1226
1227 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1228
1229         PR gdb/18050:
1230         * target.c (dispose_inferior): Don't dispose of inferiors that are
1231         already killed.
1232
1233 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1234
1235         * remote.c (remote_target::download_tracepoint): Change char* to
1236         const char*.
1237
1238 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1239
1240         * target.h (target_options_to_string): Return an std::string.
1241         * target.c (str_comma_list_concat_elem): Return void, use
1242         std::string.
1243         (do_option): Likewise.
1244         (target_options_to_string): Return an std::string.
1245         * linux-nat.c (linux_nat_target::wait): Adjust.
1246         * target-debug.h (target_debug_print_options): Adjust.
1247
1248 2018-08-07  Tom Tromey  <tom@tromey.com>
1249
1250         * Makefile.in (CPPFLAGS): New variable.
1251         (INTERNAL_CPPFLAGS): Use it.
1252
1253 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1254
1255         * NEWS: Mention the index cache.
1256
1257 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1258
1259         * common/pathstuff.h (get_standard_cache_dir): New.
1260         * common/pathstuff.c (get_standard_cache_dir): New.
1261         * build-id.h (build_id_to_string): New.
1262         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1263         DEBUG_STR_SUFFIX): Move to here.
1264         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1265         DEBUG_STR_SUFFIX): Move from there.
1266         (write_psymtabs_to_index): Make non-static, add basename
1267         parameter.  Write to temporary files, rename when done.
1268         (save_gdb_index_command): Adjust call to
1269         write_psymtabs_to_index.
1270         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1271         field.
1272         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1273         (get_gdb_index_contents_from_cache): New.
1274         (get_gdb_index_contents_from_cache_dwz): New.
1275         (dwarf2_initialize_objfile): Read index from cache.
1276         (dwarf2_build_psymtabs): Save to index.
1277         * dwarf-index-cache.h: New file.
1278         * dwarf-index-cache.c: New file.
1279         * dwarf-index-write.h: New file.
1280
1281 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1282
1283         * gnulib/aclocal.m4: Re-generate.
1284         * gnulib/config.in: Re-generate.
1285         * gnulib/configure: Re-generate.
1286         * gnulib/import/Makefile.am: Re-generate.
1287         * gnulib/import/Makefile.in: Re-generate.
1288         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1289         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1290         * gnulib/import/m4/mkdir.m4: New file.
1291         * gnulib/import/mkdir.c: New file.
1292         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1293         module.
1294
1295 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1296
1297         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1298         * common/scoped_mmap.c: New file.
1299         * common/scoped_mmap.h (destroy): New method.
1300         (~scoped_mmap, reset): Use destroy.
1301         (scoped_mmap): New move constructor.
1302         (mmap_file): New declaration.
1303         * unittests/scoped_mmap-selftests.c (test_normal,
1304         test_invalid_filename, run_tests): New functions.
1305         (_initialize_scoped_mmap_selftests): Register selftest.
1306
1307 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1308
1309         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1310         (read_gdb_index_from_buffer): ... this.  Remove section
1311         parameter, add buffer parameter.
1312         (get_gdb_index_contents_ftype,
1313         get_gdb_index_contents_dwz_ftype): New typedefs.
1314         (dwarf2_read_gdb_index): Add callback parameters to get the
1315         index contents.
1316         (get_gdb_index_contents_from_section): New.
1317         (dwarf2_initialize_objfile): Update call to
1318         dwarf2_read_gdb_index.
1319
1320 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1321
1322         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1323         (gdb_open_cloexec): Likewise.
1324         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1325         (commandline_from_pid): Likewise.
1326         (linux_xfer_osdata_threads): Likewise.
1327         (linux_xfer_osdata_fds): Likewise.
1328         * ada-lang.c (is_package_name): Likewise.
1329         * auxv.c (procfs_xfer_auxv): Likewise.
1330         * breakpoint.c (print_one_breakpoint_location): Use
1331         uiout::field_fmt.
1332         (print_one_catch_solib): Use string_printf.
1333         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1334         (add_pe_forwarded_sym): Likewise.
1335         * dwarf2read.c (create_type_unit_group): Likewise.
1336         (build_error_marker_type): Likewise.
1337         * infcall.c (get_function_name): Likewise.
1338         * valprint.c (print_converted_chars_to_obstack): Likewise.
1339         * xtensa-tdep.c (xtensa_register_type): Likewise.
1340
1341 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1342
1343         * remote.c (remote_target::download_tracepoint): Fix format
1344         string errors.
1345
1346 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1347
1348         * tracefile.c: Include common/byte-vector.h.
1349         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1350         with trace_regblock_size if needed.  Update uses of buf.
1351
1352 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1353
1354         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1355         std::vector<unsigned char>.
1356         * tracepoint.c (collection_list::collection_list): Remove
1357         m_regs_mask initializer from initializer list.  Resize
1358         m_regs_mask using the largest remote register number.
1359         (collection_list::add_remote_register): Remove size check on
1360         m_regs_mask.  Use at to access element.
1361         (collection_list::stringify): Change type of temp_buf to
1362         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1363         stringify the register mask.  Use pack_hex_byte for the register
1364         mask.
1365
1366 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1367
1368         * tracepoint.h (class collection_list) <add_register>: Remove.
1369         <add_remote_register, add_ax_registers, add_local_register>:
1370         Declare.
1371         <add_memrange>: Add scope parameter.
1372         * tracepoint.c (encode_actions_1): Likewise.
1373         (collection_list::add_register): Rename to ...
1374         (collection_list::add_remote_register): ... this.  Update
1375         comment.
1376         (collection_list::add_ax_registers, add_local_register): New
1377         methods.
1378         (collection_list::add_memrange): Add scope parameter.  Call
1379         add_local_register instead of add_register.
1380         (finalize_tracepoint_aexpr): New function.
1381         (collection_list::collect_symbol): Update calls to add_memrange.
1382         Call add_local_register instead of add_register.  Call
1383         add_ax_registers.  Call finalize_tracepoint_aexpr.
1384         (encode_actions_1): Get remote regnos for $reg action.  Call
1385         add_remote_register, add_ax_registers, and add_local_register.
1386         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1387         (validate_actionline): Call finalize_tracepoint_aexpr.
1388
1389 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1390
1391         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1392         Replace array buf with gdb::char_vector buf, of size
1393         get_remote_packet_size ().  Replace references to buf and
1394         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1395         and xsnprintf with snprintf.  Raise errors if the buffer is too
1396         small.
1397
1398 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1399
1400         * remote.c (remote_target::download_tracepoint): Fix the has_more
1401         predicate in the QTDP action list iteration.
1402
1403 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1404
1405         * remote.c (remote_target::download_tracepoint): Fix indentation
1406         in for block.
1407
1408 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1409
1410         * proc-api.c (_initialize_proc_api): Remove c, unused.
1411         * procfs.c (procfs_init_inferior): Remove signals, unused.
1412         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1413         unused.
1414
1415 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1416             Andrew Burgess  <andrew.burgess@embecosm.com>
1417
1418         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1419         'W_STOPCODE (0)' as this could be ambiguous.
1420
1421 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1422
1423         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1424         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1425         "ai_socktype").
1426
1427 2018-08-02  Tom Tromey  <tom@tromey.com>
1428
1429         PR symtab/16842.
1430         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1431         symbols.
1432         (process_structure_scope): Likewise.
1433
1434 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1435
1436         PR gdb/22629:
1437         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1438         kill inferior.
1439
1440 2018-08-02  Tom Tromey  <tom@tromey.com>
1441
1442         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1443         (darwin_suspend_inferior, darwin_resume_inferior)
1444         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1445         (darwin_check_new_threads): Check result of get_darwin_inferior.
1446
1447 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1448
1449         GDB 8.1.1 released.
1450
1451 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1452
1453         * varobj.c (varobj_get_path_expr_parent): Report an error if
1454         parent is a dynamic varobj.
1455
1456 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1457
1458         * gnulib/aclocal.m4: Re-generate.
1459         * gnulib/config.in: Re-generate.
1460         * gnulib/configure: Re-generate.
1461         * gnulib/import/Makefile.in: Re-generate.
1462         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1463         * gnulib/import/m4/onceonly.m4: Re-generate.
1464
1465 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1466
1467         * target-descriptions.c (struct xml_test_tdesc): New.
1468         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1469         (record_xml_tdesc): Update.
1470         (maintenance_check_xml_descriptions): Update.
1471         * target-descriptions.h (record_xml_tdesc): Update comment.
1472
1473 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1474
1475         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1476         checking array bounds are defined.
1477
1478 2018-07-30  Tom Tromey  <tom@tromey.com>
1479
1480         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1481         irreflexivity violation.
1482
1483 2018-07-30  Tom Tromey  <tom@tromey.com>
1484
1485         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1486         * value.c (unpack_long): Remove lint code.
1487         * valops.c (value_ind): Remove lint code.
1488         * valarith.c (value_x_binop, value_x_unop, value_equal)
1489         (value_pos): Remove lint code.
1490
1491 2018-07-28  Tom de Vries  <tdevries@suse.de>
1492
1493         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1494         with undefined upper bound as <optimized out>.
1495
1496 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1497
1498         * gcore.in: Rename variable "name" to "prefix".  Expand
1499         "usage" text.
1500
1501 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1502
1503         * windows-nat.c (windows_nat_target::create_inferior): Update to
1504         call close() in global namespace.
1505
1506 2018-07-26  Tom Tromey  <tom@tromey.com>
1507
1508         * dwarf-index-write.c (add_address_entry): Don't add objfile
1509         offsets.
1510         * dbxread.c (find_stab_function): Rename from
1511         find_stab_function_addr.  Return a bound_minimal_symbol.
1512         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1513         Don't add objfile offsets.
1514         (end_psymtab): Use raw_text_low, raw_text_high,
1515         MSYMBOL_VALUE_RAW_ADDRESS.
1516         (read_ofile_symtab): Update.
1517         (process_one_symbol): Update.
1518         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1519         offsets.
1520         (dw2_relocate): Remove.
1521         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1522         searching addrmap.
1523         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1524         Update.
1525         (process_psymtab_comp_unit_reader, add_partial_symbol)
1526         (add_partial_subprogram, dwarf2_ranges_read): Update.
1527         (load_partial_dies): Update.
1528         (add_address_entry): Don't add objfile offsets.
1529         (dwarf2_build_include_psymtabs): Update.
1530         (create_addrmap_from_aranges): Don't add objfile offsets.
1531         (dw2_find_pc_sect_compunit_symtab): Update.
1532         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1533         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1534         Update.
1535         (parse_partial_symbols): Don't add objfile offsets.  Use
1536         raw_text_low, raw_text_high.  Update.
1537         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1538         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1539         or call 'relocate' quick function.  Clear psymbol_map.
1540         * psympriv.h (struct partial_symbol) <address>: Add section
1541         offset.
1542         <set_unrelocated_address>: Rename from set_address.
1543         <raw_text_low, raw_text_high>: New methods.
1544         <text_low, text_high>: Add objfile parameter.
1545         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1546         set_unrelocated_address.
1547         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1548         (find_pc_psymbol): Update.
1549         (fixup_psymbol_section, relocate_psymtabs): Remove.
1550         (dump_psymtab, psym_functions): Update.
1551         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1552         parameter.
1553         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1554         (start_psymtab_common): Update.
1555         * symfile-debug.c (debug_qf_relocate): Remove.
1556         (debug_sym_quick_functions): Update.
1557         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1558         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1559         Update.
1560
1561 2018-07-26  Tom Tromey  <tromey@redhat.com>
1562
1563         * dbxread.c (end_psymtab): Use text_high_valid and
1564         text_low_valid.
1565         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1566         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1567         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1568         Update comment.
1569         <text_low_valid, text_high_valid>: New fields.
1570         <set_text_low, set_text_high>: Update.
1571         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1572
1573 2018-07-26  Tom Tromey  <tom@tromey.com>
1574
1575         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1576         Update.
1577         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1578         textlow and texthigh fields.
1579         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1580         Update.
1581         * mdebugread.c (parse_lines, parse_partial_symbols)
1582         (psymtab_to_symtab_1): Update.
1583         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1584         Rename fields.  Update comment.  Now private.
1585         <text_low, text_high, set_text_low, set_text_high>: New methods.
1586         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1587         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1588         (start_psymtab_common, maintenance_info_psymtabs)
1589         (maintenance_check_psymtabs): Update.
1590         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1591         texthigh fields.
1592         (scan_xcoff_symtab): Update.
1593
1594 2018-07-26  Tom Tromey  <tromey@redhat.com>
1595
1596         * psympriv.h (struct partial_symbol) <unrelocated_address,
1597         address, set_address>: New methods.
1598         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1599         (fixup_psymbol_section, relocate_psymtabs): Update.
1600         (print_partial_symbols): Add 'objfile' parameter.  Update.
1601         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1602         Update.
1603
1604 2018-07-26  Tom Tromey  <tom@tromey.com>
1605
1606         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1607         (debug_names::write_psymbols): Update.
1608         * psympriv.h (struct partial_symbol): Derive from
1609         general_symbol_info.
1610         <obj_section>: New method.
1611         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1612         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1613         (find_pc_sect_psymbol, fixup_psymbol_section)
1614         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1615         (print_partial_symbols, recursively_search_psymtabs)
1616         (compare_psymbols, psymbol_hash, psymbol_compare)
1617         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1618         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1619
1620 2018-07-26  Tom Tromey  <tromey@redhat.com>
1621
1622         * dbxread.c (end_psymtab): Remove dead code.
1623
1624 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1625
1626         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1627         DWARF unwinders are disabled.
1628         * dwarf2-frame.c: Add dwarf2read.h include.
1629         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1630         disabled.
1631         (dwarf2_frame_unwinders_enabled_p): Define.
1632         (show_dwarf_unwinders_enabled_p): New function.
1633         (_initialize_dwarf2_frame): Register switch to control DWARF
1634         unwinder use.
1635         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1636         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1637         (show_dwarf_cmdlist): Remove static keyword.
1638         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1639         (show_dwarf_cmdlist): Declare.
1640         * NEWS: Document new feature.
1641
1642 2018-07-26  Tom de Vries  <tdevries@suse.de>
1643
1644         PR breakpoints/23366
1645         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1646
1647 2018-07-26  Tom de Vries  <tdevries@suse.de>
1648
1649         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1650         DW_AT_count can't be translated to a dynamic prop.
1651
1652 2018-07-25  Tom de Vries  <tdevries@suse.de>
1653
1654         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1655         try/catch.
1656
1657 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1658
1659         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1660
1661 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1662
1663         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1664
1665 2018-07-24  Keith Seitz  <keiths@redhat.comt
1666
1667         PR symtab/23010
1668         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1669         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1670         instead of add_symbol_to_list.
1671         (read_file_scope): Call prepare_one_comp_unit before reading
1672         any other DIEs.
1673
1674 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1675
1676         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1677
1678 2018-07-24  Tom Tromey  <tom@tromey.com>
1679
1680         * utils.c (malloc, realloc, free): Don't declare.
1681         * configure, config.in: Rebuild.
1682         * configure.ac: Don't check for declarations of free, malloc, or
1683         realloc.
1684
1685 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1686
1687         * aarch64-linux-nat.c
1688         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1689         variable.
1690         * arm-linux-nat.c (fetch_regs): Likewise.
1691         (store_regs): Likewise.
1692         (fetch_vfp_regs): Likewise.
1693         (store_vfp_regs): Likewise.
1694         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1695         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1696         (arm_linux_nat_target::insert_watchpoint): Likewise.
1697         (arm_linux_nat_target::remove_watchpoint): Likewise.
1698         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1699         Likewise.
1700         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1701         Likewise.
1702         * ppc-linux-nat.c (fetch_register): Likewise.
1703         (fetch_all_gp_regs): Likewise.
1704         (fetch_ppc_registers): Likewise.
1705         (store_all_gp_regs): Likewise.
1706         (store_ppc_registers): Likewise.
1707         (hwdebug_insert_point): Likewise.
1708         (can_use_watchpoint_cond_accel): Likewise.
1709         * remote-sim.c (gdb_os_write_stdout): Likewise.
1710
1711 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1712             Tom Tromey  <tom@tromey.com>
1713
1714         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1715         test for it.
1716         * configure: Rebuild.
1717
1718 2018-07-22  Tom Tromey  <tom@tromey.com>
1719
1720         * regformats/regdat.sh: Define xmltarget_${name} inside
1721         #ifndef IN_PROCESS_AGENT.
1722
1723 2018-07-22  Tom Tromey  <tom@tromey.com>
1724
1725         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1726
1727 2018-07-22  Tom Tromey  <tom@tromey.com>
1728
1729         * symfile.c (reread_symbols): Notify iter, not objfile.
1730
1731 2018-07-22  Tom Tromey  <tom@tromey.com>
1732
1733         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1734         Use arch_ops.
1735         (ravenscar_thread_target::prepare_to_store): Likewise.
1736
1737 2018-07-22  Tom Tromey  <tom@tromey.com>
1738
1739         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1740         unused variable.  Call value_fetch_lazy when needed.
1741         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1742         Remove unused variable.  Call value_fetch_lazy when needed.
1743
1744 2018-07-22  Tom Tromey  <tom@tromey.com>
1745
1746         * m32c-tdep.c (mark_dma): Return void.
1747         (make_regs): Remove unused declarations.
1748
1749 2018-07-22  Tom Tromey  <tom@tromey.com>
1750
1751         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1752         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1753         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1754         bkscm_get_valid_block_smob_arg_unsafe for effect.
1755
1756 2018-07-22  Tom Tromey  <tom@tromey.com>
1757
1758         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1759         value_type.
1760
1761 2018-07-22  Tom Tromey  <tom@tromey.com>
1762
1763         * windows-nat.c (saved_context): Conditionally define.
1764         * remote.c (remote_target::remote_btrace_maybe_reopen):
1765         Conditionally declare "warned".
1766         * inflow.c (sigquit_ours): Conditionally define.
1767         (new_tty): Move "tty" declaration inside #if.
1768         * guile/guile.c (guile_datadir): Conditionally define.
1769         * charset.c (set_be_le_names): Move some declarations inside #if.
1770         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1771         #if.
1772         (parse_xml_btrace_conf): Likewise.
1773
1774 2018-07-22  Tom Tromey  <tom@tromey.com>
1775
1776         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1777
1778 2018-07-22  Tom Tromey  <tom@tromey.com>
1779
1780         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1781         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1782         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1783         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1784         * stack.c (frame_apply_level_command): Remove unused variable.
1785         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1786         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1787         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1788         unused variable.
1789         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1790         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1791         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1792         variable.
1793         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1794         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1795         variable.
1796         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1797         Remove unused variable.
1798         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1799         variable.
1800         * common/tdesc.c (print_xml_feature::visit): Remove unused
1801         variable.
1802         * compile/compile-object-load.c (store_regs): Remove unused
1803         variables.
1804         * complaints.c (clear_complaints): Remove unused variable.
1805         * corelow.c (core_target_open): Remove unused variable.
1806         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1807         variable.
1808         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1809         variable.
1810         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1811         variable.
1812         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1813         variable.
1814         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1815         variable.
1816         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1817         variable.
1818         * ia64-tdep.c (examine_prologue): Remove unused variable.
1819         * infcall.c (run_inferior_call): Remove unused variable.
1820         * inferior.c (exit_inferior): Remove unused variable.
1821         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1822         * linespec.c (decode_line_2): Remove unused variable.
1823         * linux-nat.c (super_close): Remove.
1824         * linux-tdep.c (linux_info_proc): Remove unused variable.
1825         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1826         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1827         Remove unused variable.
1828         * parse.c (find_minsym_type_and_address): Remove unused variable.
1829         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1830         variable.
1831         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1832         variable.
1833         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1834         variables.
1835         * record-btrace.c (record_btrace_target::store_registers): Remove
1836         unused variable.
1837         (cmd_show_record_btrace_cpu): Remove unused variable.
1838         * riscv-tdep.c (riscv_register_reggroup_p)
1839         (riscv_push_dummy_call, riscv_return_value): Remove unused
1840         variable.
1841         * rust-exp.y (literal): Remove unused variable.
1842         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1843         unused variable.
1844         <STRUCTOP_ANONYMOUS>: Likewise.
1845         * s390-linux-tdep.c (s390_linux_init_abi_31)
1846         (s390_linux_init_abi_64): Remove unused variable.
1847         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1848         (file_select_thread, net_windows_open, _initialize_ser_windows):
1849         Remove unused variables.
1850         * symtab.c (find_pc_sect_line): Remove unused variable.
1851         * target-memory.c (compute_garbled_blocks): Remove unused
1852         variable.
1853         (target_write_memory_blocks): Remove unused variable.
1854         * target.c (target_stack::unpush): Remove unused variables.
1855         * tracepoint.c (start_tracing, all_tracepoint_actions)
1856         (merge_uploaded_trace_state_variables)
1857         (print_one_static_tracepoint_marker): Remove unused variable.
1858         * unittests/basic_string_view/element_access/char/1.cc (test01):
1859         Remove unused variable.
1860         * windows-nat.c (windows_continue, windows_add_all_dlls)
1861         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1862         Remove unused variables.
1863
1864 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1865
1866         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1867         attr_profile in HAVE_ELF.
1868         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1869         HAVE_ELF.
1870
1871 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1872
1873         * frame.c (frame_register_unwind): Change parameter name.
1874         (frame_unwind_register): Likewise.
1875         (frame_unwind_register_value): Likewise.
1876         (frame_unwind_register_signed): Likewise.
1877         (frame_unwind_register_unsigned): Likewise.
1878         * frame.h (frame_register_unwind): Likewise.
1879         (frame_unwind_register): Likewise.
1880         (frame_unwind_register_value): Likewise.
1881         (frame_unwind_register_signed): Likewise.
1882         (frame_unwind_register_unsigned): Likewise.
1883         (frame_unwind_arch): Likewise.
1884
1885 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1886
1887         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1888         ISA maintenance.
1889
1890 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1891
1892         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1893         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1894         hand.
1895
1896 2018-07-20  Keith Seitz  <keiths@redhat.com>
1897
1898         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1899         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1900         m_compunit_symtab, m_language>: Add "m_" prefix.
1901         Update all uses.
1902         * buildsym.c: Update all uses.
1903
1904 2018-07-20  Tom Tromey  <tom@tromey.com>
1905
1906         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1907         * buildsym.h (record_line_ftype): Remove typedef.
1908
1909 2018-07-20  Tom Tromey  <tom@tromey.com>
1910
1911         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1912         (end_expandable_symtab): Likewise.
1913         (end_symtab_get_static_block): Likewise.
1914         (end_symtab_from_static_block): Likewise.
1915         * buildsym-legacy.c (augment_type_symtab): Remove.
1916         (end_expandable_symtab): Remove.
1917         (end_symtab_get_static_block): Remove.
1918         (end_symtab_from_static_block): Remove.
1919
1920 2018-07-20  Tom Tromey  <tom@tromey.com>
1921
1922         * dwarf2read.c: Include buildsym.h.
1923         (struct dwarf2_cu) <builder>: New method.
1924         (fixup_go_packaging): Update.
1925         (process_full_comp_unit, process_full_type_unit): Update.  Don't
1926         use scoped_free_pendings.
1927         (using_directives): Add "cu" parameter, remove "language".
1928         (read_import_statement, setup_type_unit_groups, )
1929         (read_func_scope, read_lexical_block_scope)
1930         (dwarf2_record_block_ranges, read_namespace): Update.
1931         (lnp_state_machine::lnp_state_machine): Add cu parameter.
1932         (lnp_state_machine::handle_end_sequence): Update.
1933         (class lnp_state_machine) <m_cu>: New member.
1934         <m_record_line_callback>: Remove.
1935         <m_currently_recording_lines>: New member.
1936         (lnp_state_machine::handle_set_file): Update.
1937         (noop_record_line): Remove.
1938         (dwarf_record_line_p): Add cu parameter.
1939         (dwarf_record_line_1, dwarf_finish_line): Likewise.
1940         (lnp_state_machine::record_line)
1941         (lnp_state_machine::lnp_state_machine)
1942         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1943         (dwarf_decode_lines): Update.
1944         (dwarf2_start_subfile): Add cu parameter.
1945         (dwarf2_start_symtab, new_symbol): Update.
1946         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1947         Remove dwarf2_per_objfile parameter.
1948         (dwarf_decode_macros): Update.
1949
1950 2018-07-20  Tom Tromey  <tom@tromey.com>
1951
1952         * stabsread.c (define_symbol): Update.
1953         * buildsym-legacy.h (get_buildsym_compunit): Declare.
1954         * dwarf2read.c (new_symbol): Update.
1955         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1956         * cp-namespace.c: Include buildsym.h.
1957         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1958         * buildsym-legacy.c (get_buildsym_compunit): New function.
1959
1960 2018-07-20  Tom Tromey  <tom@tromey.com>
1961
1962         * xcoffread.c: Include buildsym-legacy.h.
1963         * windows-nat.c: Include buildsym-legacy.h.
1964         * stabsread.c: Include buildsym-legacy.h.
1965         * mdebugread.c: Include buildsym-legacy.h.
1966         * buildsym-legacy.h: New file.
1967         * buildsym-legacy.c: New file, from buildsym.c.
1968         * go32-nat.c: Include buildsym-legacy.h.
1969         * dwarf2read.c: Include buildsym-legacy.h.
1970         * dbxread.c: Include buildsym-legacy.h.
1971         * cp-namespace.c: Include buildsym-legacy.h.
1972         * coffread.c: Include buildsym-legacy.h.
1973         * buildsym.h: Move some contents to buildsym-legacy.h.
1974         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
1975         buildsym-legacy.c.
1976         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1977
1978 2018-07-20  Tom Tromey  <tom@tromey.com>
1979
1980         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1981         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1982         (buildsym_compunit::buildsym_compunit)
1983         (buildsym_compunit::~buildsym_compunit)
1984         (buildsym_compunit::get_macro_table): Define.
1985
1986 2018-07-20  Tom Tromey  <tom@tromey.com>
1987
1988         * buildsym.c (reset_symtab_globals): Remove.
1989         (buildsym_compunit::end_symtab_from_static_block): Update.
1990         (buildsym_compunit::augment_type_symtab): Update.
1991         (end_symtab_from_static_block): Call free_buildsym_compunit.
1992         (augment_type_symtab, end_symtab, end_expandable_symtab):
1993         Likewise.
1994
1995 2018-07-20  Tom Tromey  <tom@tromey.com>
1996
1997         * arch-utils.c: Do not include buildsym.h.
1998         * mipsread.c: Do not include buildsym.h.
1999         * machoread.c: Do not include buildsym.h.
2000         * elfread.c: Do not include buildsym.h.
2001
2002 2018-07-20  Tom Tromey  <tom@tromey.com>
2003
2004         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2005         initialization.
2006         (buildsym_compunit): Add new constructor.
2007         (struct buildsym_compunit) <get_last_source_file, finish_block,
2008         record_block_range, start_subfile, patch_subfile_names,
2009         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2010         set_last_source_start_addr, get_last_source_start_addr,
2011         get_local_using_directives, set_local_using_directives,
2012         get_global_using_directives, outermost_context_p,
2013         get_current_context_stack, get_context_stack_depth,
2014         get_current_subfile, get_local_symbols, get_file_symbols,
2015         get_global_symbols, record_debugformat, record_producer,
2016         push_context, pop_context, end_symtab_get_static_block,
2017         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2018         New public methods.
2019         <record_pending_block, finish_block_internal, make_blockvector,
2020         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2021         private methods.
2022         Update all users.
2023
2024 2018-05-22  Tom Tromey  <tom@tromey.com>
2025
2026         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2027         parameter.
2028         (finish_block_internal): Update.
2029
2030 2018-07-20  Tom Tromey  <tom@tromey.com>
2031
2032         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2033         parameter.
2034         (finish_block_internal): Update.
2035
2036 2018-07-20  Tom Tromey  <tom@tromey.com>
2037
2038         * buildsym.h (EXTERN): Don't define or undef.
2039         * buildsym.c (EXTERN): Don't define.
2040
2041 2018-07-20  Tom Tromey  <tom@tromey.com>
2042
2043         * buildsym.c: Remove TODO comment.
2044
2045 2018-07-20  Tom Tromey  <tom@tromey.com>
2046
2047         * coffread.c (coff_symtab_read): Update.
2048         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2049         (xcoff_new_init): Update.
2050         * mipsread.c (mipscoff_new_init): Update.
2051         * mdebugread.c (mdebug_build_psymtabs): Update.
2052         * elfread.c (elf_new_init): Update.
2053         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2054         Update.
2055         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2056         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2057         (stabsect_build_psymtabs): Update.
2058         * buildsym.h (buildsym_init): Don't declare.
2059         * buildsym.c: Update comment.
2060         (prepare_for_building): Remove.
2061         (start_symtab, restart_symtab): Update.
2062         (reset_symtab_globals): Update comment.
2063         (buildsym_init): Remove.
2064
2065 2018-07-20  Tom Tromey  <tom@tromey.com>
2066
2067         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2068         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2069         (read_enum_type, common_block_start, common_block_end)
2070         (cleanup_undefined_types_1, finish_global_stabs): Update.
2071         * mdebugread.c (psymtab_to_symtab_1): Update.
2072         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2073         (read_lexical_block_scope, new_symbol): Update.
2074         * dbxread.c (process_one_symbol): Update.
2075         * coffread.c (coff_symtab_read, process_coff_symbol)
2076         (coff_read_enum_type): Update.
2077         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2078         declare.
2079         (get_local_symbols, get_file_symbols, get_global_symbols): New
2080         functions.
2081         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2082         m_global_symbols.
2083         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2084         (~scoped_free_pendings): Update.
2085         (finish_block, prepare_for_building, reset_symtab_globals)
2086         (end_symtab_get_static_block, end_symtab_with_blockvector)
2087         (augment_type_symtab, push_context): Update.
2088         (get_local_symbols, get_file_symbols, get_global_symbols): New
2089         functions.
2090         (buildsym_init): Update.
2091
2092 2018-07-20  Tom Tromey  <tom@tromey.com>
2093
2094         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2095         (process_full_type_unit): Likewise.
2096         (dwarf2_start_symtab): Set list_in_scope.
2097
2098 2018-07-20  Tom Tromey  <tom@tromey.com>
2099
2100         * dwarf2read.c (process_psymtab_comp_unit_reader)
2101         (build_type_psymtabs_reader): Do not set list_in_scope.
2102
2103 2018-07-20  Tom Tromey  <tom@tromey.com>
2104
2105         * buildsym.c (free_pendings): Remove.
2106         (add_symbol_to_list, scoped_free_pendings)
2107         (finish_block_internal, buildsym_init): Update.
2108
2109 2018-07-20  Tom Tromey  <tom@tromey.com>
2110
2111         * xcoffread.c (read_xcoff_symtab): Update.
2112         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2113         Update.
2114         * dbxread.c (process_one_symbol): Update.
2115         * coffread.c (coff_symtab_read): Update.
2116         * buildsym.h (finish_block): Update.
2117         * buildsym.c (finish_block): Remove "listhead" argument.
2118         (end_symtab_get_static_block): Update.
2119
2120 2018-07-20  Tom Tromey  <tom@tromey.com>
2121
2122         * buildsym.h (class scoped_free_pendings): Remove constructor.
2123         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2124         method.
2125         <m_pending_block_obstack, m_pending_blocks>: New members.
2126         (pending_block_obstack, pending_blocks): Remove.
2127         (scoped_free_pendings::scoped_free_pendings): Default.
2128         (~scoped_free_pendings): Update.
2129         (free_pending_blocks): Remove.
2130         (finish_block_internal, record_pending_block, make_blockvector)
2131         (end_symtab_get_static_block, augment_type_symtab, push_context)
2132         (buildsym_init): Update.
2133
2134 2018-07-20  Tom Tromey  <tom@tromey.com>
2135
2136         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2137         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2138         members.
2139         (pending_addrmap, pending_addrmap_obstack)
2140         (pending_addrmap_interesting): Remove.
2141         (scoped_free_pendings, record_block_range, make_blockvector)
2142         (prepare_for_building, reset_symtab_globals, buildsym_init):
2143         Update.
2144
2145 2018-07-20  Tom Tromey  <tom@tromey.com>
2146
2147         * xcoffread.c (process_linenos): Update.
2148         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2149         * mdebugread.c (psymtab_to_symtab_1): Update.
2150         * dwarf2read.c (setup_type_unit_groups)
2151         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2152         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2153         * dbxread.c (process_one_symbol): Update.
2154         * coffread.c (coff_symtab_read, enter_linenos)
2155         (process_coff_symbol): Update.
2156         * buildsym.h (current_subfile): Don't declare.
2157         (get_current_subfile): Declare.
2158         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2159         member.
2160         (start_subfile, free_buildsym_compunit, push_subfile)
2161         (prepare_for_building, start_symtab): Update.
2162         (get_current_subfile): New function.
2163
2164 2018-07-20  Tom Tromey  <tom@tromey.com>
2165
2166         * coffread.c (coff_symtab_read): Update.
2167         * xcoffread.c (read_xcoff_symtab): Update.
2168         * dwarf2read.c (new_symbol): Update.
2169         (read_func_scope, read_lexical_block_scope): Update.
2170         * dbxread.c (process_one_symbol): Update.
2171         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2172         (outermost_context_p): Remove macro.
2173         (outermost_context_p, get_current_context_stack)
2174         (get_context_stack_depth): Declare.
2175         (pop_context): Return struct context_stack.
2176         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2177         member.
2178         (context_stack_size): Remove.
2179         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2180         (prepare_for_building, end_symtab_get_static_block)
2181         (augment_type_symtab, push_context): Update.
2182         (pop_context): Return struct context_stack.
2183         (outermost_context_p, get_current_context_stack)
2184         (get_context_stack_depth): New functions.
2185         (buildsym_init): Update.
2186
2187 2018-07-20  Tom Tromey  <tom@tromey.com>
2188
2189         * rust-exp.y: Now a pure parser.  Update all rules.
2190         (%union): Move earlier.
2191         (current_parser, work_obstack): Remove globals.
2192         (rust_parser, ~rust_parser): Update.
2193         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2194         lex_character, lex_number, lex_string, lex_identifier,
2195         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2196         convert_name, convert_params_to_expression,
2197         convert_ast_to_expression, ast_basic_type, ast_operation,
2198         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2199         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2200         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2201         ast_array_type, ast_slice_type, ast_reference_type,
2202         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2203         (rust_parse): Update.
2204         (rustyyerror, rustyylex): Add parser parameter.
2205         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2206         (rust_lex_stringish_test, rust_lex_test_sequence)
2207         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2208         (rust_lex_test_push_back, rust_lex_tests): Update.
2209
2210 2018-07-19  Pedro Alves  <palves@redhat.com>
2211
2212         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2213         gdb::unique_xmalloc_ptr.
2214         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2215         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2216         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2217         copy-initialization.
2218         * guile/scm-pretty-print.c (ppscm_print_children): Use
2219         gdb::unique_xmalloc_ptr instead of cleanups.
2220         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2221         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2222         gdb::unique_xmalloc_ptr.
2223         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2224         Adjust to use gdb::unique_xmalloc_ptr.
2225         * guile/scm-utils.c (extract_arg): Adjust.
2226         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2227         gdb::unique_xmalloc_ptr instead of a cleanup.
2228
2229 2018-07-19  Tom Tromey  <tom@tromey.com>
2230
2231         * utils.c (do_value_free_to_mark)
2232         (make_cleanup_value_free_to_mark): Remove.
2233         * utils.h (make_cleanup_value_free_to_mark): Remove.
2234
2235 2018-07-19  Pedro Alves  <palves@redhat.com>
2236
2237         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2238         forwarding reference.
2239
2240 2018-07-18  Pedro Alves  <palves@redhat.com>
2241
2242         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2243         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2244         cleanup.
2245
2246 2018-07-18  Pedro Alves  <palves@redhat.com>
2247
2248         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2249         exceptions.
2250         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2251         (gdbscm_wrap): New.
2252         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2253         directly instead of a cleanup.
2254         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2255         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2256         (vlscm_binop_gdbthrow): New, factored out from ...
2257         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2258         (vlscm_rich_compare): Use gdbscm_wrap.
2259         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2260         instead of a cleanup.
2261         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2262         cleanup.
2263         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2264         Use xfree directly instead of a cleanup.
2265         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2266         Adjust to use gdbscm_wrap and scoped_value_mark.
2267         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2268         (gdbscm_value_address, gdbscm_value_dereference)
2269         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2270         scoped_value_mark.
2271         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2272         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2273         scoped_value_mark.
2274         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2275         gdbscm_wrap and scoped_value_mark.
2276         (gdbscm_value_to_string): Use xfree directly instead of a
2277         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2278         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2279         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2280         scoped_value_mark.
2281         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2282         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2283         scoped_value_mark.
2284         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2285         gdbscm_wrap.
2286
2287 2018-07-18  Tom de Vries  <tdevries@suse.de>
2288
2289         * findvar.c (default_read_var_value): Also resolve dynamic type for
2290         LOC_OPTIMIZED_OUT vars.
2291
2292 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2293
2294         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2295         decoding.
2296
2297 2018-07-17  Tom Tromey  <tom@tromey.com>
2298
2299         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2300         (compute_enum_list, pascm_set_param_value_x)
2301         (gdbscm_parameter_value): Update.
2302         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2303         (gdbscm_scm_to_host_string): Update.
2304         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2305         Update.
2306         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2307         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2308         * guile/scm-string.c (gdbscm_scm_to_string): Return
2309         unique_xmalloc_ptr.
2310         (gdbscm_scm_to_host_string): Likewise.
2311
2312 2018-07-17  Tom Tromey  <tom@tromey.com>
2313
2314         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2315         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2316         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2317         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2318         unique_xmalloc_ptr.
2319
2320 2018-07-17  Tom Tromey  <tom@tromey.com>
2321
2322         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2323         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2324         Update.
2325         * guile/scm-cmd.c (cmdscm_function): Update.
2326         * guile/scm-pretty-print.c
2327         (ppscm_print_exception_unless_memory_error): Update.
2328         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2329         Return unique_xmalloc_ptr.
2330
2331 2018-07-17  Tom Tromey  <tom@tromey.com>
2332
2333         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2334         Use string_printf.
2335
2336 2018-07-17  Jim Wilson  <jimw@sifive.com>
2337
2338         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2339         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2340         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2341         unecessary braces after EF_RISCV_RVC test.  Delete call to
2342         set_gdbarch_decr_pc_after_break.
2343
2344         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2345         RISCV_LAST_FP_REGNUM + 1.
2346         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2347
2348 2018-07-17  Tom Tromey  <tom@tromey.com>
2349
2350         * configure.ac: Remove --disable-gdbcli.
2351         * configure: Rebuild.
2352         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2353         (SUBDIR_CLI_CFLAGS): Remove.
2354         (SFILES): Use SUBDIR_CLI_SRCS.
2355         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2356
2357 2018-07-17  Tom Tromey  <tom@tromey.com>
2358
2359         PR gdb/18624:
2360         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2361
2362 2018-07-16  Jim Wilson  <jimw@sifive.com>
2363
2364         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2365
2366 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2367
2368         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2369         variable.
2370         (libunwind_frame_sniffer): Likewise.
2371         (libunwind_frame_prev_register): Likewise.
2372         (libunwind_sigtramp_frame_sniffer): Likewise.
2373         * ia64-tdep.c (ia64_access_reg): Likewise.
2374         (ia64_access_rse_reg): Likewise.
2375         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2376         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2377
2378 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2379
2380         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2381
2382 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2383
2384         * remote-sim.c (gdbsim_target::close,
2385         gdbsim_target::mourn_inferior): Remove unused variables.
2386
2387 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2388
2389         * ia64-tdep.c (ktab_buf): New global.
2390         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2391         (get_kernel_table): Adjust.
2392
2393 2018-07-16  Tom Tromey  <tom@tromey.com>
2394
2395         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2396         * dwarf2read.c (using_directives, new_symbol): Use
2397         outermost_context_p.
2398         * dbxread.c (process_one_symbol): Use outermost_context_p.
2399         * coffread.c (coff_symtab_read): Use outermost_context_p.
2400
2401 2018-07-16  Tom Tromey  <tom@tromey.com>
2402
2403         * dwarf2read.c (using_directives, read_func_scope)
2404         (read_lexical_block_scope): Update.
2405         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2406         * buildsym.h (local_using_directives, global_using_directives):
2407         Don't declare.
2408         (get_local_using_directives, set_local_using_directives)
2409         (get_global_using_directives): Declare.
2410         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2411         m_global_using_directives>: New members.
2412         (finish_block_internal, prepare_for_building)
2413         (reset_symtab_globals, end_symtab_get_static_block)
2414         (push_context): Update.
2415         (get_local_using_directives, set_local_using_directives)
2416         (get_global_using_directives): New functions.
2417         (buildsym_init): Update.
2418
2419 2018-07-16  Tom Tromey  <tom@tromey.com>
2420
2421         * xcoffread.c (xcoff_initial_scan): Don't call
2422         free_pending_blocks.
2423         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2424         * buildsym.h (class scoped_free_pendings): Add constructor.
2425         (free_pending_blocks): Don't declare.
2426         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2427         (free_pending_blocks): Now static.
2428
2429 2018-07-16  Tom Tromey  <tom@tromey.com>
2430
2431         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2432         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2433         member.
2434         (struct subfile_stack): Remove.
2435         (subfile_stack): Remove.
2436         (push_subfile, pop_subfile, buildsym_init): Update.
2437
2438 2018-07-16  Tom Tromey  <tom@tromey.com>
2439
2440         * buildsym.c (push_subfile): Use gdb_assert.
2441         (pop_subfile): Use gdb_assert.
2442
2443 2018-07-16  Tom Tromey  <tom@tromey.com>
2444
2445         * buildsym.h (merge_symbol_lists): Remove.
2446         * buildsym.c (merge_symbol_lists): Remove.
2447
2448 2018-07-16  Tom Tromey  <tom@tromey.com>
2449
2450         * stabsread.c (scan_file_globals): Update comment.
2451         * stabsread.h (scan_file_globals): Move from buildsym.h.
2452         * buildsym.h (scan_file_globals): Move to stabsread.h.
2453
2454 2018-07-16  Tom Tromey  <tom@tromey.com>
2455
2456         * xcoffread.c (xcoff_new_init): Update.
2457         * mipsread.c (mipscoff_new_init): Update.
2458         * mdebugread.c (mdebug_build_psymtabs): Update.
2459         * elfread.c (elf_new_init): Update.
2460         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2461         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2462         * buildsym.h (buildsym_new_init): Don't declare.
2463         * buildsym.c (buildsym_new_init): Remove.
2464
2465 2018-07-16  Tom Tromey  <tom@tromey.com>
2466
2467         * stabsread.h (within_function): Move from buildsym.h.
2468         * stabsread.c (start_stabs): Clear within_function.
2469         * coffread.c (coff_start_symtab): Clear within_function.
2470         * buildsym.h (within_function): Move to stabsread.h.
2471         * buildsym.c (prepare_for_building): Update.
2472
2473 2018-07-16  Tom Tromey  <tom@tromey.com>
2474
2475         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2476         * dwarf2read.c (dwarf2_start_symtab): Don't set
2477         processing_gcc_compilation.
2478         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2479
2480 2018-07-16  Tom Tromey  <tom@tromey.com>
2481
2482         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2483         (next_symbol_text_func): Move from buildsym.h.
2484         * stabsread.c (hashname): Move from buildsym.c.
2485         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2486         (next_symbol_text_func, hashname): Move to stabsread.h.
2487         * buildsym.c: Don't include bcache.h
2488         (hashname): Move to stasbread.c.
2489
2490 2018-07-16  Tom Tromey  <tom@tromey.com>
2491
2492         * buildsym.h (context_stack_size): Don't declare.
2493         * buildsym.c (context_stack_size): New global.
2494
2495 2018-07-16  Tom Tromey  <tom@tromey.com>
2496
2497         * dbxread.c (processing_acc_compilation): New global.
2498         * buildsym.h (processing_acc_compilation): Don't declare.
2499
2500 2018-07-16  Tom Tromey  <tom@tromey.com>
2501
2502         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2503         * dbxread.c (read_ofile_symtab): Update.
2504         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2505         * buildsym.h (last_source_start_addr): Remove.
2506         (set_last_source_start_addr, get_last_source_start_addr):
2507         Declare.
2508         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2509         parameter.
2510         (struct buildsym_compunit) <m_last_source_start_addr>: New
2511         member.
2512         (prepare_for_building): Remove start_addr parameter.
2513         (start_symtab, restart_symtab, end_symtab_get_static_block)
2514         (end_symtab_with_blockvector): Update.
2515         (set_last_source_start_addr, get_last_source_start_addr): New
2516         functions.
2517
2518 2018-07-16  Tom Tromey  <tom@tromey.com>
2519
2520         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2521         member.
2522         (have_line_numbers): Remove.
2523         (record_line, prepare_for_building, end_symtab_get_static_block)
2524         (augment_type_symtab): Update.
2525
2526 2018-07-16  Tom Tromey  <tom@tromey.com>
2527
2528         * buildsym.c (~buildsym_compunit): Free the macro table.
2529         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2530         methods.
2531         <m_pending_macros>: New member.
2532         (pending_macros): Remove.
2533         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2534         (reset_symtab_globals, end_symtab_get_static_block)
2535         (end_symtab_with_blockvector, augment_type_symtab)
2536         (buildsym_init): Update.
2537
2538 2018-07-16  Tom Tromey  <tom@tromey.com>
2539
2540         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2541         parameter.
2542         (buildsym_compunit::set_last_source_file): New method.
2543         <m_last_source_file>: New member.
2544         (prepare_for_building): Remove "name" parameter.
2545         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2546         (last_source_file): Remove.
2547         (set_last_source_file, get_last_source_file): Update.
2548
2549 2018-07-16  Tom Tromey  <tom@tromey.com>
2550
2551         * buildsym.c (prepare_for_building): Add assert.
2552
2553 2018-07-16  Tom Tromey  <tom@tromey.com>
2554
2555         * buildsym.c (~buildsym_compunit): Update.
2556         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2557         (start_subfile, patch_subfile_names)
2558         (end_symtab_with_blockvector): Update.
2559
2560 2018-07-16  Tom Tromey  <tom@tromey.com>
2561
2562         * buildsym.c (struct buildsym_compunit): Add constructor,
2563         destructor, initializers.
2564         (start_buildsym_compunit): Remove.
2565         (free_buildsym_compunit): Use "delete".
2566         (start_symtab, restart_symtab): Use "new".
2567
2568 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2569
2570         * symfile.c (set_objfile_default_section_offset): Remove struct
2571         keyword.
2572
2573 2018-07-14  Stafford Horne  <shorne@gmail.com>
2574
2575         * (Responsible Maintainers): Add myself as or1k maintainer.
2576
2577 2018-07-13  Tom Tromey  <tom@tromey.com>
2578
2579         * symfile.c (set_objfile_default_section_offset): Use extra braces
2580         around initializer.
2581
2582 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2583
2584         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2585         non-branching basr.
2586
2587 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2588
2589         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2590         unittests/cli-utils-selftests.c
2591         * unittests/cli-utils-selftests.c: New file.
2592
2593 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2594
2595         * NEWS: Mention new commands. Mention change to 'thread apply'.
2596
2597 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2598
2599         * thread.c (thr_try_catch_cmd): New function.
2600         (thread_apply_all_command): Handle qcs flags.
2601         (thread_apply_command): Handle qcs flags.
2602         (taas_command): New function.
2603         (tfaas_command): New function.
2604         (_initialize_thread): Update to setup the new commands 'taas
2605         and 'tfaas'. Change doc string for 'thread apply'.
2606
2607 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2608
2609         * stack.c: (trailing_outermost_frame): New function, mostly
2610         extracted from backtrace_command_1.
2611         (leading_innermost_frame): New function.
2612         (backtrace_command_1): Update to call trailing_outermost_frame.
2613         (frame_apply_command_count): New function.
2614         (frame_apply_level_command): New function.
2615         (frame_apply_all_command): New function.
2616         (frame_apply_command): New function.
2617         (faas_command): New function.
2618         (frame_cmd_list): New variable.
2619         (_initialize_stack): Update to setup the new commands 'frame apply'
2620         and 'faas'.
2621
2622 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2623
2624         * cli-utils.c (number_or_range_parser::get_number): Only handle
2625         numbers or convenience var as numbers.
2626         (parse_flags): New function.
2627         (parse_flags_qcs): New function.
2628         (number_or_range_parser::finished): Ensure parsing end is detected
2629         before end of string.
2630         * cli-utils.h (parse_flags): New function.
2631         (parse_flags_qcs): New function.
2632         (number_or_range_parser): Remove m_finished bool.
2633         (number_or_range_parser::skip_range): Set m_in_range to false.
2634
2635 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2636
2637         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2638         on Windows.
2639
2640 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2641             Jan Kratochvil  <jan.kratochvil@redhat.com>
2642             Paul Fertser  <fercerpav@gmail.com>
2643             Tsutomu Seki  <sekiriki@gmail.com>
2644             Pedro Alves  <palves@redhat.com>
2645
2646         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2647         'unittests/parse-connection-spec-selftests.c'.
2648         (COMMON_SFILES): Add 'common/netstuff.c'.
2649         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2650         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2651         * common/netstuff.c: New file.
2652         * common/netstuff.h: New file.
2653         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2654         (wait_for_connect): Update comment.  New parameter
2655         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2656         Use 'sock' directly instead of 'scb->fd'.
2657         (try_connect): New function, with code from 'net_open'.
2658         (net_open): Rewrite main loop to deal with multiple
2659         sockets/addresses.  Handle IPv6-style hostnames; implement
2660         support for IPv6 connections.
2661         * unittests/parse-connection-spec-selftests.c: New file.
2662
2663 2018-07-11  Pedro Alves  <palves@redhat.com>
2664
2665         PR gdb/23377
2666         * remote.c (remote_target::remote_detach_pid): Call
2667         set_current_process.
2668
2669 2018-07-11  Pedro Alves  <palves@redhat.com>
2670
2671         * h8300-tdep.c (h8300_gdbarch_init): Remove
2672         set_gdbarch_ecoff_reg_to_regnum calls.
2673
2674 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2675
2676         PR c++/23373
2677         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2678         offsets/sizes for static members of a class/struct.
2679
2680 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2681
2682         * target-descriptions.c (tdesc_register_bitsize): Rename.
2683         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2684         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2685         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2686
2687 2018-07-10  Tom Tromey  <tom@tromey.com>
2688
2689         * breakpoint.c (moribund_locations): Now static and a
2690         std::vector.
2691         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2692         (build_bpstat_chain, update_global_location_list)
2693         (breakpoint_retire_moribund): Update.
2694         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2695         VEC.
2696
2697 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2698
2699         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2700         (riscv_register_reggroup_p): Use new function, remove unneeded
2701         parenthesis.
2702         (riscv_push_dummy_call): Extend assert to compare against xlen or
2703         flen based on register type.
2704
2705 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2706
2707         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2708
2709 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2710
2711         * remote.c (show_hardware_watchpoint_limit): New function.
2712         (show_hardware_watchpoint_length_limit): New function.
2713         (show_hardware_breakpoint_limit): New function.
2714         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2715         where appropriate, update help text.
2716
2717 2018-07-09  Tom Tromey  <tom@tromey.com>
2718
2719         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2720         (CLIBS): Don't mention NAT_CLIBS.
2721
2722 2018-07-09  Tom Tromey  <tom@tromey.com>
2723
2724         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2725         (LIBGDB_OBS, clean mostlyclean): Update.
2726         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2727
2728 2018-07-09  Tom Tromey  <tom@tromey.com>
2729
2730         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2731         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2732         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2733
2734 2018-07-09  Tom Tromey  <tom@tromey.com>
2735
2736         * Makefile.in (ALLDEPFILES): Remove exec.c.
2737         (COMMON_OBS): Remove exec.o.
2738         (COMMON_SFILES): Add exec.c.
2739
2740 2018-07-09  Tom Tromey  <tom@tromey.com>
2741
2742         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2743
2744 2018-07-09  Tom Tromey  <tom@tromey.com>
2745
2746         * Makefile.in (clean mostlyclean): Remove stamp-version.
2747         (version.c): Depend on stamp-version.
2748         (stamp-version): New rule, from version.c rule.
2749
2750 2018-07-09  Tom Tromey  <tom@tromey.com>
2751
2752         * Makefile.in (init.c): Depend on stamp-init.
2753         (stamp-init): New rule, from init.c rule.
2754         (clean mostlyclean): Remove stamp-init.
2755
2756 2018-07-09  Tom Tromey  <tom@tromey.com>
2757
2758         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2759         SUBDIR_GCC_COMPILE_SRCS.
2760
2761 2018-07-09  Tom Tromey  <tom@tromey.com>
2762
2763         * Makefile.in (init.c): Remove some unused sed rules.
2764
2765 2018-07-09  Tom Tromey  <tom@tromey.com>
2766
2767         * Makefile.in (TSOBS): Remove.
2768         (INIT_FILES): Update.
2769         (LIBGDB_OBS): Update.
2770         (COMMON_SFILES): Add inflow.c.
2771         (SFILES): Remove inflow.c.
2772
2773 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2774
2775         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2776
2777 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2778
2779         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2780         get_saveloc_name, is_signal_frame_name, step_name,
2781         init_remote_name, create_addr_space_name,
2782         destroy_addr_space_name, search_unwind_table_name,
2783         find_dyn_list_name): Constify.
2784
2785 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2786
2787         * darwin-nat.c (darwin_pthread_kill): New function.
2788         (darwin_resume_thread): Use darwin_pthread_kill.
2789
2790 2018-07-05  Tom de Vries  <tdevries@suse.de>
2791
2792         * macroexp.c (macro_buffer) <operator=>: New member function.
2793
2794 2018-07-04  Tom Tromey  <tom@tromey.com>
2795
2796         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2797
2798 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2799
2800         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2801         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2802         * maint.c: Likewise.
2803         * top.c: Likewise.
2804
2805 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2806
2807         * NEWS: Create a new section for the next release branch.
2808         Rename the section of the current branch, now that it has
2809         been cut.
2810
2811 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2812
2813         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2814         * version.in: Bump version to 8.2.50.DATE-git.
2815
2816 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2817             Pedro Alves  <palves@redhat.com>
2818
2819         * linux-nat.c (linux_init_ptrace): Rename to ...
2820         (linux_init_ptrace_procfs): ... this.  Call
2821         linux_proc_init_warnings.
2822         (linux_nat_target::post_attach)
2823         (linux_nat_target::post_startup_inferior): Adjust.
2824         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2825         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2826
2827 2018-07-04  Tom de Vries  <tdevries@suse.de>
2828
2829         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2830         check ...
2831         (read_comp_unit_head): ... here.
2832
2833 2018-07-03  Tom Tromey  <tom@tromey.com>
2834
2835         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2836         (stop_tracing, tstatus_command)
2837         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2838         (print_one_static_tracepoint_marker): Update.
2839         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2840         std::vector.
2841         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2842         VEC.
2843         (all_tracepoints, static_tracepoints_here): Return std::vector.
2844
2845 2018-07-03  Tom Tromey  <tom@tromey.com>
2846
2847         * common/ptid.c (ptid_equal): Remove.
2848         * common/ptid.h (ptid_equal): Don't declare.
2849         * ada-tasks.c: Update.
2850         * breakpoint.c: Update.
2851         * common/agent.c: Update.
2852         * corelow.c: Update.
2853         * darwin-nat-info.c: Update.
2854         * darwin-nat.c: Update.
2855         * dcache.c: Update.
2856         * dtrace-probe.c: Update.
2857         * dummy-frame.c: Update.
2858         * fbsd-nat.c: Update.
2859         * frame.c: Update.
2860         * gdbthread.h: Update.
2861         * gnu-nat.c: Update.
2862         * go32-nat.c: Update.
2863         * inf-loop.c: Update.
2864         * inf-ptrace.c: Update.
2865         * infcall.c: Update.
2866         * infcmd.c: Update.
2867         * inflow.c: Update.
2868         * infrun.c: Update.
2869         * linux-fork.c: Update.
2870         * linux-nat.c: Update.
2871         * linux-thread-db.c: Update.
2872         * mi/mi-cmd-var.c: Update.
2873         * mi/mi-interp.c: Update.
2874         * mi/mi-main.c: Update.
2875         * nto-procfs.c: Update.
2876         * ppc-linux-tdep.c: Update.
2877         * procfs.c: Update.
2878         * python/py-inferior.c: Update.
2879         * python/py-record-btrace.c: Update.
2880         * python/py-record.c: Update.
2881         * ravenscar-thread.c: Update.
2882         * regcache.c: Update.
2883         * remote-sim.c: Update.
2884         * remote.c: Update.
2885         * sol-thread.c: Update.
2886         * solib.c: Update.
2887         * target.c: Update.
2888         * tui/tui-stack.c: Update.
2889         * varobj.c: Update.
2890         * windows-nat.c: Update.
2891         * windows-tdep.c: Update.
2892
2893 2018-07-03  Tom Tromey  <tom@tromey.com>
2894
2895         * common/ptid.c (ptid_match): Remove.
2896         * common/ptid.h (ptid_match): Don't declare.
2897         * fbsd-nat.c: Update.
2898         * infcmd.c: Update.
2899         * infrun.c: Update.
2900         * linux-nat.c: Update.
2901         * record-btrace.c: Update.
2902         * regcache.c: Update.
2903         * remote.c: Update.
2904
2905 2018-07-03  Tom Tromey  <tom@tromey.com>
2906
2907         * common/ptid.c (ptid_tid_p): Remove.
2908         * common/ptid.h (ptid_tid_p): Don't declare.
2909         * sol-thread.c: Update.
2910
2911 2018-07-03  Tom Tromey  <tom@tromey.com>
2912
2913         * common/ptid.c (ptid_lwp_p): Remove.
2914         * common/ptid.h (ptid_lwp_p): Don't declare.
2915         * fbsd-nat.c: Update.
2916         * linux-nat.c: Update.
2917         * nat/linux-procfs.c: Update.
2918         * nat/x86-linux-dregs.c: Update.
2919         * sol-thread.c: Update.
2920
2921 2018-07-03  Tom Tromey  <tom@tromey.com>
2922
2923         * common/ptid.c (ptid_is_pid): Remove.
2924         * common/ptid.h (ptid_is_pid): Don't declare.
2925         * infrun.c: Update.
2926         * linux-nat.c: Update.
2927         * mi/mi-interp.c: Update.
2928         * remote.c: Update.
2929         * thread.c: Update.
2930
2931 2018-07-03  Tom Tromey  <tom@tromey.com>
2932
2933         * common/ptid.c (ptid_get_tid): Remove.
2934         * common/ptid.h (ptid_get_tid): Don't declare.
2935         * ada-tasks.c: Update.
2936         * aix-thread.c: Update.
2937         * bsd-uthread.c: Update.
2938         * darwin-nat.c: Update.
2939         * fbsd-nat.c: Update.
2940         * i386-darwin-nat.c: Update.
2941         * infrun.c: Update.
2942         * linux-tdep.c: Update.
2943         * nto-procfs.c: Update.
2944         * ppc-ravenscar-thread.c: Update.
2945         * python/py-infthread.c: Update.
2946         * ravenscar-thread.c: Update.
2947         * sol-thread.c: Update.
2948         * sparc-ravenscar-thread.c: Update.
2949         * windows-nat.c: Update.
2950
2951 2018-07-03  Tom Tromey  <tom@tromey.com>
2952
2953         * common/ptid.c (ptid_get_lwp): Remove.
2954         * common/ptid.h (ptid_get_lwp): Don't declare.
2955         * aarch64-linux-nat.c: Update.
2956         * ada-tasks.c: Update.
2957         * aix-thread.c: Update.
2958         * amd64-linux-nat.c: Update.
2959         * arm-linux-nat.c: Update.
2960         * corelow.c: Update.
2961         * fbsd-nat.c: Update.
2962         * fbsd-tdep.c: Update.
2963         * gnu-nat.c: Update.
2964         * i386-cygwin-tdep.c: Update.
2965         * i386-gnu-nat.c: Update.
2966         * i386-linux-nat.c: Update.
2967         * ia64-linux-nat.c: Update.
2968         * inf-ptrace.c: Update.
2969         * infrun.c: Update.
2970         * linux-fork.c: Update.
2971         * linux-nat.c: Update.
2972         * linux-tdep.c: Update.
2973         * linux-thread-db.c: Update.
2974         * mips-linux-nat.c: Update.
2975         * nat/aarch64-linux-hw-point.c: Update.
2976         * nat/aarch64-linux.c: Update.
2977         * nat/linux-btrace.c: Update.
2978         * nat/linux-osdata.c: Update.
2979         * nat/linux-procfs.c: Update.
2980         * nat/x86-linux-dregs.c: Update.
2981         * obsd-nat.c: Update.
2982         * ppc-fbsd-nat.c: Update.
2983         * ppc-linux-nat.c: Update.
2984         * procfs.c: Update.
2985         * python/py-infthread.c: Update.
2986         * ravenscar-thread.c: Update.
2987         * remote.c: Update.
2988         * s390-linux-nat.c: Update.
2989         * sol-thread.c: Update.
2990         * sol2-tdep.c: Update.
2991         * spu-linux-nat.c: Update.
2992         * x86-linux-nat.c: Update.
2993         * xtensa-linux-nat.c: Update.
2994
2995 2018-07-03  Tom Tromey  <tom@tromey.com>
2996
2997         * common/ptid.c (ptid_get_pid): Remove.
2998         * common/ptid.h (ptid_get_pid): Don't declare.
2999         * aarch64-linux-nat.c: Update.
3000         * ada-lang.c: Update.
3001         * aix-thread.c: Update.
3002         * alpha-bsd-nat.c: Update.
3003         * amd64-fbsd-nat.c: Update.
3004         * amd64-linux-nat.c: Update.
3005         * arm-linux-nat.c: Update.
3006         * arm-nbsd-nat.c: Update.
3007         * auxv.c: Update.
3008         * break-catch-syscall.c: Update.
3009         * breakpoint.c: Update.
3010         * bsd-uthread.c: Update.
3011         * corelow.c: Update.
3012         * ctf.c: Update.
3013         * darwin-nat.c: Update.
3014         * fbsd-nat.c: Update.
3015         * fbsd-tdep.c: Update.
3016         * gcore.c: Update.
3017         * gnu-nat.c: Update.
3018         * hppa-nbsd-nat.c: Update.
3019         * hppa-obsd-nat.c: Update.
3020         * i386-fbsd-nat.c: Update.
3021         * ia64-linux-nat.c: Update.
3022         * inf-ptrace.c: Update.
3023         * infcmd.c: Update.
3024         * inferior.c: Update.
3025         * inferior.h: Update.
3026         * inflow.c: Update.
3027         * infrun.c: Update.
3028         * linux-fork.c: Update.
3029         * linux-nat.c: Update.
3030         * linux-tdep.c: Update.
3031         * linux-thread-db.c: Update.
3032         * m68k-bsd-nat.c: Update.
3033         * mi/mi-interp.c: Update.
3034         * mi/mi-main.c: Update.
3035         * mips-linux-nat.c: Update.
3036         * mips-nbsd-nat.c: Update.
3037         * mips64-obsd-nat.c: Update.
3038         * nat/aarch64-linux-hw-point.c: Update.
3039         * nat/aarch64-linux.c: Update.
3040         * nat/linux-btrace.c: Update.
3041         * nat/linux-osdata.c: Update.
3042         * nat/linux-procfs.c: Update.
3043         * nat/x86-linux-dregs.c: Update.
3044         * nto-procfs.c: Update.
3045         * obsd-nat.c: Update.
3046         * ppc-linux-nat.c: Update.
3047         * ppc-nbsd-nat.c: Update.
3048         * ppc-obsd-nat.c: Update.
3049         * proc-service.c: Update.
3050         * procfs.c: Update.
3051         * python/py-inferior.c: Update.
3052         * python/py-infthread.c: Update.
3053         * ravenscar-thread.c: Update.
3054         * record.c: Update.
3055         * remote-sim.c: Update.
3056         * remote.c: Update.
3057         * rs6000-nat.c: Update.
3058         * s390-linux-nat.c: Update.
3059         * sh-nbsd-nat.c: Update.
3060         * sol-thread.c: Update.
3061         * sparc-nat.c: Update.
3062         * sparc64-tdep.c: Update.
3063         * spu-linux-nat.c: Update.
3064         * spu-tdep.c: Update.
3065         * target-debug.h: Update.
3066         * target.c: Update.
3067         * thread.c: Update.
3068         * tid-parse.c: Update.
3069         * tracefile-tfile.c: Update.
3070         * vax-bsd-nat.c: Update.
3071         * windows-nat.c: Update.
3072         * x86-linux-nat.c: Update.
3073         * x86-nat.c: Update.
3074
3075 2018-07-03  Tom Tromey  <tom@tromey.com>
3076
3077         * common/ptid.c (pid_to_ptid): Remove.
3078         * common/ptid.h (pid_to_ptid): Don't declare.
3079         * aix-thread.c: Update.
3080         * arm-linux-nat.c: Update.
3081         * common/ptid.c: Update.
3082         * common/ptid.h: Update.
3083         * corelow.c: Update.
3084         * ctf.c: Update.
3085         * darwin-nat.c: Update.
3086         * fbsd-nat.c: Update.
3087         * fork-child.c: Update.
3088         * gnu-nat.c: Update.
3089         * go32-nat.c: Update.
3090         * inf-ptrace.c: Update.
3091         * infcmd.c: Update.
3092         * inferior.c: Update.
3093         * infrun.c: Update.
3094         * linux-fork.c: Update.
3095         * linux-nat.c: Update.
3096         * nat/aarch64-linux-hw-point.c: Update.
3097         * nat/fork-inferior.c: Update.
3098         * nat/x86-linux-dregs.c: Update.
3099         * nto-procfs.c: Update.
3100         * obsd-nat.c: Update.
3101         * procfs.c: Update.
3102         * progspace.c: Update.
3103         * remote.c: Update.
3104         * rs6000-nat.c: Update.
3105         * s390-linux-nat.c: Update.
3106         * sol-thread.c: Update.
3107         * spu-linux-nat.c: Update.
3108         * target.c: Update.
3109         * top.c: Update.
3110         * tracefile-tfile.c: Update.
3111         * windows-nat.c: Update.
3112
3113 2018-07-03  Tom Tromey  <tom@tromey.com>
3114
3115         * common/ptid.h (ptid_build): Don't declare.
3116         * common/ptid.c (ptid_build): Remove.
3117         * aix-thread.c: Update.
3118         * bsd-kvm.c: Update.
3119         * bsd-uthread.c: Update.
3120         * common/agent.c: Update.
3121         * common/ptid.c: Update.
3122         * common/ptid.h: Update.
3123         * corelow.c: Update.
3124         * darwin-nat.c: Update.
3125         * fbsd-nat.c: Update.
3126         * gnu-nat.c: Update.
3127         * linux-fork.c: Update.
3128         * linux-nat.c: Update.
3129         * linux-thread-db.c: Update.
3130         * nat/linux-osdata.c: Update.
3131         * nat/linux-procfs.c: Update.
3132         * nto-procfs.c: Update.
3133         * obsd-nat.c: Update.
3134         * proc-service.c: Update.
3135         * procfs.c: Update.
3136         * ravenscar-thread.c: Update.
3137         * remote-sim.c: Update.
3138         * remote.c: Update.
3139         * sol-thread.c: Update.
3140         * target.c: Update.
3141         * windows-nat.c: Update.
3142
3143 2018-07-03  Tom Tromey  <tom@tromey.com>
3144
3145         * infrun.c (follow_exec): Use exit_inferior_silent.
3146         * inferior.c (exit_inferior_num_silent): Remove.
3147         * inferior.h (exit_inferior_num_silent): Don't declare.
3148
3149 2018-07-03  Tom Tromey  <tom@tromey.com>
3150
3151         PR cli/23340:
3152         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3153         inferior_ptid on error.
3154
3155 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3156             Simon Marchi  <simon.marchi@polymtl.ca>
3157
3158         PR tdep/8282
3159         * disasm.h (gdb_disassembler): Add
3160         `m_disassembler_options_holder'. member
3161         * disasm.c (get_all_disassembler_options): New function.
3162         (gdb_disassembler::gdb_disassembler): Use it.
3163         (gdb_buffered_insn_length_init_dis): Likewise.
3164         (gdb_buffered_insn_length): Adjust accordingly.
3165         (set_disassembler_options): Handle options with arguments.
3166         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3167         line if showing options with descriptions.
3168         (disassembler_options_completer): Adapt to using the
3169         `disasm_options_and_args_t' structure.
3170         * mips-tdep.c (mips_disassembler_options): New variable.
3171         (mips_disassembler_options_o32): Likewise.
3172         (mips_disassembler_options_n32): Likewise.
3173         (mips_disassembler_options_n64): Likewise.
3174         (gdb_print_insn_mips): Don't set `disassembler_options'.
3175         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3176         functions.
3177         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3178         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3179         `gdbarch_disassembler_options_implicit' and
3180         `gdbarch_valid_disassembler_options'.
3181         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3182         `disasm_options_and_args_t' structure.
3183         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3184         method.
3185         (valid_disassembler_options): Switch from `disasm_options_t' to
3186         the `disasm_options_and_args_t' structure.
3187         * NEWS: Document `set disassembler-options' support for the MIPS
3188         target.
3189         * gdbarch.h: Regenerate.
3190         * gdbarch.c: Regenerate.
3191
3192 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3193
3194         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3195
3196 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3197
3198         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3199         parameter in call to amd64_target_description.
3200         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3201         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3202         (amd64fbsd_init_abi): Likewise.
3203         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3204         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3205         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3206         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3207
3208 2018-06-29  Pedro Alves  <palves@redhat.com>
3209
3210         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3211         "segments" parameter.
3212         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3213         (_initialize_amd64_tdep): Update call to
3214         amd64_create_target_description.
3215         (amd64_target_description): Add "segments" parameter.  Adjust
3216         the implementation to use it.
3217         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3218         call to amd64_create_target_description.
3219         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3220         * gdb/arch/amd64.h (amd64_create_target_description): Add
3221         "segments" register.
3222         * gdb/arch/amd64.c (amd64_create_target_description): Add
3223         "segments" parameter.  Call create_feature_i386_64bit_segments
3224         only if SEGMENTS is true.
3225         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3226         call to amd64_create_target_description.
3227
3228 2018-06-29  Pedro Alves  <palves@redhat.com>
3229
3230         * thread.c (thread_target_id_str): New, factored out from ...
3231         (print_thread_info_1): ... here.  Use it to compute the max
3232         "Target Id" column width.
3233
3234 2018-06-29  Pedro Alves  <palves@redhat.com>
3235
3236         * remote.c (remote_target::extra_thread_info): Delete
3237         'display_buf' and 'n' locals.  from the cache, regardless of
3238         packet mechanims is in use.  Use cache for qThreadExtra and qP
3239         methods too.
3240
3241 2018-06-29  Pedro Alves  <palves@redhat.com>
3242
3243         * blockframe.c (find_pc_sect_containing_function): New function.
3244         * breakpoint.c (print_breakpoint_location): Don't call
3245         find_pc_sect_function.
3246         * linespec.c (create_sals_line_offset): Record the location's
3247         symbol in the sal.
3248         * linespec.c (convert_address_location_to_sals): Fill in sal's
3249         symbol with find_pc_sect_containing_function.
3250         * symtab.c (find_function_start_sal): Rename to ...
3251         (find_function_start_sal_1): ... this.
3252         (find_function_start_sal): Reimplement as wrapper around
3253         find_function_start_sal_1, and use
3254         find_pc_sect_containing_function to fill in the sal's symbol.
3255         (find_function_start_sal(symbol*, bool)): Adjust.
3256         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3257         comments.
3258         (find_pc_sect_containing_function): Declare.
3259
3260 2018-06-29  Pedro Alves  <palves@redhat.com>
3261
3262         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3263         true if the the location has no symbol.
3264
3265 2018-06-28  Tom Tromey  <tom@tromey.com>
3266
3267         * NEWS: Mention --enable-codesign.
3268         * silent-rules.mk (ECHO_SIGN): New variable.
3269         * configure.ac: Add --enable-codesign.
3270         * configure: Rebuild.
3271         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3272         (gdb$(EXEEXT)): Optionally invoke codesign.
3273
3274 2018-06-28  Pedro Alves  <palves@redhat.com>
3275
3276         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3277         comments.
3278         (switch_to_thread_no_regs): Adjust comment.
3279         * infcmd.c (stop_pc): Delete.
3280         (post_create_inferior, info_program_command): Replace references
3281         to stop_pc with references to thread_info->suspend.stop_pc.
3282         * inferior.h (stop_pc): Delete declaration.
3283         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3284         (handle_inferior_event_1, handle_signal_stop)
3285         (process_event_stop_test, keep_going_stepped_thread)
3286         (handle_step_into_function, handle_step_into_function_backward)
3287         (print_stop_location): Replace references to stop_pc with
3288         references to thread_info->suspend.stop_pc.
3289         (struct infcall_suspend_state) <stop_pc>: Delete field.
3290         (save_infcall_suspend_state, restore_infcall_suspend_state):
3291         Remove references to inf_stat->stop_pc.
3292         * linux-fork.c (fork_load_infrun_state): Likewise.
3293         * record-btrace.c (record_btrace_set_replay): Likewise.
3294         * record-full.c (record_full_goto_entry): Likewise.
3295         * remote.c (print_one_stopped_thread): Likewise.
3296         * target.c (target_resume): Extend comment.
3297         * thread.c (set_executing_thread): New.
3298         (set_executing): Use it.
3299         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3300         Remove references to stop_pc.
3301
3302 2018-06-28  Pedro Alves  <palves@redhat.com>
3303
3304         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3305         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3306
3307 2018-06-28  Tom Tromey  <tom@tromey.com>
3308
3309         * coffread.c (coff_symfile_finish): Update.
3310         * xcoffread.c (xcoff_symfile_finish): Update.
3311         * elfread.c (elf_symfile_finish): Update.
3312         * symfile.h (dwarf2_free_objfile): Don't declare.
3313         * dwarf2read.c (_initialize_dwarf2_read): Use
3314         register_objfile_data_with_cleanup.
3315         (dwarf2_free_objfile): Now static.  Change signature.
3316
3317 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3318
3319         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3320         option "-o" to add-symbol-file-load to add an offset to each
3321         section's load address.
3322         * symfile.c (set_objfile_default_section_offset): New function.
3323
3324 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3325
3326         * symfile.c (add_symbol_file_command): Make sure that sections
3327         with the same name are sorted in the same order.
3328
3329 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3330
3331         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3332         require the second argument.  If omitted, load sections at the
3333         addresses specified in the file.
3334
3335 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3336
3337         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3338         (_initialize_symfile): Add option "-o" to symbol-file to add an
3339         offset to each section of the symbol file.
3340
3341 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3342
3343         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3344
3345 2018-06-27  Tom Tromey  <tom@tromey.com>
3346
3347         * stack.c (_initialize_stack): Update "func" help text.
3348
3349 2018-06-27  Tom Tromey  <tom@tromey.com>
3350
3351         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3352         std::vector.
3353         (unwind_infopy_str, pyuw_create_unwind_info)
3354         (unwind_infopy_add_saved_register, pyuw_sniffer)
3355         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3356         Update.
3357         (struct saved_reg): Add constructor.
3358         <value>: Now a gdbpy_ref<>.
3359
3360 2018-06-27  Tom Tromey  <tom@tromey.com>
3361
3362         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3363
3364 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3365
3366         * gdb-gdb.py.in: Format using autopep8.
3367
3368 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3369
3370         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3371         (type_lookup_function): Recognize CORE_ADDR values.
3372
3373 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3374
3375         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3376         print tag_name.
3377
3378 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3379
3380         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3381         <__lt__>: Add.
3382
3383 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3384
3385         * gdb-gdb.py: Move to...
3386         * gdb-gdb.py.in: ... here.
3387         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3388         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3389         dependencies.
3390         (distclean): Remove gdb-gdb.py when cleaning.
3391         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3392         * configure: Re-generate.
3393
3394 2018-06-27  Pedro Alves  <palves@redhat.com>
3395
3396         * proc-service.c (get_ps_regcache): New.
3397         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3398         (ps_lsetfpregs): Use it.
3399
3400 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3401
3402         PR gdb/21695
3403         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3404         (dwarf_decode_lines_1): Adjust.
3405
3406 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3407
3408         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3409         override.
3410         <info_proc>: Likewise.
3411
3412 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3413
3414         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3415         to windows_fetch_one_register, and only handle the case of
3416         fetching one register.  Move the code that reloads the context
3417         and iterates over all registers if R is negative to...
3418         (windows_nat_target::fetch_registers): ... here.
3419         (do_windows_store_inferior_registers): Rename to
3420         windows_store_one_register, and only handle the case of storing
3421         one register.  Move the code that handles the case where r is
3422         negative to...
3423         (windows_nat_target::store_registers) ... here.
3424
3425 2018-06-26  Tom Tromey  <tom@tromey.com>
3426
3427         PR rust/22574:
3428         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3429         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3430         Update.
3431         (rust_internal_print_type): Add podata parameter.
3432         (rust_print_type): Update.
3433
3434 2018-06-26  Tom Tromey  <tom@tromey.com>
3435
3436         * typeprint.h (struct print_offset_data) <update, finish,
3437         maybe_print_hole>: New methods.
3438         <indentation>: New constant.
3439         * typeprint.c (print_offset_data::indentation): Define.
3440         (print_offset_data::maybe_print_hole, print_offset_data::update)
3441         (print_offset_data::finish): Move from c-typeprint.c and rename.
3442         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3443         (print_spaces_filtered_with_print_options): Update.
3444         (c_print_type_union_field_offset, maybe_print_hole)
3445         (c_print_type_struct_field_offset): Move to typeprint.c and
3446         rename.
3447         (c_type_print_base_struct_union): Update.
3448
3449 2018-06-25  Pedro Alves  <palves@redhat.com>
3450
3451         * gdbthread.h (thread_info_ref, delete_thread)
3452         (delete_thread_silent, first_thread_of_inferior)
3453         (any_thread_of_inferior, switch_to_thread)
3454         (enable_thread_stack_temporaries)
3455         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3456         (get_last_thread_stack_temporary)
3457         (value_in_thread_stack_temporaries, can_access_registers_thread):
3458         Spell out "struct thread_info" instead of just "thread_info".
3459         * inferior.h (notice_new_inferior): Likewise.
3460
3461 2018-06-25  Pedro Alves  <palves@redhat.com>
3462
3463         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3464         pass thread_info pointer to delete_thread.
3465         (windows_nat_target::detach): Pass inferior pointer to
3466         detach_inferior.
3467         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3468         delete_thread.
3469         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3470         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3471         and pass a thread_info pointer to delete_thread.
3472         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3473         pass thread_info pointer to delete_thread.
3474         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3475         delete_thread_silent call.
3476         * procfs.c (procfs_target::detach): Pass inferior pointer to
3477         detach_inferior.
3478         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3479         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3480         delete_thread_silent call.
3481         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3482         pass thread_info pointer to delete_thread.
3483         (windows_nat_target::detach): Pass inferior pointer to
3484         delete_inferior.
3485
3486 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3487
3488         * regcache.c (readable_regcache::read_part): Fix asserts.
3489         (reg_buffer::raw_collect_part): New function.
3490         (regcache::write_part): Fix asserts.
3491         (reg_buffer::raw_supply_part): New function.
3492         (regcache::transfer_regset_register): New helper function.
3493         (regcache::transfer_regset): Call new functions.
3494         (regcache_supply_regset): Use gdb_byte*.
3495         (regcache::supply_regset): Likewise.
3496         (regcache_collect_regset): Likewise.
3497         (regcache::collect_regset): Likewise.
3498         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3499         (reg_buffer::raw_supply_part): Likewise.
3500         (regcache::transfer_regset_register): Likewise.
3501         (regcache::transfer_regset): Use gdb_byte*.
3502
3503 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3504
3505         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3506
3507 2018-06-21  Pedro Alves  <palves@redhat.com>
3508
3509         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3510         instead of a ptid_t.  All callers adjusted.
3511         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3512         adjusted.
3513         (print_ada_task_info, display_current_task_id, task_command_1):
3514         Adjust.
3515         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3516         inferior_thread.
3517         (breakpoint_kind): Adjust.
3518         (remove_breakpoints_pid): Rename to ...
3519         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3520         pointer.  All callers adjusted.
3521         (bpstat_clear_actions): Use inferior_thread.
3522         (get_bpstat_thread): New.
3523         (bpstat_do_actions): Use it.
3524         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3525         to take a thread_info pointer.  All callers adjusted.
3526         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3527         (breakpoint_re_set_thread): Use inferior_thread.
3528         * breakpoint.h (struct inferior): Forward declare.
3529         (bpstat_stop_status): Update.
3530         (remove_breakpoints_pid): Delete.
3531         (remove_breakpoints_inf): New.
3532         * bsd-uthread.c (bsd_uthread_target::wait)
3533         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3534         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3535         (maint_btrace_packet_history_cmd)
3536         (maint_btrace_clear_packet_history_cmd): Adjust.
3537         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3538         inferior_thread.
3539         * cli/cli-interp.c: Include "inferior.h".
3540         * common/refcounted-object.h (struct
3541         refcounted_object_ref_policy): New.
3542         * compile/compile-object-load.c: Include gdbthread.h.
3543         (store_regs): Use inferior_thread.
3544         * corelow.c (core_target::close): Use current_inferior.
3545         (core_target_open): Adjust to use first_thread_of_inferior and use
3546         the current inferior.
3547         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3548         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3549         <thread>: ... this new field.  All references adjusted.
3550         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3551         Take a thread_info pointer instead of a ptid_t.
3552         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3553         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3554         thread_info pointer instead of a ptid_t.
3555         * elfread.c: Include "inferior.h".
3556         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3557         Use inferior_thread.
3558         * eval.c (evaluate_subexp): Likewise.
3559         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3560         inferior_thread.
3561         * gdb_proc_service.h (struct thread_info): Forward declare.
3562         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3563         <thread>: ... this new field.  All references adjusted.
3564         * gdbarch.h, gdbarch.c: Regenerate.
3565         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3566         'thread' parameter.  All implementations and callers adjusted.
3567         * gdbthread.h (thread_info) <set_running>: New method.
3568         (delete_thread, delete_thread_silent): Take a thread_info pointer
3569         instead of a ptid.
3570         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3571         (first_thread_of_process): Delete, replaced by ...
3572         (first_thread_of_inferior): ... this new function.  All callers
3573         adjusted.
3574         (any_live_thread_of_process): Delete, replaced by ...
3575         (any_live_thread_of_inferior): ... this new function.  All callers
3576         adjusted.
3577         (switch_to_thread, switch_to_no_thread): Declare.
3578         (is_executing): Delete.
3579         (enable_thread_stack_temporaries): Update comment.
3580         <enable_thread_stack_temporaries>: Take a thread_info pointer
3581         instead of a ptid_t.  Incref the thread.
3582         <~enable_thread_stack_temporaries>: Decref the thread.
3583         <m_ptid>: Delete
3584         <m_thr>: New.
3585         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3586         (get_last_thread_stack_temporary)
3587         (value_in_thread_stack_temporaries, can_access_registers_thread):
3588         Take a thread_info pointer instead of a ptid_t.  All callers
3589         adjusted.
3590         * infcall.c (get_call_return_value): Use inferior_thread.
3591         (run_inferior_call): Work with thread pointers instead of ptid_t.
3592         (call_function_by_hand_dummy): Work with thread pointers instead
3593         of ptid_t.  Use thread_info_ref.
3594         * infcmd.c (proceed_thread_callback): Access thread's state
3595         directly.
3596         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3597         access thread's state directly.
3598         (continue_command): Use inferior_thread.
3599         (info_program_command): Use find_thread_ptid and access thread
3600         state directly.
3601         (proceed_after_attach_callback): Use thread state directly.
3602         (notice_new_inferior): Take a thread_info pointer instead of a
3603         ptid_t.  All callers adjusted.
3604         (exit_inferior): Take an inferior pointer instead of a pid.  All
3605         callers adjusted.
3606         (exit_inferior_silent): New.
3607         (detach_inferior): Delete.
3608         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3609         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3610         (detach_inferior_command, kill_inferior_command): Use
3611         find_inferior_id instead of valid_gdb_inferior_id and
3612         gdb_inferior_id_to_pid.
3613         (inferior_command): Use inferior and thread pointers.
3614         * inferior.h (struct thread_info): Forward declare.
3615         (notice_new_inferior): Take a thread_info pointer instead of a
3616         ptid_t.  All callers adjusted.
3617         (detach_inferior): Delete declaration.
3618         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3619         instead of a pid.  All callers adjusted.
3620         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3621         (valid_gdb_inferior_id): Delete.
3622         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3623         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3624         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3625         ...
3626         <inf>: ... this new field.
3627         <step_ptid>: Delete, replaced by ...
3628         <step_thread>: ... this new field.
3629         (get_displaced_stepping_state): Take an inferior pointer instead
3630         of a pid.  All callers adjusted.
3631         (displaced_step_in_progress_any_inferior): Adjust.
3632         (displaced_step_in_progress_thread): Take a thread pointer instead
3633         of a ptid_t.  All callers adjusted.
3634         (displaced_step_in_progress, add_displaced_stepping_state): Take
3635         an inferior pointer instead of a pid.  All callers adjusted.
3636         (get_displaced_step_closure_by_addr): Adjust.
3637         (remove_displaced_stepping_state): Take an inferior pointer
3638         instead of a pid.  All callers adjusted.
3639         (displaced_step_prepare_throw, displaced_step_prepare)
3640         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3641         All callers adjusted.
3642         (start_step_over): Adjust.
3643         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3644         displaced step queue.
3645         (do_target_resume): Adjust.
3646         (fetch_inferior_event): Use inferior_thread.
3647         (context_switch, get_inferior_stop_soon): Take an
3648         execution_control_state pointer instead of a ptid_t.  All callers
3649         adjusted.
3650         (switch_to_thread_cleanup): Delete.
3651         (stop_all_threads): Use scoped_restore_current_thread.
3652         * inline-frame.c: Include "gdbthread.h".
3653         (inline_state) <inline_state>: Take a thread pointer instead of a
3654         ptid_t.  All callers adjusted.
3655         <ptid>: Delete, replaced by ...
3656         <thread>: ... this new field.
3657         (find_inline_frame_state): Take a thread pointer instead of a
3658         ptid_t.  All callers adjusted.
3659         (skip_inline_frames, step_into_inline_frame)
3660         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3661         pointer instead of a ptid_t.  All callers adjusted.
3662         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3663         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3664         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3665         pointers directly.
3666         * linux-nat.c (get_detach_signal): Likewise.
3667         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3668         (thread_db_notice_clone): Adjust.
3669         (thread_db_find_new_threads_silently)
3670         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3671         a thread pointer instead of a ptid_t.  All callers adjusted.
3672         * mi/mi-cmd-var.c: Include "inferior.h".
3673         (mi_cmd_var_update_iter): Update to use thread pointers.
3674         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3675         inferior directly.
3676         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3677         out to ...
3678         (mi_output_running): ... this new function.
3679         (mi_on_resume_1): Adjust to use it.
3680         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3681         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3682         directly.
3683         (interrupt_thread_callback): : Adjust to use thread and inferior
3684         pointers.
3685         * proc-service.c: Include "gdbthread.h".
3686         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3687         * progspace-and-thread.c: Include "inferior.h".
3688         * progspace.c: Include "inferior.h".
3689         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3690         hold a reference to an inferior_object.
3691         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3692         inferior_thread.
3693         * python/py-inferior.c (struct inferior_object): Give the type a
3694         tag name instead of a typedef.
3695         (python_on_normal_stop): No need to check if the current thread is
3696         listed.
3697         (inferior_to_inferior_object): Change return type to
3698         inferior_object.  All callers adjusted.
3699         (find_thread_object): Delete, bits factored out to ...
3700         (thread_to_thread_object): ... this new function.
3701         * python/py-infthread.c (create_thread_object): Use
3702         inferior_to_inferior_object.
3703         (thpy_is_stopped): Use thread pointer directly.
3704         (gdbpy_selected_thread): Use inferior_thread.
3705         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3706         field, replaced with ...
3707         <thread>: ... this new field.  All users adjusted.
3708         (btpy_insn_or_gap_new): Drop const.
3709         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3710         callers adjusted.
3711         * python/py-record.c: Include "gdbthread.h".
3712         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3713         a ptid_t.  All callers adjusted.
3714         (gdbpy_current_recording): Use inferior_thread.
3715         * python/py-record.h (recpy_record_object) <ptid>: Delete
3716         field, replaced with ...
3717         <thread>: ... this new field.  All users adjusted.
3718         (recpy_element_object) <ptid>: Delete
3719         field, replaced with ...
3720         <thread>: ... this new field.  All users adjusted.
3721         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3722         a ptid_t.  All callers adjusted.
3723         * python/py-threadevent.c: Include "gdbthread.h".
3724         (get_event_thread): Use thread_to_thread_object.
3725         * python/python-internal.h (struct inferior_object): Forward
3726         declare.
3727         (find_thread_object, find_inferior_object): Delete declarations.
3728         (thread_to_thread_object, inferior_to_inferior_object): New
3729         declarations.
3730         * record-btrace.c: Include "inferior.h".
3731         (require_btrace_thread): Use inferior_thread.
3732         (record_btrace_frame_sniffer)
3733         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3734         (get_thread_current_frame): Use scoped_restore_current_thread and
3735         switch_to_thread.
3736         (get_thread_current_frame): Use thread pointer directly.
3737         (record_btrace_replay_at_breakpoint): Use thread's inferior
3738         pointer directly.
3739         * record-full.c: Include "inferior.h".
3740         * regcache.c: Include "gdbthread.h".
3741         (get_thread_arch_regcache): Use the inferior's address space
3742         directly.
3743         (get_thread_regcache, registers_changed_thread): New.
3744         * regcache.h (get_thread_regcache(thread_info *thread)): New
3745         overload.
3746         (registers_changed_thread): New.
3747         (remote_target) <remote_detach_1>: Swap order of parameters.
3748         (remote_add_thread): <remote_add_thread>: Return the new thread.
3749         (get_remote_thread_info(ptid_t)): New overload.
3750         (remote_target::remote_notice_new_inferior): Use thread pointers
3751         directly.
3752         (remote_target::process_initial_stop_replies): Use
3753         thread_info::set_running.
3754         (remote_target::remote_detach_1, remote_target::detach)
3755         (extended_remote_target::detach): Adjust.
3756         * stack.c (frame_show_address): Use inferior_thread.
3757         * target-debug.h (target_debug_print_thread_info_pp): New.
3758         * target-delegates.c: Regenerate.
3759         * target.c (default_thread_address_space): Delete.
3760         (memory_xfer_partial_1): Use current_inferior.
3761         (target_detach): Use current_inferior.
3762         (target_thread_address_space): Delete.
3763         (generic_mourn_inferior): Use current_inferior.
3764         * target.h (struct target_ops) <thread_address_space>: Delete.
3765         (target_thread_address_space): Delete.
3766         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3767         pointers directly.
3768         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3769         thread pointer instead of a ptid_t.  Adjust all callers.
3770         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3771         (first_thread_of_process): Delete, replaced by ...
3772         (first_thread_of_inferior): ... this new function.  All callers
3773         adjusted.
3774         (any_thread_of_process): Rename to ...
3775         (any_thread_of_inferior): ... this, and take an inferior pointer.
3776         (any_live_thread_of_process): Rename to ...
3777         (any_live_thread_of_inferior): ... this, and take an inferior
3778         pointer.
3779         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3780         (value_in_thread_stack_temporaries)
3781         (get_last_thread_stack_temporary): Take a thread pointer instead
3782         of a ptid_t.  Adjust all callers.
3783         (thread_info::set_running): New.
3784         (validate_registers_access): Use inferior_thread.
3785         (can_access_registers_ptid): Rename to ...
3786         (can_access_registers_thread): ... this, and take a thread
3787         pointer.
3788         (print_thread_info_1): Adjust to compare thread pointers instead
3789         of ptids.
3790         (switch_to_no_thread, switch_to_thread): Make extern.
3791         (scoped_restore_current_thread::~scoped_restore_current_thread):
3792         Use m_thread pointer directly.
3793         (scoped_restore_current_thread::scoped_restore_current_thread):
3794         Use inferior_thread.
3795         (thread_command): Use thread pointer directly.
3796         (thread_num_make_value_helper): Use inferior_thread.
3797         * top.c (execute_command): Use inferior_thread.
3798         * tui/tui-interp.c: Include "inferior.h".
3799         * varobj.c (varobj_create): Use inferior_thread.
3800         (value_of_root_1): Use find_thread_global_id instead of
3801         global_thread_id_to_ptid.
3802
3803 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3804
3805         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3806         possible.
3807         (regcache::write_part): Likewise.
3808         (readable_regcache::cooked_read_part): Update comment.
3809         (readable_regcache::cooked_write_part): Likewise.
3810         * regcache.h: (readable_regcache::read_part): Likewise.
3811         (regcache::write_part): Likewise.
3812
3813 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3814             Dirk Schubert  <dirk.schubert@arm.com>
3815
3816         * aarch64-linux-nat.c (post_attach): New.
3817         (aarch64_linux_nat_target::post_attach): Override post_attach to
3818         record the number of hardware debug registers.
3819
3820 2018-06-20  Tom Tromey  <tom@tromey.com>
3821
3822         * python/py-param.c (add_setshow_generic): Make parameters const.
3823         (parmpy_init): Update.
3824
3825 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3826
3827         * regcache.h (regcache_cooked_read_ftype): Rename to...
3828         (register_read_ftype): ...this, change type to function_view.
3829         (class reg_buffer) <save>: Remove src parameter.
3830         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3831         parameter non-const in first overload.  Remove src parameter in
3832         second overload.
3833         * regcache.c (do_cooked_read): Remove.
3834         (readonly_detached_regcache::readonly_detached_regcache): Make
3835         parameter non-const, adjust call to other constructor.
3836         (reg_buffer::save): Remove src parameter.
3837         * frame.c (do_frame_register_read): Remove.
3838         (frame_save_as_regcache): Use lambda function.
3839         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3840         parameter to ppu2spu_data *.
3841         (ppu2spu_sniffer): Use lambda function.
3842
3843 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3844
3845         * record-full.c (record_full_target::insert_breakpoint): Remove
3846         "struct" keyword, add const.
3847
3848 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3849
3850         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3851         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3852         * configure.ac: Remove AC_PREREQ, add missing quoting.
3853         * gnulib/configure.ac: Modernize usage of
3854         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3855         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3856         (AUTOMAKE_VERSION): Bump to 1.15.1.
3857         * configure: Re-generate.
3858         * config.in: Re-generate.
3859         * aclocal.m4: Re-generate.
3860         * gnulib/aclocal.m4: Re-generate.
3861         * gnulib/config.in: Re-generate.
3862         * gnulib/configure: Re-generate.
3863         * gnulib/import/Makefile.in: Re-generate.
3864
3865 2018-06-19  Pedro Alves  <palves@redhat.com>
3866
3867         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3868         (lookup_minimal_symbol_by_pc_section): ... here with
3869         gdb_assert_not_reached added.
3870
3871 2018-06-19  Pedro Alves  <palves@redhat.com>
3872
3873         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3874         parameter with a block parameter.  Compare location's block symbol
3875         with the frame's block instead of addresses.
3876         (skip_inline_frames): Pass the current block instead of the
3877         frame's address.  Break out as soon as we determine the frame
3878         should not be skipped.
3879
3880 2018-06-18  Tom Tromey  <tom@tromey.com>
3881
3882         * solib-aix.c (solib_aix_get_section_offsets): Return
3883         unique_xmalloc_ptr.
3884         (solib_aix_solib_create_inferior_hook): Update.
3885
3886 2018-06-18  Tom Tromey  <tom@tromey.com>
3887
3888         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3889
3890 2018-06-18  Tom Tromey  <tom@tromey.com>
3891
3892         * solib-frv.c (frv_relocate_main_executable): Use
3893         unique_xmalloc_ptr.
3894         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3895         unique_xmalloc_ptr.
3896
3897 2018-06-18  Tom Tromey  <tom@tromey.com>
3898
3899         * objfiles.h (inhibit_section_map_updates): Update.
3900         (resume_section_map_updates, resume_section_map_updates_cleanup):
3901         Remove.
3902         * solib-svr4.c (svr4_handle_solib_event): Update.
3903         * objfiles.c (inhibit_section_map_updates): Return
3904         scoped_restore_tmpl<int>.
3905         (resume_section_map_updates, resume_section_map_updates_cleanup):
3906         Remove.
3907
3908 2018-06-18  Tom Tromey  <tom@tromey.com>
3909
3910         * valprint.h (read_string): Update.
3911         * valprint.c (read_string): Change type of "buffer".
3912         (val_print_string): Update.
3913         * python/py-value.c (valpy_string): Update.
3914         * language.h (struct language_defn) <la_get_string>: Change
3915         type of "buffer".
3916         (default_get_string, c_get_string): Update.
3917         * language.c (default_get_string): Change type of "buffer".
3918         * guile/scm-value.c (gdbscm_value_to_string): Update.
3919         * c-lang.c (c_get_string): Change type of "buffer".
3920
3921 2018-06-18  Tom Tromey  <tom@tromey.com>
3922
3923         * ser-mingw.c (struct pipe_state_destroyer): New.
3924         (pipe_state_up): New typedef.
3925         (cleanup_pipe_state): Remove.
3926         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
3927
3928 2018-06-18  Tom Tromey  <tom@tromey.com>
3929
3930         * rust-lang.h (rust_yyerror): Don't declare.
3931         * rust-lang.c (rust_language_defn): Update.
3932         * rust-exp.y (yyerror): Now static.
3933         * parse.c (parse_exp_in_context_1): Update.
3934         * p-lang.h (p_yyerror): Don't declare.
3935         * p-lang.c (p_language_defn): Update.
3936         * p-exp.y (yyerror): Now static.
3937         * opencl-lang.c (opencl_language_defn): Update.
3938         * objc-lang.c (objc_language_defn): Update.
3939         * m2-lang.h (m2_yyerror): Don't declare.
3940         * m2-lang.c (m2_language_defn): Update.
3941         * m2-exp.y (yyerror): Now static.
3942         * language.h (struct language_defn) <la_error>: Remove.
3943         * language.c (unk_lang_error): Remove.
3944         (unknown_language_defn, auto_language_defn): Remove.
3945         * go-lang.h (go_yyerror): Don't declare.
3946         * go-lang.c (go_language_defn): Update.
3947         * go-exp.y (yyerror): Now static.
3948         * f-lang.h (f_yyerror): Don't declare.
3949         * f-lang.c (f_language_defn): Update.
3950         * f-exp.y (yyerror): Now static.
3951         * d-lang.h (d_yyerror): Don't declare.
3952         * d-lang.c (d_language_defn): Update.
3953         * d-exp.y (yyerror): Now static.
3954         * c-lang.h (c_yyerror): Don't declare.
3955         * c-lang.c (c_language_defn, cplus_language_defn)
3956         (asm_language_defn, minimal_language_defn): Update.
3957         * c-exp.y (yyerror): Now static.
3958         * ada-lang.h (ada_yyerror): Don't declare.
3959         * ada-lang.c (ada_language_defn): Update.
3960         * ada-exp.y (yyerror): Now static.
3961
3962 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3963
3964         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3965         (store_sveregs_to_thread): Likewise.
3966         (aarch64_linux_fetch_inferior_registers): Check for SVE.
3967         (aarch64_linux_store_inferior_registers): Likewise.
3968         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3969         function.
3970         (aarch64_sve_regs_copy_to_regcache): Likewise.
3971         (aarch64_sve_regs_copy_from_regcache): Likewise.
3972         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3973         declaration.
3974         (aarch64_sve_regs_copy_to_regcache): Likewise.
3975         (aarch64_sve_regs_copy_from_regcache): Likewise.
3976         (sve_context): Structure from Linux headers.
3977         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3978         (SVE_SIG_ZREG_SIZE): Likewise.
3979         (SVE_SIG_PREG_SIZE): Likewise.
3980         (SVE_SIG_FFR_SIZE): Likewise.
3981         (SVE_SIG_REGS_OFFSET): Likewise.
3982         (SVE_SIG_ZREGS_OFFSET): Likewise.
3983         (SVE_SIG_ZREG_OFFSET): Likewise.
3984         (SVE_SIG_ZREGS_SIZE): Likewise.
3985         (SVE_SIG_PREGS_OFFSET): Likewise.
3986         (SVE_SIG_PREG_OFFSET): Likewise.
3987         (SVE_SIG_PREGS_SIZE): Likewise.
3988         (SVE_SIG_FFR_OFFSET): Likewise.
3989         (SVE_SIG_REGS_SIZE): Likewise.
3990         (SVE_SIG_CONTEXT_SIZE): Likewise.
3991         (SVE_PT_REGS_MASK): Likewise.
3992         (SVE_PT_REGS_FPSIMD): Likewise.
3993         (SVE_PT_REGS_SVE): Likewise.
3994         (SVE_PT_VL_INHERIT): Likewise.
3995         (SVE_PT_VL_ONEXEC): Likewise.
3996         (SVE_PT_REGS_OFFSET): Likewise.
3997         (SVE_PT_FPSIMD_OFFSET): Likewise.
3998         (SVE_PT_FPSIMD_SIZE): Likewise.
3999         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4000         (SVE_PT_SVE_PREG_SIZE): Likewise.
4001         (SVE_PT_SVE_FFR_SIZE): Likewise.
4002         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4003         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4004         (__SVE_SIG_TO_PT): Likewise.
4005         (SVE_PT_SVE_OFFSET): Likewise.
4006         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4007         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4008         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4009         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4010         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4011         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4012         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4013         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4014         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4015         (SVE_PT_SVE_SIZE): Likewise.
4016         (SVE_PT_SIZE): Likewise.
4017         (HAS_SVE_STATE): New define.
4018
4019 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4020
4021         * nat/aarch64-sve-linux-sigcontext.h: New file.
4022         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4023         new files.
4024         (SVE_VQ_MIN): Likewise.
4025         (SVE_VQ_MAX): Likewise.
4026         (SVE_VL_MIN): Likewise.
4027         (SVE_VL_MAX): Likewise.
4028         (SVE_NUM_ZREGS): Likewise.
4029         (SVE_NUM_PREGS): Likewise.
4030         (sve_vl_valid): Likewise.
4031         (struct user_sve_header): Likewise.
4032
4033 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4034             Richard Bunt <Richard.Bunt@arm.com>
4035
4036         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4037         was requested by GDB.
4038
4039 2018-06-15  Tom de Vries  <tdevries@suse.de>
4040
4041         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4042
4043 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4044
4045         * gnulib/update-gnulib.sh: Print expected versions of
4046         autoconf/aclocal.
4047
4048 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4049
4050         * arch-utils.c (default_type_align): Use type_length_units.
4051         * gdbtypes.c (type_align): Use type_length_units.
4052
4053 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4054
4055         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4056         of 'define' command.
4057
4058 2018-06-14  Tom de Vries  <tdevries@suse.de>
4059
4060         PR cli/22573
4061         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4062         get_no_prettyformat_print_options.
4063
4064 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4065
4066         * sparc-nat.h: Include target.h.
4067         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4068         <fetch_registers>: Remove this argument in function call.
4069         <store_registers>: Remove this argument in function call, remove
4070         extra semicolon.
4071         <low_forget_process>: Call sparc64_forget_process instead of
4072         sparc_forget_process.
4073
4074 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4075
4076         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4077         (procfs_target::make_corefile_notes): Adjust to new
4078         target_read_alloc return type.
4079
4080 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4081             Stephen Roberts  <stephen.roberts@arm.com>
4082
4083         PR gdb/22882
4084         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4085         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4086         Move should_notify_stop local into more inner scope.
4087
4088 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4089             Stephen Roberts  <stephen.roberts@arm.com>
4090
4091         PR gdb/22882
4092         * infrun.c (resume_1): Add call to mark_async_event_handler.
4093
4094 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4095
4096         * infrun.c (do_target_wait): Change old version of $pc printed.
4097
4098 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4099
4100         * dwarf2read.c (read_index_from_section): Rename to...
4101         (read_gdb_index_from_section): ... this, update all callers.
4102         (dwarf2_read_index): Rename to...
4103         (dwarf2_read_gdb_index): ... this, update all callers.
4104
4105 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4106
4107         * gdb/hppa-linux-nat.c
4108         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4109         hppa_linux_nat_target::fetch_registers.
4110
4111 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4112
4113         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4114         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4115         (AARCH64_DWARF_SVE_FFR): Likewise.
4116         (AARCH64_DWARF_SVE_P0): Likewise.
4117         (AARCH64_DWARF_SVE_Z0): Likewise.
4118
4119 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4120
4121         * common/common-regcache.h (raw_compare): New function.
4122         * regcache.c (regcache::raw_compare): Likewise.
4123         * regcache.h (regcache::raw_compare): New declaration.
4124
4125 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4126
4127         * common/common-regcache.h (reg_buffer_common): New structure.
4128         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4129         (reg_buffer::raw_supply): Likewise.
4130         (reg_buffer::raw_supply_integer): Likewise.
4131         (reg_buffer::raw_supply_zeroed): Likewise.
4132         (reg_buffer::raw_collect): Likewise.
4133         (reg_buffer::raw_collect_integer): Likewise.
4134         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4135         (reg_buffer::raw_supply): Likewise.
4136         (reg_buffer::raw_supply_integer): Likewise.
4137         (reg_buffer::raw_supply_zeroed): Likewise.
4138         (reg_buffer::raw_collect): Likewise.
4139         (reg_buffer::raw_collect_integer): Likewise.
4140
4141 2018-06-10  Tom Tromey  <tom@tromey.com>
4142
4143         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4144         (class remote_state) <stop_reply_queue>: Now std::vector.
4145         (remote_state::~remote_state)
4146         (remote_target::stop_reply_queue_length): Update.
4147         (struct queue_iter_param, remove_child_of_pending_fork)
4148         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4149         (check_pending_event_prevents_wildcard_vcont_callback)
4150         (remove_stop_reply_for_inferior)
4151         (remove_stop_reply_of_remote_state)
4152         (remote_notif_remove_once_on_match)
4153         (stop_reply_match_ptid_and_ws)
4154         (remote_kill_child_of_pending_fork): Remove.
4155         (remote_target::remove_new_fork_children)
4156         (remote_target::check_pending_events_prevent_wildcard_vcont)
4157         (remote_target::discard_pending_stop_replies)
4158         (remote_target::discard_pending_stop_replies_in_queue)
4159         (remote_target::remote_notif_remove_queued_reply)
4160         (remote_target::queued_stop_reply)
4161         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4162         (remote_target::wait, remote_target::kill_new_fork_children)
4163         (remote_target::async): Update.
4164
4165 2018-06-10  Tom Tromey  <tom@tromey.com>
4166
4167         * record-full.c (record_full_arch_list_cleanups): Remove.
4168         (record_full_message): Use try/catch.
4169         (record_full_wait_cleanups): Remove.
4170         (record_full_wait_1): Use try/catch.
4171         (record_full_restore): Likewise.
4172
4173 2018-06-10  Tom Tromey  <tom@tromey.com>
4174
4175         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4176         declare VEC.  Add constructor.
4177         <in_target_beneath>: Now bool.
4178         (record_full_breakpoints): Now a std::vector, static.
4179         (record_full_sync_record_breakpoints)
4180         (record_full_init_record_breakpoints)
4181         (record_full_target::insert_breakpoint)
4182         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4183
4184 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4185
4186         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4187         * serial.c (serial_interface_lookup): Remove struct keyword.
4188
4189 2018-06-10  Tom Tromey  <tom@tromey.com>
4190
4191         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4192         method.
4193         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4194         a method.
4195         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4196         method.
4197         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4198         "beneath" as a method.
4199         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4200         Use "beneath" as a method.
4201
4202 2018-06-10  Tom Tromey  <tom@tromey.com>
4203
4204         * tracefile.c (struct trace_file_writer_deleter): New.
4205         <operator()>: Rename from trace_file_writer_xfree.
4206         (trace_file_writer_up): New typedef.
4207         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4208
4209 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4210
4211         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4212         <m_registers, m_register_status>: Change type to
4213         std::unique_ptr.
4214         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4215         XCNEWVEC.
4216
4217 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4218
4219         * common/common-regcache.h (enum register_status): Add
4220         underlying type "signed char".
4221         * regcache.h (reg_buffer) <m_register_status>: Change type to
4222         register_status *.
4223         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4224         register_status instead of signed char.
4225         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4226         (reg_buffer::get_register_status): Remove cast.
4227         (readable_regcache::raw_read): Remove cast.
4228         (readable_regcache::cooked_read): Remove cast.
4229
4230 2018-06-09  Tom Tromey  <tom@tromey.com>
4231
4232         * source.c (reverse_search_command, forward_search_command): Use
4233         scoped_fd.
4234
4235 2018-06-09  Tom Tromey  <tom@tromey.com>
4236
4237         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4238         (serial_ops_list): Now static, std::vector.
4239         (serial_interface_lookup, serial_add_interface): Update.
4240
4241 2018-06-09  Tom Tromey  <tom@tromey.com>
4242
4243         * dwarf2read.c (process_cu_includes): Update.
4244         (process_full_comp_unit): Update.
4245         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4246         std::vector.
4247
4248 2018-06-08  Paul Koning  <paul_koning@dell.com>
4249
4250         PR gdb/23252
4251
4252         * python/python.c (do_start_initialization):
4253         Avoid call to internal Python API.
4254         (init__gdb_module): New function.
4255
4256 2018-06-08  Gary Benson <gbenson@redhat.com>
4257
4258         * linux-thread-db.c (valprint.h): New include.
4259         (struct check_thread_db_info): New structure.
4260         (check_thread_db_on_load, tdb_testinfo): New static globals.
4261         (check_thread_db, check_thread_db_callback): New functions.
4262         (try_thread_db_load_1): Run integrity checks if requested.
4263         (maintenance_check_libthread_db): New function.
4264         (_initialize_thread_db): Register "maint check libthread-db"
4265         and "maint set/show check-libthread-db".
4266         * NEWS: Mention the above new commands.
4267
4268 2018-06-08  Tom Tromey  <tom@tromey.com>
4269
4270         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4271         now a method.
4272
4273 2018-06-08  Tom Tromey  <tom@tromey.com>
4274
4275         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4276
4277 2018-06-08  Tom Tromey  <tom@tromey.com>
4278
4279         * common/btrace-common.h (struct btrace_data): Add constructor,
4280         destructor, move assignment operator.
4281         <empty, clear, fini>: New methods.
4282         <format>: Initialize.
4283         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4284         (btrace_data_empty): Don't declare.
4285         * common/btrace-common.c (btrace_data_init): Remove.
4286         (btrace_data::fini): Rename from btrace_data_fini.
4287         (btrace_data::empty): Rename from btrace_data_empty.
4288         (btrace_data::clear): Rename from btrace_data_clear.  Return
4289         bool.
4290         * btrace.h (make_cleanup_btrace_data): Don't declare.
4291         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4292         (parse_xml_btrace): Update.
4293         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4294         (maint_btrace_clear_packet_history_cmd): Update.
4295
4296 2018-06-07  Pedro Alves  <palves@redhat.com>
4297
4298         * target.h (target_ops) <beneath>: Now a method.  All references
4299         updated.
4300         (class target_stack): New.
4301         * target.c (g_target_stack): New.
4302         (g_current_top_target): Delete.
4303         (current_top_target): Get the top target out of g_target_stack.
4304         (target_stack::push, target_stack::unpush): New.
4305         (push_target, unpush_target): Reimplement.
4306         (target_is_pushed): Reimplement in terms of g_target_stack.
4307         (target_ops::beneath, target_stack::find_beneath): New.
4308
4309 2018-06-07  Pedro Alves  <palves@redhat.com>
4310
4311         * target.h (find_target_beneath): Delete declaration.
4312         * target.c (find_target_beneath): Delete definition.
4313         * aix-thread.c: All callers of find_target_beneath adjusted to
4314         call target_ops::beneath instead.
4315         * bsd-uthread.c: Likewise.
4316         * linux-thread-db.c: Likewise.
4317         * ravenscar-thread.c: Likewise.
4318         * sol-thread.c: Likewise.
4319         * spu-multiarch.c: Likewise.
4320
4321 2018-06-07  Pedro Alves  <palves@redhat.com>
4322
4323         * target.h (target_ops) <beneath>: Now a method.  All references
4324         updated.
4325         (target_ops) <m_beneath>: New.
4326         * target.c (target_ops::beneath): New.
4327         * corelow.c: Adjust all references to target_ops::beneath.
4328         * linux-thread-db.c: Likewise.
4329         * make-target-delegates: Likewise.
4330         * record-btrace.c: Likewise.
4331         * record-full.c: Likewise.
4332         * remote.c: Likewise.
4333         * target.c: Likewise.
4334         * target-delegates.c: Regenerate.
4335
4336 2018-06-07  Pedro Alves  <palves@redhat.com>
4337
4338         * target.h (target_stack): Delete.
4339         (current_top_target): Declare function.
4340         * target.c (target_stack): Delete.
4341         (g_current_top_target): New.
4342         (current_top_target): New function.
4343         * auxv.c: Use current_top_target instead of target_stack
4344         throughout.
4345         * avr-tdep.c: Likewise.
4346         * breakpoint.c: Likewise.
4347         * corefile.c: Likewise.
4348         * elfread.c: Likewise.
4349         * eval.c: Likewise.
4350         * exceptions.c: Likewise.
4351         * frame.c: Likewise.
4352         * gdbarch-selftests.c: Likewise.
4353         * gnu-v3-abi.c: Likewise.
4354         * ia64-tdep.c: Likewise.
4355         * ia64-vms-tdep.c: Likewise.
4356         * infcall.c: Likewise.
4357         * infcmd.c: Likewise.
4358         * infrun.c: Likewise.
4359         * linespec.c: Likewise.
4360         * linux-tdep.c: Likewise.
4361         * minsyms.c: Likewise.
4362         * ppc-linux-nat.c: Likewise.
4363         * ppc-linux-tdep.c: Likewise.
4364         * procfs.c: Likewise.
4365         * regcache.c: Likewise.
4366         * remote.c: Likewise.
4367         * rs6000-tdep.c: Likewise.
4368         * s390-linux-nat.c: Likewise.
4369         * s390-tdep.c: Likewise.
4370         * solib-aix.c: Likewise.
4371         * solib-darwin.c: Likewise.
4372         * solib-dsbt.c: Likewise.
4373         * solib-spu.c: Likewise.
4374         * solib-svr4.c: Likewise.
4375         * solib-target.c: Likewise.
4376         * sparc-tdep.c: Likewise.
4377         * sparc64-tdep.c: Likewise.
4378         * spu-tdep.c: Likewise.
4379         * symfile.c: Likewise.
4380         * symtab.c: Likewise.
4381         * target-descriptions.c: Likewise.
4382         * target-memory.c: Likewise.
4383         * target.c: Likewise.
4384         * target.h: Likewise.
4385         * tracefile-tfile.c: Likewise.
4386         * tracepoint.c: Likewise.
4387         * valops.c: Likewise.
4388         * valprint.c: Likewise.
4389         * value.c: Likewise.
4390         * windows-tdep.c: Likewise.
4391         * mi/mi-main.c: Likewise.
4392
4393 2018-06-07  Tom Tromey  <tom@tromey.com>
4394
4395         * valprint.h (build_address_symbolic): Declare.
4396         * printcmd.c (print_address_symbolic): Update.
4397         (build_address_symbolic): Change "name" and "filename" to
4398         std::string.
4399         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4400         Update.
4401         * defs.h (build_address_symbolic): Remove declaration.
4402
4403 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4404
4405         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4406         (aarch64_vnv_type): Add function.
4407         (aarch64_pseudo_register_name): Add V regs for SVE.
4408         (aarch64_pseudo_register_type): Likewise.
4409         (aarch64_pseudo_register_reggroup_p): Likewise.
4410         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4411         (aarch64_pseudo_read_value): Add V regs for SVE.
4412         (aarch64_pseudo_write_2): Use V0 offset for SVE
4413         (aarch64_pseudo_write): Add V regs for SVE.
4414         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4415
4416 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4417
4418         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4419         (sve_vl_from_vq): Likewise.
4420
4421 2018-06-05  Tom Tromey  <tom@tromey.com>
4422
4423         * cli/cli-cmds.c (show_version): Update.
4424         * top.c (print_gdb_version): Add "interactive" parameter.
4425         Update.
4426         * main.c (captured_main_1): Update.
4427         * top.h (print_gdb_version): Add "interactive" parameter and a
4428         comment.
4429
4430 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4431
4432         * common/enum-flags.h: Add trailing semicolon to example in
4433         comment.
4434
4435 2018-06-05  Tom Tromey  <tom@tromey.com>
4436
4437         PR cli/12326:
4438         * NEWS: Add entry about pager.
4439         * utils.c (pagination_disabled_for_command): New global.
4440         (prompt_for_continue): Allow "c" response to prompt.
4441         (reinitialize_more_filter): Clear
4442         pagination_disabled_for_command.
4443         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4444
4445 2018-06-04  Tom Tromey  <tom@tromey.com>
4446
4447         * ada-lang.h (ada_lookup_symbol_list): Update.
4448         * ada-lang.c (resolve_subexp): Update.
4449         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4450         parameter.
4451         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4452         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4453         results parameter to std::vector.
4454         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4455         Update.
4456         * ada-exp.y (block_lookup): Update.
4457         (select_possible_type_sym): Change type of syms.  Remove nsyms
4458         parameter.
4459         (write_var_or_type, write_name_assoc): Update.
4460
4461 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4462
4463         * windows-nat.c (windows_nat_target::xfer_partial): Return
4464         TARGET_XFER_E_IO if we need to delegate to the target beneath
4465         but BENEATH is NULL.
4466
4467 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4468
4469         * Makefile.in (config.status): Add configure.nat as a
4470         dependency.
4471
4472 2018-06-04  Tom Tromey  <tom@tromey.com>
4473
4474         * cp-name-parser.y (cpname_state): Add method declarations.
4475         (HANDLE_QUAL): Update.
4476         (cpname_state::d_grab, cpname_state::fill_comp)
4477         (cpname_state::make_operator, cpname_state::make_dtor)
4478         (cpname_state::make_builtin_type, cpname_state::make_name)
4479         (cpname_state::d_qualify, cpname_state::d_int_type)
4480         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4481         (%union): Move earlier.
4482
4483 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4484
4485         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4486
4487 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4488
4489         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4490         (aarch64_pseudo_write_1): Likewise.
4491         (aarch64_pseudo_read_value): Use helper.
4492         (aarch64_pseudo_write): Likewise.
4493
4494 2018-06-04  Pedro Alves  <palves@redhat.com>
4495
4496         * darwin-nat.c (darwin_ops): Delete.
4497         (darwin_attach_pid): Use get_native_target.
4498
4499 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4500
4501         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4502         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4503
4504 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4505
4506         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4507         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4508         (aarch64_gdbarch_init): Check for SVE.
4509         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4510
4511 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4512
4513         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4514         * aarch64-tdep.h (aarch64_read_description): Likewise.
4515         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4516         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4517         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4518         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4519         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4520
4521 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4522
4523         * value.c (value_fetch_lazy_bitfield): New.
4524         (value_fetch_lazy_memory): New.
4525         (value_fetch_lazy_register): New.
4526         (value_fetch_lazy): Factor out to smaller functions.
4527
4528 2018-06-01  Tom Tromey  <tom@tromey.com>
4529
4530         * cp-name-parser.y (backslashable, represented): Now const.
4531
4532 2018-06-01  Tom Tromey  <tom@tromey.com>
4533
4534         * cp-name-parser.y: Include parser-defs.h.
4535         (parser_fprintf): Remove declaration.
4536
4537 2018-06-01  Tom Tromey  <tom@tromey.com>
4538
4539         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4540         %parse-param.
4541         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4542         (global_result): Remove globals.
4543         (struct cpname_state): New.
4544         (yyparse): Don't declare.
4545         (yylex, yyerror): Move declarations after %union.
4546         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4547         (make_name): Add state parameter.
4548         Update all callers.
4549         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4550         parameter.
4551         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4552         Update.
4553         (yylex): Add lvalp, state parameters.
4554         (yyerror): Add state parameter.
4555         (cp_demangled_name_to_comp): Update.
4556
4557 2018-06-01  Tom Tromey  <tom@tromey.com>
4558
4559         * cp-name-parser.y (parser_fprintf): Declare.
4560         (GDB_YY_REMAP_PREFIX): Define.
4561         Include yy-remap.h.  Don't redefine yy* identifiers.
4562
4563 2018-06-01  Tom Tromey  <tom@tromey.com>
4564
4565         * python/py-type.c (typy_legacy_template_argument): Update.
4566         * cp-support.h (cp_demangled_name_to_comp): Update.
4567         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4568         parameter to be a "std::string *".
4569         (main): Update.
4570
4571 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4572
4573         * ada-lex.l: Include "diagnostics.h" instead of
4574         "common/diagnostics.h".
4575         * unittests/environ-selftests.c: Likewise.
4576         * common/diagnostics.h: Moved to ../include.
4577
4578 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4579
4580         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4581         to language_mode_manual while calling breakpoint_re_set_one.
4582
4583 2018-06-01  Tom Tromey  <tom@tromey.com>
4584
4585         * valops.c (value_cast_structs, destructor_name_p): Update.
4586         * symtab.c (gdb_mangle_name): Update.
4587         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4588         Update.
4589         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4590         (pascal_object_print_value_fields, pascal_object_print_value):
4591         Update.
4592         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4593         * linespec.c (find_methods): Update.
4594         * gdbtypes.h (type_name_no_tag): Remove.
4595         (type_name_or_error): Rename from type_name_no_tag_or_error.
4596         * gdbtypes.c (type_name_no_tag): Remove.
4597         (type_name_or_error): Rename from type_name_no_tag_or_error.
4598         (lookup_struct_elt_type, check_typedef): Update.
4599         * expprint.c (print_subexp_standard): Update.
4600         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4601         * d-namespace.c (d_lookup_nested_symbol): Update.
4602         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4603         (cp_print_class_member): Update.
4604         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4605         * completer.c (add_struct_fields): Update.
4606         * c-typeprint.c (cp_type_print_derivation_info)
4607         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4608         Update.
4609         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4610         (ada_prefer_type, ada_is_exception_sym): Update.
4611
4612 2018-06-01  Tom Tromey  <tom@tromey.com>
4613
4614         * valops.c (enum_constant_from_type, value_namespace_elt)
4615         (value_maybe_namespace_elt): Update.
4616         * valarith.c (find_size_for_pointer_math): Update.
4617         * target-descriptions.c (make_gdb_type): Update.
4618         * symmisc.c (print_symbol): Update.
4619         * stabsread.c (define_symbol, read_type)
4620         (complain_about_struct_wipeout, add_undefined_type)
4621         (cleanup_undefined_types_1): Update.
4622         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4623         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4624         (rust_internal_print_type, rust_composite_type)
4625         (rust_evaluate_funcall, rust_evaluate_subexp)
4626         (rust_inclusive_range_type_p): Update.
4627         * python/py-type.c (typy_get_tag): Update.
4628         * p-typeprint.c (pascal_type_print_base): Update.
4629         * mdebugread.c (parse_symbol, parse_type): Update.
4630         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4631         Update.
4632         * guile/scm-type.c (gdbscm_type_tag): Update.
4633         * go-lang.c (sixg_string_p): Update.
4634         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4635         Update.
4636         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4637         (TYPE_TAG_NAME): Remove.
4638         * gdbtypes.c (type_name_no_tag): Simplify.
4639         (check_typedef, check_types_equal, recursive_dump_type)
4640         (copy_type_recursive, arch_composite_type): Update.
4641         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4642         in summary mode when needed.
4643         * eval.c (evaluate_funcall): Update.
4644         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4645         (process_structure_scope, read_enumeration_type)
4646         (read_namespace_type, read_module_type, determine_prefix): Update.
4647         * cp-support.c (inspect_type): Update.
4648         * coffread.c (process_coff_symbol, decode_base_type): Update.
4649         * c-varobj.c (c_is_path_expr_parent): Update.
4650         * c-typeprint.c (c_type_print_base_struct_union): Update.
4651         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4652         summary when using C language.
4653         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4654         (gen_maybe_namespace_elt): Update.
4655         * ada-lang.c (ada_type_name): Simplify.
4656         (empty_record, ada_template_to_fixed_record_type_1)
4657         (template_to_static_fixed_type)
4658         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4659
4660 2018-06-01  Tom Tromey  <tom@tromey.com>
4661
4662         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4663         c_print_type.
4664         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4665         (c_print_type): Update.
4666         (c_print_type): New overload.
4667         (c_type_print_varspec_prefix, c_type_print_args)
4668         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4669         (c_type_print_base_struct_union, c_type_print_base_1)
4670         (cp_type_print_method_args): Add "language" parameter.
4671         (c_type_print_base): Update.
4672         * c-lang.h (c_print_type): Add new overload.
4673
4674 2018-06-01  Tom Tromey  <tom@tromey.com>
4675
4676         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4677         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4678
4679 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4680
4681         * aarch64-tdep.c (aarch64_sve_register_names): New const
4682         var.
4683         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4684         (AARCH64_SVE_Z_REGS_NUM): New define.
4685         (AARCH64_SVE_P_REGS_NUM): Likewise.
4686         (AARCH64_SVE_NUM_REGS): Likewise.
4687
4688 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4689
4690         * nat/linux-ptrace.h [__alpha__]
4691         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4692         definitions.
4693
4694 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4695
4696         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4697         the endianness selected.
4698         * NEWS: Document `set endian auto' mode operation update.
4699
4700 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4701
4702         * Makefile.in: Add new header.
4703         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4704         (sve_vl_from_vg): Likewise.
4705         (sve_vq_from_vl): Likewise.
4706         (sve_vl_from_vq): Likewise.
4707         (sve_vq_from_vg): Likewise.
4708         (sve_vg_from_vq): Likewise.
4709         * configure.nat: Add new c file.
4710         * nat/aarch64-sve-linux-ptrace.c: New file.
4711         * nat/aarch64-sve-linux-ptrace.h: New file.
4712
4713 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4714
4715         * aarch64-linux-nat.c (aarch64_linux_read_description):
4716         Add parmeter zero.
4717         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4718         Likewise.
4719         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4720         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4721         (aarch64_gdbarch_init): Add parmeter zero.
4722         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4723         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4724         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4725         parmeter.
4726         * doc/gdb.texinfo: Describe SVE feature
4727         * features/aarch64-sve.c: New file.
4728
4729 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4730
4731         PR gdb/23210
4732         * gdbarch.sh (significant_addr_bit): Default to zero when
4733         not set by target architecture.
4734         * gdbarch.c: Re-generated.
4735         * utils.c (address_significant): Update.
4736
4737 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4738
4739         * stack.c (func_command): Remove trailing newline in call to error.
4740
4741 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4742
4743         * regcache.h (regcache_raw_collect): Remove, update callers to
4744         use regcache::raw_collect.
4745         * regcache.c (regcache_raw_collect): Remove.
4746
4747 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4748
4749         * regcache.h (regcache_raw_supply): Remove, update callers to
4750         use detached_regcache::raw_supply.
4751         * regcache.c (regcache_raw_supply): Remove.
4752
4753 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4754
4755         * regcache.h (regcache_cooked_write_part): Remove, update
4756         callers to use regcache::cooked_write_part.
4757         * regcache.c (regcache_cooked_write_part): Remove.
4758
4759 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4760
4761         * regcache.h (regcache_cooked_read_part): Remove, update callers
4762         to use readable_regcache::cooked_read_part.
4763         * regcache.c (regcache_cooked_read_part): Remove.
4764
4765 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4766
4767         * regcache.h (regcache_cooked_read_value): Remove, update
4768         callers to use readable_regcache::cooked_read_value.
4769         * regcache.c (regcache_cooked_read_value): Remove.
4770
4771 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4772
4773         * regcache.h (regcache_cooked_write): Remove, update callers to
4774         use regcache::cooked_write.
4775         * regcache.c (regcache_cooked_write): Remove.
4776
4777 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4778
4779         * regcache.h (regcache_invalidate): Remove, update callers to
4780         use detached_regcache::invalidate instead.
4781         * regcache.c (regcache_invalidate): Remove.
4782
4783 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4784
4785         * regcache.h (regcache_raw_write_part): Remove, update callers
4786         to use regcache::raw_write_part instead.
4787         * regcache.c (regcache_raw_write_part): Remove.
4788
4789 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4790
4791         * regcache.h (regcache_raw_read_part): Remove, update callers to
4792         use readable_regcache::raw_read_part instead.
4793         * regcache.c (regcache_raw_read_part): Remove.
4794
4795 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4796
4797         * regcache.h (regcache_cooked_read): Remove, update callers to
4798         use readable_regcache::cooked_read instead.
4799         * regcache.c (regcache_cooked_read): Remove.
4800
4801 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4802
4803         * regcache.h (regcache_raw_write): Remove, update callers to use
4804         regcache::raw_write instead.
4805         * regcache.c (regcache_raw_write): Remove.
4806
4807 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4808
4809         * regcache.h (regcache_raw_read): Remove, update callers to use
4810         readable_regcache::raw_read instead.
4811         * regcache.c (regcache_raw_read): Remove.
4812
4813 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4814
4815         * regcache.h (regcache_raw_update): Remove, update callers to
4816         use readable_regcache::raw_update instead.
4817         * regcache.c (regcache_raw_update): Remove.
4818
4819 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4820
4821         * regcache.h (regcache_register_status): Remove, update callers
4822         to use reg_buffer::get_register_status directly instead.
4823         * regcache.c (regcache_register_status): Remove.
4824
4825 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4826
4827         * regcache.h (regcache_get_ptid): Remove, update all callers to
4828         call regcache::ptid instead.
4829         * regcache.c (regcache_get_ptid): Remove.
4830
4831 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4832
4833         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4834
4835 2018-05-30  Pedro Alves  <palves@redhat.com>
4836
4837         * common/common-exceptions.h (exception_rethrow): Use
4838         ATTRIBUTE_NORETURN.
4839
4840 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4841
4842         * breakpoint.c (print_solib_event, check_status_catch_solib):
4843         Remove struct keyword in range-based for loops.
4844         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4845         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4846         Likewise.
4847         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4848         Likewise.
4849         * symfile.c (addr_info_make_relative): Likewise.
4850         * thread.c (value_in_thread_stack_temporaries): Likewise.
4851
4852 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4853
4854         PR gdb/16841
4855         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4856         aggregate type to get its real type before accessing it.
4857
4858 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4859
4860         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4861         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4862         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4863         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4864         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4865         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4866         * printcmd.c (info_address_command): Likewise.
4867
4868 2018-05-29  Tom Tromey  <tom@tromey.com>
4869
4870         * windows-nat.c (handle_exception): Update fall-through comment.
4871
4872 2018-05-29  Tom Tromey  <tom@tromey.com>
4873
4874         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4875         (struct program_space) <added_solibs>: Now a std::vector.
4876         * breakpoint.c (print_solib_event): Update.
4877         (check_status_catch_solib): Update.
4878         * progspace.c (clear_program_space_solib_cache): Update.
4879         * solib.c (update_solib_list): Update.
4880
4881 2018-05-29  Tom Tromey  <tom@tromey.com>
4882
4883         * python/py-type.c (typy_richcompare): Update.
4884         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4885         * gdbtypes.h (types_deeply_equal): Return bool.
4886         (types_equal): Likewise.
4887         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4888         declare VEC.
4889         (check_types_equal): Change worklist to std::vector.  Return
4890         bool.
4891         (struct type_equality_entry): Add constructor.
4892         (compare_maybe_null_strings): Return bool.
4893         (check_types_worklist): Return bool.  Change worklist to
4894         std::vector.
4895         (types_deeply_equal): Use std::vector.
4896         (types_equal): Return bool.
4897         (compare_maybe_null_strings): Simplify.
4898
4899 2018-05-29  Tom Tromey  <tom@tromey.com>
4900
4901         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4902
4903 2018-05-29  Tom Tromey  <tom@tromey.com>
4904
4905         * objc-lang.h: Don't include cp-support.h.
4906         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4907         declare VEC.
4908
4909 2018-05-27  Tom Tromey  <tom@tromey.com>
4910
4911         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4912
4913 2018-05-25  Tom Tromey  <tom@tromey.com>
4914
4915         * value.c (value::location): Initialize.
4916
4917 2018-05-25  Tom Tromey  <tom@tromey.com>
4918
4919         * dbxread.c (init_bincl_list): Remove.
4920         (bincl_list): Now a std::vector.
4921         (bincls_allocated, next_bincl): Remove.
4922         (free_bincl_list, do_free_bincl_list_cleanup)
4923         (make_cleanup_free_bincl_list): Remove.
4924         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4925         unique_xmalloc_ptr.
4926         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4927         (struct header_file_location): Add constructor.
4928         (add_bincl_to_list): Remove.
4929
4930 2018-05-25  Tom Tromey  <tom@tromey.com>
4931
4932         * tui/tui.c (tui_enable): Update.
4933         * mi/mi-interp.c (mi_interp::init): Update.
4934         * interps.h (class interp) <name>: New method.
4935         <m_name>: Rename from name.
4936         (~scoped_restore_interp): Update.
4937         * interps.c (interp::interp): Update.
4938         (interp_add, interp_set, interp_lookup_existing)
4939         (current_interp_named_p): Update.
4940
4941 2018-05-25  Tom Tromey  <tom@tromey.com>
4942
4943         * interps.c (interp_name): Remove.
4944         * mi/mi-interp.c (mi_interp::init): Update.
4945         * interps.h (interp_name): Remove.
4946         (~scoped_restore_interp): Update.
4947         * tui/tui.c (tui_enable): Update.
4948
4949 2018-05-25  Tom Tromey  <tom@tromey.com>
4950
4951         * utils.c (fputs_maybe_filtered): Update.
4952         * linespec.c (decode_line_full): Update.
4953         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4954         (mi_print_breakpoint_for_event, mi_solib_loaded)
4955         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4956         (mi_user_selected_context_changed): Update.
4957         * mi/mi-main.c (mi_execute_command): Update.
4958         * cli/cli-script.c (execute_control_command): Update.
4959         * python/python.c (execute_gdb_command): Update.
4960         * solib.c (info_sharedlibrary_command): Update.
4961         * interps.c (interp_ui_out): Remove.
4962         * interps.h (interp_ui_out): Remove.
4963
4964 2018-05-25  Tom Tromey  <tom@tromey.com>
4965
4966         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4967         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4968         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4969
4970 2018-05-25  Tom Tromey  <tom@tromey.com>
4971
4972         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4973         * interps.c (interp_exec): Use scoped_restore.
4974
4975 2018-05-25  Tom Tromey  <tom@tromey.com>
4976
4977         * remote.c (remote_target::remote_file_get): Use
4978         gdb::byte_vector.
4979         (remote_target::remote_file_put): Likewise.
4980
4981 2018-05-25  Tom Tromey  <tom@tromey.com>
4982
4983         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4984         a std::string.
4985         (get_pe_section_index, add_pe_exported_sym): Update.
4986         (read_pe_exported_syms): Use gdb::def_vector.
4987
4988 2018-05-25  Tom Tromey  <tom@tromey.com>
4989
4990         * frame.c (remove_prev_frame): Remove.
4991         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4992
4993 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
4994
4995         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4996         Remove prototypes.
4997         * mips-linux-nat.c (supply_fpregset): Always call
4998         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4999         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5000         `mips_fill_fpregset'.
5001         * mips-linux-tdep.c (mips_supply_fpregset)
5002         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5003         (mips_fill_fpregset_wrapper): Remove functions.
5004         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5005         (mips_linux_fpregset): Remove variable.
5006         (mips_linux_iterate_over_regset_sections): Use
5007         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5008         (mips_linux_o32_sigframe_init): Remove comment.
5009
5010 2018-05-25  Pedro Alves  <palves@redhat.com>
5011
5012         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5013         (struct readahead_cache, struct packet_reg, struct
5014         remote_arch_state, class remote_state): Move higher up in the
5015         file.
5016         (remote_target::m_remote_state): Now an object instead of a pointer.
5017         (remote_target::get_remote_state): Adjust.
5018
5019 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5020
5021         * stack.c (select_and_print_frame): Delete.
5022         (struct function_bounds): Move struct within function.
5023         (func_command): Most content moved into new function
5024         find_frame_for_function, use new function, print result, add
5025         function comment.
5026         (find_frame_for_function): New function, now returns a result.
5027
5028 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5029
5030         * stack.c (iterate_over_block_arg_vars): Fix comment.
5031         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5032
5033 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5034
5035         PR gdb/23203
5036         * frame.c
5037         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5038         Define.
5039         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5040         Define.
5041         * frame.h (class scoped_restore_selected_frame): New class.
5042         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5043         of any exception, use scoped_restore_selected_frame to restore the
5044         frame instead.
5045
5046 2018-05-24  Pedro Alves  <palves@redhat.com>
5047
5048         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5049         override.
5050
5051 2018-05-23  Tom Tromey  <tom@tromey.com>
5052
5053         * complaints.c (struct complaints): Remove.
5054         (symfile_complaint_book): Remove.
5055         (series): New global.
5056         (complaint_internal): Update.
5057         (clear_complaints): Update.
5058
5059 2018-05-23  Tom Tromey  <tom@tromey.com>
5060
5061         * complaints.c (counters): New global.
5062         (struct complain): Remove.
5063         (struct complaints) <root>: Remove.
5064         (complaint_sentinel): Remove.
5065         (symfile_complaint_book): Update.
5066         (find_complaint) Remove.
5067         (complaint_internal, clear_complaints): Update.
5068
5069 2018-05-23  Tom Tromey  <tom@tromey.com>
5070
5071         * complaints.c (struct complain) <file, line>: Remove.
5072         (find_complaint): Remove file, line parameters.
5073         (complaint_internal): Update.
5074
5075 2018-05-23  Tom Tromey  <tom@tromey.com>
5076
5077         * complaints.c (vcomplaint): Remove.
5078         (complaint_internal) Merge in contents of vcomplaint.
5079
5080 2018-05-23  Tom Tromey  <tom@tromey.com>
5081
5082         * complaints.c (struct complaints) <explanation>: Remove.
5083         (symfile_explanations): Remove.
5084         (symfile_complaint_book): Update.
5085         (vcomplaint): Update.
5086         (struct explanation): Remove.
5087
5088 2018-05-23  Tom Tromey  <tom@tromey.com>
5089
5090         * complaints.c (symfile_complaints): Remove.
5091         (complaint_internal): Remove "complaints" parameter.
5092         (clear_complaints, vcomplaint): Remove "c" parameter.
5093         (get_complaints): Remove.
5094         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5095         (dwarf2_debug_line_missing_file_complaint)
5096         (dwarf2_debug_line_missing_end_sequence_complaint)
5097         (dwarf2_complex_location_expr_complaint)
5098         (dwarf2_const_value_length_mismatch_complaint)
5099         (dwarf2_section_buffer_overflow_complaint)
5100         (dwarf2_macro_malformed_definition_complaint)
5101         (dwarf2_invalid_attrib_class_complaint)
5102         (create_addrmap_from_index, dw2_symtab_iter_next)
5103         (dw2_expand_marked_cus)
5104         (dw2_debug_names_iterator::find_vec_in_debug_names)
5105         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5106         (create_debug_type_hash_table, init_cutu_and_read_dies)
5107         (partial_die_parent_scope, add_partial_enumeration)
5108         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5109         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5110         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5111         (create_cus_hash_table, create_dwp_hash_table)
5112         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5113         (dwarf2_rnglists_process, dwarf2_ranges_process)
5114         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5115         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5116         (handle_struct_member_die, process_structure_scope)
5117         (read_array_type, read_common_block, read_module_type)
5118         (read_tag_pointer_type, read_typedef, read_base_type)
5119         (read_subrange_type, load_partial_dies, partial_die_info::read)
5120         (partial_die_info::read, partial_die_info::read)
5121         (partial_die_info::read, read_checked_initial_length_and_offset)
5122         (dwarf2_string_attr, read_formatted_entries)
5123         (dwarf_decode_line_header)
5124         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5125         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5126         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5127         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5128         (get_signatured_type, get_DW_AT_signature_type)
5129         (decode_locdesc, file_file_name, consume_improper_spaces)
5130         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5131         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5132         (dwarf2_symbol_mark_computed, set_die_type)
5133         (read_attribute_value): Update.
5134         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5135         Update.
5136         * dbxread.c (unknown_symtype_complaint)
5137         (lbrac_mismatch_complaint, repeated_header_complaint)
5138         (set_namestring, function_outside_compilation_unit_complaint)
5139         (read_dbx_symtab, process_one_symbol): Update.
5140         * gdbtypes.c (stub_noname_complaint): Update.
5141         * windows-nat.c (handle_unload_dll): Update.
5142         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5143         (decode_base_type): Update.
5144         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5145         (eb_complaint, record_include_begin, record_include_end)
5146         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5147         (process_xcoff_symbol, read_symbol)
5148         (function_outside_compilation_unit_complaint)
5149         (scan_xcoff_symtab): Update.
5150         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5151         * buildsym.c (finish_block_internal, make_blockvector)
5152         (end_symtab_get_static_block, augment_type_symtab): Update.
5153         * dtrace-probe.c (dtrace_process_dof)
5154         (dtrace_static_probe_ops::get_probes): Update.
5155         * complaints.h (struct complaint): Don't declare.
5156         (symfile_complaints): Remove.
5157         (complaint_internal): Remove "complaints" parameter.
5158         (complaint): Likewise.
5159         (clear_complaints): Likewise.
5160         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5161         (reread_symbols): Update.
5162         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5163         (dwarf2_frame_cache, decode_frame_entry): Update.
5164         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5165         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5166         (info_selectors_command): Update.
5167         * macrotab.c (macro_include, check_for_redefinition)
5168         (macro_undef): Update.
5169         * objfiles.c (filter_overlapping_sections): Update.
5170         * stabsread.c (invalid_cpp_abbrev_complaint)
5171         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5172         (define_symbol, error_type, read_type, rs6000_builtin_type)
5173         (stabs_method_name_from_physname, read_member_functions)
5174         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5175         (attach_fields_to_type, complain_about_struct_wipeout)
5176         (read_range_type, read_args, common_block_start)
5177         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5178         Update.
5179         * mdebugread.c (index_complaint, unknown_ext_complaint)
5180         (basic_type_complaint, bad_tag_guess_complaint)
5181         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5182         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5183         (parse_procedure, parse_lines)
5184         (function_outside_compilation_unit_complaint)
5185         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5186         (bad_tag_guess_complaint, reg_value_complaint): Update.
5187         * cp-support.c (demangled_name_complaint): Update.
5188         * macroscope.c (sal_macro_scope): Update.
5189         * dwarf-index-write.c (class debug_names): Update.
5190
5191 2018-05-23  Tom Tromey  <tom@tromey.com>
5192
5193         * complaints.c (clear_complaints): Remove "noisy" parameter.
5194         * complaints.h (clear_complaints): Update.
5195         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5196         (reread_symbols): Update.
5197
5198 2018-05-23  Tom Tromey  <tom@tromey.com>
5199
5200         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5201         SUBSEQUENT_MESSAGE.
5202         (vcomplaint, clear_complaints): Update.
5203         (symfile_explanations): Remove some messages.
5204
5205 2018-05-23  Tom Tromey  <tom@tromey.com>
5206
5207         * complaints.c (internal_complaint): Remove.
5208         * complaints.h (internal_complaint): Remove.
5209
5210 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5211
5212         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5213
5214 2018-05-22  Pedro Alves  <palves@redhat.com>
5215
5216         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5217         (remote_fileio_badfd, remote_fileio_return_errno)
5218         (remote_fileio_return_success, remote_fileio_func_open)
5219         (remote_fileio_func_open, remote_fileio_func_close)
5220         (remote_fileio_func_read, remote_fileio_func_write)
5221         (remote_fileio_func_lseek, remote_fileio_func_rename)
5222         (remote_fileio_func_unlink, remote_fileio_func_stat)
5223         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5224         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5225         remote_target parameter.
5226         (remote_fio_func_map) <func>: Add remote_target parameter.
5227         (do_remote_fileio_request, remote_fileio_request):
5228         * remote-fileio.h (remote_fileio_request):
5229         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5230         remote_target parameter.
5231         (remote_notif_process, handle_notification): Adjust to pass down
5232         the remote.
5233         (remote_notif_state_allocate): Add remote_target parameter.  Save
5234         it.
5235         * remote-notif.h (struct remote_target): Forward declare.
5236         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5237         remote_target parameter.
5238         (struct remote_notif_state) <remote>: New field.
5239         (remote_notif_ack, remote_notif_parse): Add remote_target
5240         parameter.
5241         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5242         remote_target parameter.
5243         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5244         (threads_listing_context, rmt_thread_action, protocol_feature)
5245         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5246         (packet_result, struct threads_listing_context, remote_state):
5247         Move definitions and declarations higher up.
5248         (remote_target) <~remote_target>: Declare.
5249         (remote_download_command_source, remote_file_put, remote_file_get)
5250         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5251         (remote_hostio_pread_vFile, remote_hostio_send_command)
5252         (remote_hostio_set_filesystem, remote_hostio_open)
5253         (remote_hostio_close, remote_hostio_unlink, remote_state)
5254         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5255         (get_memory_write_packet_size, get_memory_read_packet_size)
5256         (append_pending_thread_resumptions, remote_detach_1)
5257         (append_resumption, remote_resume_with_vcont)
5258         (add_current_inferior_and_thread, wait_ns, wait_as)
5259         (process_stop_reply, remote_notice_new_inferior)
5260         (process_initial_stop_replies, remote_add_thread)
5261         (btrace_sync_conf, remote_btrace_maybe_reopen)
5262         (remove_new_fork_children, kill_new_fork_children)
5263         (discard_pending_stop_replies, stop_reply_queue_length)
5264         (check_pending_events_prevent_wildcard_vcont)
5265         (discard_pending_stop_replies_in_queue, stop_reply)
5266         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5267         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5268         (remote_interrupt_as, remote_interrupt_ns)
5269         (remote_get_noisy_reply, remote_query_attached)
5270         (remote_add_inferior, remote_current_thread, get_current_thread)
5271         (set_thread, set_general_thread, set_continue_thread)
5272         (set_general_process, write_ptid)
5273         (remote_unpack_thread_info_response, remote_get_threadinfo)
5274         (parse_threadlist_response, remote_get_threadlist)
5275         (remote_threadlist_iterator, remote_get_threads_with_ql)
5276         (remote_get_threads_with_qxfer)
5277         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5278         (get_offsets, remote_check_symbols, remote_supported_packet)
5279         (remote_query_supported, remote_packet_size)
5280         (remote_serial_quit_handler, remote_detach_pid)
5281         (remote_vcont_probe, remote_resume_with_hc)
5282         (send_interrupt_sequence, interrupt_query)
5283         (remote_notif_get_pending_events, fetch_register_using_p)
5284         (send_g_packet, process_g_packet, fetch_registers_using_g)
5285         (store_register_using_P, store_registers_using_G)
5286         (set_remote_traceframe, check_binary_download)
5287         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5288         (remote_xfer_live_readonly_partial, remote_read_bytes)
5289         (remote_send_printf, remote_flash_write, readchar)
5290         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5291         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5292         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5293         (extended_remote_disable_randomization, extended_remote_run)
5294         (send_environment_packet, extended_remote_environment_support)
5295         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5296         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5297         (packet_command): Now methods of ...
5298         (remote_target): ... this class.
5299         (m_remote_state) <remote_target>: New field.
5300         (struct remote_state) <stop_reply_queue,
5301         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5302         fields.
5303         (remote_state::remote_state): Allocate stop_reply_queue.
5304         (remote_state): Delete global.
5305         (get_remote_state_raw): Delete.
5306         (remote_target::get_remote_state): Allocate m_remote_state on
5307         demand.
5308         (get_current_remote_target): New.
5309         (remote_ops, extended_remote_ops): Delete.
5310         (wait_forever_enabled_p, remote_async_inferior_event_token):
5311         Delete, moved to struct remote_state.
5312         (remote_target::close): Delete self.  Destruction bits split to
5313         ...
5314         (remote_target::~remote_target): ... this.
5315         (show_memory_packet_size): Adjust to use
5316         get_current_remote_target.
5317         (struct protocol_feature) <func>: Add remote_target parameter.
5318         All callers adjusted.
5319         (curr_quit_handler_target): New.
5320         (remote_serial_quit_handler): Reimplement.
5321         (remote_target::open_1): Adjust to use get_current_remote_target.
5322         Heap-allocate remote_target/extended_remote_target instances.
5323         (vcont_builder::vcont_builder): Add remote_target parameter, and
5324         save it in m_remote.  All callers adjusted.
5325         (vcont_builder::m_remote): New field.
5326         (vcont_builder::restart, vcont_builder::flush)
5327         (vcont_builder::push_action): Use it.
5328         (remote_target::commit_resume): Use it.
5329         (struct queue_iter_param) <remote>: New field.
5330         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5331         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5332         (check_pending_event_prevents_wildcard_vcont_callback)
5333         (remote_target::check_pending_events_prevent_wildcard_vcont)
5334         (remote_target::discard_pending_stop_replies)
5335         (remote_target::discard_pending_stop_replies_in_queue)
5336         (remote_target::remote_notif_remove_queued_reply): Fill in
5337         'remote' field.
5338         (remote_notif_get_pending_events): New.
5339         (remote_target::readchar, remote_target::remote_serial_write):
5340         Save/restore curr_quit_handler_target.
5341         (putpkt): New.
5342         (kill_new_fork_children): Fill in 'remote' field.
5343         (packet_command): Use get_current_remote_target, defer to
5344         remote_target method of same name.
5345         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5346         parameter, and save it in m_remote.  All callers adjusted.
5347         (scoped_remote_fd::release): Use m_remote.
5348         (scoped_remote_fd::m_remote): New field.
5349         (remote_file_put, remote_file_get, remote_file_delete): Use
5350         get_current_remote_target, defer to remote_target method of same
5351         name.
5352         (remote_btrace_reset): Add remote_state paremeter.  Update all
5353         callers.
5354         (remote_async_inferior_event_handler). Pass down 'data'.
5355         (remote_new_objfile): Use get_current_remote_target.
5356         (remote_target::vcont_r_supported): New.
5357         (set_range_stepping): Use get_current_remote_target and
5358         remote_target::vcont_r_supported.
5359         (_initialize_remote): Don't allocate 'remote_state' and
5360         'stop_reply_queue' globals.
5361         * remote.h (struct remote_target): Forward declare.
5362         (getpkt, putpkt, remote_notif_get_pending_events): Add
5363         'remote_target' parameter.
5364
5365 2018-05-22  Pedro Alves  <palves@redhat.com>
5366
5367         * remote.c (vcont_builder): Now a class.  Make all data members
5368         private.
5369         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5370         Declare methods.
5371         (vcont_builder_restart): Rename to ...
5372         (vcont_builder::restart): ... this.
5373         (vcont_builder_flush): Rename to ...
5374         (vcont_builder::flush): ... this.
5375         (vcont_builder_push_action): Rename to ...
5376         (vcont_builder::push_action): ... this.
5377         (remote_target::commit_resume): Adjust.
5378
5379 2018-05-22  Pedro Alves  <palves@redhat.com>
5380
5381         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5382         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5383         (get_fixed_memory_packet_size): New.
5384         (get_memory_packet_size): Use it.
5385         (set_memory_packet_size): Don't override the config size with
5386         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5387         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5388         Don't refer to get_memory_packet_size if not connected to a remote
5389         target.  Show "(default)" if configured size is 0.
5390
5391 2018-05-22  Pedro Alves  <palves@redhat.com>
5392
5393         * remote.c (remote_target::mourn_inferior): Move
5394         discard_pending_stop_replies call here from ...
5395         (_initialize_remote): ... here.
5396
5397 2018-05-22  Pedro Alves  <palves@redhat.com>
5398
5399         * remote.c (compare_section_command): Remove set_general_process
5400         call.
5401
5402 2018-05-22  Pedro Alves  <palves@redhat.com>
5403
5404         * remote.c (struct packet_reg, struct remote_arch_state):
5405         Move higher up in the file.
5406         (remote_state) <m_arch_states>: Store remote_arch_state values
5407         instead of remote_arch_state pointers.
5408         (remote_state::get_remote_arch_state): Adjust.
5409
5410 2018-05-22  Pedro Alves  <palves@redhat.com>
5411
5412         * remote.c: Include <unordered_map>.
5413         (remote_state): Now a class.
5414         (remote_state) <get_remote_arch_state>: Declare method.
5415         <get_remote_arch_state>: New field.
5416         (remote_arch_state) <remote_arch_state>: Declare ctor.
5417         <regs>: Now a unique_ptr.
5418         (remote_gdbarch_data_handle): Delete.
5419         (get_remote_arch_state): Delete.
5420         (remote_state::get_remote_arch_state): New.
5421         (get_remote_state): Adjust to call remote_state's
5422         get_remote_arch_state method.
5423         (init_remote_state): Delete, bits factored out to ...
5424         (remote_arch_state::remote_arch_state): ... this new method.
5425         (get_remote_packet_size, get_memory_packet_size)
5426         (process_g_packet, remote_target::fetch_registers)
5427         (remote_target::prepare_to_store, store_registers_using_G)
5428         (remote_target::store_registers, remote_target::get_trace_status):
5429         Adjust to call remote_state's method.
5430         (_initialize_remote): Remove reference to
5431         remote_gdbarch_data_handle.
5432
5433 2018-05-22  Pedro Alves  <palves@redhat.com>
5434
5435         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5436         pread>: New method declarations.
5437         (remote_target::open_1): Adjust.
5438         (readahead_cache_invalidate): Rename to ...
5439         (readahead_cache::invalidate): ... this, and adjust to be a class
5440         method.
5441         (readahead_cache_invalidate_fd): Rename to ...
5442         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5443         class method.
5444         (remote_hostio_pwrite): Adjust.
5445         (remote_hostio_pread_from_cache): Rename to ...
5446         (readahead_cache::pread): ... this, and adjust to be a class
5447         method.
5448         (remote_hostio_close): Adjust.
5449
5450 2018-05-22  Pedro Alves  <palves@redhat.com>
5451
5452         * remote.c (remote_hostio_close_cleanup): Delete.
5453         (class scoped_remote_fd): New.
5454         (remote_file_put, remote_file_get): Use it.
5455
5456 2018-05-22  Pedro Alves  <palves@redhat.com>
5457
5458         (struct vCont_action_support): Use bool and initialize all fields.
5459         (struct readahead_cache): Initialize all fields.
5460         (remote_state): Use bool and initialize all fields.
5461         (remote_state::remote_state, remote_state::~remote_state): New.
5462         (new_remote_state): Delete.
5463         (_initialize_remote): Use new to allocate remote_state.
5464
5465 2018-05-22  Pedro Alves  <palves@redhat.com>
5466             張俊芝  <zjz@zjz.name>
5467
5468         PR gdb/22973
5469         * c-exp.y: Include "c-support.h".
5470         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5471         of tolower.  Use c_ident_is_alpha to scan names.
5472         * c-lang.c: Include "c-support.h".
5473         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5474         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5475         * c-support.h: New file, with bits factored out from ...
5476         * cp-name-parser.y: ... this file.
5477         Include "c-support.h".
5478         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5479         c-support.h and renamed.
5480         (symbol_end, yylex): Adjust.
5481
5482 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5483
5484         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5485         parameter type to CORE_ADDR.
5486         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5487         parameter type in declaration to CORE_ADDR.
5488         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5489         target_auxv_search to get AT_HWCAP and use the result to get the
5490         target description.
5491         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5492         to CORE_ADDR. Remove the cast of the return value to unsigned
5493         long. Fix error predicate of target_auxv_search.
5494         (ppc_linux_nat_target::read_description): Change the type of the
5495         hwcap variable to CORE_ADDR.
5496
5497 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5498
5499         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5500         if the size of fpscr is larger than 32 bits.
5501
5502 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5503
5504         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5505         (ppc32_linux_vsxregmap): New global.
5506         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5507         regcache_supply_regset, and regcache_collect_regset.
5508         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5509         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5510         (fetch_vsx_register, store_vsx_register): Remove.
5511         (fetch_vsx_registers): Add regno parameter. Get regset using
5512         ppc_linux_vsxregset. Use regset to supply registers.
5513         (store_vsx_registers): Add regno parameter. Get regset using
5514         ppc_linux_vsxregset. Use regset to collect registers.
5515         (fetch_register): Call fetch_vsx_registers instead of
5516         fetch_vsx_register.
5517         (store_register): Call store_vsx_registers instead of
5518         store_vsx_register.
5519         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5520         new regno parameter.
5521         (store_ppc_registers): Call store_vsx_registers with -1 for the
5522         new regno parameter.
5523         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5524         (ppc_collect_vsxregset): Remove.
5525
5526 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5527
5528         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5529         offset fields.
5530         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5531         for vector register offset fields.
5532         (ppc64_fbsd_reg_offsets): Likewise.
5533         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5534         to vector register offset fields.
5535         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5536         to vector register offset fields.
5537         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5538         vector register offset fields.
5539         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5540         initializers for vector register offset fields.
5541         (rs6000_aix64_reg_offsets): Likewise.
5542         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5543         (ppc_supply_vrregset): Remove.
5544         (ppc_collect_vrregset): Remove.
5545         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5546         (ppc_linux_vrregset) : New function.
5547         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5548         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5549         (ppc32_linux_vrregset): Remove.
5550         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5551         and use result instead of ppc32_linux_vrregset.
5552         (ppc32_linux_reg_offsets): Remove initializers for vector register
5553         offset fields.
5554         (ppc64_linux_reg_offsets): Likewise.
5555         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5556         * ppc-linux-nat.c: Include regset.h.
5557         (gdb_vrregset_t): Adjust comment to account for little-endian
5558         mode.
5559         (supply_vrregset, fill_vrregset): Remove.
5560         (fetch_altivec_register, store_altivec_register): Remove.
5561         (fetch_altivec_registers): Add regno parameter. Get regset using
5562         ppc_linux_vrregset. Use regset to supply registers.
5563         (store_altivec_registers): Add regno parameter. Get regset using
5564         ppc_linux_vrregset. Use regset to collect registers.
5565         (fetch_register): Call fetch_altivec_registers instead of
5566         fetch_altivec_register.
5567         (store_register): Call store_altivec_registers instead of
5568         store_altivec_register.
5569         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5570         the new regno parameter.
5571         (store_ppc_registers): Call store_altivec_registers with -1 for
5572         the new regno parameter.
5573
5574 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5575
5576         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5577         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5578         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5579         (gdb_vrregset_t): Change array type size to
5580         PPC_LINUX_SIZEOF_VRREGSET.
5581         (gdb_vsxregset_t): Change array type size to
5582         PPC_LINUX_SIZEOF_VSXREGSET.
5583         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5584         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5585         PPC_LINUX_SIZEOF_VSXREGSET.
5586
5587 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5588
5589         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5590         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5591         nat/ppc-linux.c.
5592         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5593         ppc_linux_target_wordsize with tid.
5594         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5595         wordsize with tid.
5596         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5597         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5598         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5599         tid parameter. Remove static specifier.
5600         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5601         (ppc_linux_target_wordsize): New declaration.
5602
5603 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5604
5605         * arch/ppc-linux-common.c: New file.
5606         * arch/ppc-linux-common.h: New file.
5607         * arch/ppc-linux-tdesc.h: New file.
5608         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5609         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5610         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5611         arch/ppc-linux-tdesc.h.
5612         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5613         arch/ppc-linux-tdesc.h.
5614         (ppc_linux_nat_target::read_description): Remove target
5615         description matching code. Fill a ppc_linux_features struct and
5616         call ppc_linux_match_description with it. Move comment about ISA
5617         2.05 to ppc-linux-common.c.
5618         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5619         arch/ppc-linux-tdesc.h.
5620         (ppc_linux_core_read_description): Remove target description
5621         matching code. Fill a ppc_linux_features struct and call
5622         ppc_linux_match_description with it.
5623         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5624         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5625         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5626         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5627         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5628         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5629         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5630         (tdesc_powerpc_e500l): Remove.
5631
5632 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5633
5634         * ada-lang.c (catch_assert_command): Pass empty string instead
5635         of NULL for excep_string argument.
5636
5637 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5638
5639         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5640         the width of the requested register exceeds the width of the
5641         `ptrace' data type.
5642
5643 2018-05-21  Tom Tromey  <tom@tromey.com>
5644
5645         * printcmd.c (output_command): Remove.
5646         (output_command_const): Rename to output_command.
5647         * valprint.h (output_command): Rename from output_command_const.
5648         * tracepoint.c (trace_dump_actions): Call output_command.
5649
5650 2018-05-21  Tom Tromey  <tom@tromey.com>
5651
5652         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5653         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5654         * ada-lang.h (create_ada_exception_catchpoint): Update.
5655         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5656         std::string.
5657         (create_excep_cond_exprs, ~ada_catchpoint)
5658         (should_stop_exception, print_one_exception)
5659         (print_mention_exception, print_recreate_exception): Update.
5660         (ada_get_next_arg): Remove.
5661         (catch_ada_exception_command_split): Use std::string.  Change type
5662         of "excep_string", "cond_string".
5663         (catch_ada_exception_command): Update.
5664         (create_ada_exception_catchpoint): Change type of excep_string.
5665         (ada_exception_sal): Remove excep_string parameter.
5666         (~ada_catchpoint): Remove.
5667
5668 2018-05-21  Tom Tromey  <tom@tromey.com>
5669
5670         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5671         cleanup.
5672
5673 2018-05-21  Tom Tromey  <tom@tromey.com>
5674
5675         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5676         Return unique_xmalloc_ptr.
5677         (print_it_exception): Update.
5678
5679 2018-05-21  Tom Tromey  <tom@tromey.com>
5680
5681         * tracepoint.c (trace_dump_actions): Use std::string.
5682
5683 2018-05-21  Tom Tromey  <tom@tromey.com>
5684
5685         * symfile.c (reread_symbols): Use std::string for original_name.
5686
5687 2018-05-21  Tom Tromey  <tom@tromey.com>
5688
5689         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5690         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5691         constructor.
5692
5693 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5694
5695         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5696         instance to...
5697         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5698         * objfiles.c (get_objfile_bfd_data): Allocate
5699         objfile_per_bfd_storage with obstack_new when allocating on
5700         obstack.
5701
5702 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5703
5704         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5705         OBSTACK_ZALLOC.
5706         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5707         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5708         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5709         (add_pending): Likewise.
5710         (parse_symbol): Likewise.
5711         (parse_partial_symbols): Likewise.
5712         (psymtab_to_symtab_1): Likewise.
5713         (new_psymtab): Likewise.
5714         (elfmdebug_build_psymtabs): Likewise.
5715         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5716         * objfiles.c (get_objfile_bfd_data): Likewise.
5717         (objfile_register_static_link): Likewise.
5718         * psymtab.c (allocate_psymtab): Likewise.
5719         * stabsread.c (read_member_functions): Likewise.
5720         * xcoffread.c (xcoff_end_psymtab): Likewise.
5721
5722 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5723
5724         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5725         compiler supports std::is_trivially_constructible.
5726         * common/poison.h: Include obstack.h.
5727         (IsMallocable): Define to is_trivially_constructible if the
5728         compiler supports it, define to true_type otherwise.
5729         (xobnew): New.
5730         (XOBNEW): Redefine.
5731         (xobnewvec): New.
5732         (XOBNEWVEC): Redefine.
5733         * gdb_obstack.h (obstack_zalloc): New.
5734         (OBSTACK_ZALLOC): Redefine.
5735         (obstack_calloc): New.
5736         (OBSTACK_CALLOC): Redefine.
5737         (obstack_new): New.
5738         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5739         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5740         gdbarch.c.
5741         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5742         obstack_calloc/obstack_zalloc.
5743         (gdbarch_obstack_zalloc): Remove.
5744         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5745
5746 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5747
5748         * stack.c (backtrace_command_1): Remove useless variable int i.
5749
5750 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5751
5752         * stack.c (print_frame_info): Fix comment.
5753
5754 2018-05-18  Tom Tromey  <tom@tromey.com>
5755
5756         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5757         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5758         (~dwarf2_per_objfile): Update
5759         (dwarf2_get_dwz_file): Use new.
5760         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5761         unique_ptr.
5762
5763 2018-05-18  Tom Tromey  <tom@tromey.com>
5764
5765         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5766         unique_ptr.
5767         * dwarf2read.c (struct dwp_file): Add constructor and
5768         initializers.
5769         (open_and_init_dwp_file): Return a unique_ptr.
5770         (dwarf2_per_objfile, create_dwp_hash_table)
5771         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5772         (lookup_dwo_unit_in_dwp): Update.
5773         (open_and_init_dwp_file, get_dwp_file): Update.
5774
5775 2018-05-18  Tom Tromey  <tom@tromey.com>
5776
5777         * dwarf2read.c (dwarf2_per_objfile): Update.
5778         (struct mapped_index): Add initializers.
5779         (dwarf2_read_index): Use new.
5780         (dw2_symtab_iter_init): Update.
5781         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5782         unique_ptr.
5783
5784 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5785
5786         * dwarf2read.c (mapped_index) <total_size>: Remove.
5787
5788 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5789
5790         * unittests/format_pieces-selftests.c (test_format_specifier):
5791         Add ARI comments.
5792
5793 2018-05-18  Tom Tromey  <tom@tromey.com>
5794
5795         * c-typeprint.c (maybe_print_hole): New function.
5796         (c_print_type_struct_field_offset): Update.
5797         (c_type_print_base_struct_union): Call maybe_print_hole.
5798
5799 2018-05-17  Keith Seitz  <keiths@redhat.com>
5800
5801         * breakpoint.c (build_bpstat_chain): New function, moved from
5802         bpstat_stop_status.
5803         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5804         If no stop chain is passed, call build_bpstat_chain to build it.
5805         * breakpoint.h (build_bpstat_chain): Declare.
5806         (bpstat_stop_status): Move documentation here from breakpoint.c.
5807         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5808         build the stop chain and pass it to skip_inline_frames.
5809         Pass this stop chain to bpstat_stop_status.
5810         * inline-frame.c: Include breakpoint.h.
5811         (stopped_by_user_bp_inline_frame): New function.
5812         (skip_inline_frames): Add parameter `stop_chain'.
5813         Move documention to inline-frame.h.
5814         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5815         whether the frame should be elided.
5816         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5817         Add moved documentation and update for new parameter.
5818
5819 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5820
5821         PR cli/14975
5822         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5823         unittests/format_pieces-selftests.c.
5824         * common/format.h (format_piece) <operator==>: New.
5825         (format_pieces) <operator[]>: Remove.
5826         * common/format.c (format_pieces::format_pieces): Handle \e.
5827         * unittests/format_pieces-selftests.c: New.
5828
5829 2018-05-17  Tom Tromey  <tom@tromey.com>
5830
5831         PR symtab/23010:
5832         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5833         (dw2_instantiate_symtab): Add skip_partial parameter.
5834         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5835         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5836         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5837         (dw2_expand_symtabs_matching_one)
5838         (dw2_find_pc_sect_compunit_symtab)
5839         (dw2_debug_names_lookup_symbol)
5840         (dw2_debug_names_expand_symtabs_for_function): Update.
5841         (init_cutu_and_read_dies): Add skip_partial parameter.
5842         (process_psymtab_comp_unit, build_type_psymtabs_1)
5843         (process_skeletonless_type_unit, load_partial_comp_unit)
5844         (psymtab_to_symtab_1): Update.
5845         (load_full_comp_unit): Add skip_partial parameter.
5846         (process_imported_unit_die, dwarf2_read_addr_index)
5847         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5848         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5849         (read_signatured_type): Update.
5850
5851 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5852
5853         * value.c (release_value): Remove unused variable.
5854         (record_latest_value): Likewise.
5855         (access_value_history): Likewise.
5856         (preserve_values): Likewise.
5857
5858 2018-05-17  Tom Tromey  <tom@tromey.com>
5859
5860         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5861         Initialize.
5862
5863 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5864
5865         PR gdb/22286
5866         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5867         Also handle registers whose width is not a multiple of
5868         PTRACE_TYPE_RET.
5869         (linux_nat_trad_target::store_register): Likewise.
5870
5871 2018-05-16  Tom Tromey  <tom@tromey.com>
5872
5873         * gdbcore.h (core_bfd): Redefine.
5874         * corelow.c (core_target::close): Update.
5875         (core_target_open): Update.
5876         * progspace.h (struct program_space) <cbfd>: Now a
5877         gdb_bfd_ref_ptr.
5878
5879 2018-05-16  Tom Tromey  <tom@tromey.com>
5880
5881         PR cli/19551:
5882         * symfile-add-flags.h (enum symfile_add_flags)
5883         <SYMFILE_NOT_FILENAME>: New constant.
5884         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5885         objfile name from BFD.
5886         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5887         * minidebug.c (find_separate_debug_file_in_section): Put
5888         ".gnu_debugdata" into BFD's file name.
5889
5890 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5891
5892         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5893         Remove.
5894
5895 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5896
5897         PR binutils/21446
5898         * aarch64-tdep.c (aarch64_analyze_prologue,
5899         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5900         Indicate not interested in errors.
5901
5902 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5903
5904         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5905         Supply the MIPS_ZERO_REGNUM register.
5906
5907 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5908
5909         * mips-tdep.c (mask_address_var): Make variable static.
5910
5911 2018-05-14  Tom Tromey  <tom@tromey.com>
5912
5913         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5914
5915 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
5916
5917         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5918         FXSAVE_ADDR for the mxcsr register.
5919
5920 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
5921
5922         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5923
5924 2018-05-11  Pedro Alves  <palves@redhat.com>
5925
5926         * corelow.c (core_target) <core_target>: No longer inline.
5927         Initialize m_core_gdbarch, m_core_vec and build the section table
5928         here.
5929         <~core_target>: New.
5930         <core_gdbarch, get_core_register_section>: New methods.
5931         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5932         factored out from ...
5933         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5934         (core_ops): Delete.
5935         (sniff_core_bfd): Add gdbarch parameter.
5936         (core_close): Delete, merged into ...
5937         (core_target::close): ... here.  Delete self.
5938         (core_close_cleanup): Delete.
5939         (core_target_open): Allocate a core_target on the heap.  Use a
5940         unique_ptr instead of a cleanup.  Bits moved into the core_target
5941         ctor.  Adjust to use core_target methods instead of globals.
5942         (get_core_register_section): Rename to ...
5943         (core_target::get_core_register_section): ... this and adjust.
5944         (struct get_core_registers_cb_data): New.
5945         (get_core_registers_cb): Use it.  Use bool.
5946         (core_target::fetch_registers, core_target::files_info)
5947         (core_target::xfer_partial, core_target::read_description)
5948         (core_target::pid_to, core_target::thread_name): Adjust to
5949         reference class fields instead of globals.
5950         * target.h (struct target_ops_deleter, target_ops_up): New.
5951
5952 2018-05-11  Pedro Alves  <palves@redhat.com>
5953
5954         * corefile.c (core_file_command): Move to corelow.c.
5955         * corelow.c (the_core_target): Delete.
5956         (core_file_command): Moved from corefile.c.  Check exec_bfd
5957         instead of the_core_target.  Use target_detach instead of calling
5958         into the_core_target directly.
5959         (maybe_say_no_core_file_now): New.
5960         (core_target::detach): Use it.
5961         (_initialize_corelow): Remove references to the_core_target.
5962         * gdbcore.h (the_core_target): Delete.
5963
5964 2018-05-11  Tom Tromey  <tromey@redhat.com>
5965             Pedro Alves  <palves@redhat.com>
5966
5967         * corefile.c (core_bfd): Remove.
5968         * gdbcore.h (core_bfd): Now a macro.
5969         * progspace.h (struct program_space) <cbfd>: New field.
5970
5971 2018-05-11  Tom Tromey  <tom@tromey.com>
5972
5973         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5974         gdb::def_vector.
5975
5976 2018-05-10  Tom Tromey  <tom@tromey.com>
5977
5978         * configure: Rebuild.
5979         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5980
5981 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
5982
5983         PR server/23158:
5984         * regformats/regdat.sh: Adjust script, following the addition
5985         of the new expedite_regs parameter to init_target_desc.
5986
5987 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
5988     
5989         PR gdb/23127
5990         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5991         set_gdbarch_significant_addr_bit.
5992         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5993         set_gdbarch_significant_addr_bit.
5994         * utils.c (address_significant): Update to sign extend addr.
5995
5996 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
5997
5998         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5999         (xtensa_linux_init_abi): Limit tdep->num_regs by
6000         tdep->num_nopriv_regs.
6001         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6002         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6003         not initialized.
6004
6005 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6006
6007         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6008
6009 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6010
6011         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6012         (I387_MXCSR_INIT_VAL): New constant.
6013         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6014         buffer if it was supplied by the inferior.
6015         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6016         (i387_xsave_get_clear_bv): New function.
6017         (i387_supply_xsave): Only read x87 control registers from the
6018         xsave buffer if the feature is enabled, and the state will have
6019         been written, otherwise, provide a suitable default.
6020         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6021         including x87 control registers.  Update control registers if they
6022         have changed from the default value, and mark features as enabled
6023         as required.
6024         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6025
6026 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6027
6028         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6029
6030 2018-05-07  Tom Tromey  <tom@tromey.com>
6031
6032         * configure: Rebuild.
6033         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6034
6035 2018-05-07  Tom Tromey  <tom@tromey.com>
6036
6037         PR tdep/20362:
6038         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6039         bit.  Use correct value for VDIV.
6040
6041 2018-05-04  Tom Tromey  <tom@tromey.com>
6042
6043         * configure: Rebuild.
6044         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6045
6046 2018-05-04  Tom Tromey  <tom@tromey.com>
6047
6048         * linux-record.c (record_linux_system_call) <case
6049         RECORD_SYS_RECVFROM>: Add "break".
6050
6051 2018-05-04  Tom Tromey  <tom@tromey.com>
6052
6053         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6054         Add missing "break".
6055         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6056         Add missing "break".
6057
6058 2018-05-04  Tom Tromey  <tom@tromey.com>
6059
6060         * rs6000-tdep.c (ppc_process_record_op4)
6061         (ppc_process_record_op63): Add fall-through comment.
6062
6063 2018-05-04  Tom Tromey  <tom@tromey.com>
6064
6065         * i386-tdep.c (i386_process_record): Add fall-through comment.
6066
6067 2018-05-04  Tom Tromey  <tom@tromey.com>
6068
6069         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6070         comment.
6071
6072 2018-05-04  Tom Tromey  <tom@tromey.com>
6073
6074         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6075         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6076         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6077         comment.
6078         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6079         comment.
6080         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6081         comment.
6082
6083 2018-05-04  Tom Tromey  <tom@tromey.com>
6084
6085         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6086
6087 2018-05-04  Tom Tromey  <tom@tromey.com>
6088
6089         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6090         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6091         * symfile.c (section_is_mapped): Fix fall-through comment.
6092         * stabsread.c (define_symbol, read_member_functions): Fix
6093         fall-through comment.
6094         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6095         comment.
6096         * remote.c (remote_wait_as): Fix fall-through comment.
6097         * p-exp.y (yylex): Fix fall-through comment.
6098         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6099         comment.
6100         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6101         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6102         * jv-exp.y (yylex): Fix fall-through comment.
6103         * go-exp.y (lex_one_token): Fix fall-through comment.
6104         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6105         fall-through comment.
6106         * f-exp.y (yylex): Fix fall-through comment.
6107         * dwarf2read.c (process_die): Fix fall-through comments.
6108         * dbxread.c (process_one_symbol): Fix fall-through comment.
6109         * d-exp.y (lex_one_token): Fix fall-through comment.
6110         * cp-name-parser.y (yylex): Fix fall-through comment.
6111         * coffread.c (coff_symtab_read): Fix fall-through comment.
6112         * c-exp.y (lex_one_token): Fix fall-through comment.
6113         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6114         comment.
6115         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6116         comment.
6117
6118 2018-05-04  Tom Tromey  <tom@tromey.com>
6119
6120         PR python/22730:
6121         * NEWS: Mention gdb.execute change.
6122         * gdbcmd.h (execute_control_command): Don't declare.
6123         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6124         execute_control_commands, execute_control_commands_to_string.
6125         * cli/cli-script.h (execute_control_commands)
6126         (execute_control_commands_to_string): Declare.
6127         (execute_control_command): Add from_tty parameter.
6128         * cli/cli-script.c (execute_control_commands)
6129         (execute_control_commands_to_string): New functions.
6130         (execute_user_command): Use execute_control_commands.
6131         (execute_control_command_1): Add "from_tty" parameter.  Update.
6132         (execute_control_command): Likewise.
6133
6134 2018-05-04  Tom Tromey  <tom@tromey.com>
6135
6136         PR python/22731:
6137         * NEWS: Mention that breakpoint commands are writable.
6138         * python/py-breakpoint.c (bppy_set_commands): New function.
6139         (breakpoint_object_getset) <"commands">: Use it.
6140
6141 2018-05-04  Tom Tromey  <tom@tromey.com>
6142
6143         * tracepoint.c (actions_command): Update.
6144         * mi/mi-cmd-break.c (mi_command_line_array)
6145         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6146         (mi_read_next_line): Remove.
6147         (mi_cmd_break_commands): Update.
6148         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6149         function_view.
6150         * cli/cli-script.c (get_command_line): Update.
6151         (process_next_line): Use function_view.  Constify.
6152         (recurse_read_control_structure, read_command_lines)
6153         (read_command_lines_1): Change argument types to function_view.
6154         (do_define_command, document_command): Update.
6155         * breakpoint.h (check_tracepoint_command): Don't declare.
6156         * breakpoint.c (check_tracepoint_command): Remove.
6157         (commands_command_1, create_tracepoint_from_upload): Update.
6158
6159 2018-05-04  Tom Tromey  <tom@tromey.com>
6160
6161         PR gdb/11750:
6162         * cli/cli-script.h (enum command_control_type) <define_control>:
6163         New constant.
6164         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6165         (build_command_line, execute_control_command_1)
6166         (process_next_line): Likewise.
6167         (do_define_command): New function, extracted from define_command.
6168         (define_command): Use it.
6169
6170 2018-05-04  Tom Tromey  <tom@tromey.com>
6171
6172         * tracepoint.c (actions_command): Update.
6173         * cli/cli-script.h (read_command_lines): Update.
6174         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6175         (MAX_TMPBUF): Remove define.
6176         (define_command): Use string_printf.
6177         (document_command): Likewise.
6178         * breakpoint.c (commands_command_1): Update.
6179
6180 2018-05-04  Tom Tromey  <tom@tromey.com>
6181
6182         * top.c (execute_command): Update.
6183         * cli/cli-script.h (print_command_lines): Now varargs.
6184         * cli/cli-script.c (print_command_lines): Now varargs.
6185         (execute_control_command_1) <case while_control, case if_control>:
6186         Update.
6187
6188 2018-05-04  Tom Tromey  <tom@tromey.com>
6189
6190         * tracepoint.c (all_tracepoint_actions): Rename from
6191         all_tracepoint_actions_and_cleanup.  Change return type.
6192         (actions_command, encode_actions_1, encode_actions)
6193         (trace_dump_actions, tdump_command): Update.
6194         * remote.c (remote_download_command_source): Update.
6195         * python/python.c (gdbpy_eval_from_control_command)
6196         (python_command, python_interactive_command): Update.
6197         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6198         * guile/guile.c (guile_command)
6199         (gdbscm_eval_from_control_command, guile_command): Update.
6200         * compile/compile.c (compile_code_command)
6201         (compile_print_command, compile_to_object): Update.
6202         * cli/cli-script.h (struct command_lines_deleter): New.
6203         (counted_command_line): New typedef.
6204         (struct command_line): Add constructor, destructor.
6205         <body_list>: Remove.
6206         <body_list_0, body_list_1>: New members.
6207         (command_line_up): Remove typedef.
6208         (read_command_lines, read_command_lines_1, get_command_line):
6209         Update.
6210         (copy_command_lines): Don't declare.
6211         * cli/cli-script.c (build_command_line): Use "new".
6212         (get_command_line): Return counted_command_line.
6213         (print_command_lines, execute_user_command)
6214         (execute_control_command_1, while_command, if_command): Update.
6215         (realloc_body_list): Remove.
6216         (process_next_line, recurse_read_control_structure): Update.
6217         (read_command_lines, read_command_lines_1): Return counted_command_line.
6218         (free_command_lines): Use "delete".
6219         (copy_command_lines): Remove.
6220         (define_command, document_command, show_user_1): Update.
6221         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6222         a counted_command_line.
6223         * breakpoint.h (counted_command_line): Remove typedef.
6224         (breakpoint_set_commands): Update.
6225         * breakpoint.c (check_no_tracepoint_commands)
6226         (validate_commands_for_breakpoint): Update.
6227         (breakpoint_set_commands): Change commands to be a
6228         counted_command_line.
6229         (commands_command_1, update_dprintf_command_list)
6230         (create_tracepoint_from_upload): Update.
6231
6232 2018-05-04  Tom Tromey  <tom@tromey.com>
6233
6234         * cli/cli-decode.h (cmd_list_element): New constructor.
6235         (~cmd_list_element): New destructor.
6236         (struct cmd_list_element): Add initializers.
6237         * cli/cli-decode.c (do_add_cmd): Use "new".
6238         (delete_cmd): Use "delete".
6239
6240 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6241             Pedro Alves <palves@redhat.com>
6242
6243         PR breakpoints/19806 and support for PR external/20207.
6244         * NEWS: Mention Aarch64 watchpoint improvements.
6245         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6246         watchpoints and PR external/20207 watchpoints.
6247         * nat/aarch64-linux-hw-point.c
6248         (kernel_supports_any_contiguous_range): New.
6249         (aarch64_watchpoint_offset): New.
6250         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6251         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6252         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6253         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6254         next_addr_orig_p.  Support PR external/20207 watchpoints.
6255         (aarch64_downgrade_regs): New.
6256         (aarch64_dr_state_insert_one_point): New parameters offset and
6257         addr_orig.
6258         (aarch64_dr_state_remove_one_point): Likewise.
6259         (aarch64_handle_breakpoint): Update caller.
6260         (aarch64_handle_aligned_watchpoint): Likewise.
6261         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6262         aligned_offset.
6263         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6264         aarch64_downgrade_regs.
6265         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6266         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6267         (DR_CONTROL_MASK): ... this.
6268         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6269         (unsigned int aarch64_watchpoint_offset): New prototype.
6270         (aarch64_linux_set_debug_regs): Remove const from state.
6271         * utils.c (align_up, align_down): Move to ...
6272         * common/common-utils.c (align_up, align_down): ... here.
6273         * utils.h (align_up, align_down): Move to ...
6274         * common/common-utils.h (align_up, align_down): ... here.
6275
6276 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6277
6278         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6279         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6280         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6281         Re-implement to match the ABI as summarized in GCC's
6282         gcc/config/sparc/sparc.c.  All callers updated.
6283         (sparc32_store_arguments): Remove assertion.
6284
6285 2018-05-04  Tom Tromey  <tom@tromey.com>
6286
6287         * printcmd.c: Don't include tui.h.
6288         (decode_format): Use skip_spaces.
6289
6290 2018-05-04  Tom Tromey  <tom@tromey.com>
6291
6292         PR gdb/22619:
6293         * printcmd.c (last_count): New global.
6294         (x_command): Use saved count when repeating.
6295
6296 2018-05-04  Tom Tromey  <tom@tromey.com>
6297
6298         * nto-procfs.c (do_closedir_cleanup): Remove.
6299         (procfs_pidlist): Use gdb_dir_up.
6300         * procfs.c (do_closedir_cleanup): Remove.
6301         (proc_update_threads): Use gdb_dir_up.
6302         * common/filestuff.h (struct gdb_dir_deleter): New.
6303         (gdb_dir_up): New typedef.
6304
6305 2018-05-04  Tom Tromey  <tom@tromey.com>
6306
6307         * ada-lang.c (print_mention_exception): Use std::string.
6308
6309 2018-05-04  Tom Tromey  <tom@tromey.com>
6310
6311         * ada-lang.c (create_excep_cond_exprs): Update.
6312         (ada_exception_catchpoint_cond_string): Use std::string.
6313
6314 2018-05-04  Tom Tromey  <tom@tromey.com>
6315
6316         * ada-lang.c (xget_renaming_scope): Return std::string.
6317         (old_renaming_is_invisible): Update.
6318
6319 2018-05-04  Tom Tromey  <tom@tromey.com>
6320
6321         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6322         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6323
6324 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6325
6326         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6327
6328 2018-05-04  Tom Tromey  <tom@tromey.com>
6329
6330         * remote.c (remote_query_supported_append): Change type.
6331         (remote_check_symbols): Update.
6332
6333 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6334
6335         PR gdb/11420
6336         * configure.ac: Prepend libpython.
6337         * python/python-config.py: Likewise.
6338         * configure: Regenerate.
6339
6340 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6341
6342         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6343
6344 2018-05-03  Pedro Alves  <palves@redhat.com>
6345
6346         * s390-linux-nat.c
6347         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6348         override.  Write 'true' instead of '1'.
6349         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6350         declaration.
6351
6352 2018-05-02  Pedro Alves  <palves@redhat.com>
6353
6354         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6355         add_inf_child_target.
6356         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6357         add_inf_child_target.
6358         * aix-thread.c (aix_thread_target_info): New.
6359         (aix_thread_target) <shortname, longname, doc>: Delete.
6360         <info>: New.
6361         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6362         add_inf_child_target.
6363         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6364         add_inf_child_target.
6365         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6366         add_inf_child_target.
6367         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6368         add_inf_child_target.
6369         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6370         add_inf_child_target.
6371         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6372         add_inf_child_target.
6373         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6374         add_inf_child_target.
6375         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6376         add_inf_child_target.
6377         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6378         add_inf_child_target.
6379         * bfd-target.c (target_bfd_target_info): New.
6380         (target_bfd) <shortname, longname, doc>: Delete.
6381         <info>: New.
6382         * bsd-kvm.c (bsd_kvm_target_info): New.
6383         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6384         <info>: New.
6385         (bsd_kvm_target::open): Rename to ...
6386         (bsd_kvm_target_open): ... this.  Adjust.
6387         * bsd-uthread.c (bsd_uthread_target_info): New.
6388         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6389         <info>: New.
6390         * corefile.c (core_file_command): Adjust.
6391         * corelow.c (core_target_info): New.
6392         (core_target) <shortname, longname, doc>: Delete.
6393         <info>: New.
6394         (core_target::open): Rename to ...
6395         (core_target_open): ... this.  Adjust.
6396         * ctf.c (ctf_target_info): New.
6397         (ctf_target) <shortname, longname, doc>: Delete.
6398         <info>: New.
6399         (ctf_target::open): Rename to ...
6400         (ctf_target_open): ... this.
6401         (_initialize_ctf): Adjust.
6402         * exec.c (exec_target_info): New.
6403         (exec_target) <shortname, longname, doc>: Delete.
6404         <info>: New.
6405         (exec_target::open): Rename to ...
6406         (exec_target_open): ... this.
6407         * gdbcore.h (core_target_open): Declare.
6408         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6409         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6410         add_inf_child_target.
6411         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6412         add_inf_child_target.
6413         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6414         add_inf_child_target.
6415         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6416         add_inf_child_target.
6417         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6418         add_inf_child_target.
6419         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6420         add_inf_child_target.
6421         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6422         add_inf_child_target.
6423         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6424         add_inf_child_target.
6425         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6426         add_inf_child_target.
6427         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6428         add_inf_child_target.
6429         * inf-child.c (inf_child_target_info): New.
6430         (inf_child_target::info): New.
6431         (inf_child_open_target): Remove 'target' parameter.  Use
6432         get_native_target instead.
6433         (inf_child_target::open): Delete.
6434         (add_inf_child_target): New.
6435         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6436         Delete.
6437         <info>: New.
6438         (add_inf_child_target): Declare.
6439         (inf_child_open_target): Declare.
6440         * linux-thread-db.c (thread_db_target_info): New.
6441         (thread_db_target) <shortname, longname, doc>: Delete.
6442         <info>: New.
6443         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6444         add_inf_child_target.
6445         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6446         add_inf_child_target.
6447         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6448         add_inf_child_target.
6449         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6450         add_inf_child_target.
6451         * make-target-delegates (print_class): Adjust.
6452         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6453         add_inf_child_target.
6454         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6455         add_inf_child_target.
6456         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6457         add_inf_child_target.
6458         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6459         add_inf_child_target.
6460         * nto-procfs.c (nto_native_target_info): New.
6461         (nto_procfs_target_native) <shortname, longname, doc>:
6462         Delete.
6463         <info>: New.
6464         (nto_procfs_target_info): New.
6465         (nto_procfs_target_procfs) <shortname, longname, doc>:
6466         Delete.
6467         <info>: New.
6468         (init_procfs_targets): Adjust.
6469         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6470         add_inf_child_target.
6471         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6472         add_inf_child_target.
6473         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6474         add_inf_child_target.
6475         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6476         add_inf_child_target.
6477         * ravenscar-thread.c (ravenscar_target_info): New.
6478         (ravenscar_thread_target) <shortname, longname, doc>:
6479         Delete.
6480         <info>: New.
6481         * record-btrace.c (record_btrace_target_info):
6482         (record_btrace_target) <shortname, longname, doc>: Delete.
6483         <info>: New.
6484         (record_btrace_target::open): Rename to ...
6485         (record_btrace_target_open): ... this.  Adjust.
6486         * record-full.c (record_longname, record_doc): New.
6487         (record_full_base_target) <shortname, longname, doc>: Delete.
6488         <info>: New.
6489         (record_full_target_info): New.
6490         (record_full_target): <shortname>: Delete.
6491         <info>: New.
6492         (record_full_core_open_1, record_full_open_1): Update comments.
6493         (record_full_base_target::open): Rename to ...
6494         (record_full_open): ... this.
6495         (cmd_record_full_restore): Update.
6496         (_initialize_record_full): Update.
6497         * remote-sim.c (remote_sim_target_info): New.
6498         (gdbsim_target) <shortname, longname, doc>: Delete.
6499         <info>: New.
6500         (gdbsim_target::open): Rename to ...
6501         (gdbsim_target_open): ... this.
6502         (_initialize_remote_sim): Adjust.
6503         * remote.c (remote_doc): New.
6504         (remote_target_info): New.
6505         (remote_target) <shortname, longname, doc>: Delete.
6506         <info>: New.
6507         (extended_remote_target_info): New.
6508         (extended_remote_target) <shortname, longname, doc>: Delete.
6509         <info>: New.
6510         (remote_target::open_1): Make static.  Adjust.
6511         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6512         * s390-linux-nat.c (_initialize_s390_nat): Use
6513         add_inf_child_target.
6514         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6515         add_inf_child_target.
6516         * sol-thread.c (thread_db_target_info): New.
6517         (sol_thread_target) <shortname, longname, doc>: Delete.
6518         <info>: New.
6519         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6520         add_inf_child_target.
6521         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6522         add_inf_child_target.
6523         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6524         add_inf_child_target.
6525         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6526         add_inf_child_target.
6527         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6528         add_inf_child_target.
6529         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6530         add_inf_child_target.
6531         * spu-linux-nat.c (_initialize_spu_nat): Use
6532         add_inf_child_target.
6533         * spu-multiarch.c (spu_multiarch_target_info): New.
6534         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6535         <info>: New.
6536         * target-delegates.c: Regenerate.
6537         * target.c: Include <unordered_map>.
6538         (target_ops_p): Delete.
6539         (DEF_VEC_P(target_ops_p)): Delete.
6540         (target_factories): New.
6541         (test_target_info): New.
6542         (test_target_ops::info): New.
6543         (open_target): Adjust to use target_factories.
6544         (add_target_with_completer): Rename to ...
6545         (add_target): ... this.  Change prototype.  Register target_info
6546         and open callback in target_factories.  Register target_info in
6547         command context instead of target_ops.
6548         (add_target): Delete old implementation.
6549         (add_deprecated_target_alias): Change prototype.  Adjust.
6550         (the_native_target): New.
6551         (set_native_target, get_native_target): New.
6552         (find_default_run_target): Use the_native_target.
6553         (find_attach_target, find_run_target): Simplify.
6554         (target_ops::open): Delete.
6555         (dummy_target_info): New.
6556         (dummy_target::shortname, dummy_target::longname)
6557         (dummy_target::doc): Delete.
6558         (dummy_target::info): New.
6559         (debug_target::shortname, debug_target::longname)
6560         (debug_target::doc): Delete.
6561         (debug_target::info): New.
6562         * target.h (struct target_info): New.
6563         (target_ops::~target_ops): Add comment.
6564         (target_ops::info): New.
6565         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6566         longer virtual.  Implement in terms of target_info.
6567         (set_native_target, get_native_target): Declare.
6568         (target_open_ftype): New.
6569         (add_target, add_target_with_completer)
6570         (add_deprecated_target_alias): Change prototype.
6571         (test_target) <shortname, longname, doc>: Delete.
6572         <info>: New.
6573         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6574         add_inf_child_target.
6575         * tracefile-tfile.c (tfile_target_info): New.
6576         (tfile_target) <shortname, longname, doc>: Delete.
6577         <info>: New.
6578         (tfile_target::open): Rename to ...
6579         (tfile_target_open): ... this.
6580         (_initialize_tracefile_tfile): Adjust.
6581         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6582         add_inf_child_target.
6583         * windows-nat.c (_initialize_windows_nat): Use
6584         add_inf_child_target.
6585         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6586         add_inf_child_target.
6587
6588 2018-05-02  Pedro Alves  <palves@redhat.com>
6589
6590         * linux-nat.h (linux_nat_target) <low_new_thread,
6591         low_delete_thread, low_new_fork, low_forget_process,
6592         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6593         New virtual methods.
6594         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6595         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6596         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6597         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6598         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6599         Delete.
6600         * linux-fork.c (delete_fork): Adjust to call low method.
6601         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6602         (linux_nat_new_fork, linux_nat_forget_process_hook)
6603         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6604         (linux_nat_status_is_event):
6605         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6606         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6607         to call low method.
6608         (sigtrap_is_event): Rename to ...
6609         (linux_nat_target::low_status_is_event): ... this.
6610         (linux_nat_set_status_is_event): Delete.
6611         (save_stop_reason, linux_nat_wait_1)
6612         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6613         low methods.
6614         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6615         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6616         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6617         (linux_nat_set_prepare_to_resume): Delete.
6618         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6619         low virtual methods.
6620         * amd64-linux-nat.c: Likewise.
6621         * arm-linux-nat.c: Likewise.
6622         * i386-linux-nat.c: Likewise.
6623         * ia64-linux-nat.c: Likewise.
6624         * mips-linux-nat.c: Likewise.
6625         * ppc-linux-nat.c: Likewise.
6626         * s390-linux-nat.c: Likewise.
6627         * sparc64-linux-nat.c: Likewise.
6628         * x86-linux-nat.c: Likewise.
6629         * x86-linux-nat.h: Include "nat/x86-linux.h".
6630         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6631         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6632         Override methods.
6633
6634 2018-05-02  Pedro Alves  <palves@redhat.com>
6635
6636         * target.h (target_ops)
6637         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6638         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6639         stopped_by_watchpoint, have_continuable_watchpoint,
6640         stopped_data_address, watchpoint_addr_within_range,
6641         can_accel_watchpoint_condition, can_run, thread_alive,
6642         has_all_memory, has_memory, has_stack, has_registers,
6643         has_execution, can_async_p, is_async_p, supports_non_stop,
6644         always_non_stop_p, can_execute_reverse, supports_multi_process,
6645         supports_enable_disable_tracepoint,
6646         supports_disable_randomization, supports_string_tracing,
6647         supports_evaluation_of_breakpoint_conditions,
6648         can_run_breakpoint_commands, filesystem_is_local,
6649         can_download_tracepoint, get_trace_state_variable_value,
6650         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6651         record_is_replaying, record_will_replay,
6652         augmented_libraries_svr4_read>: Adjust to return bool.
6653         * aarch64-linux-nat.c: All implementations adjusted.
6654         * aix-thread.c: All implementations adjusted.
6655         * arm-linux-nat.c: All implementations adjusted.
6656         * breakpoint.c: All implementations adjusted.
6657         * bsd-kvm.c: All implementations adjusted.
6658         * bsd-uthread.c: All implementations adjusted.
6659         * corelow.c: All implementations adjusted.
6660         * ctf.c: All implementations adjusted.
6661         * darwin-nat.c: All implementations adjusted.
6662         * darwin-nat.h: All implementations adjusted.
6663         * exec.c: All implementations adjusted.
6664         * fbsd-nat.c: All implementations adjusted.
6665         * fbsd-nat.h: All implementations adjusted.
6666         * gnu-nat.c: All implementations adjusted.
6667         * gnu-nat.h: All implementations adjusted.
6668         * go32-nat.c: All implementations adjusted.
6669         * ia64-linux-nat.c: All implementations adjusted.
6670         * inf-child.c: All implementations adjusted.
6671         * inf-child.h: All implementations adjusted.
6672         * inf-ptrace.c: All implementations adjusted.
6673         * inf-ptrace.h: All implementations adjusted.
6674         * linux-nat.c: All implementations adjusted.
6675         * linux-nat.h: All implementations adjusted.
6676         * mips-linux-nat.c: All implementations adjusted.
6677         * nto-procfs.c: All implementations adjusted.
6678         * ppc-linux-nat.c: All implementations adjusted.
6679         * procfs.c: All implementations adjusted.
6680         * ravenscar-thread.c: All implementations adjusted.
6681         * record-btrace.c: All implementations adjusted.
6682         * record-full.c: All implementations adjusted.
6683         * remote-sim.c: All implementations adjusted.
6684         * remote.c: All implementations adjusted.
6685         * s390-linux-nat.c: All implementations adjusted.
6686         * sol-thread.c: All implementations adjusted.
6687         * spu-multiarch.c: All implementations adjusted.
6688         * target-delegates.c: All implementations adjusted.
6689         * target.c: All implementations adjusted.
6690         * target.h: All implementations adjusted.
6691         * tracefile-tfile.c: All implementations adjusted.
6692         * tracefile.c: All implementations adjusted.
6693         * tracefile.h: All implementations adjusted.
6694         * windows-nat.c: All implementations adjusted.
6695         * x86-linux-nat.h: All implementations adjusted.
6696         * x86-nat.h: All implementations adjusted.
6697
6698 2018-05-02  Pedro Alves  <palves@redhat.com>
6699
6700         * make-target-delegates (scan_target_h): Don't trim lines here.
6701         Replace sequences of tabs and/or whitespace with a single
6702         whitespace.
6703         (top level, parsing methods): Trim each line before processing it
6704         here.
6705
6706 2018-05-02  Pedro Alves  <palves@redhat.com>
6707             John Baldwin  <jhb@freebsd.org>
6708
6709         * target.h (enum strata) <debug_stratum>: New.
6710         (struct target_ops) <all delegation methods>: Replace by C++
6711         virtual methods, and drop "to_" prefix.  All references updated
6712         throughout.
6713         <to_shortname, to_longname, to_doc, to_data,
6714         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6715         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6716         virtual methods.  All references updated throughout.
6717         <can_attach, supports_terminal_ours, can_create_inferior,
6718         get_thread_control_capabilities, attach_no_wait>: New
6719         virtual methods.
6720         <insert_breakpoint, remove_breakpoint>: Now
6721         TARGET_DEFAULT_NORETURN methods.
6722         <info_proc>: Now returns bool.
6723         <to_magic>: Delete.
6724         (OPS_MAGIC): Delete.
6725         (current_target): Delete.  All references replaced by references
6726         to ...
6727         (target_stack): ... this.  New.
6728         (target_shortname, target_longname): Adjust.
6729         (target_can_run): Now a function declaration.
6730         (default_child_has_all_memory, default_child_has_memory)
6731         (default_child_has_stack, default_child_has_registers)
6732         (default_child_has_execution): Remove target_ops parameter.
6733         (complete_target_initialization): Delete.
6734         (memory_breakpoint_target): New template class.
6735         (test_target_ops): Refactor as a C++ class with virtual methods.
6736         * make-target-delegates (NAME_PART): Tighten.
6737         (POINTER_PART, CP_SYMBOL): New.
6738         (SIMPLE_RETURN_PART): Reimplement.
6739         (VEC_RETURN_PART): Expect less.
6740         (RETURN_PART, VIRTUAL_PART): New.
6741         (METHOD): Adjust to C++ virtual methods.
6742         (scan_target_h): Remove reference to C99.
6743         (dname): Output "target_ops::" prefix.
6744         (write_function_header): Adjust to output a C++ class method.
6745         (write_declaration): New.
6746         (write_delegator): Adjust to output a C++ class method.
6747         (tdname): Output "dummy_target::" prefix.
6748         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6749         method.
6750         (tdefault_names, debug_names): Delete.
6751         (return_types, tdefaults, styles, argtypes_array): New.
6752         (top level): All methods are delegators.
6753         (print_class): New.
6754         (top level): Print dummy_target and debug_target classes.
6755         * target-delegates.c: Regenerate.
6756         * target-debug.h (target_debug_print_enum_info_proc_what)
6757         (target_debug_print_thread_control_capabilities)
6758         (target_debug_print_thread_info_p): New.
6759         * target.c (dummy_target): Delete.
6760         (the_dummy_target, the_debug_target): New.
6761         (target_stack): Now extern.
6762         (set_targetdebug): Push/unpush debug target.
6763         (default_child_has_all_memory, default_child_has_memory)
6764         (default_child_has_stack, default_child_has_registers)
6765         (default_child_has_execution): Remove target_ops parameter.
6766         (complete_target_initialization): Delete.
6767         (add_target_with_completer): No longer call
6768         complete_target_initialization.
6769         (target_supports_terminal_ours): Use regular delegation.
6770         (update_current_target): Delete.
6771         (push_target): No longer check magic number.  Don't call
6772         update_current_target.
6773         (unpush_target): Don't call update_current_target.
6774         (target_is_pushed): No longer check magic number.
6775         (target_require_runnable): Skip for all stratums over
6776         process_stratum.
6777         (target_ops::info_proc): New.
6778         (target_info_proc): Use find_target_at and
6779         find_default_run_target.
6780         (target_supports_disable_randomization): Use regular delegation.
6781         (target_get_osdata): Use find_target_at.
6782         (target_ops::open, target_ops::close, target_ops::can_attach)
6783         (target_ops::attach, target_ops::can_create_inferior)
6784         (target_ops::create_inferior, target_ops::can_run)
6785         (target_can_run): New.
6786         (default_fileio_target): Use regular delegation.
6787         (target_ops::fileio_open, target_ops::fileio_pwrite)
6788         (target_ops::fileio_pread, target_ops::fileio_fstat)
6789         (target_ops::fileio_close, target_ops::fileio_unlink)
6790         (target_ops::fileio_readlink): New.
6791         (target_fileio_open_1, target_fileio_unlink)
6792         (target_fileio_readlink): Always call the target method.  Handle
6793         FILEIO_ENOSYS.
6794         (return_zero, return_zero_has_execution): Delete.
6795         (init_dummy_target): Delete.
6796         (dummy_target::dummy_target, dummy_target::shortname)
6797         (dummy_target::longname, dummy_target::doc)
6798         (debug_target::debug_target, debug_target::shortname)
6799         (debug_target::longname, debug_target::doc): New.
6800         (target_supports_delete_record): Use regular delegation.
6801         (setup_target_debug): Delete.
6802         (maintenance_print_target_stack): Skip debug_stratum.
6803         (initialize_targets): Instantiate the_dummy_target and
6804         the_debug_target.
6805         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6806         use target_stack.
6807         (target_auxv_search, fprint_target_auxv): Adjust.
6808         (info_auxv_command): Adjust to use target_stack.
6809         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6810         * exceptions.c (print_flush): Handle a NULL target_stack.
6811         * regcache.c (target_ops_no_register): Refactor as class with
6812         virtual methods.
6813
6814         * exec.c (exec_target): New class.
6815         (exec_ops): Now an exec_target.
6816         (exec_open, exec_close_1, exec_get_section_table)
6817         (exec_xfer_partial, exec_files_info, exec_has_memory)
6818         (exec_make_note_section): Refactor as exec_target methods.
6819         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6820         Delete.
6821         (exec_target::find_memory_regions): New.
6822         (_initialize_exec): Don't call init_exec_ops.
6823         * gdbcore.h (exec_file_clear): Delete.
6824
6825         * corefile.c (core_target): Delete.
6826         (core_file_command): Adjust.
6827         * corelow.c (core_target): New class.
6828         (the_core_target): New.
6829         (core_close): Remove target_ops parameter.
6830         (core_close_cleanup): Adjust.
6831         (core_target::close): New.
6832         (core_open, core_detach, get_core_registers, core_files_info)
6833         (core_xfer_partial, core_thread_alive, core_read_description)
6834         (core_pid_to_str, core_thread_name, core_has_memory)
6835         (core_has_stack, core_has_registers, core_info_proc): Rework as
6836         core_target methods.
6837         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6838         (_initialize_corelow): Initialize the_core_target.
6839         * gdbcore.h (core_target): Delete.
6840         (the_core_target): New.
6841
6842         * ctf.c: (ctf_target): New class.
6843         (ctf_ops): Now a ctf_target.
6844         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6845         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6846         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6847         methods.
6848         (init_ctf_ops): Delete.
6849         (_initialize_ctf): Don't call it.
6850         * tracefile-tfile.c (tfile_target): New class.
6851         (tfile_ops): Now a tfile_target.
6852         (tfile_open, tfile_close, tfile_files_info)
6853         (tfile_get_tracepoint_status, tfile_trace_find)
6854         (tfile_fetch_registers, tfile_xfer_partial)
6855         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6856         Refactor as tfile_target methods.
6857         (tfile_xfer_partial_features): Remove target_ops parameter.
6858         (init_tfile_ops): Delete.
6859         (_initialize_tracefile_tfile): Don't call it.
6860         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6861         (tracefile_has_stack, tracefile_has_registers)
6862         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6863         tracefile_target methods.
6864         (init_tracefile_ops): Delete.
6865         (tracefile_target::tracefile_target): New.
6866         * tracefile.h: Include "target.h".
6867         (tracefile_target): New class.
6868         (init_tracefile_ops): Delete.
6869
6870         * spu-multiarch.c (spu_multiarch_target): New class.
6871         (spu_ops): Now a spu_multiarch_target.
6872         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6873         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6874         (spu_search_memory, spu_mourn_inferior): Refactor as
6875         spu_multiarch_target methods.
6876         (init_spu_ops): Delete.
6877         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6878         complete_target_initialization.
6879
6880         * ravenscar-thread.c (ravenscar_thread_target): New class.
6881         (ravenscar_ops): Now a ravenscar_thread_target.
6882         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6883         (ravenscar_thread_alive, ravenscar_pid_to_str)
6884         (ravenscar_fetch_registers, ravenscar_store_registers)
6885         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6886         (ravenscar_stopped_by_hw_breakpoint)
6887         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6888         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6889         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6890         methods.
6891         (init_ravenscar_thread_ops): Delete.
6892         (_initialize_ravenscar): Remove references to
6893         init_ravenscar_thread_ops and complete_target_initialization.
6894
6895         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6896         (bsd_uthread_target): New class.
6897         (bsd_uthread_ops): Now a bsd_uthread_target.
6898         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6899         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6900         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6901         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6902         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6903         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6904         (bsd_uthread_target): Delete function.
6905         (_initialize_bsd_uthread): Remove reference to
6906         complete_target_initialization.
6907
6908         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6909         (target_bfd): ... this new class.
6910         (target_bfd_xfer_partial, target_bfd_get_section_table)
6911         (target_bfd_close): Refactor as target_bfd methods.
6912         (target_bfd::~target_bfd): New.
6913         (target_bfd_reopen): Adjust.
6914         (target_bfd::close): New.
6915
6916         * record-btrace.c (record_btrace_target): New class.
6917         (record_btrace_ops): Now a record_btrace_target.
6918         (record_btrace_open, record_btrace_stop_recording)
6919         (record_btrace_disconnect, record_btrace_close)
6920         (record_btrace_async, record_btrace_info)
6921         (record_btrace_insn_history, record_btrace_insn_history_range)
6922         (record_btrace_insn_history_from, record_btrace_call_history)
6923         (record_btrace_call_history_range)
6924         (record_btrace_call_history_from, record_btrace_record_method)
6925         (record_btrace_is_replaying, record_btrace_will_replay)
6926         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6927         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6928         (record_btrace_store_registers, record_btrace_prepare_to_store)
6929         (record_btrace_to_get_unwinder)
6930         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6931         (record_btrace_commit_resume, record_btrace_wait)
6932         (record_btrace_stop, record_btrace_can_execute_reverse)
6933         (record_btrace_stopped_by_sw_breakpoint)
6934         (record_btrace_supports_stopped_by_sw_breakpoint)
6935         (record_btrace_stopped_by_hw_breakpoint)
6936         (record_btrace_supports_stopped_by_hw_breakpoint)
6937         (record_btrace_update_thread_list, record_btrace_thread_alive)
6938         (record_btrace_goto_begin, record_btrace_goto_end)
6939         (record_btrace_goto, record_btrace_stop_replaying_all)
6940         (record_btrace_execution_direction)
6941         (record_btrace_prepare_to_generate_core)
6942         (record_btrace_done_generating_core): Refactor as
6943         record_btrace_target methods.
6944         (init_record_btrace_ops): Delete.
6945         (_initialize_record_btrace): Remove reference to
6946         init_record_btrace_ops.
6947         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6948         the execution_direction global.
6949         (record_full_base_target, record_full_target)
6950         (record_full_core_target): New classes.
6951         (record_full_ops): Now a record_full_target.
6952         (record_full_core_ops): Now a record_full_core_target.
6953         (record_full_target::detach, record_full_target::disconnect)
6954         (record_full_core_target::disconnect)
6955         (record_full_target::mourn_inferior, record_full_target::kill):
6956         New.
6957         (record_full_open, record_full_close, record_full_async): Refactor
6958         as methods of the record_full_base_target class.
6959         (record_full_resume, record_full_commit_resume): Refactor
6960         as methods of the record_full_target class.
6961         (record_full_wait, record_full_stopped_by_watchpoint)
6962         (record_full_stopped_data_address)
6963         (record_full_stopped_by_sw_breakpoint)
6964         (record_full_supports_stopped_by_sw_breakpoint)
6965         (record_full_stopped_by_hw_breakpoint)
6966         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6967         methods of the record_full_base_target class.
6968         (record_full_store_registers, record_full_xfer_partial)
6969         (record_full_insert_breakpoint, record_full_remove_breakpoint):
6970         Refactor as methods of the record_full_target class.
6971         (record_full_can_execute_reverse, record_full_get_bookmark)
6972         (record_full_goto_bookmark, record_full_execution_direction)
6973         (record_full_record_method, record_full_info, record_full_delete)
6974         (record_full_is_replaying, record_full_will_replay)
6975         (record_full_goto_begin, record_full_goto_end, record_full_goto)
6976         (record_full_stop_replaying): Refactor as methods of the
6977         record_full_base_target class.
6978         (record_full_core_resume, record_full_core_kill)
6979         (record_full_core_fetch_registers)
6980         (record_full_core_prepare_to_store)
6981         (record_full_core_store_registers, record_full_core_xfer_partial)
6982         (record_full_core_insert_breakpoint)
6983         (record_full_core_remove_breakpoint)
6984         (record_full_core_has_execution): Refactor
6985         as methods of the record_full_core_target class.
6986         (record_full_base_target::supports_delete_record): New.
6987         (init_record_full_ops): Delete.
6988         (init_record_full_core_ops): Delete.
6989         (record_full_save): Refactor as method of the
6990         record_full_base_target class.
6991         (_initialize_record_full): Remove references to
6992         init_record_full_ops and init_record_full_core_ops.
6993
6994         * remote.c (remote_target, extended_remote_target): New classes.
6995         (remote_ops): Now a remote_target.
6996         (extended_remote_ops): Now an extended_remote_target.
6997         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6998         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6999         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7000         (remote_pass_signals, remote_set_syscall_catchpoint)
7001         (remote_program_signals, )
7002         (remote_thread_always_alive): Remove target_ops parameter.
7003         (remote_thread_alive, remote_thread_name)
7004         (remote_update_thread_list, remote_threads_extra_info)
7005         (remote_static_tracepoint_marker_at)
7006         (remote_static_tracepoint_markers_by_strid)
7007         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7008         (remote_open): Refactor as methods of remote_target.
7009         (extended_remote_open, extended_remote_detach)
7010         (extended_remote_attach, extended_remote_post_attach):
7011         (extended_remote_supports_disable_randomization)
7012         (extended_remote_create_inferior): : Refactor as method of
7013         extended_remote_target.
7014         (remote_set_permissions, remote_open_1, remote_detach)
7015         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7016         (remote_resume, remote_commit_resume, remote_stop)
7017         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7018         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7019         (remote_prepare_to_store, remote_store_registers)
7020         (remote_flash_erase, remote_flash_done, remote_files_info)
7021         (remote_kill, remote_mourn, remote_insert_breakpoint)
7022         (remote_remove_breakpoint, remote_insert_watchpoint)
7023         (remote_watchpoint_addr_within_range)
7024         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7025         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7026         (remote_supports_stopped_by_sw_breakpoint)
7027         (remote_stopped_by_hw_breakpoint)
7028         (remote_supports_stopped_by_hw_breakpoint)
7029         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7030         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7031         (remote_verify_memory): Refactor as methods of remote_target.
7032         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7033         parameter.
7034         (remote_xfer_partial, remote_get_memory_xfer_limit)
7035         (remote_search_memory, remote_rcmd, remote_memory_map)
7036         (remote_pid_to_str, remote_get_thread_local_address)
7037         (remote_get_tib_address, remote_read_description): Refactor as
7038         methods of remote_target.
7039         (remote_target::fileio_open, remote_target::fileio_pwrite)
7040         (remote_target::fileio_pread, remote_target::fileio_close): New.
7041         (remote_hostio_readlink, remote_hostio_fstat)
7042         (remote_filesystem_is_local, remote_can_execute_reverse)
7043         (remote_supports_non_stop, remote_supports_disable_randomization)
7044         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7045         (remote_supports_enable_disable_tracepoint)
7046         (remote_supports_string_tracing)
7047         (remote_can_run_breakpoint_commands, remote_trace_init)
7048         (remote_download_tracepoint, remote_can_download_tracepoint)
7049         (remote_download_trace_state_variable, remote_enable_tracepoint)
7050         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7051         (remote_trace_start, remote_get_trace_status)
7052         (remote_get_tracepoint_status, remote_trace_stop)
7053         (remote_trace_find, remote_get_trace_state_variable_value)
7054         (remote_save_trace_data, remote_get_raw_trace_data)
7055         (remote_set_disconnected_tracing, remote_core_of_thread)
7056         (remote_set_circular_trace_buffer, remote_traceframe_info)
7057         (remote_get_min_fast_tracepoint_insn_len)
7058         (remote_set_trace_buffer_size, remote_set_trace_notes)
7059         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7060         (remote_disable_btrace, remote_teardown_btrace)
7061         (remote_read_btrace, remote_btrace_conf)
7062         (remote_augmented_libraries_svr4_read, remote_load)
7063         (remote_pid_to_exec_file, remote_can_do_single_step)
7064         (remote_execution_direction, remote_thread_handle_to_thread_info):
7065         Refactor as methods of remote_target.
7066         (init_remote_ops, init_extended_remote_ops): Delete.
7067         (remote_can_async_p, remote_is_async_p, remote_async)
7068         (remote_thread_events, remote_upload_tracepoints)
7069         (remote_upload_trace_state_variables): Refactor as methods of
7070         remote_target.
7071         (_initialize_remote): Remove references to init_remote_ops and
7072         init_extended_remote_ops.
7073
7074         * remote-sim.c (gdbsim_target): New class.
7075         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7076         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7077         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7078         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7079         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7080         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7081         Refactor as methods of gdbsim_target.
7082         (gdbsim_ops): Now a gdbsim_target.
7083         (init_gdbsim_ops): Delete.
7084         (gdbsim_cntrl_c): Adjust.
7085         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7086
7087         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7088         (the_amd64_linux_nat_target): New.
7089         (amd64_linux_fetch_inferior_registers)
7090         (amd64_linux_store_inferior_registers): Refactor as methods of
7091         amd64_linux_nat_target.
7092         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7093         * i386-linux-nat.c: Don't include "linux-nat.h".
7094         (i386_linux_nat_target): New class.
7095         (the_i386_linux_nat_target): New.
7096         (i386_linux_fetch_inferior_registers)
7097         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7098         as methods of i386_linux_nat_target.
7099         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7100         * inf-child.c (inf_child_ops): Delete.
7101         (inf_child_fetch_inferior_registers)
7102         (inf_child_store_inferior_registers): Delete.
7103         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7104         methods of inf_child_target.
7105         (inf_child_target::supports_terminal_ours)
7106         (inf_child_target::terminal_init)
7107         (inf_child_target::terminal_inferior)
7108         (inf_child_target::terminal_ours_for_output)
7109         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7110         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7111         New.
7112         (inf_child_open, inf_child_disconnect, inf_child_close)
7113         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7114         (inf_child_post_startup_inferior, inf_child_can_run)
7115         (inf_child_pid_to_exec_file): Refactor as methods of
7116         inf_child_target.
7117         (inf_child_follow_fork): Delete.
7118         (inf_child_target::can_create_inferior)
7119         (inf_child_target::can_attach): New.
7120         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7121         (inf_child_target::has_stack, inf_child_target::has_registers)
7122         (inf_child_target::has_execution): New.
7123         (inf_child_fileio_open, inf_child_fileio_pwrite)
7124         (inf_child_fileio_pread, inf_child_fileio_fstat)
7125         (inf_child_fileio_close, inf_child_fileio_unlink)
7126         (inf_child_fileio_readlink, inf_child_use_agent)
7127         (inf_child_can_use_agent): Refactor as methods of
7128         inf_child_target.
7129         (return_zero, inf_child_target): Delete.
7130         (inf_child_target::inf_child_target): New.
7131         * inf-child.h: Include "target.h".
7132         (inf_child_target): Delete function prototype.
7133         (inf_child_target): New class.
7134         (inf_child_open_target, inf_child_mourn_inferior)
7135         (inf_child_maybe_unpush_target): Delete.
7136         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7137         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7138         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7139         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7140         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7141         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7142         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7143         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7144         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7145         methods of inf_ptrace_target.
7146         (inf_ptrace_target): Delete function.
7147         * inf-ptrace.h: Include "inf-child.h".
7148         (inf_ptrace_target): Delete function declaration.
7149         (inf_ptrace_target): New class.
7150         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7151         * linux-nat.c (linux_target): New.
7152         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7153         (linux_nat_target::~linux_nat_target): New.
7154         (linux_child_post_attach, linux_child_post_startup_inferior)
7155         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7156         (linux_child_remove_fork_catchpoint)
7157         (linux_child_insert_vfork_catchpoint)
7158         (linux_child_remove_vfork_catchpoint)
7159         (linux_child_insert_exec_catchpoint)
7160         (linux_child_remove_exec_catchpoint)
7161         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7162         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7163         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7164         (linux_nat_stopped_data_address)
7165         (linux_nat_stopped_by_sw_breakpoint)
7166         (linux_nat_supports_stopped_by_sw_breakpoint)
7167         (linux_nat_stopped_by_hw_breakpoint)
7168         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7169         (linux_nat_kill, linux_nat_mourn_inferior)
7170         (linux_nat_xfer_partial, linux_nat_thread_alive)
7171         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7172         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7173         (linux_child_static_tracepoint_markers_by_strid)
7174         (linux_nat_is_async_p, linux_nat_can_async_p)
7175         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7176         (linux_nat_supports_multi_process)
7177         (linux_nat_supports_disable_randomization, linux_nat_async)
7178         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7179         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7180         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7181         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7182         methods of linux_nat_target.
7183         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7184         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7185         parameter.
7186         (check_stopped_by_watchpoint): Adjust.
7187         (linux_xfer_partial): Delete.
7188         (linux_target_install_ops, linux_target, linux_nat_add_target):
7189         Delete.
7190         (linux_nat_target::linux_nat_target): New.
7191         * linux-nat.h: Include "inf-ptrace.h".
7192         (linux_nat_target): New.
7193         (linux_target, linux_target_install_ops, linux_nat_add_target):
7194         Delete function declarations.
7195         (linux_target): Declare global.
7196         * linux-thread-db.c (thread_db_target): New.
7197         (thread_db_target::thread_db_target): New.
7198         (thread_db_ops): Delete.
7199         (the_thread_db_target): New.
7200         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7201         (thread_db_update_thread_list, thread_db_pid_to_str)
7202         (thread_db_extra_thread_info)
7203         (thread_db_thread_handle_to_thread_info)
7204         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7205         (thread_db_resume): Refactor as methods of thread_db_target.
7206         (init_thread_db_ops): Delete.
7207         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7208         * x86-linux-nat.c: Don't include "linux-nat.h".
7209         (super_post_startup_inferior): Delete.
7210         (x86_linux_nat_target::~x86_linux_nat_target): New.
7211         (x86_linux_child_post_startup_inferior)
7212         (x86_linux_read_description, x86_linux_enable_btrace)
7213         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7214         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7215         methods of x86_linux_nat_target.
7216         (x86_linux_create_target): Delete.  Bits folded ...
7217         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7218         pointer.
7219         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7220         (x86_linux_nat_target): New class.
7221         (x86_linux_create_target): Delete.
7222         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7223         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7224         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7225         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7226         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7227         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7228         make extern.
7229         (x86_use_watchpoints): Delete.
7230         * x86-nat.h: Include "breakpoint.h" and "target.h".
7231         (x86_use_watchpoints): Delete.
7232         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7233         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7234         (x86_insert_watchpoint, x86_remove_watchpoint)
7235         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7236         (x86_stopped_by_hw_breakpoint): New declarations.
7237         (x86_nat_target): New template class.
7238
7239         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7240         (the_ppc_linux_nat_target): New.
7241         (ppc_linux_fetch_inferior_registers)
7242         (ppc_linux_can_use_hw_breakpoint)
7243         (ppc_linux_region_ok_for_hw_watchpoint)
7244         (ppc_linux_ranged_break_num_registers)
7245         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7246         (ppc_linux_insert_mask_watchpoint)
7247         (ppc_linux_remove_mask_watchpoint)
7248         (ppc_linux_can_accel_watchpoint_condition)
7249         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7250         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7251         (ppc_linux_watchpoint_addr_within_range)
7252         (ppc_linux_masked_watch_num_registers)
7253         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7254         (ppc_linux_read_description): Refactor as methods of
7255         ppc_linux_nat_target.
7256         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7257
7258         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7259         (procfs_target): New class.
7260         (the_procfs_target): New.
7261         (procfs_target): Delete function.
7262         (procfs_auxv_parse, procfs_attach, procfs_detach)
7263         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7264         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7265         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7266         (procfs_create_inferior, procfs_update_thread_list)
7267         (procfs_thread_alive, procfs_pid_to_str)
7268         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7269         (procfs_stopped_data_address, procfs_insert_watchpoint)
7270         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7271         (proc_find_memory_regions, procfs_info_proc)
7272         (procfs_make_note_section): Refactor as methods of procfs_target.
7273         (_initialize_procfs): Adjust.
7274         * sol-thread.c (sol_thread_target): New class.
7275         (sol_thread_ops): Now a sol_thread_target.
7276         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7277         (sol_thread_fetch_registers, sol_thread_store_registers)
7278         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7279         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7280         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7281         (init_sol_thread_ops): Delete.
7282         (_initialize_sol_thread): Adjust.  Remove references to
7283         init_sol_thread_ops and complete_target_initialization.
7284
7285         * windows-nat.c (windows_nat_target): New class.
7286         (windows_fetch_inferior_registers)
7287         (windows_store_inferior_registers, windows_resume, windows_wait)
7288         (windows_attach, windows_detach, windows_pid_to_exec_file)
7289         (windows_files_info, windows_create_inferior)
7290         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7291         (windows_close, windows_pid_to_str, windows_xfer_partial)
7292         (windows_get_tib_address, windows_get_ada_task_ptid)
7293         (windows_thread_name, windows_thread_alive): Refactor as
7294         windows_nat_target methods.
7295         (do_initial_windows_stuff): Adjust.
7296         (windows_target): Delete function.
7297         (_initialize_windows_nat): Adjust.
7298
7299         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7300         (darwin_mourn_inferior, darwin_kill_inferior)
7301         (darwin_create_inferior, darwin_attach, darwin_detach)
7302         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7303         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7304         (darwin_supports_multi_process): Refactor as darwin_nat_target
7305         methods.
7306         (darwin_resume_to, darwin_files_info): Delete.
7307         (_initialize_darwin_inferior): Rename to ...
7308         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7309         * darwin-nat.h: Include "inf-child.h".
7310         (darwin_nat_target): New class.
7311         (darwin_complete_target): Delete.
7312         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7313         (darwin_target): New.
7314         (i386_darwin_fetch_inferior_registers)
7315         (i386_darwin_store_inferior_registers): Refactor as methods of
7316         darwin_nat_target.
7317         (darwin_complete_target): Delete, with ...
7318         (_initialize_i386_darwin_nat): ... bits factored out here.
7319
7320         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7321         (the_alpha_linux_nat_target): New.
7322         (alpha_linux_register_u_offset): Refactor as
7323         alpha_linux_nat_target method.
7324         (_initialize_alpha_linux_nat): Adjust.
7325         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7326         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7327         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7328         methods of linux_nat_trad_target.
7329         (linux_trad_target): Delete.
7330         * linux-nat-trad.h (linux_trad_target): Delete function.
7331         (linux_nat_trad_target): New class.
7332         * mips-linux-nat.c (mips_linux_nat_target): New class.
7333         (super_fetch_registers, super_store_registers, super_close):
7334         Delete.
7335         (the_mips_linux_nat_target): New.
7336         (mips64_linux_regsets_fetch_registers)
7337         (mips64_linux_regsets_store_registers)
7338         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7339         (mips_linux_register_u_offset, mips_linux_read_description)
7340         (mips_linux_can_use_hw_breakpoint)
7341         (mips_linux_stopped_by_watchpoint)
7342         (mips_linux_stopped_data_address)
7343         (mips_linux_region_ok_for_hw_watchpoint)
7344         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7345         (mips_linux_close): Refactor as methods of mips_linux_nat.
7346         (_initialize_mips_linux_nat): Adjust to C++ification.
7347
7348         * aix-thread.c (aix_thread_target): New class.
7349         (aix_thread_ops): Now an aix_thread_target.
7350         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7351         (aix_thread_fetch_registers, aix_thread_store_registers)
7352         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7353         (aix_thread_thread_alive, aix_thread_pid_to_str)
7354         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7355         Refactor as methods of aix_thread_target.
7356         (init_aix_thread_ops): Delete.
7357         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7358         and complete_target_initialization.
7359         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7360         (rs6000_nat_target): New class.
7361         (the_rs6000_nat_target): New.
7362         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7363         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7364         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7365         (super_create_inferior): Delete.
7366         (_initialize_rs6000_nat): Adjust to C++ification.
7367
7368         * arm-linux-nat.c (arm_linux_nat_target): New class.
7369         (the_arm_linux_nat_target): New.
7370         (arm_linux_fetch_inferior_registers)
7371         (arm_linux_store_inferior_registers, arm_linux_read_description)
7372         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7373         (arm_linux_remove_hw_breakpoint)
7374         (arm_linux_region_ok_for_hw_watchpoint)
7375         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7376         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7377         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7378         arm_linux_nat_target.
7379         (_initialize_arm_linux_nat): Adjust to C++ification.
7380
7381         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7382         (the_aarch64_linux_nat_target): New.
7383         (aarch64_linux_fetch_inferior_registers)
7384         (aarch64_linux_store_inferior_registers)
7385         (aarch64_linux_child_post_startup_inferior)
7386         (aarch64_linux_read_description)
7387         (aarch64_linux_can_use_hw_breakpoint)
7388         (aarch64_linux_insert_hw_breakpoint)
7389         (aarch64_linux_remove_hw_breakpoint)
7390         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7391         (aarch64_linux_region_ok_for_hw_watchpoint)
7392         (aarch64_linux_stopped_data_address)
7393         (aarch64_linux_stopped_by_watchpoint)
7394         (aarch64_linux_watchpoint_addr_within_range)
7395         (aarch64_linux_can_do_single_step): Refactor as methods of
7396         aarch64_linux_nat_target.
7397         (super_post_startup_inferior): Delete.
7398         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7399
7400         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7401         (the_hppa_linux_nat_target): New.
7402         (hppa_linux_fetch_inferior_registers)
7403         (hppa_linux_store_inferior_registers): Refactor as methods of
7404         hppa_linux_nat_target.
7405         (_initialize_hppa_linux_nat): Adjust to C++ification.
7406
7407         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7408         (the_ia64_linux_nat_target): New.
7409         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7410         (ia64_linux_stopped_data_address)
7411         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7412         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7413         ia64_linux_nat_target methods.
7414         (super_xfer_partial): Delete.
7415         (_initialize_ia64_linux_nat): Adjust to C++ification.
7416
7417         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7418         (the_m32r_linux_nat_target): New.
7419         (m32r_linux_fetch_inferior_registers)
7420         (m32r_linux_store_inferior_registers): Refactor as
7421         m32r_linux_nat_target methods.
7422         (_initialize_m32r_linux_nat): Adjust to C++ification.
7423
7424         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7425         (the_m68k_linux_nat_target): New.
7426         (m68k_linux_fetch_inferior_registers)
7427         (m68k_linux_store_inferior_registers): Refactor as
7428         m68k_linux_nat_target methods.
7429         (_initialize_m68k_linux_nat): Adjust to C++ification.
7430
7431         * s390-linux-nat.c (s390_linux_nat_target): New class.
7432         (the_s390_linux_nat_target): New.
7433         (s390_linux_fetch_inferior_registers)
7434         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7435         (s390_insert_watchpoint, s390_remove_watchpoint)
7436         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7437         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7438         (s390_auxv_parse, s390_read_description): Refactor as methods of
7439         s390_linux_nat_target.
7440         (_initialize_s390_nat): Adjust to C++ification.
7441
7442         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7443         (the_sparc_linux_nat_target): New.
7444         (_initialize_sparc_linux_nat): Adjust to C++ification.
7445         * sparc-nat.c (sparc_fetch_inferior_registers)
7446         (sparc_store_inferior_registers): Remove target_ops parameter.
7447         * sparc-nat.h (sparc_fetch_inferior_registers)
7448         (sparc_store_inferior_registers): Remove target_ops parameter.
7449         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7450         (the_sparc64_linux_nat_target): New.
7451         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7452
7453         * spu-linux-nat.c (spu_linux_nat_target): New class.
7454         (the_spu_linux_nat_target): New.
7455         (spu_child_post_startup_inferior, spu_child_post_attach)
7456         (spu_child_wait, spu_fetch_inferior_registers)
7457         (spu_store_inferior_registers, spu_xfer_partial)
7458         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7459         methods.
7460         (_initialize_spu_nat): Adjust to C++ification.
7461
7462         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7463         (the_tilegx_linux_nat_target): New.
7464         (fetch_inferior_registers, store_inferior_registers):
7465         Refactor as methods.
7466         (_initialize_tile_linux_nat): Adjust to C++ification.
7467
7468         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7469         (the_xtensa_linux_nat_target): New.
7470         (xtensa_linux_fetch_inferior_registers)
7471         (xtensa_linux_store_inferior_registers): Refactor as
7472         xtensa_linux_nat_target methods.
7473         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7474
7475         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7476         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7477         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7478         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7479         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7480         (fbsd_stopped_by_sw_breakpoint)
7481         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7482         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7483         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7484         (fbsd_post_startup_inferior, fbsd_post_attach)
7485         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7486         (fbsd_set_syscall_catchpoint)
7487         (super_xfer_partial, super_resume, super_wait)
7488         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7489         (fbsd_handle_debug_trap): Remove target_ops parameter.
7490         (fbsd_nat_add_target): Delete.
7491         * fbsd-nat.h: Include "inf-ptrace.h".
7492         (fbsd_nat_add_target): Delete.
7493         (USE_SIGTRAP_SIGINFO): Define.
7494         (fbsd_nat_target): New class.
7495
7496         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7497         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7498         (amd64bsd_target): Delete.
7499         * amd64-bsd-nat.h: New file.
7500         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7501         "x86-bsd-nat.h".
7502         (amd64_fbsd_nat_target): New class.
7503         (the_amd64_fbsd_nat_target): New.
7504         (amd64fbsd_read_description): Refactor as method of
7505         amd64_fbsd_nat_target.
7506         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7507         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7508         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7509         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7510         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7511         (i386bsd_target): Delete.
7512         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7513         (i386bsd_fetch_inferior_registers)
7514         (i386bsd_store_inferior_registers): Declare.
7515         (i386_bsd_nat_target): New class.
7516         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7517         (the_i386_fbsd_nat_target): New.
7518         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7519         i386_fbsd_nat_target methods.
7520         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7521         (_initialize_i386fbsd_nat): Adjust to C++ification.
7522         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7523         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7524         (_initialize_x86_bsd_nat): Adjust to C++ification.
7525         * x86-bsd-nat.h: Include "x86-nat.h".
7526         (x86bsd_target): Delete declaration.
7527         (x86bsd_nat_target): New class.
7528
7529         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7530         (the_aarch64_fbsd_nat_target): New.
7531         (aarch64_fbsd_fetch_inferior_registers)
7532         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7533         aarch64_fbsd_nat_target.
7534         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7535         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7536         (the_alpha_bsd_nat_target): New.
7537         (alphabsd_fetch_inferior_registers)
7538         (alphabsd_store_inferior_registers): Refactor as
7539         alpha_bsd_nat_target methods.
7540         (_initialize_alphabsd_nat): Refactor as methods of
7541         alpha_bsd_nat_target.
7542         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7543         (the_amd64_nbsd_nat_target): New.
7544         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7545         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7546         (the_amd64_obsd_nat_target): New.
7547         (_initialize_amd64obsd_nat): Adjust to C++ification.
7548         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7549         (the_arm_fbsd_nat_target): New.
7550         (arm_fbsd_fetch_inferior_registers)
7551         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7552         (_initialize_arm_fbsd_nat): Refactor as methods of
7553         arm_fbsd_nat_target.
7554         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7555         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7556         (the_arm_netbsd_nat_target): New.
7557         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7558         arm_netbsd_nat_target.
7559         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7560         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7561         (the_hppa_nbsd_nat_target): New.
7562         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7563         hppa_nbsd_nat_target methods.
7564         (_initialize_hppanbsd_nat): Adjust to C++ification.
7565         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7566         (the_hppa_obsd_nat_target): New.
7567         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7568         methods of hppa_obsd_nat_target.
7569         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7570         add_target.
7571         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7572         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7573         add_target.
7574         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7575         (_initialize_i386obsd_nat): Use add_target.
7576         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7577         (the_m68k_bsd_nat_target): New.
7578         (m68kbsd_fetch_inferior_registers)
7579         (m68kbsd_store_inferior_registers): Refactor as methods of
7580         m68k_bsd_nat_target.
7581         (_initialize_m68kbsd_nat): Adjust to C++ification.
7582         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7583         (the_mips_fbsd_nat_target): New.
7584         (mips_fbsd_fetch_inferior_registers)
7585         (mips_fbsd_store_inferior_registers): Refactor as methods of
7586         mips_fbsd_nat_target.
7587         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7588         add_target.
7589         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7590         (the_mips_nbsd_nat_target): New.
7591         (mipsnbsd_fetch_inferior_registers)
7592         (mipsnbsd_store_inferior_registers): Refactor as methods of
7593         mips_nbsd_nat_target.
7594         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7595         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7596         (the_mips64_obsd_nat_target): New.
7597         (mips64obsd_fetch_inferior_registers)
7598         (mips64obsd_store_inferior_registers): Refactor as methods of
7599         mips64_obsd_nat_target.
7600         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7601         add_target.
7602         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7603         nbsd_nat_target.
7604         * nbsd-nat.h: Include "inf-ptrace.h".
7605         (nbsd_nat_target): New class.
7606         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7607         (obsd_wait): Refactor as methods of obsd_nat_target.
7608         (obsd_add_target): Delete.
7609         * obsd-nat.h: Include "inf-ptrace.h".
7610         (obsd_nat_target): New class.
7611         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7612         (the_ppc_fbsd_nat_target): New.
7613         (ppcfbsd_fetch_inferior_registers)
7614         (ppcfbsd_store_inferior_registers): Refactor as methods of
7615         ppc_fbsd_nat_target.
7616         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7617         add_target.
7618         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7619         (the_ppc_nbsd_nat_target): New.
7620         (ppcnbsd_fetch_inferior_registers)
7621         (ppcnbsd_store_inferior_registers): Refactor as methods of
7622         ppc_nbsd_nat_target.
7623         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7624         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7625         (the_ppc_obsd_nat_target): New.
7626         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7627         methods of ppc_obsd_nat_target.
7628         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7629         add_target.
7630         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7631         (the_sh_nbsd_nat_target): New.
7632         (shnbsd_fetch_inferior_registers)
7633         (shnbsd_store_inferior_registers): Refactor as methods of
7634         sh_nbsd_nat_target.
7635         (_initialize_shnbsd_nat): Adjust to C++ification.
7636         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7637         (inf_ptrace_xfer_partial): Delete.
7638         (sparc_xfer_partial, sparc_target): Delete.
7639         * sparc-nat.h (sparc_fetch_inferior_registers)
7640         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7641         (sparc_target): Delete function declaration.
7642         (sparc_target): New template class.
7643         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7644         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7645         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7646         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7647         add_target.
7648         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7649         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7650         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7651         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7652         add_target.
7653         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7654         (the_vax_bsd_nat_target): New.
7655         (vaxbsd_fetch_inferior_registers)
7656         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7657         methods.
7658         (_initialize_vaxbsd_nat): Adjust to C++ification.
7659
7660         * bsd-kvm.c (bsd_kvm_target): New class.
7661         (bsd_kvm_ops): Now a bsd_kvm_target.
7662         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7663         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7664         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7665         bsd_kvm_target.
7666         (bsd_kvm_return_one): Delete.
7667         (bsd_kvm_add_target): Adjust to C++ification.
7668
7669         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7670         (nto_procfs_target_procfs): New classes.
7671         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7672         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7673         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7674         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7675         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7676         (procfs_remove_hw_breakpoint, procfs_resume)
7677         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7678         (procfs_kill_inferior, procfs_store_registers)
7679         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7680         as methods of nto_procfs_target.
7681         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7682         (nto_native_ops): Delete.
7683         (procfs_open, procfs_native_open): Delete.
7684         (nto_native_ops): Now an nto_procfs_target_native.
7685         (init_procfs_targets): Adjust to C++ification.
7686         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7687         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7688         Refactor as methods of nto_procfs_target.
7689
7690         * go32-nat.c (go32_nat_target): New class.
7691         (the_go32_nat_target): New.
7692         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7693         (go32_store_registers, go32_xfer_partial, go32_files_info)
7694         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7695         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7696         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7697         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7698         (go32_target): Delete.
7699         (_initialize_go32_nat): Adjust to C++ification.
7700
7701         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7702         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7703         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7704         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7705         gnu_nat_target.
7706         (gnu_target): Delete.
7707         * gnu-nat.h (gnu_target): Delete.
7708         (gnu_nat_target): New class.
7709         * i386-gnu-nat.c (gnu_base_target): New.
7710         (i386_gnu_nat_target): New class.
7711         (the_i386_gnu_nat_target): New.
7712         (_initialize_i386gnu_nat): Adjust to C++ification.
7713
7714 2018-05-02  Pedro Alves  <palves@redhat.com>
7715
7716         * bfd-target.c (target_bfd_xclose): Rename to ...
7717         (target_bfd_close): ... this.
7718         (target_bfd_reopen): Adjust.
7719         * target.c (target_close): Remove references to to_xclose.
7720         * target.h (target_ops::to_xclose): Delete.
7721         (target_ops::to_close): Update comments.
7722
7723 2018-05-02  Pedro Alves  <palves@redhat.com>
7724
7725         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7726         "linux-nat.h".
7727         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7728         * inf-ptrace.c (inf_ptrace_register_u_offset)
7729         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7730         (inf_ptrace_store_register, inf_ptrace_store_registers)
7731         (inf_ptrace_trad_target): Move to ...
7732         * linux-nat-trad.c: ... this new file.
7733         * linux-nat-trad.h: New file.
7734         * linux-nat.c (linux_target_install_ops): Make extern.
7735         (linux_trad_target): Delete.
7736         * linux-nat.h (linux_trad_target): Delete declaration.
7737         (linux_target_install_ops): Declare.
7738         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7739         "linux-nat.h".
7740
7741 2018-05-02  Pedro Alves  <palves@redhat.com>
7742
7743         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7744         procfs_target/add_target here.
7745         * procfs.c (procfs_target): Make static.
7746         (_initialize_procfs): Call add_target here.
7747         * procfs.h (struct target_ops): Remove forward declaration.
7748         (procfs_target): Remove declaration.
7749         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7750
7751 2018-05-02  Pedro Alves  <palves@redhat.com>
7752
7753         * procfs.c (procfs_stopped_by_watchpoint)
7754         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7755         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7756         Forward declare.
7757         (procfs_use_watchpoints): Delete, move contents...
7758         (procfs_target): ... here.
7759         * procfs.h (procfs_use_watchpoints): Delete declaration.
7760         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7761         procfs_use_watchpoints.
7762         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7763         procfs_use_watchpoints.
7764
7765 2018-05-02  Tom Tromey  <tom@tromey.com>
7766
7767         PR python/20084:
7768         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7769         and var_zuinteger_unlimited.
7770         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7771         and PARAM_ZUINTEGER_UNLIMITED.
7772         (set_parameter_value): Handle var_zuinteger and
7773         var_zuinteger_unlimited.
7774         (add_setshow_generic): Likewise.
7775         (parmpy_init): Likewise.
7776
7777 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7778
7779         PR rust/23124
7780         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7781         pointer is not null before dereferencing it.
7782
7783 2018-04-30  Tom Tromey  <tom@tromey.com>
7784
7785         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7786         is_mi_like_p.
7787
7788 2018-04-30  Tom Tromey  <tom@tromey.com>
7789
7790         * breakpoint.c (mention): Remove use of is_mi_like_p.
7791         (print_mention_ranged_breakpoint): Likewise.
7792         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7793         of is_mi_like_p.
7794
7795 2018-04-30  Tom Tromey  <tom@tromey.com>
7796
7797         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7798
7799 2018-04-30  Tom Tromey  <tom@tromey.com>
7800
7801         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7802         (info_spu_event_command): Remove some uses of is_mi_like_p.
7803
7804 2018-04-30  Tom Tromey  <tom@tromey.com>
7805
7806         * python/py-framefilter.c (py_print_single_arg)
7807         (enumerate_locals, py_print_args, py_print_frame): Remove some
7808         uses of is_mi_like_p.
7809
7810 2018-04-30  Tom Tromey  <tom@tromey.com>
7811
7812         * ui-out.c: Update.
7813         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7814         * ui-out.h (ui_out::is_mi_like_p): Now const.
7815         (ui_out::do_is_mi_like_p): Now const.
7816         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7817
7818 2018-04-30  Tom Tromey  <tom@tromey.com>
7819
7820         * varobj.c (varobj_set_visualizer): Use new_reference.
7821         * python/python.c (gdbpy_decode_line): Use new_reference.
7822         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7823         new_reference.
7824
7825 2018-04-30  Tom Tromey  <tom@tromey.com>
7826
7827         * varobj.c (install_new_value): Use new_reference.
7828         * value.h (value_incref): Return void.  Swap intro comment with
7829         value_decref.
7830         * value.c (set_value_parent): Use new_reference.
7831         (value_incref): Return void.  Update intro comment.
7832         (release_value): Use new_reference.
7833         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7834
7835 2018-04-30  Tom Tromey  <tom@tromey.com>
7836
7837         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7838         * gdb_bfd.h (new_bfd_ref): Remove.
7839         (gdb_bfd_open): Update comment.
7840         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7841         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7842         (gdb_bfd_fdopenr): Use new_reference.
7843         * exec.c (exec_file_attach): Use new_reference.
7844
7845 2018-04-30  Tom Tromey  <tom@tromey.com>
7846
7847         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7848         method.
7849
7850 2018-04-30  Tom Tromey  <tom@tromey.com>
7851
7852         * jit.c (jit_read_code_entry): Use type_align.
7853         * i386-tdep.c (i386_gdbarch_init): Don't call
7854         set_gdbarch_long_long_align_bit.
7855         * gdbarch.sh: Remove long_long_align_bit.
7856         * gdbarch.c, gdbarch.h: Rebuild.
7857         * arc-tdep.c (arc_type_align): New function.
7858         (arc_gdbarch_init): Use arc_type_align.  Don't call
7859         set_gdbarch_long_long_align_bit.
7860
7861 2018-04-30  Tom Tromey  <tom@tromey.com>
7862
7863         * rust-lang.c (rust_type_alignment): Remove.
7864         (rust_composite_type): Use type_align.
7865
7866 2018-04-30  Tom Tromey  <tom@tromey.com>
7867
7868         * NEWS: Mention Type.align.
7869         * python/py-type.c (typy_get_alignof): New function.
7870         (type_object_getset): Add "alignof".
7871
7872 2018-04-30  Tom Tromey  <tom@tromey.com>
7873
7874         PR exp/17095:
7875         * NEWS: Update.
7876         * std-operator.def (UNOP_ALIGNOF): New operator.
7877         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7878         New.
7879         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7880         * c-lang.c (c_op_print_tab): Add alignof.
7881         * c-exp.y (ALIGNOF): New token.
7882         (exp): Add "ALIGNOF" production.
7883         (ident_tokens): Add _Alignof and alignof.
7884
7885 2018-04-30  Tom Tromey  <tom@tromey.com>
7886
7887         * i386-tdep.c (i386_type_align): New function.
7888         (i386_gdbarch_init): Update.
7889         * gdbarch.sh (type_align): New method.
7890         * gdbarch.c, gdbarch.h: Rebuild.
7891         * arch-utils.h (default_type_align): Declare.
7892         * arch-utils.c (default_type_align): New function.
7893         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7894         (struct type) <align_log2>: New field.
7895         <instance_flags>: Now a bitfield.
7896         (TYPE_RAW_ALIGN): New macro.
7897         (type_align, type_raw_align, set_type_align): Declare.
7898         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7899         functions.
7900         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7901         (get_alignment, maybe_set_alignment): New functions.
7902         (read_structure_type, read_enumeration_type, read_array_type)
7903         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7904         (read_subrange_type, read_base_type): Set type alignment.
7905
7906 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
7907
7908         * dwarf2read.c (read_index_from_section): Use bool.
7909
7910 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
7911
7912         PR gdb/22950
7913         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7914         with #ifdef.
7915
7916 2018-04-29  John Reiser  <jreiser@BitWagon.com>
7917
7918         PR build/22873
7919         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7920         last step, and do it atomically.
7921
7922 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
7923
7924         * compile/compile-c-types.c (convert_int, convert_float):
7925         Update for C FE v1.
7926
7927 2018-04-27  Tom Tromey  <tom@tromey.com>
7928
7929         PR rust/22545:
7930         * rust-lang.c (rust_inclusive_range_type_p): New function.
7931         (rust_range): Handle inclusive ranges.
7932         (rust_compute_range): Likewise.
7933         * rust-exp.y (struct rust_op) <inclusive>: New field.
7934         (DOTDOTEQ): New constant.
7935         (range_expr): Add "..=" productions.
7936         (operator_tokens): Add "..=" token.
7937         (ast_range): Add "inclusive" parameter.
7938         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7939         ranges.
7940         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7941         bounds values.
7942         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7943         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7944         Update comments.
7945         * expprint.c (print_subexp_standard): Handle new bounds values.
7946         (dump_subexp_body_standard): Likewise.
7947
7948 2018-04-27  Tom Tromey  <tom@tromey.com>
7949
7950         * configure: Rebuild.
7951         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7952         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7953         "OVERRIDE".
7954         (class symbol_needs_eval_context): Likewise.
7955         * dwarf2read.c (mock_mapped_index::symbol_name_count)
7956         (mock_mapped_index::symbol_name_at): Use "override".  Remove
7957         "virtual".
7958         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7959         "override".
7960         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7961         * aarch64-tdep.c (instruction_reader::read): Use "override".
7962         (instruction_reader_test::read): Likewise.
7963         * arm-tdep.c (instruction_reader::read): Use "override".
7964         (instruction_reader_thumb::read): Likewise.
7965
7966 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
7967
7968         PR remote/9665
7969         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7970         instead of remote_send.
7971         (remote_send): Remove.
7972
7973 2018-04-26  Pedro Alves  <palves@redhat.com>
7974
7975         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7976         find_function_start_sal instead of find_pc_line.
7977
7978 2018-04-26  Pedro Alves  <palves@redhat.com>
7979
7980         * breakpoint.c (set_breakpoint_location_function): Handle
7981         mst_data_gnu_ifunc.
7982         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7983         * elfread.c (elf_symtab_read): Give data symbols with
7984         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7985         (elf_rel_plt_read): Update comment.
7986         * linespec.c (convert_linespec_to_sals): Handle
7987         mst_data_gnu_ifunc.
7988         (minsym_found): Handle mst_data_gnu_ifunc.
7989         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7990         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7991         * parse.c (find_minsym_type_and_address): Handle
7992         mst_data_gnu_ifunc.
7993         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7994         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7995         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7996         comment.
7997         <mst_data_gnu_ifunc>: New enumerator.
7998
7999 2018-04-26  Pedro Alves  <palves@redhat.com>
8000
8001         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8002         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8003         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8004         Handle it.
8005         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8006         (lookup_minimal_symbol_by_pc): Adjust.
8007         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8008         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8009         * minsyms.h (lookup_msym_prefer): New enum.
8010         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8011         parameter by a lookup_msym_prefer parameter.
8012
8013 2018-04-26  Pedro Alves  <palves@redhat.com>
8014
8015         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8016         ends in "@plt" instead of looking at the symbol's section.
8017
8018 2018-04-26  Pedro Alves  <palves@redhat.com>
8019
8020         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8021         all references.
8022         (find_pc_partial_function_gnu_ifunc): Rename to ...
8023         (find_pc_partial_function): ... this, and remove references to
8024         'is_gnu_ifunc_p'.
8025         (find_pc_partial_function): Delete old implementation.
8026         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8027
8028 2018-04-26  Pedro Alves  <palves@redhat.com>
8029
8030         * linespec.c (struct bound_minimal_symbol_search_key): New.
8031         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8032         skip first line if we found a GNU ifunc minimal symbol by name.
8033         (compare_msymbols): Change parameters to work with a destructured
8034         lhs minsym.
8035         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8036         functions.
8037
8038 2018-04-26  Pedro Alves  <palves@redhat.com>
8039
8040         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8041         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8042         address/name.
8043         (add_location_to_breakpoint): Store the minsym and the objfile in
8044         the breakpoint location.
8045         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8046         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8047         Record the minsym in the sal.
8048         * symtab.h (symtab_and_line) <msymbol>: New field.
8049
8050 2018-04-26  Pedro Alves  <palves@redhat.com>
8051
8052         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8053         unless we actually resolved the ifunc.
8054
8055 2018-04-26  Pedro Alves  <palves@redhat.com>
8056
8057         * c-exp.y (variable production): Prefer ifunc minsyms over
8058         regular function symbols.
8059         * symtab.c (find_gnu_ifunc): New function.
8060         * minsyms.h (lookup_msym_prefer): New enum.
8061         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8062         parameter by a lookup_msym_prefer parameter.
8063         * symtab.h (find_gnu_ifunc): New declaration.
8064
8065 2018-04-26  Pedro Alves  <palves@redhat.com>
8066
8067         * blockframe.c (find_gnu_ifunc_target_type): New function.
8068         (find_function_type): New.
8069         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8070         return a value with a memory address.
8071         (eval_call): For calls to GNU ifunc functions, try to find the
8072         type of the target function from the type that the resolver
8073         returns.
8074         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8075         symbols.
8076         * infcall.c (find_function_return_type): Delete.
8077         (find_function_addr): Add 'function_type' parameter.  For calls to
8078         GNU ifunc functions, try to find the type of the target function
8079         from the type that the resolver returns, and return it via
8080         FUNCTION_TYPE.
8081         (call_function_by_hand_dummy): Adjust to use the function type
8082         returned by find_function_addr.
8083         (find_function_addr): Add 'function_type' parameter and move
8084         description here.
8085         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8086         declarations.
8087
8088 2018-04-26  Pedro Alves  <palves@redhat.com>
8089
8090         * c-exp.y (variable production): Skip finding an alias for ifunc
8091         symbols.
8092
8093 2018-04-26  Pedro Alves  <palves@redhat.com>
8094
8095         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8096
8097 2018-04-25  Pedro Alves  <palves@redhat.com>
8098
8099         * infcmd.c (kill_command): Print the pid as string, not the whole
8100         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8101         message.
8102         * remote.c (remote_detach_1): Print the pid as string, not the
8103         whole thread's ptid.
8104
8105 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8106             Sergio Durigan Junior  <sergiodj@redhat.com>
8107             Pedro Alves  <palves@redhat.com>
8108
8109         * infcmd.c (kill_command): Print message when inferior has
8110         been killed.
8111         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8112         '1'.
8113         (add_inferior): Improve message printed when
8114         'print_inferior_events' is on.
8115         (exit_inferior): Remove message printed when
8116         'print_inferior_events' is on.
8117         (detach_inferior): Improve message printed when
8118         'print_inferior_events' is on.
8119         (initialize_inferiors): Use 'add_inferior_silent' to set
8120         'current_inferior_'.
8121         * inferior.h (print_inferior_events): Declare here as
8122         'extern'.
8123         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8124         '[Detaching...]' messages when 'print_inferior_events' is on.
8125         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8126         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8127         'Detaching after fork from child...', replace it by '... from
8128         parent...'.
8129         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8130         prefix/suffix when printing 'Detaching...' messages.  Print
8131         them when 'print_inferior_events' is on.
8132         * remote.c (remote_detach_1): Print message when detaching
8133         from inferior and '!is_fork_parent'.
8134
8135 2018-04-24  Tom Tromey  <tom@tromey.com>
8136
8137         * cli-out.h: Reindent.
8138
8139 2018-04-24  Tom Tromey  <tom@tromey.com>
8140
8141         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8142         (cli_ui_out::do_field_string): Use fputs_filtered.
8143         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8144
8145 2018-04-23  Tom Tromey  <tom@tromey.com>
8146
8147         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8148         gdb::unique_xmalloc_ptr.
8149
8150 2018-04-23  Tom Tromey  <tom@tromey.com>
8151
8152         * configure: Rebuild.
8153
8154 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8155
8156         PR gdb/23095
8157         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8158         prepare_for_testing.  Set normal_bp to r_debug_state if target
8159         is bsd.
8160
8161 2018-04-21  Pedro Alves  <palves@redhat.com>
8162             Rajendra SY  <rajendra.sy@gmail.com>
8163
8164         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8165         * remote.c (extended_remote_attach): In all-stop mode, mark the
8166         thread as executing.
8167
8168 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8169
8170         * thread.c (thread_apply_all_command): Fix comment.
8171         (thread_command): Fix comment.
8172
8173 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8174
8175         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8176         parameter.
8177         * features/aarch64-core.c (create_feature_aarch64_core):
8178         Regenerate.
8179         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8180         Likewise.
8181         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8182         Likewise.
8183         * features/i386/32bit-avx512.c
8184         (create_feature_i386_32bit_avx512): Likewise.
8185         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8186         Likewise.
8187         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8188         Likewise.
8189         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8190         Likewise.
8191         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8192         Likewise.
8193         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8194         Likewise.
8195         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8196         Likewise.
8197         * features/i386/64bit-avx512.c
8198         (create_feature_i386_64bit_avx512): Likewise.
8199         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8200         Likewise.
8201         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8202         Likewise.
8203         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8204         Likewise.
8205         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8206         Likewise.
8207         * features/i386/64bit-segments.c
8208         (create_feature_i386_64bit_segments): Likewise.
8209         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8210         Likewise.
8211         * features/i386/x32-core.c
8212         (create_feature_i386_x32_core): Likewise.
8213         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8214         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8215         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8216         * target-descriptions.c: In generated code, don't pass xml
8217         filename.
8218
8219 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8220
8221         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8222         (print_xml_feature::visit_post): Likewise.
8223         (print_xml_feature::visit): Likewise.
8224         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8225         (print_xml_feature): Add new class.
8226         * regformats/regdat.sh: Null xmltarget on feature targets.
8227         * target-descriptions.c (struct target_desc): Add xmltarget.
8228         (maintenance_check_tdesc_xml_convert): Add unittest function.
8229         (tdesc_get_features_xml): Add function to get xml.
8230         (maintenance_check_xml_descriptions): Test xml generation.
8231         * xml-tdesc.c (string_read_description_xml): Add function.
8232         * xml-tdesc.h (string_read_description_xml): Add declaration.
8233
8234 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8235
8236         * features/Makefile: Add feature marker to targets with new style
8237         target descriptions.
8238         * regformats/aarch64.dat: Regenerate.
8239         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8240         * regformats/i386/amd64-avx-linux.dat: Likewise.
8241         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8242         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8243         * regformats/i386/amd64-linux.dat: Likewise.
8244         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8245         * regformats/i386/amd64.dat: Likewise.
8246         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8247         * regformats/i386/i386-avx-linux.dat: Likewise.
8248         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8249         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8250         * regformats/i386/i386-linux.dat: Likewise.
8251         * regformats/i386/i386-mmx-linux.dat: Likewise.
8252         * regformats/i386/i386-mpx-linux.dat: Likewise.
8253         * regformats/i386/i386.dat: Likewise.
8254         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8255         * regformats/i386/x32-avx-linux.dat: Likewise.
8256         * regformats/i386/x32-linux.dat: Likewise.
8257         * regformats/tic6x-c62x-linux.dat: Likewise.
8258         * regformats/tic6x-c64x-linux.dat: Likewise.
8259         * regformats/tic6x-c64xp-linux.dat: Likewise.
8260         * regformats/regdat.sh: Parse feature marker.
8261
8262 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8263
8264         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8265         (tdesc_osabi_name): Likewise.
8266         * target-descriptions.c (tdesc_architecture_name): Add new
8267         function.
8268         (tdesc_osabi_name): Likewise.
8269
8270 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8271
8272         * common/tdesc.c (tdesc_predefined_type): Move to here.
8273         (tdesc_named_type): Likewise.
8274         (tdesc_create_vector): Likewise.
8275         (tdesc_create_struct): Likewise.
8276         (tdesc_set_struct_size): Likewise.
8277         (tdesc_create_union): Likewise.
8278         (tdesc_create_flags): Likewise.
8279         (tdesc_create_enum): Likewise.
8280         (tdesc_add_field): Likewise.
8281         (tdesc_add_typed_bitfield): Likewise.
8282         (tdesc_add_bitfield): Likewise.
8283         (tdesc_add_flag): Likewise.
8284         (tdesc_add_enum_value): Likewise.
8285         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8286         (struct tdesc_type_vector): Likewise.
8287         (struct tdesc_type_field): Likewise.
8288         (struct tdesc_type_with_fields): Likewise.
8289         (tdesc_create_enum): Add declaration.
8290         (tdesc_add_typed_bitfield): Likewise.
8291         (tdesc_add_enum_value): Likewise.
8292         * target-descriptions.c (tdesc_type_field): Move from here.
8293         (tdesc_type_builtin): Likewise.
8294         (tdesc_type_vector): Likewise.
8295         (tdesc_type_with_fields): Likewise.
8296         (tdesc_predefined_types): Likewise.
8297         (tdesc_named_type): Likewise.
8298         (tdesc_create_vector): Likewise.
8299         (tdesc_create_struct): Likewise.
8300         (tdesc_set_struct_size): Likewise.
8301         (tdesc_create_union): Likewise.
8302         (tdesc_create_flags): Likewise.
8303         (tdesc_create_enum): Likewise.
8304         (tdesc_add_field): Likewise.
8305         (tdesc_add_typed_bitfield): Likewise.
8306         (tdesc_add_bitfield): Likewise.
8307         (tdesc_add_flag): Likewise.
8308         (tdesc_add_enum_value): Likewise.
8309         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8310         (tdesc_add_typed_bitfield): Likewise.
8311         (tdesc_add_enum_value): Likewise.
8312
8313 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8314
8315         * common/tdesc.c (tdesc_feature::accept): Move to here.
8316         (tdesc_feature::operator==): Likewise.
8317         (tdesc_create_reg): Likewise.
8318         * common/tdesc.h (tdesc_type_kind): Likewise.
8319         (struct tdesc_type): Likewise.
8320         (struct tdesc_feature): Likewise.
8321         * regformats/regdat.sh: Create a feature.
8322         * target-descriptions.c (tdesc_type_kind): Move from here.
8323         (tdesc_type): Likewise.
8324         (tdesc_type_up): Likewise.
8325         (tdesc_feature): Likewise.
8326         (tdesc_create_reg): Likewise.
8327
8328 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8329
8330         * Makefile.in: Add arch/tdesc.c
8331         * common/tdesc.c: New file.
8332         * common/tdesc.h (tdesc_element_visitor): Move to here.
8333         (tdesc_element): Likewise.
8334         (tdesc_reg): Likewise.
8335         (tdesc_reg_up): Likewise.
8336         * regformats/regdef.h (reg): Add offset to constructors.
8337         * target-descriptions.c (tdesc_element_visitor): Move from here.
8338         (tdesc_element): Likewise.
8339         (tdesc_reg): Likewise.
8340         (tdesc_reg_up): Likewise.
8341
8342 2018-04-17  Tom Tromey  <tom@tromey.com>
8343
8344         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8345         discriminant field.
8346
8347 2018-04-17  Tom Tromey  <tom@tromey.com>
8348
8349         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8350
8351 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8352
8353         * symtab.c (print_symbol_info): Skip printing filename and line
8354         number when `last' is NULL.
8355         (symtab_symbol_info): Use empty string instead of NULL for first
8356         invocation of print_symbol_info.
8357         (rbreak_command): Pass NULL to `last' parameter of
8358         print_symbol_info.
8359
8360 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8361
8362         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8363         instead of nullptr.
8364
8365 2018-04-16  Pedro Alves  <palves@redhat.com>
8366
8367         * MAINTAINERS (sh): Remove.
8368         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8369         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8370         (ALLDEPFILES): Remove sh64-tdep.c.
8371         * NEWS: Mentions that support for SH-5/SH64 is removed.
8372         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8373         (sh*-*-openbsd*): Ditto.
8374         (sh64-*-elf*): Remove.
8375         (sh*): Remove.
8376         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8377         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8378         * sh-tdep.c: No longer include "sh64-tdep.h".
8379         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8380         * sh64-tdep.c, sh64-tdep.h: Remove files.
8381
8382 2018-04-16  Pedro Alves  <palves@redhat.com>
8383
8384         * MAINTAINERS: Remove m88k.
8385         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8386         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8387         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8388         * NEWS: Mention that support for m88k was removed.
8389         * configure.host (m88*-*-*): Remove support.
8390         * configure.nat (m88k-*-*): Remove support.
8391         * configure.tgt (m88*-*-openbsd*): Remove.
8392         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8393
8394 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8395
8396         * configure.tgt (x86_tobjs): New variable.
8397         (amd64_tobjs, i386_tobjs): Use it.
8398
8399 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8400
8401         * symtab.c (print_symbol_info): Precede the symbol definition by
8402         the line number when available.
8403         * NEWS: Advertise this enhancement.
8404
8405 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8406
8407         * NEWS (New options): announce set/show record btrace cpu.
8408         * btrace.c: Include record-btrace.h.
8409         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8410         the vendor is unknown.
8411         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8412         Maybe overwrite the btrace configuration's cpu.
8413         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8414         (btrace_fetch): Add cpu parameter.  Update callers.
8415         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8416         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8417         errata workarounds if the vendor is unknown.
8418         * python/py-record-btrace.c: Include record-btrace.h.
8419         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8420         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8421         * record-btrace.c (record_btrace_cpu_state_kind): New.
8422         (record_btrace_cpu): New.
8423         (set_record_btrace_cpu_cmdlist): New.
8424         (record_btrace_get_cpu): New.
8425         (require_btrace_thread, record_btrace_info)
8426         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8427         (cmd_set_record_btrace_cpu_none): New.
8428         (cmd_set_record_btrace_cpu_auto): New.
8429         (cmd_set_record_btrace_cpu): New.
8430         (cmd_show_record_btrace_cpu): New.
8431         (_initialize_record_btrace): Initialize set/show record btrace cpu
8432         commands.
8433         * record-btrace.h (record_btrace_get_cpu): New.
8434
8435 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8436
8437         * record.c (set_record_command): Fix typo in message.
8438
8439 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8440
8441         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8442
8443 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8444
8445         * infrun.c (process_event_stop_test): Call
8446         gdbarch_in_indirect_branch_thunk.
8447         * gdbarch.sh (in_indirect_branch_thunk): New.
8448         * gdbarch.c: Regenerated.
8449         * gdbarch.h: Regenerated.
8450         * x86-tdep.h: New.
8451         * x86-tdep.c: New.
8452         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8453         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8454         (ALLDEPFILES): Add x86-tdep.c.
8455         * arch-utils.h (default_in_indirect_branch_thunk): New.
8456         * arch-utils.c (default_in_indirect_branch_thunk): New.
8457         * i386-tdep: Include x86-tdep.h.
8458         (i386_in_indirect_branch_thunk): New.
8459         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8460         function.
8461         * amd64-tdep: Include x86-tdep.h.
8462         (amd64_in_indirect_branch_thunk): New.
8463         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8464
8465 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8466
8467         PR gdb/23053
8468         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8469         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8470         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8471         regression.
8472
8473 2018-04-12  Tom Tromey  <tom@tromey.com>
8474
8475         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8476         (rust_evaluate_subexp): Likewise.
8477
8478 2018-04-12  Pedro Alves  <palves@redhat.com>
8479
8480         * procfs.c (procfs_detach): Make forward declaration's prototype
8481         match definition's protototype.
8482         (proc_get_LDT_entry): Remove stale do_cleanups call.
8483
8484 2018-04-12  Pedro Alves  <palves@redhat.com>
8485
8486         * target.h (target_ops::to_has_exited): Delete.
8487         (target_has_exited): Delete.
8488         * target-delegates.c: Regenerate.
8489
8490 2018-04-11  Pedro Alves  <palves@redhat.com>
8491
8492         * target.c (fileio_fh_t::t): Add comment.
8493         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8494         (target_fileio_close): Handle a NULL target.
8495         (invalidate_fileio_fh): New.
8496         (target_close): Call it.
8497         * remote.c (remote_hostio_send_command): No longer check whether
8498         remote_desc is open.
8499
8500 2018-04-11  Pedro Alves  <palves@redhat.com>
8501
8502         * target.c (fileio_fh_t): Make it a named struct instead of a
8503         typedef.
8504         (fileio_fh_t::is_closed): New method.
8505         (DEF_VEC_O (fileio_fh_t)): Remove.
8506         (fileio_fhandles): Now a std::vector.
8507         (is_closed_fileio_fh): Delete.
8508         (acquire_fileio_fd): Adjust.  Rename parameters.
8509         (release_fileio_fd): Adjust.
8510         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8511         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8512         (target_fileio_close): Adjust.
8513
8514 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8515
8516         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8517         index.
8518
8519 2018-04-10  Pedro Alves  <palves@redhat.com>
8520
8521         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8522         (scoped_finish_thread_state): New class.
8523         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8524         cleanup.
8525         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8526         (fetch_inferior_event, normal_stop): Likewise.
8527         * thread.c (finish_thread_state_cleanup): Delete.
8528
8529 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8530             Pedro Alves  <palves@redhat.com>
8531
8532         * value.c: Include "selftest.h" and "common/array-view.h".
8533         (struct range) <operator ==>: New.
8534         (test_ranges_contain): New.
8535         (check_ranges_vector): New.
8536         (test_insert_into_bit_range_vector): New.
8537         (_initialize_values): Register selftests.
8538         * common/array-view.h (operator==, operator!=): New.
8539
8540 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8541
8542         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8543         an iterator.
8544         * inline-frame.c: Include <algorithm>.
8545         (struct inline_state): Add constructor.
8546         (inline_state_s): Remove.
8547         (DEF_VEC_O(inline_state_s)): Remove.
8548         (inline_states): Change type to std::vector.
8549         (find_inline_frame_state): Adjust to std::vector.
8550         (allocate_inline_frame_state): Remove.
8551         (clear_inline_frame_state): Adjust to std::vector.
8552         (skip_inline_frames): Adjust to std::vector.
8553
8554 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8555
8556         * tracepoint.h (struct trace_state_variable): Add constructor.
8557         <name>: Change type to std::string.
8558         * tracepoint.c (tsv_s): Remove.
8559         (DEF_VEC_O(tsv_s)): Remove.
8560         (tvariables): Change to std::vector.
8561         (create_trace_state_variable): Adjust to std::vector.
8562         (find_trace_state_variable): Likewise.
8563         (find_trace_state_variable_by_number): Likewise.
8564         (delete_trace_state_variable): Likewise.
8565         (trace_variable_command): Adjust to std::string.
8566         (delete_trace_variable_command): Likewise.
8567         (tvariables_info_1): Adjust to std::vector.
8568         (save_trace_state_variables): Likewise.
8569         (start_tracing): Likewise.
8570         (merge_uploaded_trace_state_variables): Adjust to std::vector
8571         and std::string.
8572         * target.h (struct target_ops)
8573         <to_download_trace_state_variable>: Pass reference to
8574         trace_state_variable.
8575         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8576         * target-delegates.c: Re-generate.
8577         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8578         (mi_tsv_deleted): Likewise.
8579         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8580         * remote.c (remote_download_trace_state_variable): Change
8581         pointer to reference and adjust.
8582         * make-target-delegates (parse_argtypes): Handle references.
8583         (write_function_header): Likewise.
8584         (munge_type): Likewise.
8585
8586 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8587
8588         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8589         string_view-selftests.c.
8590         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8591         testsuite.
8592         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8593         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8594         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8595         * unittests/basic_string_view/element_access/char/1.cc:
8596         Likewise.
8597         * unittests/basic_string_view/element_access/char/empty.cc:
8598         Likewise.
8599         * unittests/basic_string_view/element_access/char/front_back.cc:
8600         Likewise.
8601         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8602         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8603         Likewise.
8604         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8605         Likewise.
8606         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8607         Likewise.
8608         * unittests/basic_string_view/operations/compare/char/1.cc:
8609         Likewise.
8610         * unittests/basic_string_view/operations/compare/char/13650.cc:
8611         Likewise.
8612         * unittests/basic_string_view/operations/copy/char/1.cc:
8613         Likewise.
8614         * unittests/basic_string_view/operations/data/char/1.cc:
8615         Likewise.
8616         * unittests/basic_string_view/operations/find/char/1.cc:
8617         Likewise.
8618         * unittests/basic_string_view/operations/find/char/2.cc:
8619         Likewise.
8620         * unittests/basic_string_view/operations/find/char/3.cc:
8621         Likewise.
8622         * unittests/basic_string_view/operations/find/char/4.cc:
8623         Likewise.
8624         * unittests/basic_string_view/operations/rfind/char/1.cc:
8625         Likewise.
8626         * unittests/basic_string_view/operations/rfind/char/2.cc:
8627         Likewise.
8628         * unittests/basic_string_view/operations/rfind/char/3.cc:
8629         Likewise.
8630         * unittests/basic_string_view/operations/substr/char/1.cc:
8631         Likewise.
8632         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8633         * unittests/string_view-selftests.c: New file.
8634
8635 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8636
8637         * unittests/basic_string_view/capacity/1.cc: New file.
8638         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8639         * unittests/basic_string_view/cons/char/1.cc: New file.
8640         * unittests/basic_string_view/cons/char/2.cc: New file.
8641         * unittests/basic_string_view/cons/char/3.cc: New file.
8642         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8643         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8644         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8645         * unittests/basic_string_view/element_access/char/1.cc: New file.
8646         * unittests/basic_string_view/element_access/char/2.cc: New file.
8647         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8648         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8649         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8650         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8651         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8652         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8653         * unittests/basic_string_view/include.cc: New file.
8654         * unittests/basic_string_view/inserters/char/1.cc: New file.
8655         * unittests/basic_string_view/inserters/char/2.cc: New file.
8656         * unittests/basic_string_view/inserters/char/3.cc: New file.
8657         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8658         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8659         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8660         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8661         * unittests/basic_string_view/literals/types.cc: New file.
8662         * unittests/basic_string_view/literals/values.cc: New file.
8663         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8664         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8665         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8666         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8667         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8668         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8669         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8670         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8671         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8672         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8673         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8674         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8675         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8676         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8677         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8678         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8679         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8680         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8681         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8682         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8683         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8684         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8685         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8686         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8687         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8688         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8689         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8690         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8691         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8692         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8693         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8694         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8695         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8696         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8697         * unittests/basic_string_view/operators/char/2.cc: New file.
8698         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8699         * unittests/basic_string_view/range_access/char/1.cc: New file.
8700         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8701         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8702         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8703         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8704         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8705         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8706         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8707         * unittests/basic_string_view/typedefs.cc: New file.
8708         * unittests/basic_string_view/types/1.cc: New file.
8709
8710 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8711
8712         * common/gdb_string_view.h: Remove libstdc++ implementation
8713         details, adjust to gdb reality.
8714         * common/gdb_string_view.tcc: Likewise.
8715         * cli/cli-script.c (struct string_view): Remove.
8716         (user_args) <m_args>: Change element type to gdb::string_view.
8717         (user_args::insert_args): Adjust.
8718
8719 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8720
8721         * common/gdb_string_view.h: New file.
8722         * common/gdb_string_view.tcc: New file.
8723
8724 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8725
8726         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8727         * configure: Re-generate.
8728
8729 2018-04-09  Pedro Alves  <palves@redhat.com>
8730
8731         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8732         (set_target_gdbarch): Call
8733         gdb::observers::architecture_changed.notify instead of
8734         observer_notify_architecture_changed.
8735
8736 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8737
8738         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8739         (do_restore_current_traceframe_cleanup): Remove.
8740         (restore_current_traceframe_cleanup_dtor): Remove.
8741         (make_cleanup_restore_current_traceframe): Remove.
8742         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8743         New.
8744         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8745         * infrun.c (fetch_inferior_event): Use
8746         scoped_restore_current_traceframe.
8747
8748 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8749
8750         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8751         Remove.
8752         <n_allocated_type_units>: Remove.
8753         <all_type_units>: Change to std::vector.
8754         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8755         to std::vector change.
8756         (dwarf2_per_objfile::get_cutu): Likewise.
8757         (dwarf2_per_objfile::get_tu): Likewise.
8758         (create_signatured_type_table_from_index): Likewise.
8759         (create_signatured_type_table_from_debug_names): Likewise.
8760         (dw2_symtab_iter_next): Likewise.
8761         (dw2_print_stats): Likewise.
8762         (dw2_expand_all_symtabs): Likewise.
8763         (dw2_expand_marked_cus): Likewise.
8764         (dw2_debug_names_iterator::next): Likewise.
8765         (dwarf2_initialize_objfile): Likewise.
8766         (add_signatured_type_cu_to_table): Likewise.
8767         (create_all_type_units): Likewise.
8768         (add_type_unit): Likewise.
8769         (struct tu_abbrev_offset): Add constructor.
8770         (build_type_psymtabs_1): Adjust to std::vector change.
8771         (print_tu_stats): Likewise.
8772         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8773         (write_debug_names): Likewise.
8774
8775 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8776
8777         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8778         Make an std::vector.
8779         <n_comp_units>: Remove.
8780         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8781         to std::vector change.
8782         (dwarf2_per_objfile::get_cutu): Likewise.
8783         (dwarf2_per_objfile::get_cu): Likewise.
8784         (create_cus_from_index): Likewise.
8785         (create_addrmap_from_index): Likewise.
8786         (create_addrmap_from_aranges): Likewise.
8787         (dwarf2_read_index): Likewise.
8788         (dw2_find_last_source_symtab): Likewise.
8789         (dw2_map_symtabs_matching_filename): Likewise.
8790         (dw2_symtab_iter_next): Likewise.
8791         (dw2_print_stats): Likewise.
8792         (dw2_expand_all_symtabs): Likewise.
8793         (dw2_expand_symtabs_with_fullname): Likewise.
8794         (dw2_expand_marked_cus): Likewise.
8795         (dw2_map_symbol_filenames): Likewise.
8796         (create_cus_from_debug_names): Likewise.
8797         (dwarf2_read_debug_names): Likewise.
8798         (dw2_debug_names_iterator::next): Likewise.
8799         (dwarf2_initialize_objfile): Likewise.
8800         (set_partial_user): Likewise.
8801         (dwarf2_build_psymtabs_hard): Likewise.
8802         (read_comp_units_from_section): Remove arguments, adjust to
8803         std::vector change.
8804         (create_all_comp_units): Adjust to std::vector and
8805         read_comp_units_from_section changes.
8806         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8807         change.
8808         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8809         (psyms_seen_size): Likewise.
8810         (write_gdbindex): Likewise.
8811         (write_debug_names): Likewise.
8812
8813 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8814
8815         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8816         with dwarf2_per_objfile.
8817         (create_cus_from_index): Likewise.
8818         (create_signatured_type_table_from_index): Likewise.
8819         (dwarf2_read_index): Likewise.
8820         (dwarf2_initialize_objfile): Likewise.
8821         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8822         per_cu rather than get_dwarf2_per_objfile.
8823
8824 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8825
8826         * dwarf2read.h (struct signatured_type): Forward declare.
8827         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8828         New methods.
8829         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8830         (dw2_get_cutu): ...this.
8831         (dwarf2_per_objfile::get_cu): Rename from...
8832         (dw2_get_cu): ...this.
8833         (dwarf2_per_objfile::get_tu): New.
8834         (create_addrmap_from_index): Adjust.
8835         (create_addrmap_from_aranges): Adjust.
8836         (dw2_find_last_source_symtab): Adjust.
8837         (dw2_map_symtabs_matching_filename): Adjust.
8838         (dw2_symtab_iter_next): Adjust.
8839         (dw2_print_stats): Adjust.
8840         (dw2_expand_all_symtabs): Adjust.
8841         (dw2_expand_symtabs_with_fullname): Adjust.
8842         (dw2_expand_marked_cus): Adjust.
8843         (dw_expand_symtabs_matching_file_matcher): Adjust.
8844         (dw2_map_symbol_filenames): Adjust.
8845         (dw2_debug_names_iterator::next): Adjust.
8846         (dwarf2_initialize_objfile): Adjust.
8847         (set_partial_user): Adjust.
8848         (dwarf2_build_psymtabs_hard): Adjust.
8849
8850 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8851
8852         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8853         Remove unused variables.
8854         (dw2_map_symtabs_matching_filename): Likewise.
8855         (dwarf2_record_block_ranges): Likewise.
8856         (dwarf2_read_addr_index): Likewise.
8857         (follow_die_offset): Likewise.
8858
8859 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8860
8861         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8862         to symbol_file_add_main.
8863
8864 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8865
8866         PR mi/22299
8867         * mi/mi-console.c (do_fputc_async_safe): New.
8868         (mi_console_file::write_async_safe): New.
8869         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8870         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8871         New.
8872         * ui-file.c (ui_file::putstrn): Adjust call to
8873         fputstrn_unfiltered.
8874         * utils.c (printchar): Replace do_fputs and do_fprintf
8875         parameters by do_fputc.
8876         (fputstr_filtered): Adjust call to printchar.
8877         (fputstr_unfiltered): Likewise.
8878         (fputstrn_filtered): Likewise.
8879         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8880         printchar.
8881         * utils.h (do_fputc_ftype): New typedef.
8882         (fputstrn_unfiltered): Add do_fputc parameter.
8883
8884 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8885
8886         * regformats/i386/i386-avx.dat: Remove.
8887
8888 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8889
8890         PR gdb/22979
8891         * amd64-tdep.c (amd64_none_init_abi): New function.
8892         (amd64_x32_none_init_abi): New function.
8893         (_initialize_amd64_tdep): Register handlers for x86-64 and
8894         x64_32 with GDB_OSABI_NONE.
8895         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8896         GDB_OSABI_NONE osabi.
8897
8898 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8899
8900         PR gdb/22980
8901         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8902         GDB_OSABI_NONE.
8903         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8904         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8905
8906 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8907
8908         * common/byte-vector.h (char_vector): New type.
8909         * target.h (target_read_alloc): Return
8910         gdb::optional<byte_vector>.
8911         (target_read_stralloc): Return gdb::optional<char_vector>.
8912         (target_get_osdata): Return gdb::optional<char_vector>.
8913         * target.c (target_read_alloc_1): Templatize.  Replacement
8914         manual memory management with vector.
8915         (target_read_alloc): Change return type, adjust.
8916         (target_read_stralloc): Change return type, adjust.
8917         (target_get_osdata): Change return type, adjust.
8918         * auxv.c (struct auxv_info) <length>: Remove.
8919         <data>: Change type to gdb::optional<byte_vector>.
8920         (auxv_inferior_data_cleanup): Free auxv_info with delete.
8921         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8922         (target_auxv_search): Adjust.
8923         (fprint_target_auxv): Adjust.
8924         * avr-tdep.c (avr_io_reg_read_command): Adjust.
8925         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8926         (linux_make_corefile_notes): Adjust.
8927         * osdata.c (get_osdata): Adjust.
8928         * remote.c (remote_get_threads_with_qxfer): Adjust.
8929         (remote_memory_map): Adjust.
8930         (remote_traceframe_info): Adjust.
8931         (btrace_read_config): Adjust.
8932         (remote_read_btrace): Adjust.
8933         (remote_pid_to_exec_file): Adjust.
8934         * solib-aix.c (solib_aix_get_library_list): Adjust.
8935         * solib-dsbt.c (decode_loadmap): Don't free buf.
8936         (dsbt_get_initial_loadmaps): Adjust.
8937         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8938         * solib-target.c (solib_target_current_sos): Adjust.
8939         * tracepoint.c (sdata_make_value): Adjust.
8940         * xml-support.c (xinclude_start_include): Adjust.
8941         (xml_fetch_content_from_file): Adjust.
8942         * xml-support.h (xml_fetch_another): Change return type.
8943         (xml_fetch_content_from_file): Change return type.
8944         * xml-syscall.c (xml_init_syscalls_info): Adjust.
8945         * xml-tdesc.c (file_read_description_xml): Adjust.
8946         (fetch_available_features_from_target): Change return type.
8947         (target_fetch_description_xml): Adjust.
8948         (target_read_description_xml): Adjust.
8949
8950 2018-04-06  Tom Tromey  <tom@tromey.com>
8951
8952         * value.c (~value): Update.
8953         (struct value) <contents>: Now unique_xmalloc_ptr.
8954         (value_contents_bits_eq, allocate_value_contents)
8955         (value_contents_raw, value_contents_all_raw)
8956         (value_contents_for_printing, value_contents_for_printing_const)
8957         (set_value_enclosing_type): Update.
8958
8959 2018-04-06  Tom Tromey  <tom@tromey.com>
8960
8961         * value.c (range_s): Remove typedef, VEC.
8962         (struct range): Add operator<.
8963         (range_lessthan): Remove.
8964         (ranges_contain): Change type.
8965         (~value): Update.
8966         (struct value) <unavailable, optimized_out>: Now std::vector.
8967         (value_entirely_available)
8968         (value_entirely_covered_by_range_vector)
8969         (value_entirely_unavailable, value_entirely_optimized_out):
8970         Update.
8971         (insert_into_bit_range_vector): Change argument type.
8972         (find_first_range_overlap): Likewise.
8973         (struct ranges_and_idx, value_contents_bits_eq)
8974         (require_not_optimized_out, require_available): Update.
8975         (ranges_copy_adjusted): Change argument types.
8976         (value_optimized_out, value_copy, value_fetch_lazy): Update.
8977
8978 2018-04-06  Tom Tromey  <tom@tromey.com>
8979
8980         * value.c (~value): Update.
8981         (struct value) <parent>: Now a value_ref_ptr.
8982         (value_parent, set_value_parent, value_address, value_copy):
8983         Update.
8984
8985 2018-04-06  Tom Tromey  <tom@tromey.com>
8986
8987         * value.c (struct value): Add constructor, destructor, and member
8988         initializers.
8989         (allocate_value_lazy, value_decref): Update.
8990
8991 2018-04-06  Tom Tromey  <tom@tromey.com>
8992
8993         * value.c (struct value) <released, next>: Remove.
8994         (all_values): Now a std::vector.
8995         (allocate_value_lazy): Update.
8996         (value_next): Remove.
8997         (value_mark, value_free_to_mark, release_value)
8998         (value_release_to_mark): Update.
8999
9000 2018-04-06  Tom Tromey  <tom@tromey.com>
9001
9002         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9003         (free_value_chain): Remove.
9004         * value.c (free_value_chain): Remove.
9005         (value_release_to_mark): Return a std::vector.
9006         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9007         std::vector.
9008         (check_condition): Update.
9009         * eval.c (fetch_subexp_value): Change "val_chain" to a
9010         std::vector.
9011         * breakpoint.c (update_watchpoint): Update.
9012         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9013
9014 2018-04-06  Tom Tromey  <tom@tromey.com>
9015
9016         * value.h (free_all_values): Remove.
9017         * value.c (free_all_values): Remove.
9018
9019 2018-04-06  Tom Tromey  <tom@tromey.com>
9020
9021         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9022         (value_history_chain, value_history_count): Remove.
9023         (value_history): New global.
9024         (record_latest_value, access_value_history, show_values)
9025         (preserve_values): Update.
9026
9027 2018-04-06  Tom Tromey  <tom@tromey.com>
9028
9029         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9030         * varobj.c (varobj_set_display_format, varobj_set_value)
9031         (install_default_visualizer, construct_visualizer)
9032         (install_new_value, ~varobj, varobj_get_value_type)
9033         (my_value_of_variable, varobj_editable_p): Update.
9034         * c-varobj.c (c_describe_child, c_value_of_variable)
9035         (cplus_number_of_children, cplus_describe_child): Update.
9036         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9037         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9038         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9039
9040 2018-04-06  Tom Tromey  <tom@tromey.com>
9041
9042         * printcmd.c (last_examine_address): Change type to
9043         value_ref_ptr.
9044         (do_examine, x_command): Update.
9045
9046 2018-04-06  Tom Tromey  <tom@tromey.com>
9047
9048         * value.c (release_value): Update.
9049         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9050         (struct bpstats) <val>: Now a value_ref_ptr.
9051         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9052         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9053         (~watchpoint, print_it_watchpoint, watch_command_1)
9054         (invalidate_bp_value_on_memory_change): Update.
9055
9056 2018-04-06  Tom Tromey  <tom@tromey.com>
9057
9058         * varobj.c (varobj_clear_saved_item)
9059         (update_dynamic_varobj_children, install_new_value, ~varobj):
9060         Update.
9061         * value.h (value_incref): Move declaration earlier.
9062         (value_decref): Rename from value_free.
9063         (struct value_ref_policy): New.
9064         (value_ref_ptr): New typedef.
9065         (struct value_deleter): Remove.
9066         (gdb_value_up): Remove typedef.
9067         (release_value): Change return type.
9068         (release_value_or_incref): Remove.
9069         * value.c (set_value_parent): Update.
9070         (value_incref): Change return type.
9071         (value_decref): Rename from value_free.
9072         (value_free_to_mark, free_all_values, free_value_chain): Update.
9073         (release_value): Return value_ref_ptr.
9074         (release_value_or_incref): Remove.
9075         (record_latest_value, set_internalvar, clear_internalvar):
9076         Update.
9077         * stack.c (info_frame_command): Don't call value_free.
9078         * python/py-value.c (valpy_dealloc, valpy_new)
9079         (value_to_value_object): Update.
9080         * printcmd.c (do_examine): Update.
9081         * opencl-lang.c (lval_func_free_closure): Update.
9082         * mi/mi-main.c (register_changed_p): Don't call value_free.
9083         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9084         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9085         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9086         value_free.
9087         * guile/scm-value.c (vlscm_free_value_smob)
9088         (vlscm_scm_from_value): Update.
9089         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9090         (frame_unwind_register_unsigned, get_frame_register_bytes)
9091         (put_frame_register_bytes): Don't call value_free.
9092         * findvar.c (address_from_register): Don't call value_free.
9093         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9094         * dwarf2loc.c (entry_data_value_free_closure)
9095         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9096         (dwarf2_evaluate_loc_desc_full): Update.
9097         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9098         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9099         (~watchpoint, watch_command_1)
9100         (invalidate_bp_value_on_memory_change): Update.
9101         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9102
9103 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9104
9105         PR gdb/23022
9106         * warning.m4: Add -Wno-error=deprecated-register.
9107         * configure: Re-generate.
9108
9109 2018-04-05  Tom Tromey  <tom@tromey.com>
9110
9111         * linespec.h: Remove include of "vec.h".
9112
9113 2018-04-05  Tom Tromey  <tom@tromey.com>
9114
9115         * linespec.c (typep): Remove typedef.
9116         (find_methods, find_superclass_methods): Take a std::vector.
9117         (find_method): Use std::vector.
9118
9119 2018-04-05  Tom Tromey  <tom@tromey.com>
9120
9121         * utils.c (compare_strings): Remove.
9122         * utils.h (compare_strings): Remove.
9123         * objc-lang.h (find_imps): Update.
9124         * objc-lang.c (find_methods): Take a std::vector.
9125         (uniquify_strings, find_imps): Likewise.
9126         * linespec.c (find_methods): Take a std::vector.
9127         (decode_objc): Use std::vector.
9128         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9129         a std::vector.
9130         (find_method, find_function_symbols): Use std::vector.
9131
9132 2018-04-05  Tom Tromey  <tom@tromey.com>
9133
9134         * completer.c (completion_tracker::completion_tracker): Remove
9135         cast.
9136         (completion_tracker::discard_completions): Likewise.
9137         * breakpoint.c (ambiguous_names_p): Remove cast.
9138         * ada-lang.c (_initialize_ada_language): Remove cast.
9139         * utils.h (streq): Update.
9140         (streq_hash): Add new declaration.
9141         * utils.c (streq): Return bool.
9142         (streq_hash): New function.
9143
9144 2018-04-05  Tom Tromey  <tom@tromey.com>
9145
9146         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9147         Remove a string copy.
9148
9149 2018-04-05  Tom Tromey  <tom@tromey.com>
9150
9151         * linespec.c (filter_results): Use std::vector.
9152         (decode_line_2, decode_line_full): Update.
9153
9154 2018-04-05  Tom Tromey  <tom@tromey.com>
9155
9156         * linespec.c (canonical_to_fullform): Return std::string.
9157         (filter_results): Update.
9158         (struct decode_line_2_item): Add constructor.
9159         <fullform, displayform>: Now std::string.
9160         (decode_line_2_compare_items): Now a std::sort comparator.
9161         (decode_line_2): Update.
9162
9163 2018-04-05  Tom Tromey  <tom@tromey.com>
9164
9165         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9166         (unexpected_linespec_error): Update.
9167         (linespec_parse_basic, parse_linespec): Update.
9168
9169 2018-04-05  Tom Tromey  <tom@tromey.com>
9170
9171         * linespec.c (linespec_parse_basic): Reindent.
9172
9173 2018-04-05  Tom Tromey  <tom@tromey.com>
9174
9175         * minsyms.h (iterate_over_minimal_symbols): Update.
9176         * minsyms.c (iterate_over_minimal_symbols): Take a
9177         gdb::function_view.
9178         * linespec.c (struct collect_minsyms): Remove.
9179         (compare_msyms): Now a std::sort comparator.
9180         (add_minsym): Add parameters.
9181         (search_minsyms_for_name): Update.  Use std::vector.
9182
9183 2018-04-03  Tom Tromey  <tom@tromey.com>
9184
9185         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9186         gdb::byte_vector.
9187
9188 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9189
9190         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9191
9192 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9193
9194         PR gdb/16959
9195         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9196         printing static type.
9197
9198 2018-04-01  Tom Tromey  <tom@tromey.com>
9199
9200         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9201         (rs6000_xfer_shared_libraries): Update.
9202
9203 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9204
9205         * common/gdb_vecs.h (char_ptr): Remove.
9206         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9207
9208 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9209
9210         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9211         with std::vector.
9212         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9213
9214 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9215
9216         * tracepoint.h (struct uploaded_tp): Initialize fields.
9217         <actions, step_actions, cmd_strings>: Change type to
9218         std::vector<char *>.
9219         * tracepoint.c (get_uploaded_tp): Allocate with new.
9220         (free_uploaded_tps): Free with delete.
9221         (parse_tracepoint_definition): Adjust to std::vector change.
9222         * breakpoint.c (read_uploaded_action): Likewise.
9223         (create_tracepoint_from_upload): Likewise.
9224         * ctf.c (ctf_write_uploaded_tp): Likewise.
9225         (SET_ARRAY_FIELD): Likewise.
9226         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9227
9228 2018-03-30  Tom Tromey  <tom@tromey.com>
9229
9230         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9231         std::unique_ptr.
9232         (svr4_keep_data_in_core): Update.
9233         (svr4_read_so_list): Update.
9234
9235 2018-03-30  Tom Tromey  <tom@tromey.com>
9236
9237         * windows-nat.c (handle_output_debug_string, handle_exception):
9238         Update.
9239         * target.h (target_read_string): Update.
9240         * target.c (target_read_string): Change "string" to
9241         unique_xmalloc_ptr.
9242         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9243         Update.
9244         * solib-frv.c (frv_current_sos): Update.
9245         * solib-dsbt.c (dsbt_current_sos): Update.
9246         * solib-darwin.c (darwin_current_sos): Update.
9247         * linux-thread-db.c (inferior_has_bug): Update.
9248         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9249         Update.  Remove alloca.
9250         * ada-lang.c (ada_main_name): Update.
9251
9252 2018-03-30  Tom Tromey  <tom@tromey.com>
9253
9254         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9255         (struct dwo_file_deleter): New.
9256         (dwo_file_up): New typedef.
9257         (open_and_init_dwo_file): Use dwo_file_up.
9258         (free_dwo_file_cleanup): Remove.
9259
9260 2018-03-30  Tom Tromey  <tom@tromey.com>
9261
9262         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9263         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9264
9265 2018-03-30  Tom Tromey  <tom@tromey.com>
9266
9267         * dwarf2read.c (class free_cached_comp_units): New class.
9268         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9269         (free_cached_comp_units): Remove function.
9270
9271 2018-03-30  Tom Tromey  <tom@tromey.com>
9272
9273         * utils.h (make_cleanup_unpush_target): Remove.
9274         * inf-ptrace.c (struct target_unpusher): New.
9275         (target_unpush_up) New typedef.
9276         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9277         target_unpush_up.
9278         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9279
9280 2018-03-27  Tom Tromey  <tom@tromey.com>
9281
9282         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9283
9284 2018-03-27  Pedro Alves  <palves@redhat.com>
9285             Tom Tromey  <tom@tromey.com>
9286
9287         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9288         destructor.  Now a class.
9289         (gdb_readline_wrapper_cleanup): Remove function.
9290         (gdb_readline_wrapper): Remove cleanups.
9291
9292 2018-03-27  Tom Tromey  <tom@tromey.com>
9293
9294         * typeprint.h (struct type_print_options) <local_typedefs,
9295         global_typedefs>: Remove "struct" keyword.
9296         (class typedef_hash_table): New class.
9297         (recursively_update_typedef_hash, add_template_parameters)
9298         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9299         (find_typedef_in_hash): Don't declare.
9300         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9301         (typedef_hash_table::recursively_update): Rename from
9302         recursively_update_typedef_hash.  Now a member.
9303         (typedef_hash_table::add_template_parameters): Rename from
9304         add_template_parameters.  Now a member.
9305         (typedef_hash_table::typedef_hash_table): Now a constructor;
9306         rename from create_typedef_hash.
9307         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9308         rename from free_typedef_hash.
9309         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9310         (do_free_global_table): Remove.
9311         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9312         from copy_type_recursive.
9313         (create_global_typedef_table): Remove.
9314         (typedef_hash_table::find_global_typedef): Now a member of
9315         typedef_hash_table.
9316         (typedef_hash_table::find_typedef): Rename from
9317         find_typedef_in_hash; now a member.
9318         (whatis_exp): Update.
9319         * extension.h (struct ext_lang_type_printers): Add constructor and
9320         destructor.
9321         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9322         declare.
9323         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9324         Now a constructor; rename from start_ext_lang_type_printers.
9325         (ext_lang_type_printers): Now a destructor; rename from
9326         free_ext_lang_type_printers.
9327         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9328         Update.
9329         (c_type_print_base_struct_union): Update.  Remove cleanups.
9330
9331 2018-03-27  Tom Tromey  <tom@tromey.com>
9332
9333         * dwarf-index-write.c: Include <cmath>.
9334
9335 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9336
9337         * NEWS: Add entry describing new "set|show varsize-limit" command.
9338         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9339         command.
9340         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9341         "set variable".
9342
9343 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9344
9345         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9346         dwarf-index-write.c
9347         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9348         * dwarf-index-common.c: New file.
9349         * dwarf-index-common.h: New file.
9350         * dwarf-index-write.c: New file.
9351         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9352         (struct dwarf2_section_info): Move from here.
9353         (dwarf2_section_info_def): Likewise.
9354         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9355         (offset_type): Likewise.
9356         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9357         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9358         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9359         (byte_swap): Likewise.
9360         (MAYBE_SWAP): Likewise.
9361         (dwarf2_per_cu_ptr): Likewise.
9362         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9363         (struct tu_stats): Likewise.
9364         (struct dwarf2_per_objfile): Likewise.
9365         (struct dwarf2_per_cu_data): Likewise.
9366         (struct signatured_type): Likewise.
9367         (sig_type_ptr): Likewise.
9368         (DEF_VEC_P (sig_type_ptr)): Likewise.
9369         (INDEX4_SUFFIX): Likewise.
9370         (INDEX5_SUFFIX): Likewise.
9371         (DEBUG_STR_SUFFIX): Likewise.
9372         (dwarf2_read_section): Make non-static.
9373         (mapped_index_string_hash): Move from here.
9374         (dwarf5_djb_hash): Likewise.
9375         (file_write): Likewise.
9376         (class data_buf): Likewise.
9377         (struct symtab_index_entry): Likewise.
9378         (struct mapped_symtab): Likewise.
9379         (find_slot): Likewise.
9380         (hash_expand): Likewise.
9381         (add_index_entry): Likewise.
9382         (uniquify_cu_indices): Likewise.
9383         (class c_str_view): Likewise.
9384         (class c_str_view_hasher): Likewise.
9385         (class vector_hasher): Likewise.
9386         (write_hash_table): Likewise.
9387         (psym_index_map): Likewise.
9388         (struct addrmap_index_data): Likewise.
9389         (add_address_entry): Likewise.
9390         (add_address_entry_worker): Likewise.
9391         (write_address_map): Likewise.
9392         (symbol_kind): Likewise.
9393         (write_psymbols): Likewise.
9394         (struct signatured_type_index_data): Likewise.
9395         (write_one_signatured_type): Likewise.
9396         (recursively_count_psymbols): Likewise.
9397         (recursively_write_psymbols): Likewise.
9398         (class debug_names): Likewise.
9399         (check_dwarf64_offsets): Likewise.
9400         (psyms_seen_size): Likewise.
9401         (write_gdbindex): Likewise.
9402         (write_debug_names): Likewise.
9403         (assert_file_size): Likewise.
9404         (write_psymtabs_to_index): Likewise.
9405         (save_gdb_index_command): Likewise.
9406         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9407         command.
9408         * dwarf2read.h: New file.
9409
9410 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9411
9412         PR gdb/22670
9413         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9414         symbol name if the CU's language stores symbol names in linkage
9415         format.
9416         * language.h (struct language_defn)
9417         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9418         all instances of this struct.
9419
9420 2018-03-26  Tom Tromey  <tom@tromey.com>
9421
9422         * stack.c (backtrace_command_1): Remove verbose code.
9423
9424 2018-03-26  Tom Tromey  <tom@tromey.com>
9425
9426         * python/py-framefilter.c (py_print_type): Don't catch
9427         exceptions.  Return void.
9428         (py_print_value): Likewise.
9429         (py_print_single_arg): Likewise.
9430         (enumerate_args): Don't catch exceptions.
9431         (py_print_args): Likewise.
9432         (py_print_frame): Likewise.
9433         (gdbpy_apply_frame_filter): Catch exceptions here.
9434
9435 2018-03-26  Tom Tromey  <tom@tromey.com>
9436
9437         * stack.c (_initialize_stack): Remove trailing newlines from help
9438         text.  Add "Usage" line to "backtrace" help.
9439
9440 2018-03-26  Tom Tromey  <tom@tromey.com>
9441
9442         PR python/16486:
9443         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9444
9445 2018-03-26  Tom Tromey  <tom@tromey.com>
9446
9447         * python/py-framefilter.c (py_print_single_arg): Return
9448         EXT_LANG_BT_ERROR from catch.
9449
9450 2018-03-26  Tom Tromey  <tom@tromey.com>
9451
9452         PR backtrace/15584:
9453         * stack.c (backtrace_command_1): Move some code into no-filters
9454         "if".
9455
9456 2018-03-26  Tom Tromey  <tom@tromey.com>
9457
9458         * python/py-framefilter.c (throw_quit_or_print_exception): New
9459         function.
9460         (gdbpy_apply_frame_filter): Use it.
9461
9462 2018-03-26  Tom Tromey  <tom@tromey.com>
9463
9464         PR cli/17716:
9465         * python/py-framefilter.c (py_print_type, py_print_value)
9466         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9467         RETURN_MASK_ERROR.
9468
9469 2018-03-26  Tom Tromey  <tom@tromey.com>
9470
9471         * python/py-framefilter.c (enumerate_args): Use
9472         gdb::unique_xmalloc_ptr.
9473
9474 2018-03-26  Tom Tromey  <tom@tromey.com>
9475
9476         * python/py-framefilter.c (py_print_frame): Return
9477         EXT_LANG_BT_OK.
9478         (gdbpy_apply_frame_filter): Update comment.
9479         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9480         Remove.
9481         <EXT_LANG_BT_NO_FILTERS>: Change value.
9482
9483 2018-03-26  Tom Tromey  <tom@tromey.com>
9484
9485         PR backtrace/15582:
9486         * stack.c (backtrace_command): Parse "hide" argument.
9487         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9488         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9489         constant.
9490
9491 2018-03-26  Tom Tromey  <tom@tromey.com>
9492
9493         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9494         add "flags".
9495         (backtrace_command): Remove "fulltrace", add "flags".
9496
9497 2018-03-26  Tom Tromey  <tom@tromey.com>
9498
9499         * stack.c (backtrace_command): Rewrite command line parsing.
9500
9501 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9502
9503         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9504
9505 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9506
9507         * filename-seen-cache.h: Add include guard.
9508
9509 2018-03-26  Keith Seitz  <keiths@redhat.com>
9510
9511         * symfile.c (place_section): Remove "struct" from section_addr_info
9512         in comment.
9513         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9514         "struct" keyword from section_addr_info.
9515
9516 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9517
9518         * regformats/regdef.h (reg): Add constructors.
9519
9520 2018-03-25  Pedro Alves  <palves@redhat.com>
9521
9522         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9523         if then/else bodies in var_func_name extraction.
9524
9525 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9526
9527         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9528         lookup_minimal_symbol() to find symbol entry.
9529         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9530
9531 2018-03-23  Keith Seitz  <keiths@redhat.com>
9532
9533         PR c++/22968
9534         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9535         nested type definitions for C++, too.
9536
9537 2018-03-23  Tom Tromey  <tom@tromey.com>
9538
9539         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9540         a typedef.
9541         (macho_register_oso): Remove.
9542         (macho_symtab_read): Take a std::vector.
9543         (oso_el_compare_name): Now a std::sort comparator.
9544         (macho_symfile_read_all_oso): Take a std::vector.
9545         (macho_symfile_read): Use std::vector.  Remove cleanups.
9546
9547 2018-03-22  Tom Tromey  <tom@tromey.com>
9548
9549         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9550         (record_full_goto_bookmark): Use std::string.
9551
9552 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9553
9554         PR tdep/18295
9555         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9556         a single mask.
9557
9558 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9559
9560         * rs6000-tdep.c (store_insn_p): New function.
9561         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9562         and cr_reg to their unshifted values. Use store_insn_p to
9563         match LR saves using either R1 or fdata->alloca_reg. Use
9564         store_insn_p to match CR saves. Set alloca_reg_offset
9565         when alloca_reg and framep are set. Remove lr_reg shift
9566         when assigning to fdata->lr_register.
9567
9568 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9569
9570         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9571         command line args instead of emitting a warning.
9572
9573 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9574
9575         * tracepoint.h (struct static_tracepoint_marker): Initialize
9576         fields, define default constructor, move constructor and move
9577         assignment, disable the rest.
9578         <str_id, extra>: Make std::string.
9579         (release_static_tracepoint_marker): Remove.
9580         (free_current_marker): Remove.
9581         * tracepoint.c (free_current_marker): Remove.
9582         (parse_static_tracepoint_marker_definition): Adjust to
9583         std::string, use new hex2str overload.
9584         (release_static_tracepoint_marker): Remove.
9585         (print_one_static_tracepoint_marker): Get marker by reference
9586         and adjust to std::string.
9587         (info_static_tracepoint_markers_command): Adjust to std::vector
9588         changes
9589         * target.h (static_tracepoint_marker_p): Remove typedef.
9590         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9591         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9592         bool.
9593         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9594         * target-debug.h
9595         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9596         (target_debug_print_std_vector_static_tracepoint_marker): New.
9597         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9598         to...
9599         (target_debug_print_static_tracepoint_marker_p): ... this.
9600         * target-delegates.c: Re-generate.
9601         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9602         Make std::string.
9603         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9604         (decode_static_tracepoint_spec): Adjust to std::vector.
9605         (tracepoint_print_one_detail): Adjust to std::string.
9606         (strace_marker_decode_location): Adjust to std::string.
9607         (update_static_tracepoint): Adjust to std::string, remove call
9608         to release_static_tracepoint_marker.
9609         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9610         Adjust to std::vector.
9611         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9612         (remote_static_tracepoint_markers_by_strid): Adjust to
9613         std::vector.
9614         * common/rsp-low.h (hex2str): New overload with explicit count
9615         of bytes.
9616         * common/rsp-low.c (hex2str): New overload with explicit count
9617         of bytes.
9618         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9619         (_initialize_rsp_low_selftests): Add test_hex2str test.
9620         * unittests/tracepoint-selftests.c
9621         (test_parse_static_tracepoint_marker_definition): Adjust to
9622         std::string.
9623
9624 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9625
9626         * tracepoint.c (parse_static_tracepoint_marker_definition):
9627         Consider case where the definition is followed by more
9628         definitions.
9629         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9630         tracepoint-selftests.c.
9631         * unittests/tracepoint-selftests.c: New.
9632
9633 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9634
9635         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9636         Carvalho.
9637
9638 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9639
9640         * symtab.c (find_pc_sect_line): fixed indentation.
9641
9642 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9643
9644         * symtab.c (find_pc_sect_line): now uses binary search.
9645
9646 2018-03-19  Tom Tromey  <tom@tromey.com>
9647
9648         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9649         "IDENT" production.
9650
9651 2018-03-19  Pedro Alves  <palves@redhat.com>
9652             Tom Tromey  <tom@tromey.com>
9653
9654         * unittests/observable-selftests.c: New file.
9655         * common/observable.h: New file.
9656         * observable.h: New file.
9657         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9658         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9659         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9660         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9661         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9662         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9663         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9664         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9665         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9666         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9667         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9668         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9669         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9670         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9671         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9672         tui/tui-interp.c, valops.c: Update all users.
9673         * tui/tui-hooks.c (tui_bp_created_observer)
9674         (tui_bp_deleted_observer, tui_bp_modified_observer)
9675         (tui_inferior_exit_observer, tui_before_prompt_observer)
9676         (tui_normal_stop_observer, tui_register_changed_observer):
9677         Remove.
9678         (tui_observers_token): New global.
9679         (attach_or_detach, tui_attach_detach_observers): New functions.
9680         (tui_install_hooks, tui_remove_hooks): Use
9681         tui_attach_detach_observers.
9682         * record-btrace.c (record_btrace_thread_observer): Remove.
9683         (record_btrace_thread_observer_token): New global.
9684         * observer.sh: Remove.
9685         * observer.c: Rename to observable.c.
9686         * observable.c (namespace gdb_observers): Define new objects.
9687         (observer_debug): Move into gdb_observers namespace.
9688         (struct observer, struct observer_list, xalloc_observer_list_node)
9689         (xfree_observer_list_node, generic_observer_attach)
9690         (generic_observer_detach, generic_observer_notify): Remove.
9691         (_initialize_observer): Update.
9692         Don't include observer.inc.
9693         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9694         (clean mostlyclean): Likewise.
9695         (observer.h, observer.inc): Remove targets.
9696         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9697         (COMMON_SFILES): Use observable.c, not observer.c.
9698         * .gitignore: Remove observer.h.
9699
9700 2018-03-18  Tom Tromey  <tom@tromey.com>
9701
9702         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9703         gdb::def_vector.
9704         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9705
9706 2018-03-17  Tom Tromey  <tom@tromey.com>
9707
9708         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9709
9710 2018-03-17  Tom Tromey  <tom@tromey.com>
9711
9712         * target.c (class scoped_target_fd): New.
9713         (target_fileio_close_cleanup): Remove.
9714         (target_fileio_read_alloc_1): Use scoped_target_fd.
9715
9716 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9717
9718         * silent-rules.mk: New.
9719         * Makefile.in: Include silent-rules.mk
9720         (srcdir, VPATH, top_srcdir): Move up.
9721         (COMPILE): Add ECHO_CXX.
9722         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9723         (init.c): Add ECHO_INIT_C.
9724         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9725         (version.c): Add ECHO_GEN.
9726         (printcmd.o): Add ECHO_CXX.
9727         (target-float.o): Add ECHO_CXX.
9728         (ada-exp.o): Add ECHO_CXX.
9729         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9730         (insight$(EXEEXT)): Add ECHO_CXXLD.
9731         * gnulib/configure.ac: Add AM_SILENT_RULES.
9732         * gnulib/aclocal.m4: Re-generate.
9733         * gnulib/configure: Re-generate.
9734         * gnulib/import/Makefile.in: Re-generate.
9735
9736 2018-03-16  Tom Tromey  <tom@tromey.com>
9737
9738         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9739         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9740         * utils.c (do_free_section_addr_info)
9741         (make_cleanup_free_section_addr_info): Remove.
9742         * symfile.h (struct other_sections): Add constructor.
9743         (struct section_addr_info): Remove.
9744         (section_addr_info): New typedef.
9745         (struct sym_fns) <sym_offsets>: Change type of parameter.
9746         (build_section_addr_info_from_objfile)
9747         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9748         (default_symfile_offsets, symbol_file_add)
9749         (symbol_file_add_from_bfd)
9750         (build_section_addr_info_from_section_table): Update.
9751         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9752         * symfile.c (alloc_section_addr_info): Remove.
9753         (build_section_addr_info_from_section_table): Change return type.
9754         Update.
9755         (build_section_addr_info_from_bfd)
9756         (build_section_addr_info_from_objfile): Likewise.
9757         (free_section_addr_info): Remove.
9758         (relative_addr_info_to_section_offsets): Change type of "addrs".
9759         (addrs_section_compar): Now a std::sort comparator.
9760         (addrs_section_sort): Change return type.
9761         (addr_info_make_relative): Change type of "addrs".  Update.
9762         (default_symfile_offsets, syms_from_objfile_1)
9763         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9764         (symbol_file_add_separate): Update.
9765         (symbol_file_add): Change type of "addrs".  Update.
9766         (add_symbol_file_command): Update.  Remove cleanups.
9767         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9768         cleanups.
9769         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9770         * solib.c (solib_read_symbols): Update.
9771         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9772         * machoread.c (macho_symfile_offsets): Update.
9773         * jit.c (jit_bfd_try_read_symtab): Update.
9774
9775 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9776
9777         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9778         unittests/utils-selftests.c.
9779         * unittests/utils-selftests.c: New file.
9780
9781 2018-03-14  Tom Tromey  <tom@tromey.com>
9782
9783         PR cli/14977:
9784         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9785         for NULL.
9786
9787 2018-03-14  Tom Tromey  <tom@tromey.com>
9788
9789         PR cli/19918:
9790         * printcmd.c (printf_pointer): Allow "-" in format.
9791
9792 2018-03-14  Tom Tromey  <tom@tromey.com>
9793
9794         * printcmd.c (_initialize_printcmd): Add usage to printf.
9795
9796 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9797
9798         * MAINTAINERS: Update my email address.
9799
9800 2018-03-13  Tom Tromey  <tom@tromey.com>
9801
9802         * machoread.c (macho_check_dsym): Change filenamep to a
9803         std::string*.
9804         (macho_symfile_read): Update.
9805         * symfile.c (load_command): Use std::string.
9806
9807 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9808
9809         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9810         to error message string.
9811         (riscv_register_name): Use xsnprintf instead of sprintf.
9812         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9813         internal_error.
9814         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9815         error.
9816         (riscv_push_dummy_call): Likewise.
9817
9818 2018-03-12  Tom Tromey  <tom@tromey.com>
9819
9820         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9821         Use gdb::byte_vector.
9822         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9823
9824 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9825
9826         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9827         parameter type to readable_regcache.
9828         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9829         the declaration.
9830
9831 2018-03-11  Tom Tromey  <tom@tromey.com>
9832
9833         * dwarf2read.c (struct nextfield): Add initializers.
9834         (struct nextfnfield): Remove.
9835         (struct fnfieldlist): Add initializers.  Remove "length" and
9836         "head", use std::vector.
9837         (struct decl_field_list): Remove.
9838         (struct field_info): Add initializers.
9839         <fields, baseclasses>: Now std::vector.
9840         <nbaseclasses, nfnfields, typedef_field_list_count,
9841         nested_types_list_count>: Remove.
9842         (dwarf2_add_field, dwarf2_add_type_defn)
9843         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9844         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9845         (process_structure_scope): Update.
9846
9847 2018-03-11  Tom Tromey  <tom@tromey.com>
9848
9849         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9850         for use by std::sort.
9851         (build_type_psymtabs_1): Use std::vector.
9852
9853 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9854
9855         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9856         and LIBMPFR in the printed configuration.
9857
9858 2018-03-08  Tom Tromey  <tom@tromey.com>
9859
9860         * source.c (get_filename_and_charpos): Use scoped_fd.
9861         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9862         (procfs_pidlist): Likewise.
9863         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9864         (iterate_over_mappings): Likewise.
9865
9866 2018-03-08  Tom Tromey  <tom@tromey.com>
9867
9868         * infcall.c (struct call_return_meta_info)
9869         <stack_temporaries_enabled>: Remove.
9870         (get_call_return_value, call_function_by_hand_dummy): Update.
9871         * thread.c (disable_thread_stack_temporaries): Remove.
9872         (enable_thread_stack_temporaries): Remove.
9873         (thread_stack_temporaries_enabled_p): Return bool.
9874         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9875         (get_last_thread_stack_temporary): Update.
9876         * eval.c (evaluate_subexp): Update.
9877         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9878         class, not a function.
9879         (value_ptr, value_vec): Remove typedefs.
9880         (class thread_info) <stack_temporaries_enabled>: Now bool.
9881         <stack_temporaries>: Now a std::vector.
9882         (thread_stack_temporaries_enabled_p)
9883         (value_in_thread_stack_temporaries): Return bool.
9884
9885 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9886
9887         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9888         (getpkt_or_notif_sane_1): Likewise.
9889
9890 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9891
9892         * build-id.c (build_id_to_debug_bfd): Use std::string.
9893
9894 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9895
9896         * build-id.c (find_separate_debug_file_by_buildid): Return
9897         std::string.
9898         * build-id.h (find_separate_debug_file_by_buildid): Return
9899         std::string.
9900         * coffread.c (coff_symfile_read): Adjust to std::string.
9901         * elfread.c (elf_symfile_read): Adjust to std::string.
9902         * symfile.c (separate_debug_file_exists): Change parameter to
9903         std::string.
9904         (find_separate_debug_file): Return std::string.
9905         (find_separate_debug_file_by_debuglink): Return std::string.
9906         * symfile.h (find_separate_debug_file_by_debuglink): Return
9907         std::string.
9908
9909 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9910
9911         * common/xml-utils.c (xml_escape_text): Move code to...
9912         (xml_escape_text_append): ... this new function.
9913         * common/xml-utils.h (xml_escape_text_append): New declaration.
9914         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9915         New function.
9916         (_initialize_xml_utils): register test_xml_escape_text_append as
9917         a selftest.
9918
9919 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
9920
9921         * defs.h: Remove MAX_REGISTER_SIZE.
9922         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9923         asserts.
9924         * python/py-unwind.c (pyuw_sniffer): Likewise.
9925
9926 2018-03-07  Tom Tromey  <tom@tromey.com>
9927
9928         * linux-tdep.c (linux_info_proc): Update.
9929         * target.h (struct target_ops) <to_fileio_readlink>: Return
9930         optional<string>.
9931         (target_fileio_readlink): Return optional<string>.
9932         * remote.c (remote_hostio_readlink): Return optional<string>.
9933         * inf-child.c (inf_child_fileio_readlink): Return
9934         optional<string>.
9935         * target.c (target_fileio_readlink): Return optional<string>.
9936
9937 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
9938
9939         * regcache.c (cooked_read_test): Add riscv to the list of
9940         architectures that have a save_reggroup.
9941
9942 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9943
9944         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9945         value is not a dynamic class object.
9946
9947 2018-03-06  Tom Tromey  <tom@tromey.com>
9948
9949         * rust-exp.y: Formatting fixes.
9950
9951 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9952
9953         * riscv-tdep.c (riscv_register_name): Remove target description
9954         support.
9955         (riscv_gdbarch_init): Remove target description check.
9956
9957 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9958
9959         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9960         comment.
9961         * riscv-tdep.h: Likewise.
9962
9963 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9964
9965         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9966         (riscv_pseudo_register_write): Delete.
9967         (riscv_gdbarch_init): Remove all use of pseudo registers.
9968
9969 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9970
9971         * record-btrace.c (btrace_print_lines): Replace cleanup
9972         parameter with RAII equivalents.
9973         (btrace_insn_history): Replace cleanup with RAII equivalents.
9974         * ui-out.h (make_cleanup_ui_out_list_begin_end,
9975         make_cleanup_ui_out_tuple_begin_end): Remove.
9976         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9977         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9978         make_cleanup_ui_out_list_begin_end): Remove.
9979
9980 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9981
9982         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9983         parameter types to std::vector.  Use bool.
9984         (record_btrace_wait): Replace VEC(tp_t) with
9985         std::vector<thread_info *>.
9986         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9987
9988 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9989
9990         * record-btrace.c (record_btrace_disable_callback): Remove.
9991         (struct scoped_btrace_disable): New.
9992         (record_btrace_open): Use scoped_btrace_disable.
9993
9994 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9995
9996         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9997         reading values from registers.
9998
9999 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10000
10001         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10002         where appropriate.
10003
10004 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10005
10006         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10007         change parameter type.  Use GDB's print functions, and use
10008         core_addr_to_string where appropriate.
10009         (riscv_push_dummy_call): Use core_addr_to_string where
10010         appropriate, update call to riscv_print_arg_location, and reindent
10011         a few lines.
10012         (riscv_return_value): Update call to riscv_print_arg_location.
10013
10014 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10015             Tim Newsome <tim@sifive.com>
10016             Albert Ou <a0u@eecs.berkeley.edu>
10017             Darius Rad <darius@bluespec.com>
10018
10019         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10020         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10021         (ALLDEPFILES): Add riscv-tdep.c
10022         * configure.tgt: Add riscv support.
10023         * riscv-tdep.c: New file.
10024         * riscv-tdep.h: New file.
10025         * NEWS: Mention new target.
10026         * MAINTAINERS: Add entry for riscv.
10027
10028 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10029
10030         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10031         fields within aggregates.
10032
10033 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10034
10035         * record-btrace.c (btrace_print_lines): Change type of flags to
10036         gdb_disassembly_flags.
10037
10038 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10039
10040         * fbsd-nat.c: Include "inf-ptrace.h".
10041         (USE_SIGTRAP_SIGINFO): Conditionally define.
10042         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10043         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10044         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10045         function.
10046         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10047         Likewise.
10048         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10049         Likewise.
10050         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10051         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10052         "supports_stopped_by_hw_breakpoint" target methods.
10053
10054 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10055
10056         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10057         * fbsd-nat.c (debug_fbsd_nat): New variable.
10058         (show_fbsd_nat_debug): New function.
10059         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10060         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10061
10062 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10063
10064         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10065         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10066         prototype.
10067         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10068         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10069         method.
10070
10071 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10072
10073         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10074         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10075
10076 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10077
10078         * charset.c (struct charset_vector): New.
10079         (charsets): Change type to charset_vector.
10080         (find_charset_names): Adjust.
10081         (add_one): Adjust.
10082         (_initialize_charset): Adjust.
10083
10084 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10085
10086         * progspace.h (struct program_space) <deleted_solibs>: Change
10087         type to std::vector<std::string>.
10088         * progspace.c (clear_program_space_solib_cache): Adjust.
10089         * breakpoint.c (print_solib_event): Adjust.
10090         (check_status_catch_solib): Adjust.
10091         * solib.c (update_solib_list): Adjust.
10092         * ui-out.h (class ui_out) <field_string>: New overload.
10093         * ui-out.c (ui_out::field_string): New overload.
10094
10095 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10096
10097         * progspace.h (struct program_space): Add constructor and
10098         destructor, initialize fields.
10099         (add_program_space): Remove.
10100         * progspace.c (add_program_space): Rename to...
10101         (program_space::program_space): ... this.
10102         (release_program_space): Rename to...
10103         (program_space::~program_space): ... this.
10104         (delete_program_space): Use delete to delete program_space.
10105         (initialize_progspace): Use new to allocate program_space.
10106         * inferior.c (add_inferior_with_spaces): Likewise.
10107         (clone_inferior_command): Likewise.
10108         * infrun.c (follow_fork_inferior): Likewise.
10109         (handle_vfork_child_exec_or_exit): Likewise.
10110
10111 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10112
10113         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10114         (delim_string_to_char_ptr_vec): Return std::vector of
10115         gdb::unique_xmalloc_ptr.
10116         (dirnames_to_char_ptr_vec_append): Take std::vector of
10117         gdb::unique_xmalloc_ptr.
10118         (dirnames_to_char_ptr_vec): Return std::vector of
10119         gdb::unique_xmalloc_ptr.
10120         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10121         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10122         (delim_string_to_char_ptr_vec): Return an std::vector of
10123         gdb::unique_xmalloc_ptr, adjust the code.
10124         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10125         gdb::unique_xmalloc_ptr, adjust the code.
10126         (dirnames_to_char_ptr_vec): Return an std::vector of
10127         gdb::unique_xmalloc_ptr, adjust the code.
10128         * auto-load.c (auto_load_safe_path_vec): Change type to
10129         std::vector of gdb::unique_xmalloc_ptr.
10130         (auto_load_expand_dir_vars): Return an std::vector of
10131         gdb::unique_xmalloc_ptr, adjust the code.
10132         (auto_load_safe_path_vec_update): Adjust.
10133         (filename_is_in_auto_load_safe_path_vec): Adjust.
10134         (auto_load_objfile_script_1): Adjust.
10135         * build-id.c (build_id_to_debug_bfd): Adjust.
10136         * linux-thread-db.c (thread_db_load_search): Adjust.
10137         * source.c (add_path): Adjust.
10138         (openp): Adjust.
10139         * symfile.c (find_separate_debug_file): Adjust.
10140         * utils.c (do_free_char_ptr_vec): Remove.
10141         (make_cleanup_free_char_ptr_vec): Remove.
10142
10143 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10144
10145         PR gdb/22907
10146         * common/pathstuff.c: Conditionally include "<windows.h>".
10147
10148 2018-03-01  Georg Sauthoff  <mail@georg.so>
10149
10150         PR gdb/22888
10151         * gcore.in: Quote variables and switch interpreter to bash.
10152
10153 2018-03-01  Tom Tromey  <tom@tromey.com>
10154
10155         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10156         assertion.  Add assertion for discriminant_index.
10157         (quirk_rust_enum): Use correct base type name in univariant case.
10158
10159 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10160
10161         * record.c (get_call_history_modifiers): Return a
10162         record_print_flags.
10163         (cmd_record_call_history): Adjust.
10164         * record-btrace.c (record_btrace_call_history): Adjust.
10165         (record_btrace_call_history_range): Adjust.
10166         (record_btrace_call_history_from): Adjust.
10167         * target-debug.h (target_debug_print_record_print_flags): New.
10168         * target-delegates.c: Re-generate.
10169         * target.c (target_call_history): Change flags type.
10170         (target_call_history_from): Likewise.
10171         (target_call_history_range): Likewise.
10172         * target.h (struct target_ops) <target_call_history>: Likewise.
10173         (target_call_history_from): Likewise.
10174         (target_call_history_range): Likewise.
10175
10176 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10177             Simon Marchi  <simon.marchi@polymtl.ca>
10178
10179         * common/common-utils.c: Include "sys/stat.h".
10180         (is_regular_file): Move here from "source.c"; change return
10181         type to "bool".
10182         * common/common-utils.h (is_regular_file): New prototype.
10183         * common/pathstuff.c (contains_dir_separator): New function.
10184         * common/pathstuff.h (contains_dir_separator): New prototype.
10185         * source.c: Don't include "sys/stat.h".
10186         (is_regular_file): Move to "common/common-utils.c".
10187
10188 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10189
10190         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10191         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10192         * auto-load.c: Include "common/pathstuff.h".
10193         * common/common-def.h (current_directory): Move here.
10194         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10195         function.
10196         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10197         prototype.
10198         * common/pathstuff.c: New file.
10199         * common/pathstuff.h: New file.
10200         * compile/compile.c: Include "common/pathstuff.h".
10201         * defs.h (current_directory): Move to "common/common-defs.h".
10202         * dwarf2read.c: Include "common/pathstuff.h".
10203         * exec.c: Likewise.
10204         * guile/scm-safe-call.c: Likewise.
10205         * linux-thread-db.c: Likewise.
10206         * main.c: Likewise.
10207         * nto-tdep.c: Likewise.
10208         * objfiles.c: Likewise.
10209         * source.c: Likewise.
10210         * symtab.c: Likewise.
10211         * utils.c: Include "common/pathstuff.h".
10212         (gdb_realpath): Move to "common/pathstuff.c".
10213         (gdb_realpath_keepfile): Likewise.
10214         (gdb_abspath): Likewise.
10215         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10216         (gdb_realpath_keepfile): Likewise.
10217         (gdb_abspath): Likewise.
10218
10219 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10220
10221         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10222         wildcard process pid for super_resume for kernels with a
10223         specific bug.
10224
10225 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10226
10227         * compile/compile.c (get_args): Add additional comments
10228         explaining function.
10229
10230 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10231             Tom Tromey  <tom@tromey.com>
10232
10233         * target.h (memory_write_request_s): Remove typedef.  Don't define
10234         VEC.
10235         (target_write_memory_blocks): Change argument to std::vector.
10236         (struct memory_write_request): Add constructor.
10237         * target-memory.c (compare_block_starting_address): Return bool.
10238         Change argument types.
10239         (claim_memory): Change arguments to use std::vector.
10240         (split_regular_and_flash_blocks, blocks_to_erase)
10241         (compute_garbled_blocks): Likewise.
10242         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10243         (target_write_memory_blocks): Change argument to std::vector.
10244         * symfile.c (struct load_section_data): Add constructor and
10245         destructor.  Use std::vector for "requests".
10246         (struct load_progress_data): Add initializers.
10247         (load_section_callback): Update.  Use "new".
10248         (clear_memory_write_data): Remove.
10249         (generic_load): Update.
10250
10251 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10252
10253         * arch/aarch64.h: Use common/tdesc.h.
10254
10255 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10256
10257         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10258         architecture with a 64-bit ABI.
10259
10260 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10261
10262         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10263         ahead of target description loading.
10264
10265 2018-02-26  Tom Tromey  <tom@tromey.com>
10266
10267         * stack.c (backtrace_command_1): Update.
10268         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10269         of "flags".
10270         * python/py-framefilter.c (py_print_frame)
10271         (gdbpy_apply_frame_filter): Change type of "flags".
10272         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10273         of "flags".
10274         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10275         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10276         * extension.h (enum frame_filter_flag): Rename from
10277         frame_filter_flags.
10278         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10279         (apply_ext_lang_frame_filter): Change type of "flags".
10280         * extension.c (apply_ext_lang_frame_filter): Change type of
10281         "flags".
10282         * extension-priv.h (struct extension_language_ops)
10283         <apply_frame_filter>: Change type of "flags".
10284
10285 2018-02-26  Tom Tromey  <tom@tromey.com>
10286
10287         PR python/16497:
10288         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10289         off-by-one in py_end computation.
10290         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10291         PRINT_MORE_FRAMES.
10292         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10293         constant.
10294
10295 2018-02-26  Tom Tromey  <tom@tromey.com>
10296
10297         * dwarf2read.c (struct variant_field): New.
10298         (struct nextfield) <variant>: New field.
10299         (dwarf2_add_field): Handle DW_TAG_variant_part.
10300         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10301         discriminated union.
10302         (read_structure_type): Handle DW_TAG_variant_part.
10303         (handle_struct_member_die): New function, extracted from
10304         process_structure_scope.  Handle DW_TAG_variant.
10305         (process_structure_scope): Handle discriminated unions.  Call
10306         handle_struct_member_die.
10307
10308 2018-02-26  Tom Tromey  <tom@tromey.com>
10309
10310         * rust-lang.h (rust_last_path_segment): Declare.
10311         * rust-lang.c (rust_last_path_segment): Now public.  Change
10312         contract.
10313         (struct disr_info): Remove.
10314         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10315         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10316         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10317         (rust_enum_p, rust_enum_variant): New function.
10318         (rust_underscore_fields): Remove "offset" parameter.
10319         (rust_print_enum): New function.
10320         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10321         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10322         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10323         enums.
10324         (rust_internal_print_type): New function, from rust_print_type.
10325         Remove enum code.
10326         (rust_print_type): Call rust_internal_print_type.
10327         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10328         Update enum handling.
10329         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10330         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10331         (rust_union_quirks): New functions.
10332         (process_full_comp_unit, process_full_type_unit): Call
10333         rust_union_quirks.
10334         (process_structure_scope): Update rust_unions if necessary.
10335
10336 2018-02-26  Tom Tromey  <tom@tromey.com>
10337
10338         * value.h (value_union_variant): Declare.
10339         * valops.c (value_union_variant): New function.
10340         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10341         (struct discriminant_info): New.
10342         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10343         enumerator.
10344         (struct main_type) <flag_discriminated_union>: New field.
10345
10346 2018-02-26  Tom Tromey  <tom@tromey.com>
10347
10348         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10349         unittests/unpack-selftests.c.
10350         * unittests/unpack-selftests.c: New file.
10351         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10352
10353 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10354
10355         * dwarf2read.c (struct partial_die_info) <read>: New method.
10356         (read_partial_die): Remove the declaration.
10357         (load_partial_dies): Update.
10358         (partial_die_info::partial_die_info):
10359         (read_partial_die): Change it to partial_die_info::read.
10360
10361 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10362
10363         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10364         (fixup_partial_die): Remove declaration.
10365         (scan_partial_symbols): Update.
10366         (partial_die_parent_scope): Likewise.
10367         (partial_die_full_name): Likewise.
10368         (fixup_partial_die): Change it to partial_die_info::fixup.
10369
10370 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10371
10372         * dwarf2read.c (read_partial_die): Update the declaration.
10373         (load_partial_dies): Caller update.
10374         (read_partial_die): Remove one argument abbrev_len.
10375
10376 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10377
10378         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10379         assignment operator.
10380         (load_partial_dies): Use ctor and copy ctor.
10381         (read_partial_die): Update.
10382         (dwarf2_cu::find_partial_die): Use ctor.
10383
10384 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10385
10386         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10387         (find_partial_die_in_comp_unit): Change it to
10388         dwarf2_cu::find_partial_die.
10389         (find_partial_die): Update.
10390
10391 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10392
10393         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10394         is NULL.
10395
10396 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10397
10398         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10399
10400 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10401
10402         * arch/amd64.h: Use common/tdesc.h.
10403         * arch/i386.c: Likewise.
10404         * arch/i386.h: Likewise.
10405         * arch/tic6x.c: Likewise.
10406         * arch/tdesc.h: Move file from here...
10407         * common/tdesc.h: ...to here.
10408         * features/aarch64-core.c: Regenerate.
10409         * features/aarch64-fpu.c: Regenerate.
10410         * features/i386/32bit-avx.c: Regenerate.
10411         * features/i386/32bit-avx512.c: Regenerate.
10412         * features/i386/32bit-core.c: Regenerate.
10413         * features/i386/32bit-linux.c: Regenerate.
10414         * features/i386/32bit-mpx.c: Regenerate.
10415         * features/i386/32bit-pkeys.c: Regenerate.
10416         * features/i386/32bit-sse.c: Regenerate.
10417         * features/i386/64bit-avx.c: Regenerate.
10418         * features/i386/64bit-avx512.c: Regenerate.
10419         * features/i386/64bit-core.c: Regenerate.
10420         * features/i386/64bit-linux.c: Regenerate.
10421         * features/i386/64bit-mpx.c: Regenerate.
10422         * features/i386/64bit-pkeys.c: Regenerate.
10423         * features/i386/64bit-segments.c: Regenerate.
10424         * features/i386/64bit-sse.c: Regenerate.
10425         * features/i386/x32-core.c: Regenerate.
10426         * features/tic6x-c6xp.c: Regenerate.
10427         * features/tic6x-core.c: Regenerate.
10428         * features/tic6x-gp.c: Regenerate.
10429         * target-descriptions.c: Use common/tdesc.h.
10430         * target-descriptions.h: Likewise.
10431
10432 2018-02-24  Tom Tromey  <tom@tromey.com>
10433
10434         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10435         (try_thread_db_load_from_dir, thread_db_load_search): Use
10436         std::string.
10437         (info_auto_load_libthread_db_compare): Return bool.  Change
10438         argument types.
10439         (info_auto_load_libthread_db): Use std::vector, std::string.
10440         Remove cleanups.
10441
10442 2018-02-24  Tom Tromey  <tom@tromey.com>
10443
10444         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10445         std::string.
10446         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10447         std::string*.
10448         * gdbarch.c: Rebuild.
10449         * gdbarch.h: Rebuild.
10450         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10451         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10452         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10453         std::string*.
10454
10455 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10456
10457         * gdbtypes.h (sect_offset): Change type to uint64_t.
10458         (sect_offset_str): New function.
10459         * dwarf2read.c (create_addrmap_from_aranges): Use
10460         sect_offset_str.
10461         (error_check_comp_unit_head): Likewise.
10462         (create_debug_type_hash_table): Likewise.
10463         (read_cutu_die_from_dwo): Likewise.
10464         (init_cutu_and_read_dies): Likewise.
10465         (init_cutu_and_read_dies_no_follow): Likewise.
10466         (process_psymtab_comp_unit_reader): Likewise.
10467         (partial_die_parent_scope): Likewise.
10468         (peek_die_abbrev): Likewise.
10469         (process_queue): Likewise.
10470         (dwarf2_physname): Likewise.
10471         (read_namespace_alias): Likewise.
10472         (read_import_statement): Likewise.
10473         (create_dwo_cu_reader): Likewise.
10474         (create_cus_hash_table): Likewise.
10475         (lookup_dwo_cutu): Likewise.
10476         (inherit_abstract_dies): Likewise.
10477         (read_func_scope): Likewise.
10478         (read_call_site_scope): Likewise.
10479         (dwarf2_add_member_fn): Likewise.
10480         (read_common_block): Likewise.
10481         (read_module_type): Likewise.
10482         (read_typedef): Likewise.
10483         (read_subrange_type): Likewise.
10484         (load_partial_dies): Likewise.
10485         (read_partial_die): Likewise.
10486         (find_partial_die): Likewise.
10487         (read_str_index): Likewise.
10488         (dwarf2_string_attr): Likewise.
10489         (build_error_marker_type): Likewise.
10490         (lookup_die_type): Likewise.
10491         (dump_die_shallow): Likewise.
10492         (follow_die_ref): Likewise.
10493         (dwarf2_fetch_die_loc_sect_off): Likewise.
10494         (dwarf2_fetch_constant_bytes): Likewise.
10495         (follow_die_sig): Likewise.
10496         (get_signatured_type): Likewise.
10497         (get_DW_AT_signature_type): Likewise.
10498         (dwarf2_find_containing_comp_unit): Likewise.
10499         (set_die_type): Likewise.
10500
10501 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10502
10503         * arch/aarch64.c: Include "common-defs.h".
10504         * arch/amd64.c: Likewise.
10505         * arch/i386.c: Likewise.
10506
10507 2018-02-21  Tom Tromey  <tom@tromey.com>
10508
10509         * value.h: (extract_field_op): Update.
10510         * eval.c (extract_field_op): Return a const char *.
10511         * expression.h (parse_expression_for_completion): Update.
10512         * completer.c (complete_expression): Update.
10513         (add_struct_fields): Make fieldname const.
10514         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10515         (mark_completion_tag, parse_exp_in_context_1): Update.
10516         (parse_expression_for_completion): Change "name" to
10517         unique_xmalloc_ptr*.
10518
10519 2018-02-21  Tom Tromey  <tom@tromey.com>
10520
10521         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10522
10523 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10524
10525         * avr-tdep.c (avr_read_pc): Change parameter type to
10526         readable_regcache.
10527         * gdbarch.sh (read_pc): Likewise.
10528         * gdbarch.c: Re-generated.
10529         * gdbarch.h: Re-generated.
10530         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10531         readable_regcache.
10532         * ia64-tdep.c (ia64_read_pc): Likewise.
10533         * mips-tdep.c (mips_read_pc): Likewise.
10534         * spu-tdep.c (spu_read_pc): Likewise.
10535
10536 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10537
10538         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10539         * regcache-dump.c: New file.
10540         * regcache.c: Move register_dump to regcache-dump.c.
10541         (maintenance_print_registers): Likewise.
10542         (maintenance_print_raw_registers): Likewise.
10543         (maintenance_print_cooked_registers): Likewise.
10544         (maintenance_print_register_groups): Likewise.
10545         (maintenance_print_remote_registers): Likewise.
10546         (_initialize_regcache): Likewise.
10547         * regcache.h (register_dump): Moved from regcache.c.
10548
10549 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10550
10551         * regcache.c (regcache::regcache): Update.
10552         (regcache::invalidate): Move it to detached_regcache::invalidate.
10553         (get_thread_arch_aspace_regcache): Update.
10554         (regcache::raw_update): Update.
10555         (regcache::cooked_read): Remove some code.
10556         (regcache::cooked_read_value): Likewise.
10557         (regcache::raw_write): Remove assert on m_readonly_p.
10558         (regcache::raw_supply_integer): Move it to
10559         detached_regcache::raw_supply_integer.
10560         (regcache::raw_supply_zeroed): Likewise.
10561         * regcache.h (detached_regcache) <raw_supply_integer>: New
10562         declaration.
10563         <raw_supply_zeroed, invalidate>: Likewise.
10564         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10565         <invalidate>: Likewise.
10566         <m_readonly_p>: Removed.
10567
10568 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10569
10570         * infcmd.c (get_return_value): Let stop_regs point to
10571         get_current_regcache.
10572         * regcache.c (regcache::regcache): Remove.
10573         (register_dump_reg_buffer): New class.
10574         (regcache_print): Adjust.
10575         * regcache.h (regcache): Remove constructors.
10576
10577 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10578
10579         * regcache.c (class register_dump): New class.
10580         (register_dump_regcache, register_dump_none): New class.
10581         (register_dump_remote, register_dump_groups): New class.
10582         (regcache_print): Update.
10583         * regcache.h (regcache_dump_what): Move it to regcache.c.
10584         (regcache) <dump>: Remove.
10585
10586 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10587
10588         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10589          reg_buffer_rw *.
10590         (jit_unwind_reg_set_impl): Call raw_supply.
10591         (jit_frame_sniffer): Use reg_buffer_rw.
10592         * record-full.c (record_full_core_regbuf): Change its type.
10593         (record_full_core_open_1): Use reg_buffer_rw.
10594         (record_full_close): Likewise.
10595         (record_full_core_fetch_registers): Use regcache->raw_supply.
10596         (record_full_core_store_registers): Likewise.
10597         * regcache.c (regcache::get_register_status): Move it to
10598         reg_buffer.
10599         (regcache_raw_set_cached_value): Remove.
10600         (regcache::raw_set_cached_value): Remove.
10601         (regcache::raw_write): Call raw_supply.
10602         (regcache::raw_supply): Move it to reg_buffer_rw.
10603         * regcache.h (regcache_raw_set_cached_value): Remove.
10604         (reg_buffer_rw): New class.
10605
10606 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10607
10608         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10609         readonly_detached_regcache.
10610         (dummy_frame_prev_register): Use regcache->cooked_read.
10611         * frame.c (frame_save_as_regcache): Change return type.
10612         (frame_pop): Update.
10613         * frame.h (frame_save_as_regcache): Update declaration.
10614         * inferior.h (get_infcall_suspend_state_regcache): Update
10615         declaration.
10616         * infrun.c (infcall_suspend_state) <registers>: use
10617         readonly_detached_regcache.
10618         (save_infcall_suspend_state): Don't use regcache_dup.
10619         (get_infcall_suspend_state_regcache): Change return type.
10620         * linux-fork.c (struct fork_info) <savedregs>: Change to
10621         readonly_detached_regcache.
10622         <pc>: New field.
10623         (fork_save_infrun_state): Don't use regcache_dup.
10624         (info_checkpoints_command): Adjust.
10625         * mi/mi-main.c (register_changed_p): Update declaration.
10626         (mi_cmd_data_list_changed_registers): Use
10627         readonly_detached_regcache.
10628         (register_changed_p): Change parameter type to
10629         readonly_detached_regcache.
10630         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10631         readonly_detached_regcache.
10632         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10633         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10634         New.
10635         (regcache::save): Move it to reg_buffer.
10636         (regcache::restore): Change parameter type.
10637         (regcache_dup): Remove.
10638         * regcache.h (reg_buffer) <save>: New method.
10639         (readonly_detached_regcache): New class.
10640         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10641         readonly_detached_regcache.
10642         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10643
10644 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10645
10646         * frame.c (frame_save_as_regcache): Use regcache method save.
10647         (frame_pop): Use regcache method restore.
10648         * infrun.c (restore_infcall_suspend_state): Likewise.
10649         * linux-fork.c (fork_load_infrun_state): Likewise.
10650         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10651         save.
10652         * regcache.c (regcache_save): Remove.
10653         (regcache::restore): More asserts.
10654         (regcache_cpy): Remove.
10655         * regcache.h (regcache_save): Remove the declaration.
10656         (regcache::restore): Move from private to public.
10657         Remove the friend declaration of regcache_cpy.
10658         (regcache_cpy): Remove declaration.
10659
10660 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10661
10662         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10663         parameter type to 'readable_regcache *'.
10664         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10665         * arm-tdep.c (arm_neon_quad_read): Likewise.
10666         (arm_pseudo_read): Likewise.
10667         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10668         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10669         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10670         * gdbarch.c: Re-generated.
10671         * gdbarch.h: Re-generated.
10672         * gdbarch.sh (pseudo_register_read): Change parameter type to
10673         'readable_regcache *'.
10674         (pseudo_register_read_value): Likewise.
10675         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10676         (h8300_pseudo_register_read): Likewise.
10677         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10678         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10679         (i386_pseudo_register_read_into_value): Likewise.
10680         (i386_pseudo_register_read_value): Likewise.
10681         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10682         declaration.
10683         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10684         * m32c-tdep.c (m32c_raw_read): Likewise.
10685         (m32c_read_flg): Likewise.
10686         (m32c_banked_register): Likewise.
10687         (m32c_banked_read): Likewise.
10688         (m32c_sb_read): Likewise.
10689         (m32c_part_read): Likewise.
10690         (m32c_cat_read): Likewise.
10691         (m32c_r3r2r1r0_read): Likewise.
10692         (m32c_pseudo_register_read): Likewise.
10693         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10694         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10695         (mep_pseudo_cr64_read): Likewise.
10696         (mep_pseudo_register_read): Likewise.
10697         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10698         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10699         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10700         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10701         (regcache::cooked_read): Likewise.
10702         (regcache::cooked_read_value): Likewise.
10703         (regcache_cooked_read_signed):
10704         (regcache::cooked_read): Likewise.
10705         * regcache.h (readable_regcache): New class.
10706         (regcache): Inherit readable_regcache.  Move some methods to
10707         readable_regcache.
10708         * rl78-tdep.c (rl78_pseudo_register_read): Change
10709         parameter type to 'readable_regcache *'.
10710         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10711         (e500_pseudo_register_read): Change parameter type to
10712         'readable_regcache *'.
10713         (dfp_pseudo_register_read): Likewise.
10714         (vsx_pseudo_register_read): Likewise.
10715         (efpr_pseudo_register_read): Likewise.
10716         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10717         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10718         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10719         (sh64_pseudo_register_read): Likewise.
10720         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10721         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10722         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10723         (spu_pseudo_register_read): Likewise.
10724         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10725         (xtensa_pseudo_register_read): Likewise.
10726
10727 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10728
10729         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10730         (regcache::arch): Move it to reg_buffer::arch.
10731         (regcache::register_buffer): Likewise.
10732         (regcache::assert_regnum): Likewise.
10733         (regcache::num_raw_registers): Likewise.
10734         * regcache.h (reg_buffer): New class.
10735         (regcache): Inherit reg_buffer.
10736
10737 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10738
10739         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10740         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10741
10742 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10743
10744         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10745
10746 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10747
10748         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10749         (SFILES): Remove common/*.c files.
10750         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10751         * common/common.host: Add common reference.
10752         * configure.ac: Likewise.
10753         * configure: Regenerate.
10754
10755 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10756
10757         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10758         (block_initialize_namespace): Use new.
10759         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10760         (dwarf2_free_objfile): Use delete.
10761         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10762         (copy_type_recursive): Use new.
10763         * gdb_obstack.h (allocate_on_obstack): New.
10764
10765 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10766
10767         PR gdb/22849
10768         * inferior.c (exit_inferior_1): Reset inf->control.
10769
10770 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10771
10772         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10773         declaration.
10774
10775 2018-02-14  Pedro Alves  <palves@redhat.com>
10776
10777         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10778         frame_cleanup_after_sniffer on exception.
10779
10780 2018-02-14  Tom Tromey  <tom@tromey.com>
10781
10782         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10783         const.
10784         (solib_bfd_open): Make pathname const.
10785         * solib.c (solib_bfd_open): Make pathname const.
10786         * solib-spu.c (spu_bfd_fopen): Make name const.
10787         (spu_bfd_open): Make pathname const.
10788         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10789         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10790
10791 2018-02-14  Tom Tromey  <tom@tromey.com>
10792
10793         * symfile.c (symfile_bfd_open): Update.
10794         * source.h (openp, source_full_path_of, find_and_open_source):
10795         Change argument type to unique_xmalloc_ptr.
10796         * source.c (openp): Take a unique_xmalloc_ptr.
10797         (source_full_path_of, find_and_open_source): Likewise.
10798         (open_source_file, symtab_to_fullname): Update.
10799         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10800         unique_xmalloc_ptr.
10801         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10802         (exec_file_find): Update.
10803         * psymtab.c (psymtab_to_fullname): Update.
10804         * nto-tdep.h (nto_find_and_open_solib): Update.
10805         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10806         unique_xmalloc_ptr.
10807         * exec.c (exec_file_attach): Update.
10808         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10809         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10810
10811 2018-02-14  Tom Tromey  <tom@tromey.com>
10812
10813         * solib.c: Include source.h.
10814         * nto-tdep.c: Include source.h.
10815         * mi/mi-cmd-env.c: Include source.h.
10816         * infcmd.c: Include source.h.
10817         * exec.c: Include source.h.
10818         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10819         (add_path, directory_switch, source_path, init_source_path): Move
10820         declarations...
10821         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10822         (add_path, directory_switch, source_path, init_source_path):
10823         ...here.
10824
10825 2018-02-14  Tom Tromey  <tom@tromey.com>
10826
10827         * solist.h (exec_file_find, solib_find): Return
10828         unique_xmalloc_ptr.
10829         (solib_bfd_fopen): Take a const char *.
10830         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10831         (exec_file_find, solib_find): Likewise.
10832         (solib_bfd_fopen): Do not take ownership of "pathname".
10833         (solib_bfd_open): Use unique_xmalloc_ptr.
10834         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10835         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10836         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10837         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10838
10839 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10840
10841         * ada-lang.c (name_match_type_from_name): Remove reference to
10842         ada_name_for_lookup in function's documentation.
10843         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10844
10845 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10846
10847         * defs.h (enum openp_flags): New enum.
10848         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10849         Move to enum openp_flags.
10850         (openp_flags): New enum flags.
10851         (openp): Change parameter type to openp_flags.
10852         * source.c (openp): Change parameter type to openp_flags.
10853         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10854         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10855
10856 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10857
10858         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10859         per-command.
10860
10861 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10862
10863         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10864         into...
10865         (class dwarf2_queue_guard): ...the destructor of this new class.
10866         (dw2_do_instantiate_symtab): Create instance of the new class
10867         dwarf2_queue_guard, remove cleanup.
10868
10869 2018-02-09  Tom Tromey  <tom@tromey.com>
10870
10871         * source.c (find_source_lines): Don't reference past the end of
10872         the vector.
10873
10874 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10875
10876         * remote.c (remote_btrace_maybe_reopen): Change error message.
10877         * btrace.c (btrace_enable): Likewise.
10878         (parse_xml_btrace): Likewise.
10879         (parse_xml_btrace_conf): Likewise.
10880
10881 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10882
10883         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10884         (linux_enable_pt, linux_enable_bts): Call
10885         diagnose_perf_event_open_fail.
10886
10887 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10888
10889         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10890         Remove parameter and change return type.  Update callers.  Move it.
10891         (linux_enable_bts, linux_enable_pt): Improve error message.
10892         (linux_enable_pt): Remove zero buffer size check.
10893         (linux_enable_btrace): Improve error messages.  Remove NULL return
10894         check.
10895
10896 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10897
10898         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10899         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10900         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10901         (linux_supports_pt, linux_supports_btrace): Remove.
10902         (linux_enable_bts): Call cpu_supports_bts.
10903         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10904         * remote.c (remote_supports_btrace): Remove.
10905         (init_remote_ops): Remove remote_supports_btrace.
10906         * target-delegates.c: Regenerated.
10907         * target.c (target_supports_btrace): Remove.
10908         * target.h (target_ops) <to_supports_btrace>: Remove
10909         (target_supports_btrace): Remove.
10910         * x86-linux-nat.c (x86_linux_create_target): Remove
10911         linux_supports_btrace.
10912
10913 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10914
10915         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10916         btrace failed.
10917         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10918         exception and use message in own exception.
10919
10920 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10921
10922         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10923         (perf_event_pt_event_type): Use gdb_file_up.
10924         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10925         scoped_fd, and scoped_mmap.
10926
10927 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10928
10929         * common/scoped_mmap.h: New.
10930         * unittests/scoped_mmap-selftest.c: New.
10931         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10932         unittests/scoped_mmap-selftest.c.
10933
10934 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10935
10936         * common/scoped_fd.h: New.
10937         * unittests/scoped_fd-selftest.c: New.
10938         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10939         unittests/scoped_fd-selftest.c.
10940
10941 2018-02-09  Tom Tromey  <tom@tromey.com>
10942
10943         * auto-load.c (auto_load_section_scripts): Use
10944         gdb::unique_xmalloc_ptr.
10945
10946 2018-02-09  Tom Tromey  <tom@tromey.com>
10947
10948         * auto-load.c (execute_script_contents): Use std::string.
10949
10950 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
10951
10952         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10953         Python function, rather than a new command.
10954
10955 2018-02-08  Tom Tromey  <tom@tromey.com>
10956
10957         * solib.c (solib_find_1): Use std::string.
10958         (solib_bfd_fopen): Use unique_xmalloc_ptr.
10959
10960 2018-02-08  Tom Tromey  <tom@tromey.com>
10961
10962         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10963
10964 2018-02-08  Tom Tromey  <tom@tromey.com>
10965
10966         * source.c (find_source_lines): Use gdb::def_vector.
10967
10968 2018-02-08  Tom Tromey  <tom@tromey.com>
10969
10970         * macrocmd.c (struct temporary_macro_definition): New.
10971         (macro_define_command): Use temporary_macro_definition.  Remove
10972         cleanups.
10973         (free_macro_definition_ptr): Remove.
10974
10975 2018-02-08  Tom Tromey  <tom@tromey.com>
10976
10977         * macroexp.c (maybe_expand): Use std::string.
10978
10979 2018-02-08  Tom Tromey  <tom@tromey.com>
10980
10981         * macroexp.c (struct macro_buffer): Add initializers for some
10982         members.
10983         (init_buffer, init_shared_buffer, free_buffer)
10984         (free_buffer_return_text): Remove.
10985         (macro_buffer): New constructors.
10986         (~macro_buffer): New destructor.
10987         (macro_buffer::set_shared): New method.
10988         (macro_buffer::resize_buffer, macro_buffer::appendc)
10989         (macro_buffer::appendmem): Now methods, not free functions.
10990         (set_token, append_tokens_without_splicing, stringify)
10991         (macro_stringify): Update.
10992         (gather_arguments): Change return type.  Remove argc_p argument,
10993         add args_ptr argument.  Use std::vector.
10994         (substitute_args): Remove argc argument.  Accept std::vector.
10995         (expand): Update.  Use std::vector.
10996         (scan, macro_expand, macro_expand_next): Update.
10997
10998 2018-02-08  Tom Tromey  <tom@tromey.com>
10999
11000         * symtab.c (default_collect_symbol_completion_matches_break_on):
11001         Use unique_xmalloc_ptr.
11002         * macroscope.h: (sal_macro_scope, user_macro_scope)
11003         (default_macro_scope): Return unique_xmalloc_ptr.
11004         * macroscope.c (sal_macro_scope, user_macro_scope)
11005         (default_macro_scope): Return unique_xmalloc_ptr.
11006         * macroexp.h (macro_expand, macro_expand_once): Return
11007         unique_xmalloc_ptr.
11008         * macroexp.c (macro_expand, macro_expand_once): Return
11009         unique_xmalloc_ptr.
11010         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11011         (info_macro_command, info_macros_command): Use
11012         unique_xmalloc_ptr.
11013         * compile/compile-c-support.c (write_macro_definitions): Use
11014         unique_xmalloc_ptr.
11015         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11016
11017 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11018
11019         * value.c (value_static_field): Assign field type instead of
11020         containing type when returning an optimized out value.
11021
11022 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11023
11024         * ft32-tdep.c (ft32_read_pc): Remove.
11025         (ft32_write_pc): Remove.
11026         (ft32_gdbarch_init): Update.
11027         * m32r-tdep.c (m32r_read_pc): Remove.
11028         (m32r_gdbarch_init): Update.
11029         * mep-tdep.c (mep_read_pc): Remove.
11030         (mep_gdbarch_init): Update.
11031         * microblaze-tdep.c (microblaze_write_pc): Remove.
11032         (microblaze_gdbarch_init): Update.
11033         * mn10300-tdep.c (mn10300_read_pc): Remove.
11034         (mn10300_write_pc): Remove.
11035         (mn10300_gdbarch_init): Update.
11036         * moxie-tdep.c (moxie_read_pc): Remove.
11037         (moxie_write_pc): Remove.
11038         (moxie_gdbarch_init): Update.
11039
11040 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11041
11042         * expprint.c (print_subexp_standard): Handle
11043         OP_F77_UNDETERMINED_ARGLIST.
11044         (dump_subexp_body_standard): Likewise.
11045
11046 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11047
11048         * target-descriptions.c (tdesc_element_visitor) Add empty
11049         implementations.
11050         (tdesc_type): Move make_gdb_type from here.
11051         (tdesc_type_builtin): Likewise.
11052         (tdesc_type_vector): Likewise.
11053         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11054         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11055         (make_gdb_type_union): Likewise.
11056         (make_gdb_type_flags): Likewise.
11057         (make_gdb_type_enum): Likewise.
11058         (make_gdb_type): New function.
11059         (tdesc_register_type): Use static make_gdb_type.
11060
11061 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11062
11063         * infcmd.c (default_print_one_register_info): Align natural-format
11064         column values consistently one under another.
11065         (pad_to_column): New function.
11066
11067 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11068
11069         * dwarf2read.c (dwarf2_physname): Move commment.
11070
11071 2018-02-01  Leszek Swirski  <leszeks@google.com>
11072
11073         * varobj.c (varobj_formatted_print_options): Allow recursive
11074         pretty printing if pretty printing is enabled.
11075
11076 2018-02-01  Leszek Swirski  <leszeks@google.com>
11077
11078         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11079         names after a structop as a filename.
11080
11081 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11082
11083         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11084         (arm_record_coproc_data_proc): Likewise.
11085
11086 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11087
11088         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11089
11090 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11091
11092         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11093         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11094
11095 2018-01-31  Pedro Alves  <palves@redhat.com>
11096
11097         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11098         * inflow.c (child_terminal_save_inferior): Wrap reference to
11099         tcgetpgrp in HAVE_TERMIOS_H.
11100         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11101         _WIN32.
11102         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11103         always iterate over all inferiors.
11104         (gdbsim_cntrl_c): Adjust.
11105         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11106
11107 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11108
11109         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11110         index type is objfile-owned if the element type is as well.
11111
11112 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11113
11114         GDB 8.1 released.
11115
11116 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11117
11118         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11119         "features/s390x-linux64.c".
11120         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11121         s390_linux32 and s390x_linux64.
11122         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11123         default tdesc.
11124         * s390-tdep.c: Include "features/s390-linux32.c" and
11125         "features/s390x-linux64.c".
11126         (s390_tdesc_valid): Add check for tdesc_has_registers.
11127         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11128         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11129         tdesc_s390x_linux64.
11130         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11131         tdesc_s390x_linux64 to...
11132         * s390-tdep.h: ...here.
11133
11134 2018-01-30  Pedro Alves  <palves@redhat.com>
11135
11136         PR gdb/13211
11137         * config.in, configure: Regenerate.
11138         * configure.ac: Check for getpgid.
11139         * go32-nat.c (go32_pass_ctrlc): New.
11140         (go32_target): Install it.
11141         * inf-child.c (inf_child_target): Install
11142         child_terminal_save_inferior, child_pass_ctrlc and
11143         child_interrupt.
11144         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11145         (inf_ptrace_target): No longer install it.
11146         * infcmd.c (interrupt_target_1): Adjust.
11147         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11148         (child_interrupt): Declare.
11149         (inferior::terminal_state): New.
11150         * inflow.c (struct terminal_info): Update comments.
11151         (inferior_process_group): Delete.
11152         (terminal_is_ours): Delete.
11153         (gdb_tty_state): New.
11154         (child_terminal_init): Adjust.
11155         (is_gdb_terminal, sharing_input_terminal_1)
11156         (sharing_input_terminal): New functions.
11157         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11158         Set the process's actual process group in the foreground if
11159         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11160         mark terminal as the inferior's if not sharing GDB's terminal.
11161         Don't check attach_flag.
11162         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11163         pass down a target_terminal_state.
11164         (child_terminal_save_inferior): New, factored out from ...
11165         (child_terminal_ours_1): ... this.  Handle
11166         target_terminal_state::is_ours_for_output.
11167         (child_interrupt, child_pass_ctrlc): New.
11168         (inflow_inferior_exit): Clear the inferior's terminal_state.
11169         (copy_terminal_info): Copy the inferior's terminal state.
11170         (_initialize_inflow): Remove reference to terminal_is_ours.
11171         * inflow.h (inferior_process_group): Delete.
11172         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11173         * procfs.c (procfs_target): Don't install procfs_interrupt.
11174         (procfs_interrupt): Delete.
11175         * remote.c (remote_serial_quit_handler): Adjust.
11176         (remote_interrupt): Remove ptid parameter.  Adjust.
11177         * target-delegates.c: Regenerate.
11178         * target.c: Include "terminal.h".
11179         (target_terminal::terminal_state): Rename to ...
11180         (target_terminal::m_terminal_state): ... this.
11181         (target_terminal::init): Adjust.
11182         (target_terminal::inferior): Adjust to per-inferior
11183         terminal_state.
11184         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11185         (target_terminal::ours, target_terminal::ours_for_output): Use
11186         target_terminal_is_ours_kind.
11187         (target_interrupt): Remove ptid parameter.  Adjust.
11188         (default_target_pass_ctrlc): Adjust.
11189         * target.h (target_ops::to_terminal_save_inferior): New field.
11190         (target_ops::to_interrupt): Remove ptid_t parameter.
11191         (target_interrupt): Remove ptid_t parameter.  Update comment.
11192         (target_pass_ctrlc): Update comment.
11193         * target/target.h (target_terminal_state): New scoped enum,
11194         factored out of ...
11195         (target_terminal::terminal_state): ... here.
11196         (target_terminal::inferior): Update comments.
11197         (target_terminal::restore_inferior): New.
11198         (target_terminal::is_inferior, target_terminal::is_ours)
11199         (target_terminal::is_ours_for_output): Adjust.
11200         (target_terminal::scoped_restore_terminal_state): Adjust to
11201         rename, and call restore_inferior() instead of inferior().
11202         (target_terminal::scoped_restore_terminal_state::m_state): Change
11203         type.
11204         (target_terminal::terminal_state): Rename to ...
11205         (target_terminal::m_terminal_state): ... this and change type.
11206
11207 2018-01-30  Pedro Alves  <palves@redhat.com>
11208
11209         * linux-nat.c (wait_for_signal): New function.
11210         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11211         directly.
11212         (async_terminal_is_ours)
11213         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11214         (linux_nat_add_target): Don't override
11215         to_terminal_inferior/to_terminal_ours.
11216
11217 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11218
11219         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11220
11221 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11222
11223         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11224         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11225         dwarf2_per_objfile_free here.
11226         (dwarf2_per_objfile_free): Remove.
11227         (_initialize_dwarf2_read): Don't register
11228         dwarf2_per_objfile_free as a registry cleanup.
11229
11230 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11231
11232         Avoid compilation errors in MinGW native builds
11233
11234         The error is triggered by including python-internal.h, and the
11235         error message is:
11236
11237              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11238                       from build-gnulib/import/math.h:27,
11239                       from d:/usr/Python26/include/pyport.h:235,
11240                       from d:/usr/Python26/include/Python.h:58,
11241                       from python/python-internal.h:94,
11242                       from python/py-arch.c:24:
11243              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11244         using ::hypot;
11245                 ^~~~~
11246
11247         This happens because Python headers define 'hypot' to expand t
11248         '_hypot' in the Windows builds.
11249         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11250         'hypoth'.  This avoids a compilation error.
11251
11252 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11253
11254         * MAINTAINERS (Write After Approval): Fix ordering.
11255
11256 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11257
11258         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11259
11260 2018-01-26  Alan Modra  <amodra@gmail.com>
11261
11262         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11263         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11264         Remove nop.  Make const.  Comment.
11265         (powerpc32_plt_stub_so_2): New.
11266         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11267         Correct count.  Update uses.
11268         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11269         Move common code reading PLT entry word.  Correct
11270         powerpc32_plt_stub PLT address calculation.
11271         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11272         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11273         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11274         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11275         (ppc64_standard_linkage8): Likewise.
11276         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11277         Correct insns description.
11278         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11279
11280 2018-01-24  Pedro Alves  <palves@redhat.com>
11281
11282         GCC PR libstdc++/83906
11283         * gdbtypes.c (operator==(const dynamic_prop &,
11284         const dynamic_prop &)): New.
11285         (operator==(const range_bounds &, const range_bounds &)): New.
11286         (check_types_equal): Use them instead of memcmp.
11287         * gdbtypes.h (operator==(const dynamic_prop &,
11288         const dynamic_prop &)): Declare.
11289         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11290         (operator==(const range_bounds &, const range_bounds &)): Declare.
11291         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11292
11293 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11294
11295         * s390-linux-tdep.c (s390_record_address_mask)
11296         (s390_record_calc_disp_common, s390_record_calc_disp)
11297         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11298         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11299         (s390_process_record): Move to s390-tdep.c.
11300         (s390_linux_init_abi_any): Adjust.
11301         * s390-tdep.c (s390_record_address_mask)
11302         (s390_record_calc_disp_common, s390_record_calc_disp)
11303         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11304         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11305         (s390_process_record): Moved from s390-linux-tdep.c
11306         (s390_gdbarch_init): Adjust.
11307
11308 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11309
11310         * s390-linux-nat.c (s390-tdep.h): New include.
11311         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11312         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11313         (ALLDEPFILES): Add s390-tdep.c.
11314         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11315         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11316         * s390-tdep.h: ...this.  New file.
11317         * s390-linux-tdep.c (s390-tdep.h): New include.
11318         (_initialize_s390_tdep): Rename to...
11319         (_initialize_s390_linux_tdep): ...this and adjust.
11320         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11321         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11322         s390-tdep.h.
11323         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11324         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11325         (s390_is_partial_instruction, s390_software_single_step)
11326         (is_non_branch_ril, s390_displaced_step_copy_insn)
11327         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11328         (s390_prologue_data, s390_addr, s390_store, s390_load)
11329         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11330         (s390_register_call_saved, s390_guess_tracepoint_registers)
11331         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11332         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11333         (s390_pseudo_register_name, s390_pseudo_register_type)
11334         (s390_pseudo_register_read, s390_pseudo_register_write)
11335         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11336         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11337         (s390_addr_bits_remove, s390_address_class_type_flags)
11338         (s390_address_class_type_flags_to_name)
11339         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11340         (s390_function_arg_float, s390_function_arg_vector)
11341         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11342         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11343         (s390_frame_align, s390_register_return_value, s390_return_value)
11344         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11345         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11346         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11347         (s390_trad_frame_prev_register, s390_unwind_cache)
11348         (s390_prologue_frame_unwind_cache)
11349         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11350         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11351         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11352         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11353         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11354         (s390_frame_base_address, s390_local_base_address)
11355         (s390_frame_base, s390_gcc_target_options)
11356         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11357         (s390_validate_reg_range, s390_tdesc_valid)
11358         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11359         * s390-tdep.c: ...this.  New file.
11360
11361 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11362
11363         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11364         (s390_process_record, s390_gdbarch_tdep_alloc)
11365         (s390_linux_init_abi_any): Use/set new hook.
11366
11367 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11368
11369         * s390-linux-tdep.c (osabi.h): New include.
11370         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11371         (s390_linux_init_abi_any): New functions.
11372         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11373
11374 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11375
11376         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11377         tdesc_has_registers check
11378
11379 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11380
11381         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11382         (s390_validate_reg_range): New macro.
11383         (s390_gdbarch_init): Adjust.
11384
11385 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11386
11387         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11388         (s390_gdbarch_tdep_alloc): Adjust.
11389         (s390_gdbarch_init): Adjust.
11390
11391 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11392
11393         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11394         <have_tdb>: Change type to bool.
11395         (s390_gdbarch_tdep_alloc): Adjust.
11396         (s390_gdbarch_init): Adjust.
11397
11398 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11399
11400         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11401         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11402         (s390_gdbarch_tdep_alloc): New function.
11403         (s390_gdbarch_init): Allocate tdep at start and use its fields
11404         instead of separate variables.
11405
11406 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11407
11408         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11409         when looking for cached gdbarch and add comment for remaining.
11410
11411 2018-01-22  Pedro Alves  <palves@redhat.com>
11412             Sergio Durigan Junior  <sergiodj@redhat.com>
11413
11414         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11415         case.
11416
11417 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11418
11419         * MAINTAINERS: Update my company e-mail address.
11420
11421 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11422
11423         * regcache.c (cooked_write_test): New function.
11424         (_initialize_regcache): Register the test.
11425
11426 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11427
11428         * ia64-tdep.c (ia64_pseudo_register_read): Call
11429         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11430         * m32c-tdep.c (m32c_cat_read): Likewise.
11431         (m32c_r3r2r1r0_read): Likewise.
11432         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11433         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11434
11435 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11436
11437         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11438         method raw_read instead of regcache_raw_read.
11439         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11440         * arm-tdep.c (arm_neon_quad_read): Likewise.
11441         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11442         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11443         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11444         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11445         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11446         (i386_pseudo_register_read_into_value): Likewise.
11447         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11448         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11449         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11450         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11451         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11452         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11453         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11454         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11455         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11456
11457 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11458
11459         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11460         * configure.tgt: Remove target mt.
11461         * mt-tdep.c: Remove.
11462         * regcache.c (cooked_read_test): Remove the check for mt.
11463
11464 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11465
11466         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11467         instead of gdbarch_pseudo_register_read_value.
11468
11469 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11470
11471         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11472         language is Ada.
11473
11474 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11475
11476         * linespec.c (create_sals_line_offset): Remove code that preserved
11477         the symtab_and_line's line number.
11478
11479 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11480
11481         * varobj.c (varobj_create): Don't set valid_block when creating a
11482         floating varobj.
11483
11484 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11485
11486         * varobj.c (varobj_create): Remove out of date comment.
11487
11488 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11489
11490         PR mi/20395
11491         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11492         updating innermost block.
11493         * parse.c (innermost_block_tracker::update): Take extra type
11494         parameter, and check types match before updating innermost block.
11495         (write_dollar_variable): Update innermost block for registers.
11496         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11497         (innermost_block_tracker::innermost_block_tracker): Initialise
11498         m_types member.
11499         (innermost_block_tracker::reset): Take type parameter.
11500         (innermost_block_tracker::update): Take type parameter, and pass
11501         type through as needed.
11502         (innermost_block_tracker::m_types): New member.
11503         * varobj.c (varobj_create): Pass type when reseting innermost
11504         block.
11505
11506 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11507
11508         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11509         * ada-lang.c (resolve_subexp): Likewise.
11510         * breakpoint.c (set_breakpoint_condition) Likewise.
11511         (watch_command_1) Likewise.
11512         * c-exp.y (variable): Likewise.
11513         * d-exp.y (PrimaryExpression): Likewise.
11514         * f-exp.y (variable): Likewise.
11515         * go-exp.y (variable): Likewise.
11516         * m2-exp.y (variable): Likewise.
11517         * objfiles.c (objfile::~objfile): Likewise.
11518         * p-exp.y (variable): Likewise.
11519         * parse.c (innermost_block): Change type.
11520         * parser-defs.h (class innermost_block_tracker): New.
11521         (innermost_block): Change to innermost_block_tracker.
11522         * printcmd.c (display_command): Switch to innermost_block API.
11523         (do_one_display): Likewise.
11524         * rust-exp.y (do_one_display): Likewise.
11525         * symfile.c (clear_symtab_users): Likewise.
11526         * varobj.c (varobj_create): Switch to innermost_block API, replace
11527         use of innermost_block with block stored on varobj object.
11528
11529 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11530
11531         * expression.h (innermost_block): Remove declaration.
11532         * varobj.c: Add 'parser-defs.h' include.
11533
11534 2018-01-19  Tom Tromey  <tom@tromey.com>
11535
11536         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11537         symbols in the static and global blocks.
11538
11539 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11540
11541         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11542         gdb_ptrace.h, and move including gdb_wait.h ...
11543         * nat/linux-ptrace.h: ... to here.
11544
11545 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11546
11547         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11548         inf_ptrace_detach_success.
11549         (inf_ptrace_detach_success): Add inferior parameter, use it
11550         instead of inferior_ptid, pass it to detach_inferior.
11551         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11552         parameter.
11553         * inferior.c (detach_inferior): Add overload that takes an
11554         inferior object.
11555         * inferior.h (detach_inferior): Likewise.
11556         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11557         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11558         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11559
11560 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11561
11562         * target.h (struct target_ops) <to_detach>: Add inferior
11563         parameter.
11564         (target_detach): Likewise.
11565         * target.c (dispose_inferior): Pass inferior down.
11566         (target_detach): Pass inferior down.  Assert that it is equal to
11567         the current inferior.
11568         * aix-thread.c (aix_thread_detach): Pass inferior down.
11569         * corefile.c (core_file_command): Pass current_inferior() down.
11570         * corelow.c (core_detach): Add inferior parameter.
11571         * darwin-nat.c (darwin_detach): Likewise.
11572         * gnu-nat.c (gnu_detach): Likewise.
11573         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11574         * infcmd.c (detach_command): Pass current_inferior() down to
11575         target_detach.
11576         * infrun.c (follow_fork_inferior): Pass parent_inf to
11577         target_detach.
11578         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11579         target_detach.
11580         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11581         * linux-thread-db.c (thread_db_detach): Likewise.
11582         * nto-procfs.c (procfs_detach): Likewise.
11583         * procfs.c (procfs_detach): Likewise.
11584         * record.c (record_detach): Likewise.
11585         * record.h (struct inferior): Forward-declare.
11586         (record_detach): Add inferior parameter.
11587         * remote-sim.c (gdbsim_detach): Likewise.
11588         * remote.c (remote_detach_1): Likewise.
11589         (remote_detach): Likewise.
11590         (extended_remote_detach): Likewise.
11591         * sol-thread.c (sol_thread_detach): Likewise.
11592         * target-debug.h (target_debug_print_inferior_p): New macro.
11593         * target-delegates.c: Re-generate.
11594         * top.c (kill_or_detach): Pass inferior down to target_detach.
11595         * windows-nat.c (windows_detach): Add inferior parameter.
11596
11597 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11598
11599         * target.h (struct target_ops) <to_detach>: Remove args
11600         parameter.
11601         (target_detach): Likewise.
11602         * target.c (dispose_inferior): Adjust.
11603         (target_detach): Remove args parameter, adjust.
11604         * aix-thread.c (aix_thread_detach): Adjust.
11605         * corefile.c (core_file_command): Adjust.
11606         * corelow.c (core_detach): Adjust.
11607         * darwin-nat.c (darwin_detach): Adjust.
11608         * gnu-nat.c (gnu_detach): Adjust.
11609         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11610         * infcmd.c (detach_command): Adjust
11611         * infrun.c (follow_fork_inferior): Adjust.
11612         (handle_vfork_child_exec_or_exit): Adjust.
11613         * linux-fork.c (linux_fork_detach): Remove args parameter.
11614         * linux-fork.h (linux_fork_detach): Likewise.
11615         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11616         * linux-thread-db.c (thread_db_detach): Likewise.
11617         * nto-procfs.c (procfs_detach): Likewise.
11618         * procfs.c (procfs_detach): Likewise.
11619         (do_detach): Remove signo parameter.
11620         * record.c (record_detach): Remove args parameter.
11621         * record.h (record_detach): Likewise.
11622         * remote-sim.c (gdbsim_detach): Likewise.
11623         * remote.c (remote_detach_1): Likewise.
11624         (remote_detach): Likewise.
11625         (extended_remote_detach): Likewise.
11626         * sol-thread.c (sol_thread_detach): Likewise.
11627         * target-delegates.c: Re-generate.
11628         * top.c (struct qt_args) <args>: Remove field.
11629         (kill_or_detach): Don't pass args.
11630         (quit_force): Don't set args.
11631         * windows-nat.c (windows_detach): Remove args parameter.
11632
11633 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11634
11635         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11636         (arm_linux_init_abi): Install it.
11637
11638 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11639
11640         * osabi.c (gdb_osabi_names): Extend the regexp for
11641         arm-linux-gnueabihf.
11642
11643 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11644
11645         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11646         m_abbrevs.
11647         (abbrev_table::add_abbrev): Update.
11648         (abbrev_table::lookup_abbrev): Update.
11649
11650 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11651
11652         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11653
11654 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11655
11656         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11657         to "std::string".
11658
11659 2018-01-17  Tom Tromey  <tom@tromey.com>
11660
11661         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11662
11663 2018-01-17  Tom Tromey  <tom@tromey.com>
11664
11665         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11666         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11667         (create_array_type_with_stride): Update.
11668         * dwarf2read.c (set_die_type): Update.
11669
11670 2018-01-17  Tom Tromey  <tom@tromey.com>
11671
11672         * dwarf2read.c (delayed_method_info): Remove typedef.
11673         (dwarf2_cu::method_info): Now a std::vector.
11674         (add_to_method_list): Update.
11675         (free_delayed_list): Remove.
11676         (compute_delayed_physnames): Update.
11677         (process_full_comp_unit, process_full_type_unit): Clear the method
11678         list.  Remove cleanups.
11679         (psymtab_include_file_name): Add name_holder parameter.  Use
11680         unique_xmalloc_ptr.
11681         (dwarf_decode_lines): Update.
11682
11683 2018-01-17  Tom Tromey  <tom@tromey.com>
11684             Simon Marchi  <simon.marchi@ericsson.com>
11685
11686         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11687         (dwarf2_per_objfile::free_cached_comp_units)
11688         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11689         (init_cutu_and_read_dies_no_follow): Update.
11690         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11691         (dwarf2_cu::~dwarf2_cu): New.
11692         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11693         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11694
11695 2018-01-17  Tom Tromey  <tom@tromey.com>
11696             Simon Marchi  <simon.marchi@ericsson.com>
11697
11698         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11699         (struct die_reader_specs) <abbrev_table>: New member.
11700         (struct abbrev_table): Add constructor.
11701         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11702         <abbrev_obstack>: Now an auto_obstack.
11703         (abbrev_table_up): New typedef.
11704         (init_cu_die_reader): Add abbrev_table parameter.
11705         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11706         Add result_dwo_abbrev_table.
11707         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11708         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11709         Update.
11710         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11711         parameter.
11712         (skip_children): Update.
11713         (abbrev_table::alloc_abbrev): Rename from
11714         abbrev_table_alloc_abbrev.
11715         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11716         (abbrev_table::lookup_abbrev): Rename from
11717         abbrev_table_lookup_abbrev.
11718         (abbrev_table_read_table): Return abbrev_table_up.
11719         (abbrev_table_free, abbrev_table_free_cleanup)
11720         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11721         (load_partial_dies): Update.
11722
11723 2018-01-17  Tom Tromey  <tom@tromey.com>
11724
11725         * dwarf2read.c (dwarf2_compute_name): Update comment.
11726         (read_func_scope, read_variable): Update.
11727         (new_symbol): Remove.
11728         (new_symbol_full): Rename to new_symbol.
11729
11730 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11731
11732         PR gdb/16577
11733         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11734         a warning instead of throwing an error, set section size to 0 and return
11735         NULL.
11736         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11737
11738 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11739
11740         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11741         std::string.
11742         (linux_ptrace_attach_fail_reason_string): Likewise.
11743         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11744         Likewise.
11745         (linux_ptrace_attach_fail_reason_string): Likewise.
11746         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11747
11748 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11749
11750         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11751
11752 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11753
11754         PR gdb/21559
11755         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11756         checking for fs_base/gs_base fields in struct user_regs_struct.
11757         * configure: Regenerate.
11758
11759 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11760
11761         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11762         function.
11763         (aarch64_linux_init_abi): Install it to gdbarch hook
11764         gcc_target_options.
11765
11766 2018-01-15  Pedro Alves  <palves@redhat.com>
11767
11768         * common/signals-state-save-restore.c
11769         (save_original_signals_state): Fix typos.
11770
11771 2017-01-12  Tom Tromey  <tom@tromey.com>
11772             Sergio Durigan Junior  <sergiodj@redhat.com>
11773
11774         * Makefile.in (install-only): Install gdb-add-index.
11775
11776 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11777
11778         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11779
11780 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11781
11782         * infrun.c (keep_going_pass_signal): Clear step-over info when
11783         insert_breakpoints fails.
11784
11785 2018-01-11  Pedro Alves  <palves@redhat.com>
11786
11787         PR gdb/22583
11788         * infrun.c (resume): Rename to ...
11789         (resume_1): ... this.
11790         (resume): Reimplement as wrapper around resume_1.
11791
11792 2018-01-11  Pedro Alves  <palves@redhat.com>
11793
11794         PR remote/22597
11795         * remote.c (remote_parse_stop_reply): Default to the last-set
11796         general thread instead of to 'magic_null_ptid'.
11797
11798 2018-01-10  Pedro Alves  <palves@redhat.com>
11799
11800         * language.h (language_get_symbol_name_matcher): Rename ...
11801         (get_symbol_name_matcher): ... this.
11802         * language.c (language_get_symbol_name_matcher): Ditto.
11803         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11804         callers adjusted.
11805
11806 2018-01-10  Pedro Alves  <palves@redhat.com>
11807
11808         PR gdb/22670
11809         * dwarf2read.c
11810         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11811         Adjust to use language_get_symbol_name_matcher instead of
11812         language_defn::la_get_symbol_name_matcher.
11813         * language.c (language_get_symbol_name_matcher): If in Ada mode
11814         and the lookup name is a verbatim match, return Ada's matcher.
11815         * language.h (language_get_symbol_name_matcher): Adjust comment.
11816         (ada_lookup_name_info::verbatim_p):: New method.
11817
11818 2018-01-10  Pedro Alves  <palves@redhat.com>
11819
11820         PR gdb/22670
11821         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11822         minsym's language is language_auto or language_cplus, pass down
11823         language_ada instead.
11824         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11825
11826 2018-01-10  Pedro Alves  <palves@redhat.com>
11827
11828         PR gdb/22670
11829         * minsyms.c (linkage_name_str): New function.
11830         (iterate_over_minimal_symbols): Use it.
11831
11832 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11833
11834         * NEWS: Document that 'info proc' now works on FreeBSD.
11835
11836 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11837
11838         * configure.ac: Check for kinfo_getfile in libutil.
11839         * configure: Regenerate.
11840         * config.in: Regenerate.
11841         * fbsd-nat.c: Include "fbsd-tdep.h".
11842         (fbsd_fetch_cmdline): New.
11843         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11844         rather than calling error.
11845         (fbsd_info_proc): New.
11846         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11847         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11848         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11849
11850 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11851
11852         * fbsd-nat.c (struct free_deleter): Remove.
11853         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11854
11855 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11856
11857         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11858         NULL for an empty pathname.
11859
11860 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11861
11862         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11863         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11864         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11865         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11866         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11867         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11868         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11869         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11870         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11871         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11872         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11873         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11874         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11875         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11876         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11877
11878 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11879
11880         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11881         (gnu_xfer_auxv): New function.
11882         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11883         TARGET_OBJECT_AUXV.
11884
11885 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11886             Simon Marchi  <simon.marchi@ericsson.com>
11887
11888         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11889         common/selftest.c.
11890         (COMMON_OBS): Remove selftest.o.
11891         * configure.ac: Append selftest-arch.c and common/selftest.c to
11892         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11893         * configure: Re-generated.
11894         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11895         GDB_SELF_TEST.
11896         (maintenance_info_selftests): Likewise.
11897
11898 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11899
11900         * ada-valprint.c (val_print_packed_array_elements): Use
11901         proper number of elements when printing an array indexed
11902         by an enumeration type.
11903
11904 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11905
11906         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11907         (dw2_get_file_names_reader): Adjust.
11908         (lookup_dwo_signatured_type): Adjust.
11909         (lookup_dwp_signatured_type): Adjust.
11910         (lookup_signatured_type): Adjust.
11911         (create_type_unit_group): Adjust.
11912         (get_type_unit_group): Adjust.
11913         (process_psymtab_comp_unit_reader): Adjust.
11914         (build_type_psymtabs_reader): Adjust.
11915         (scan_partial_symbols): Adjust.
11916         (add_partial_symbol): Adjust.
11917         (add_partial_subprogram): Adjust.
11918         (peek_die_abbrev): Adjust.
11919         (fixup_go_packaging): Adjust.
11920         (process_imported_unit_die): Adjust.
11921         (dwarf2_compute_name): Adjust.
11922         (dwarf2_physname): Adjust.
11923         (read_import_statement): Adjust.
11924         (handle_DW_AT_stmt_list): Adjust.
11925         (read_file_scope): Adjust.
11926         (read_func_scope): Adjust.
11927         (read_lexical_block_scope): Adjust.
11928         (read_call_site_scope): Adjust.
11929         (read_variable): Adjust.
11930         (dwarf2_rnglists_process): Adjust.
11931         (dwarf2_ranges_process): Adjust.
11932         (dwarf2_ranges_read): Adjust.
11933         (dwarf2_get_pc_bounds): Adjust.
11934         (dwarf2_record_block_ranges): Adjust.
11935         (dwarf2_add_field): Adjust.
11936         (dwarf2_add_member_fn): Adjust.
11937         (read_structure_type): Adjust.
11938         (process_structure_scope): Adjust.
11939         (read_enumeration_type): Adjust.
11940         (read_array_type): Adjust.
11941         (mark_common_block_symbol_computed): Adjust.
11942         (read_common_block): Adjust.
11943         (read_namespace_type): Adjust.
11944         (read_namespace): Adjust.
11945         (read_module_type): Adjust.
11946         (read_tag_pointer_type): Adjust.
11947         (read_tag_ptr_to_member_type): Adjust.
11948         (read_tag_string_type): Adjust.
11949         (read_subroutine_type): Adjust.
11950         (read_typedef): Adjust.
11951         (read_base_type): Adjust.
11952         (attr_to_dynamic_prop): Adjust.
11953         (read_subrange_type): Adjust.
11954         (read_unspecified_type): Adjust.
11955         (dwarf2_read_abbrevs): Adjust.
11956         (load_partial_dies): Adjust.
11957         (read_partial_die): Adjust.
11958         (find_partial_die): Adjust.
11959         (guess_partial_die_structure_name): Adjust.
11960         (fixup_partial_die): Adjust.
11961         (read_attribute_value): Adjust.
11962         (read_addr_index): Adjust.
11963         (read_addr_index_from_leb128): Adjust.
11964         (read_str_index): Adjust.
11965         (dwarf2_string_attr): Adjust.
11966         (get_debug_line_section): Adjust.
11967         (dwarf_decode_line_header): Adjust.
11968         (lnp_state_machine::check_line_address): Adjust.
11969         (dwarf_decode_lines_1): Adjust.
11970         (dwarf_decode_lines): Adjust.
11971         (dwarf2_start_symtab): Adjust.
11972         (var_decode_location): Adjust.
11973         (new_symbol_full): Adjust.
11974         (dwarf2_const_value_data): Adjust.
11975         (dwarf2_const_value_attr): Adjust.
11976         (dwarf2_const_value): Adjust.
11977         (die_type): Adjust.
11978         (die_containing_type): Adjust.
11979         (build_error_marker_type): Adjust.
11980         (lookup_die_type): Adjust.
11981         (guess_full_die_structure_name): Adjust.
11982         (anonymous_struct_prefix): Adjust.
11983         (determine_prefix): Adjust.
11984         (dwarf2_name): Adjust.
11985         (follow_die_ref_or_sig): Adjust.
11986         (follow_die_offset): Adjust.
11987         (follow_die_ref): Adjust.
11988         (follow_die_sig_1): Adjust.
11989         (follow_die_sig): Adjust.
11990         (get_signatured_type): Adjust.
11991         (get_DW_AT_signature_type): Adjust.
11992         (decode_locdesc): Adjust.
11993         (dwarf_decode_macros): Adjust.
11994         (cu_debug_loc_section): Adjust.
11995         (fill_in_loclist_baton): Adjust.
11996         (dwarf2_symbol_mark_computed): Adjust.
11997         (init_one_comp_unit): Don't assign
11998         dwarf2_cu::dwarf2_per_objfile.
11999         (set_die_type): Adjust.
12000
12001 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12002
12003         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12004         <dwarf2_per_objfile>: New field.
12005         (dwarf2_per_objfile): Remove global.
12006         (get_dwarf2_per_objfile): New function.
12007         (set_dwarf2_per_objfile): New function.
12008         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12009         dwarf2_per_objfile.
12010         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12011         (read_abbrev_offset): Likewise.
12012         (read_indirect_string): Likewise.
12013         (read_indirect_line_string): Likewise.
12014         (read_indirect_string_at_offset): Likewise.
12015         (read_indirect_string_from_dwz): Likewise.
12016         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12017         dwarf2_per_objfile.
12018         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12019         (create_all_comp_units): Change objfile parameter to
12020         dwarf2_per_objfile.
12021         (create_all_type_units): Likewise.
12022         (process_queue): Add dwarf2_per_objfile parameter.
12023         (read_and_check_comp_unit_head): Likewise.
12024         (lookup_dwo_unit_in_dwp): Likewise.
12025         (get_dwp_file): Likewise.
12026         (process_cu_includes): Likewise.
12027         (struct free_dwo_file_cleanup_data): New struct.
12028         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12029         set_dwarf2_per_objfile.
12030         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12031         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12032         context, adjust calls.
12033         (dw2_instantiate_symtab): Likewise.
12034         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12035         (dw2_get_cu): Likewise.
12036         (create_cu_from_index_list): Change objfile parameter to
12037         dwarf2_per_objfile.
12038         (create_cus_from_index_list): Get dwarf2_per_objfile from
12039         context, adjust calls.
12040         (create_cus_from_index): Likewise.
12041         (create_signatured_type_table_from_index): Change objfile
12042         parameter to dwarf2_per_objfile.
12043         (create_signatured_type_table_from_debug_names): Change objfile
12044         parameter to dwarf2_per_objfile.
12045         (create_addrmap_from_index): Likewise.
12046         (create_addrmap_from_aranges): Likewise.
12047         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12048         (dw2_setup): Remove.
12049         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12050         context.
12051         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12052         get_dwarf2_per_objfile.
12053         (dw2_forget_cached_source_info): Likewise.
12054         (dw2_map_symtabs_matching_filename): Likewise.
12055         (struct dw2_symtab_iterator) <index>: Remove.
12056         <dwarf2_per_objfile>: New field.
12057         (dw2_symtab_iter_init): Replace index parameter with
12058         dwarf2_per_objfile.
12059         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12060         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12061         (dw2_print_stats): Likewise.
12062         (dw2_dump): Likewise.
12063         (dw2_expand_symtabs_for_function): Likewise.
12064         (dw2_expand_all_symtabs): Likewise.
12065         (dw2_expand_symtabs_with_fullname): Likewise.
12066         (dw2_expand_marked_cus): Replace index and objfile parameters
12067         with dwarf2_per_objfile.
12068         (dw_expand_symtabs_matching_file_matcher): Add
12069         dwarf2_per_objfile parameter and adjust calls.
12070         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12071         adjust calls.
12072         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12073         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12074         adjust calls.
12075         (create_cus_from_debug_names_list): Replace objfile parameter
12076         with dwarf2_per_objfile and adjust calls.
12077         (create_cus_from_debug_names): Likewise.
12078         (dwarf2_read_debug_names): Likewise.
12079         (mapped_debug_names::namei_to_name): Adjust call.
12080         (dw2_debug_names_iterator::next): Likewise.
12081         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12082         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12083         (dw2_debug_names_dump): Likewise.
12084         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12085         (dw2_debug_names_expand_symtabs_matching): Likewise.
12086         (dwarf2_initialize_objfile): Likewise.
12087         (dwarf2_build_psymtabs): Likewise.
12088         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12089         this_cu.
12090         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12091         (read_and_check_comp_unit_head): Likewise.
12092         (read_abbrev_offset): Likewise.
12093         (create_debug_type_hash_table): Likewise.
12094         (create_debug_types_hash_table): Likewise.
12095         (create_all_type_units): Replace objfile parameter with
12096         dwarf2_per_objfile.
12097         (add_type_unit): Add dwarf2_per_objfile parameter.
12098         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12099         with dwarf2_per_objfile.
12100         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12101         (lookup_dwp_signatured_type): Likewise.
12102         (lookup_signatured_type): Likewise.
12103         (read_cutu_die_from_dwo): Likewise.
12104         (init_tu_and_read_dwo_dies): Likewise.
12105         (init_cutu_and_read_dies): Likewise.
12106         (init_cutu_and_read_dies_no_follow): Likewise.
12107         (allocate_type_unit_groups_table): Add objfile parameter.
12108         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12109         (get_type_unit_group): Likewise.
12110         (process_psymtab_comp_unit): Update call.
12111         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12112         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12113         (print_tu_stats): Likewise.
12114         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12115         in void* parameter.
12116         (build_type_psymtabs): Change objfile parameter to
12117         dwarf2_per_objfile.
12118         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12119         passed in void* parameter.
12120         (process_skeletonless_type_units): Change objfile parameter to
12121         dwarf2_per_objfile.
12122         (set_partial_user): Likewise.
12123         (dwarf2_build_psymtabs_hard): Likewise.
12124         (read_comp_units_from_section): Likewise.
12125         (create_all_comp_units): Likewise.
12126         (scan_partial_symbols): Update calls.
12127         (add_partial_symbol): Likewise.
12128         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12129         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12130         (process_queue): Add dwarf2_per_objfile parameter.
12131         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12132         (compute_compunit_symtab_includes): Likewise.
12133         (process_cu_includes): Add dwarf2_per_objfile parameter.
12134         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12135         (process_full_type_unit): Likewise.
12136         (process_imported_unit_die): Update call.
12137         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12138         (read_file_scope): Likewise.
12139         (allocate_dwo_file_hash_table): Add objfile parameter.
12140         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12141         (create_cus_hash_table): Likewise.
12142         (create_dwp_hash_table): Likewise.
12143         (create_dwo_unit_in_dwp_v1): Likewise.
12144         (create_dwp_v2_section): Likewise.
12145         (create_dwo_unit_in_dwp_v2): Likewise.
12146         (lookup_dwo_unit_in_dwp): Likewise.
12147         (try_open_dwop_file): Likewise.
12148         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12149         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12150         cleanup to include a reference to dwarf2_per_objfile.
12151         (open_dwp_file): Add dwarf2_per_objfile parameter.
12152         (open_and_init_dwp_file): Likewise.
12153         (get_dwp_file): Likewise.
12154         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12155         (queue_and_load_all_dwo_tus): Update call.
12156         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12157         data.
12158         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12159         (dwarf2_ranges_process): Likewise.
12160         (dwarf2_get_pc_bounds): Likewise.
12161         (mark_common_block_symbol_computed): Likewise.
12162         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12163         (dwarf2_read_abbrevs): Update call.
12164         (read_partial_die): Use dwarf2_per_objfile from cu.
12165         (find_partial_die): Likewise.
12166         (fixup_partial_die): Likewise.
12167         (read_attribute_value): Likewise.
12168         (read_indirect_string_at_offset_from): Add objfile parameter.
12169         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12170         parameter.
12171         (read_indirect_string_from_dwz): Add objfile parameter.
12172         (read_indirect_string): Add objfile parameter.
12173         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12174         (read_addr_index): Use dwarf2_per_objfile from cu.
12175         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12176         call dw2_setup.
12177         (read_str_index): Use dwarf2_per_objfile from cu.
12178         (get_debug_line_section): Likewise.
12179         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12180         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12181         (new_symbol_full): Use dwarf2_per_objfile from cu.
12182         (build_error_marker_type): Likewise.
12183         (lookup_die_type): Likewise.
12184         (determine_prefix): Likewise.
12185         (follow_die_offset): Likewise.
12186         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12187         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12188         (dwarf2_fetch_die_type_sect_off): Likewise.
12189         (dwarf2_get_die_type): Likewise.
12190         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12191         (get_signatured_type): Likewise.
12192         (get_DW_AT_signature_type): Likewise.
12193         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12194         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12195         (cu_debug_loc_section): Likewise.
12196         (fill_in_loclist_baton): Likewise.
12197         (dwarf2_symbol_mark_computed): Likewise.
12198         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12199         dwarf2_per_objfile.
12200         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12201         parameter.
12202         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12203         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12204         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12205         (set_die_type): Use dwarf2_free_objfile from cu.
12206         (get_die_type_at_offset): Likewise.
12207         (dwarf2_per_objfile_free): Don't assign global variable.
12208         (debug_names) <constructor>: Add dwarf2_per_objfile
12209         parameter, update m_debugstrlookup construction.
12210         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12211         parameter.
12212         <m_dwarf2_per_objfile>: New field.
12213         <lookup>: Use m_dwarf2_per_objfile.
12214         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12215         (psyms_seen_size): Likewise.
12216         (write_gdbindex): Replace objfile parameter with
12217         dwarf2_per_objfile.
12218         (write_debug_names): Likewise.
12219         (write_psymtabs_to_index): Likewise.
12220         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12221         calls.
12222
12223 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12224
12225         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12226         <dwarf2_per_objfile>: New field.
12227         (struct dwarf2_per_cu_data) <objfile>: Remove.
12228         <dwarf2_per_objfile>: New field.
12229         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12230         of objfile.
12231         (create_signatured_type_table_from_index): Likewise.
12232         (create_debug_type_hash_table): Likewise.
12233         (fill_in_sig_entry_from_dwo_entry): Likewise.
12234         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12235         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12236         objfile.
12237         (create_partial_symtab): Access objfile through
12238         dwarf2_per_objfile.
12239         (process_psymtab_comp_unit_reader): Likewise.
12240         (read_comp_units_from_section): Likewise.
12241         (scan_partial_symbols): Likewise.
12242         (add_partial_symbol): Likewise.
12243         (add_partial_subprogram): Likewise.
12244         (peek_die_abbrev): Likewise.
12245         (fixup_go_packaging): Likewise.
12246         (process_full_comp_unit): Likewise.
12247         (process_full_type_unit): Likewise.
12248         (process_imported_unit_die): Likewise.
12249         (dwarf2_compute_name): Likewise.
12250         (dwarf2_physname): Likewise.
12251         (read_import_statement): Likewise.
12252         (create_cus_hash_table): Assign dwarf2_physname instead of
12253         objfile.
12254         (read_func_scope): Access objfile through dwarf2_per_objfile.
12255         (read_lexical_block_scope): Likewise.
12256         (read_call_site_scope): Likewise.
12257         (read_variable): Likewise.
12258         (dwarf2_rnglists_process): Likewise.
12259         (dwarf2_ranges_process): Likewise.
12260         (dwarf2_ranges_read): Likewise.
12261         (dwarf2_record_block_ranges): Likewise.
12262         (dwarf2_add_field): Likewise.
12263         (dwarf2_add_member_fn): Likewise.
12264         (read_structure_type): Likewise.
12265         (process_structure_scope): Likewise.
12266         (read_enumeration_type): Likewise.
12267         (read_array_type): Likewise.
12268         (read_common_block): Likewise.
12269         (read_namespace_type): Likewise.
12270         (read_namespace): Likewise.
12271         (read_module_type): Likewise.
12272         (read_tag_pointer_type): Likewise.
12273         (read_tag_ptr_to_member_type): Likewise.
12274         (read_tag_string_type): Likewise.
12275         (read_subroutine_type): Likewise.
12276         (read_typedef): Likewise.
12277         (read_base_type): Likewise.
12278         (attr_to_dynamic_prop): Likewise.
12279         (read_subrange_type): Likewise.
12280         (read_unspecified_type): Likewise.
12281         (load_partial_dies): Likewise.
12282         (read_partial_die): Likewise.
12283         (find_partial_die): Likewise.
12284         (guess_partial_die_structure_name): Likewise.
12285         (fixup_partial_die): Likewise.
12286         (read_attribute_value): Likewise.
12287         (read_addr_index_from_leb128): Likewise.
12288         (dwarf2_read_addr_index): Likewise.
12289         (dwarf2_string_attr): Likewise.
12290         (lnp_state_machine::check_line_address): Likewise.
12291         (dwarf_decode_lines_1): Likewise.
12292         (dwarf_decode_lines): Likewise.
12293         (dwarf2_start_symtab): Likewise.
12294         (var_decode_location): Likewise.
12295         (new_symbol_full): Likewise.
12296         (dwarf2_const_value_data): Likewise.
12297         (dwarf2_const_value_attr): Likewise.
12298         (dwarf2_const_value): Likewise.
12299         (die_type): Likewise.
12300         (die_containing_type): Likewise.
12301         (lookup_die_type): Likewise.
12302         (guess_full_die_structure_name): Likewise.
12303         (anonymous_struct_prefix): Likewise.
12304         (dwarf2_name): Likewise.
12305         (follow_die_ref_or_sig): Likewise.
12306         (follow_die_offset): Likewise.
12307         (follow_die_ref): Likewise.
12308         (dwarf2_fetch_die_loc_sect_off): Likewise.
12309         (dwarf2_fetch_constant_bytes): Likewise.
12310         (dwarf2_fetch_die_type_sect_off): Likewise.
12311         (dwarf2_get_die_type): Likewise.
12312         (follow_die_sig): Likewise.
12313         (decode_locdesc): Likewise.
12314         (dwarf2_per_cu_objfile): Likewise.
12315         (dwarf2_per_cu_text_offset): Likewise.
12316         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12317         objfile.
12318         (set_die_type): Access objfile through
12319         dwarf2_per_objfile.
12320
12321 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12322
12323         * valprint.c (converted_character_d): Remove typedef.
12324         (DEF_VEC_O (converted_character_d)): Remove.
12325         (count_next_character): Use std::vector.
12326         (print_converted_chars_to_obstack): Likewise.
12327         (generic_printstr): Likewise.
12328
12329 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12330
12331         * xml-support.h (struct gdb_xml_value): Add constructor.
12332         <value>: Change type to unique_xmalloc_ptr.
12333         (gdb_xml_value_s): Remove typedef.
12334         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12335         (gdb_xml_element_start_handler): Change parameter type to
12336         std::vector.
12337         (xml_find_attribute): Likewise.
12338         * xml-support.c (xml_find_attribute): Change parameter type to
12339         std::vector and adjust.
12340         (gdb_xml_values_cleanup): Remove.
12341         (gdb_xml_parser::start_element): Adjust to std::vector.
12342         (xinclude_start_include): Change paraeter type to std::vector
12343         and adjust.
12344         * btrace.c (check_xml_btrace_version): Likewise.
12345         (parse_xml_btrace_block): Likewise.
12346         (parse_xml_btrace_pt_config_cpu): Likewise.
12347         (parse_xml_btrace_pt): Likewise.
12348         (parse_xml_btrace_conf_bts): Likewise.
12349         (parse_xml_btrace_conf_pt): Likewise.
12350         * memory-map.c (memory_map_start_memory): Likewise.
12351         (memory_map_start_property): Likewise.
12352         * osdata.c (osdata_start_osdata): Likewise.
12353         (osdata_start_item): Likewise.
12354         (osdata_start_column): Likewise.
12355         * remote.c (start_thread): Likewise.
12356         * solib-aix.c (library_list_start_library): Likewise.
12357         (library_list_start_list): Likewise.
12358         * solib-svr4.c (library_list_start_library): Likewise.
12359         (svr4_library_list_start_list): Likewise.
12360         * solib-target.c (library_list_start_segment): Likewise.
12361         (library_list_start_section): Likewise.
12362         (library_list_start_library): Likewise.
12363         (library_list_start_list): Likewise.
12364         * tracepoint.c (traceframe_info_start_memory): Likewise.
12365         (traceframe_info_start_tvar): Likewise.
12366         * xml-syscall.c (syscall_start_syscall): Likewise.
12367         * xml-tdesc.c (tdesc_start_target): Likewise.
12368         (tdesc_start_feature): Likewise.
12369         (tdesc_start_reg): Likewise.
12370         (tdesc_start_union): Likewise.
12371         (tdesc_start_struct): Likewise.
12372         (tdesc_start_flags): Likewise.
12373         (tdesc_start_enum): Likewise.
12374         (tdesc_start_field): Likewise.
12375         (tdesc_start_enum_value): Likewise.
12376         (tdesc_start_vector): Likewise.
12377
12378 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12379
12380         * extension.h (struct xmethod_worker) <clone>: Remove.
12381         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12382         Remove.
12383         (python_xmethod_worker::clone): Remove.
12384         * valops.c (find_overload_match): Use std::move instead of
12385         clone.
12386
12387 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12388
12389         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12390         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12391         <free_xmethod_worker_data>: Remove.
12392         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12393         <get_xmethod_arg_types>: Remove.
12394         <get_xmethod_result_type>: Remove.
12395         <invoke_xmethod>: Remove.
12396         * extension.c (new_xmethod_worker): Remove.
12397         (clone_xmethod_worker): Remove.
12398         (get_matching_xmethod_workers): Return void, pass std::vector by
12399         pointer.
12400         (get_xmethod_arg_types): Rename to...
12401         (xmethod_worker::get_arg_types): ... this, and adjust.
12402         (get_xmethod_result_type): Rename to...
12403         (xmethod_worker::get_result_type): ... this, and adjust.
12404         (invoke_xmethod): Remove.
12405         (free_xmethod_worker): Remove.
12406         (free_xmethod_worker_vec): Remove.
12407         * extension.h (enum ext_lang_rc): Move here from
12408         extension-priv.h.
12409         (struct xmethod_worker): Add constructor and destructor.
12410         <data>: Remove.
12411         <value>: Remove.
12412         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12413         virtual pure methods.
12414         <get_arg_types, get_result_type>: New methods.
12415         (xmethod_worker_ptr): Remove typedef.
12416         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12417         (xmethod_worker_vec): Remove typedef.
12418         (xmethod_worker_up): New typedef.
12419         (invoke_xmethod): Remove.
12420         (clone_xmethod_worker): Remove.
12421         (free_xmethod_worker): Remove.
12422         (free_xmethod_worker_vec): Remove.
12423         (get_xmethod_arg_types): Remove.
12424         (get_xmethod_result_type): Remove.
12425         * valops.c (find_method_list): Use std::vector, don't use
12426         intermediate vector.
12427         (value_find_oload_method_list): Use std::vector.
12428         (find_overload_match): Use std::vector.
12429         (find_oload_champ): Use std::vector.
12430         * value.c (value_free): Use operator delete.
12431         (value_of_xmethod): Rename to...
12432         (value_from_xmethod): ... this.  Don't assign
12433         xmethod_worker::value, take rvalue-reference.
12434         (result_type_of_xmethod): Adjust.
12435         (call_xmethod): Adjust.
12436         * value.h: Include extension.h.
12437         (struct xmethod_worker): Don't forward-declare.
12438         (value_of_xmethod): Rename to...
12439         (value_from_xmethod): ... this, take rvalue-reference.
12440         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12441         (struct python_xmethod_worker): ... this, add constructor and
12442         destructor.
12443         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12444         (gdbpy_free_xmethod_worker_data): Rename to...
12445         (python_xmethod_worker::~python_xmethod_worker): ... this and
12446         adjust.
12447         (gdbpy_clone_xmethod_worker_data): Rename to...
12448         (python_xmethod_worker::clone): ... this and adjust.
12449         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12450         temporary vector.
12451         (gdbpy_get_xmethod_arg_types): Rename to...
12452         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12453         (gdbpy_get_xmethod_result_type): Rename to...
12454         (python_xmethod_worker::do_get_result_type): ... this and
12455         adjust.
12456         (gdbpy_invoke_xmethod): Rename to...
12457         (python_xmethod_worker::invoke): ... this and adjust.
12458         (new_python_xmethod_worker): Rename to...
12459         (python_xmethod_worker::python_xmethod_worker): ... this and
12460         adjust.
12461         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12462         Remove.
12463         (gdbpy_free_xmethod_worker_data): Remove.
12464         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12465         (gdbpy_get_xmethod_arg_types): Remove.
12466         (gdbpy_get_xmethod_result_type): Remove.
12467         (gdbpy_invoke_xmethod): Remove.
12468         * python/python.c (python_extension_ops): Remove obsolete
12469         callbacks.
12470
12471 2018-01-05  Pedro Alves  <palves@redhat.com>
12472
12473         PR gdb/18653
12474         * common/signals-state-save-restore.c
12475         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12476         find a custom handler preinstalled, instead of internal erroring.
12477         But only warn if !quiet.
12478         * common/signals-state-save-restore.h
12479         (save_original_signals_state): New parameter 'quiet'.
12480         * main.c (captured_main_1): Move save_original_signals_state call
12481         after option handling, and pass QUIET.
12482
12483 2018-01-05  Pedro Alves  <palves@redhat.com>
12484
12485         * spu-tdep.c (spu_catch_start): Pass
12486         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12487
12488 2018-01-05  Pedro Alves  <palves@redhat.com>
12489
12490         PR gdb/22670
12491         * ada-lang.c (literal_symbol_name_matcher): New function.
12492         (ada_get_symbol_name_matcher): Use it for
12493         symbol_name_match_type::SEARCH_NAME.
12494         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12495         it down instead of assuming symbol_name_match_type::FULL.
12496         * block.h (block_lookup_symbol): New parameter 'match_type'.
12497         * c-valprint.c (print_unpacked_pointer): Use
12498         lookup_symbol_search_name instead of lookup_symbol.
12499         * compile/compile-object-load.c (get_out_value_type): Pass down
12500         symbol_name_match_type::SEARCH_NAME.
12501         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12502         symbol_name_match_type::FULL.
12503         * cp-support.c (cp_get_symbol_name_matcher): Handle
12504         symbol_name_match_type::SEARCH_NAME.
12505         * infrun.c (insert_exception_resume_breakpoint): Use
12506         lookup_symbol_search_name.
12507         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12508         * psymtab.c (maintenance_check_psymtabs): Use
12509         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12510         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12511         SYMBOL_SEARCH_NAME.
12512         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12513         if symbol_name_match_type::SEARCH_NAME.
12514         (lookup_symbol_in_language): Pass down
12515         symbol_name_match_type::FULL.
12516         (lookup_symbol_search_name): New.
12517         (lookup_language_this): Pass down
12518         symbol_name_match_type::SEARCH_NAME.
12519         (lookup_symbol_aux, lookup_local_symbol): New parameter
12520         'match_type'.  Pass it down.
12521         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12522         (lookup_symbol_search_name): New declaration.
12523         (lookup_symbol_in_block): New 'match_type' parameter.
12524
12525 2018-01-05  Pedro Alves  <palves@redhat.com>
12526
12527         PR gdb/22670
12528         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12529         ada_lookup_symbol.
12530         (ada_lookup_symbol): Reimplement in terms of
12531         ada_lookup_symbol_list, bits factored out from
12532         ada_lookup_encoded_symbol.
12533
12534 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12535
12536         * ada-exp.y (write_object_renaming): When subscripting an array
12537         using a symbol as the index, pass the block in call to
12538         ada_lookup_encoded_symbol when looking that symbol up.
12539
12540 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12541
12542         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12543         TYPE_INDEX_TYPE.
12544
12545 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12546
12547         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12548         the case where VALUE_LVAL (val0) is not lval_memory.
12549
12550 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12551
12552         * ada-valprint.c (print_optional_low_bound): Handle
12553         character-indexed array printing like boolean-indexed array
12554         printing.
12555
12556 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12557
12558         * NEWS: Create a new section for the next release branch.
12559         Rename the section of the current branch, now that it has
12560         been cut.
12561
12562 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12563
12564         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12565         * version.in: Bump version to 8.1.50.DATE-git.
12566
12567 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12568
12569         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12570         Add field.
12571         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12572         Add field.
12573         (default_exception_support_info) <catch_handlers_sym>: Add field.
12574         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12575         (ada_exception_name_addr_1): Add "catch handlers" handling.
12576         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12577         Update all callers.
12578         (create_excep_cond_exprs) <ex>: Add parameter.
12579         (re_set_exception): Update create_excep_cond_exprs call.
12580         (print_it_exception, print_one_exception, print_mention_exception)
12581         (print_recreate_exception): Add "catch handler" handling.
12582         (allocate_location_catch_handlers, re_set_catch_handlers)
12583         (check_status_catch_handlers, print_it_catch_handlers)
12584         (print_one_catch_handlers, print_mention_catch_handlers)
12585         (print_recreate_catch_handlers): New function.
12586         (catch_handlers_breakpoint_ops): New variable.
12587         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12588         Add parameter.  Add "catch handler" handling.
12589         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12590         Add "catch handler" handling.
12591         (ada_exception_catchpoint_cond_string): Add "catch handler"
12592         handling.
12593         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12594         call.
12595         (catch_ada_handlers_command): New function.
12596         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12597         operations structure.
12598         (_initialize_ada_language): Add "catch handlers" command entry.
12599         * NEWS: Document "catch handlers" feature.
12600
12601 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12602
12603         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12604         account when creating the array type of the slice.
12605         (ada_value_slice): Likewise.
12606
12607 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12608
12609         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12610         New enum value.
12611         (create_array_type_with_stride): Add byte_stride_prop parameter.
12612         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12613         New parameter.  Update all callers in this file.
12614         (array_type_has_dynamic_stride): New function.
12615         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12616         of arrays with dynamic byte strides.
12617         * dwarf2read.c (read_array_type): Add support for dynamic
12618         DW_AT_byte_stride attributes.
12619
12620 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12621
12622         * dwarf2read.c (read_unspecified_type): Treat
12623         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12624
12625 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12626
12627         Update copyright year range in all GDB files.
12628
12629 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12630
12631         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12632         and gdb/testsuite/gdb.base/step-line.c.
12633
12634 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12635
12636         * copyright.py (main): Dump the contents of
12637         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12638         even if BY_HAND is empty.
12639
12640 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12641
12642         * top.c (print_gdb_version): Update Copyright year in version
12643         message.
12644
12645 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12646
12647         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12648
12649 For older changes see ChangeLog-2017.
12650 \f
12651 Local Variables:
12652 mode: change-log
12653 left-margin: 8
12654 fill-column: 74
12655 version-control: never
12656 coding: utf-8
12657 End: