Remove --enable-multi-ice
[external/binutils.git] / gdb / ChangeLog
1 2018-09-04  Tom Tromey  <tom@tromey.com>
2
3         * configure: Rebuild.
4         * configure.ac: Remove multi-ice code.
5
6 2018-09-04  Tom Tromey  <tom@tromey.com>
7
8         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
9         (ada-exp.o): Update.
10
11 2018-09-04  Tom Tromey  <tom@tromey.com>
12
13         * Makefile.in (printcmd.o, target-float.o): Remove.
14         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
15
16 2018-09-04  Tom Tromey  <tom@tromey.com>
17
18         * gnulib/Makefile.in: Remove obsolete comment.
19         * Makefile.in: Remove obsolete comment.
20
21 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
22
23         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
24         line with '+'.
25
26 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
27
28         * riscv-tdep.c: Add 'prologue-value.h' include.
29         (struct riscv_unwind_cache): New struct.
30         (riscv_debug_unwinder): New global.
31         (riscv_scan_prologue): Update arguments, capture register details
32         from prologue scan.
33         (riscv_skip_prologue): Reformat arguments line, move end of
34         prologue calculation into riscv_scan_prologue.
35         (riscv_frame_cache): Update return type, create
36         riscv_unwind_cache, scan the prologue, and fill in remaining cache
37         details.
38         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
39         (riscv_frame_prev_register): Use the trad_frame within the
40         riscv_unwind_cache.
41         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
42         flag.
43
44 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
45
46         * trad-frame.h (trad_frame_set_realreg): Declare.
47         (trad_frame_set_addr): Declare.
48         * trad-frame.c (trad_frame_set_realreg): Define new function.
49         (trad_frame_set_addr): Define new function.
50         (trad_frame_set_reg_realreg): Use new function.
51         (trad_frame_set_reg_addr): Use new function.
52
53 2018-09-01  Keith Seitz  <keiths@redhat.com>
54
55         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
56         pulongest instead of "%lld".
57         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
58         ATTRIBUTE_UNUSED.
59
60 2018-08-31  Tom Tromey  <tom@tromey.com>
61
62         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
63         variant part type.
64
65 2018-08-31  Pedro Alves  <palves@redhat.com>
66
67         * gdbarch.h: Regenerate.
68
69 2018-08-31  Pedro Alves  <palves@redhat.com>
70
71         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
72         * target.h (Hardware watchpoint interfaces): Describe
73         continuable/steppable/non-steppable watchpoints.
74         * gdbarch.h, gdbarch.c: Regenerate.
75
76 2018-08-31  Pedro Alves  <palves@redhat.com>
77
78         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
79         Delete.
80         * s390-linux-nat.c
81         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
82         * target.h (target_ops::have_continuable_watchpoint): Delete.
83         (target_have_continuable_watchpoint): Delete.
84         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
85         * target-delegates.c: Regenerate.
86
87 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
88
89         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
90         the files present in "gnulib/import/m4/".
91
92 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
93
94         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
95         c.sw, c.swsp, and c.sdsp.
96
97 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
98
99         * riscv-tdep.c (struct riscv_inferior_data): Delete.
100         (riscv_read_misa_reg): Don't cache value read into inferior data.
101         (riscv_new_inferior_data): Delete.
102         (riscv_inferior_data_cleanup): Delete.
103         (riscv_inferior_data): Delete.
104         (riscv_invalidate_inferior_data): Delete.
105         (_initialize_riscv_tdep): Remove initialisation of inferior data.
106
107 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
108
109         * compile/compile-cplus-types.c
110         (compile_cplus_instance::leave_scope): Take the address of scope
111         object.
112         (compile_cplus_instance::convert_qualified_base): Compare quals
113         to 0.
114
115 2018-08-30  Keith Seitz  <keiths@redhat.com>
116
117         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
118         Use "%s" and host_address_to_string instead of "%p" in printf.
119
120 2018-08-29  Keith Seitz  <keiths@redhat.com>
121
122         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
123         and compile-cplus-types.c.
124         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
125         * c-lang.c (cplus_language_defn): Set C++ compile functions.
126         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
127         Declare.
128         * compile/compile-c-support.c: Include compile-cplus.h.
129         (load_libcompile): Templatize.
130         (get_compile_context): "New" function.
131         (c_get_compile_context): Use get_compile_context.
132         (cplus_get_compile_context): New function.
133         (cplus_push_user_expression, cplus_pop_user_expression)
134         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
135         (cplus_compute_program): Define new structs/functions.
136         * compile/compile-cplus-symmbols.c: New file.
137         * compile/compile-cplus-types.c: New file.
138         * compile/compile-cplus.h: New file.
139         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
140         Declare.
141         * compile/compile-object-load.c (get_out_value_type): Use
142         strncmp_iw when comparing symbol names.
143         (compile_object_load): Add mst_bss and mst_data.
144         * compile/compile.c (_initialize_compile): Remove
145         -Wno-implicit-function-declaration from `compile_args'.
146         * compile/gcc-cp-plugin.h: New file.
147         * NEWS: Mention C++ compile support and new debug options.
148
149 2018-08-29  Keith Seitz  <keiths@redhat.com>
150
151         * linespec.c (collect_info::add_symbol): Make virtual.
152         (struct symbol_searcher_collect_info): New struct.
153         (symbol_searcher::find_all_symbols): New method.
154         * symtab.h (class symbol_searcher): New class.
155
156 2018-08-29  Keith Seitz  <keiths@redhat.com>
157
158         * linespec.c (struct linespec) <function_symbols, label_symbols>:
159         Change to vector of block_symbol.  Update all users.
160         (struct collect_info) <symbols>: Likewise.
161         (collect_info::add_symbol): Take block_symbol as argument.
162         Update all callers.
163         (decode_compound_collector) <m_symbols>: Change type to vector
164         of block_symbol.  Update all users.
165         (decode_compound_collector::operator ()): Change parameter type
166         to block_symbol.
167         (find_method, find_function_symbols, find_linespec_symbols)
168         (find_label_symbols_in_block, find_label_symbols): Change symbol
169         vectors to block_symbol vectors.
170         * symtab.h (symbol_found_callback_ftype): Change parameter type to
171         block_symbol.
172
173 2018-08-29  Keith Seitz  <keiths@redhat.com>
174
175         * linespec.c (symbolp): Remove typedef and VEC definitions.
176         (bound_minimal_symbol_d): Likewise.
177
178 2018-08-29  Keith Seitz  <keiths@redhat.com>
179
180         * linespec.c (decode_compound_collector::decode_compound_collector):
181         Remove initialization for `m_symtabs'.
182         (decode_compound_collector::release_symbols): Change return type
183         to std::vector.  Update all callers.
184         (class decode_compound_collector) <m_symbols>: Change type to
185         std::vector.
186         (lookup_prefix_sym): Change return type to std::vector.  Update all
187         callers.
188         (compare_symbols): Remove.
189         (std_compare_symbols): Rename to `compare_symbols'.
190         (find_method): Change `sym_classes' parameter to std::vector.
191         Update all callers.  Use std::sort to sort sym_classes.
192         (find_linespec_symbols): Remove cleanup.
193
194 2018-08-29  Keith Seitz  <keiths@redhat.com>
195
196         * linespec.c (struct linespec) <minimal_symbols>: Change type to
197         std::vector.  Update all users.
198         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
199         (struct collect_info) <minimal_symbols>: Likewise.
200         (compare_msymbols): Return bool.  Change parameters to const
201         bound_minimal_symbol references.
202         (find_method, find_function_symbols, find_linespec_symbols): Change
203         `minsyms' parameter to std::vector.  Update all callers.
204
205 2018-08-29  Keith Seitz  <keiths@redhat.com>
206
207         * linespec.c (struct linespec) <label_symbols>: Change type to
208         std::vector.  Update all users.
209         (find_label_symbols_in_block): Change `result' parameter to
210         std::vector.  Update all callers.
211         (find_label_symbols): Return std::vector.  Update all callers.
212
213 2018-08-29  Keith Seitz  <keiths@redhat.com>
214
215         * linespec.c (struct linespec) <function_symbols>: Change type to
216         std::vector.  Update all users.
217         (struct collect_info) <function_symbols>: Likewise.
218         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
219         (std_compare_symbols): New function.
220         (find_method, find_function_symbols, find_linespec_symbols)
221         (find_label_symbols_in_block): Change `symbols' parameter to
222         std::vector.  Update all callers.
223         (find_label_symbols): Likewise for `function_symbols' and
224         `label_funcs_ret'.
225
226 2018-08-29  Keith Seitz  <keiths@redhat.com>
227
228         * linespec.c (symtab_vector_up): Define.
229         (struct linespec) <file_symtabs>: Change type to std::vector *.
230         Update all uses.
231         (struct collect_info) <file_symtabs>: Likewise.
232         (collect_symtabs_from_filename): Return symtab_vector_up.
233         Update all callers.
234         (decode_objc): Remove cleanup.
235         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
236         (symtab_collector::release_symtabs): Return symtab_vector_up.
237         Update all callers.
238         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
239         Update all users.
240         (collect_symtabs_from_filename, symtabs_from_filename): Return
241         symtab_vector_up.  Update all callers.
242
243 2018-08-29  Tom Tromey  <tom@tromey.com>
244
245         * csky-tdep.c (csky_analyze_prologue): Use
246         core_addr_to_string_nz.
247
248 2018-08-29  Tom Tromey  <tom@tromey.com>
249
250         * windows-nat.c (struct xlate_exception) <them>: Change type to
251         DWORD.
252         (xlate): Fix formatting.  Remove last entry.
253         (struct xlate_exception, xlate): Comment out.
254         (windows_nat_target::resume): Use ranged for.
255
256 2018-08-29  Jim Wilson  <jimw@sifive.com>
257
258         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
259         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
260         of NT_PRFPREG.
261         (riscv_linux_nat_target::store_registers): Likewise.
262
263 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
264
265         PR gdb/23555
266         PR gdb/23558
267         * gnulib/aclocal.m4: Regenerate.
268         * gnulib/config.in: Regenerate.
269         * gnulib/configure: Regenerate.
270         * gnulib/import/Makefile.am: Update.
271         * gnulib/import/Makefile.in: Update.
272         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
273         * gnulib/import/_Noreturn.h: ... this.
274         * gnulib/import/alloca.in.h: Update.
275         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
276         * gnulib/import/arg-nonnull.h: ... this.
277         * gnulib/import/assure.h: Update.
278         * gnulib/import/at-func.c: Update.
279         * gnulib/import/basename-lgpl.c: Update.
280         * gnulib/import/extra/snippet/c++defs.h: Rename to...
281         * gnulib/import/c++defs.h: ... this.
282         * gnulib/import/canonicalize-lgpl.c: Update.
283         * gnulib/import/cdefs.h: Update.
284         * gnulib/import/chdir-long.c: Update.
285         * gnulib/import/chdir-long.h: Update.
286         * gnulib/import/cloexec.c: Update.
287         * gnulib/import/cloexec.h: Update.
288         * gnulib/import/close.c: Update.
289         * gnulib/import/closedir.c: Update.
290         * gnulib/import/config.charset: Update.
291         * gnulib/import/dirent-private.h: Update.
292         * gnulib/import/dirent.in.h: Update.
293         * gnulib/import/dirfd.c: Update.
294         * gnulib/import/dirname-lgpl.c: Update.
295         * gnulib/import/dirname.h: Update.
296         * gnulib/import/dosname.h: Update.
297         * gnulib/import/dup-safer-flag.c: Update.
298         * gnulib/import/dup-safer.c: Update.
299         * gnulib/import/dup.c: Update.
300         * gnulib/import/dup2.c: Update.
301         * gnulib/import/errno.in.h: Update.
302         * gnulib/import/error.c: Update.
303         * gnulib/import/error.h: Update.
304         * gnulib/import/exitfail.c: Update.
305         * gnulib/import/exitfail.h: Update.
306         * gnulib/import/extra/update-copyright: Update.
307         * gnulib/import/fchdir.c: Update.
308         * gnulib/import/fcntl.c: Update.
309         * gnulib/import/fcntl.in.h: Update.
310         * gnulib/import/fd-hook.c: Update.
311         * gnulib/import/fd-hook.h: Update.
312         * gnulib/import/fd-safer-flag.c: Update.
313         * gnulib/import/fd-safer.c: Update.
314         * gnulib/import/fdopendir.c: Update.
315         * gnulib/import/filename.h: Update.
316         * gnulib/import/filenamecat-lgpl.c: Update.
317         * gnulib/import/filenamecat.h: Update.
318         * gnulib/import/flexmember.h: Update.
319         * gnulib/import/float+.h: Update.
320         * gnulib/import/float.c: Update.
321         * gnulib/import/float.in.h: Update.
322         * gnulib/import/fnmatch.c: Update.
323         * gnulib/import/fnmatch.in.h: Update.
324         * gnulib/import/fnmatch_loop.c: Update.
325         * gnulib/import/fpucw.h: Update.
326         * gnulib/import/frexp.c: Update.
327         * gnulib/import/frexpl.c: Update.
328         * gnulib/import/fstat.c: Update.
329         * gnulib/import/fstatat.c: Update.
330         * gnulib/import/getcwd-lgpl.c: Update.
331         * gnulib/import/getcwd.c: Update.
332         * gnulib/import/getdtablesize.c: Update.
333         * gnulib/import/getlogin_r.c: Update.
334         * gnulib/import/getprogname.c: Update.
335         * gnulib/import/getprogname.h: Update.
336         * gnulib/import/gettext.h: Update.
337         * gnulib/import/gettimeofday.c: Update.
338         * gnulib/import/glob-libc.h: Update.
339         * gnulib/import/glob.c: Update.
340         * gnulib/import/glob.in.h: Update.
341         * gnulib/import/glob_internal.h: Update.
342         * gnulib/import/glob_pattern_p.c: Update.
343         * gnulib/import/globfree.c: Update.
344         * gnulib/import/hard-locale.c: Update.
345         * gnulib/import/hard-locale.h: Update.
346         * gnulib/import/intprops.h: Update.
347         * gnulib/import/inttypes.in.h: Update.
348         * gnulib/import/isnan.c: Update.
349         * gnulib/import/isnand-nolibm.h: Update.
350         * gnulib/import/isnand.c: Update.
351         * gnulib/import/isnanl-nolibm.h: Update.
352         * gnulib/import/isnanl.c: Update.
353         * gnulib/import/itold.c: Update.
354         * gnulib/import/libc-config.h: Update.
355         * gnulib/import/limits.in.h: Update.
356         * gnulib/import/localcharset.c: Update.
357         * gnulib/import/localcharset.h: Update.
358         * gnulib/import/localtime-buffer.c: Update.
359         * gnulib/import/localtime-buffer.h: Update.
360         * gnulib/import/lstat.c: Update.
361         * gnulib/import/m4/00gnulib.m4: Update.
362         * gnulib/import/m4/__inline.m4: Update.
363         * gnulib/import/m4/absolute-header.m4: Update.
364         * gnulib/import/m4/alloca.m4: Update.
365         * gnulib/import/m4/builtin-expect.m4: Update.
366         * gnulib/import/m4/canonicalize.m4: Update.
367         * gnulib/import/m4/chdir-long.m4: Update.
368         * gnulib/import/m4/close.m4: Update.
369         * gnulib/import/m4/closedir.m4: Update.
370         * gnulib/import/m4/configmake.m4: Update.
371         * gnulib/import/m4/d-ino.m4: Update.
372         * gnulib/import/m4/d-type.m4: Update.
373         * gnulib/import/m4/dirent_h.m4: Update.
374         * gnulib/import/m4/dirfd.m4: Update.
375         * gnulib/import/m4/dirname.m4: Update.
376         * gnulib/import/m4/double-slash-root.m4: Update.
377         * gnulib/import/m4/dup.m4: Update.
378         * gnulib/import/m4/dup2.m4: Update.
379         * gnulib/import/m4/eealloc.m4: Update.
380         * gnulib/import/m4/environ.m4: Update.
381         * gnulib/import/m4/errno_h.m4: Update.
382         * gnulib/import/m4/error.m4: Update.
383         * gnulib/import/m4/exponentd.m4: Update.
384         * gnulib/import/m4/exponentl.m4: Update.
385         * gnulib/import/m4/extensions.m4: Update.
386         * gnulib/import/m4/extern-inline.m4: Update.
387         * gnulib/import/m4/fchdir.m4: Update.
388         * gnulib/import/m4/fcntl-o.m4: Update.
389         * gnulib/import/m4/fcntl.m4: Update.
390         * gnulib/import/m4/fcntl_h.m4: Update.
391         * gnulib/import/m4/fdopendir.m4: Update.
392         * gnulib/import/m4/filenamecat.m4: Update.
393         * gnulib/import/m4/flexmember.m4: Update.
394         * gnulib/import/m4/float_h.m4: Update.
395         * gnulib/import/m4/fnmatch.m4: Update.
396         * gnulib/import/m4/fnmatch_h.m4: Update.
397         * gnulib/import/m4/fpieee.m4: Update.
398         * gnulib/import/m4/frexp.m4: Update.
399         * gnulib/import/m4/frexpl.m4: Update.
400         * gnulib/import/m4/fstat.m4: Update.
401         * gnulib/import/m4/fstatat.m4: Update.
402         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
403         * gnulib/import/m4/getcwd-path-max.m4: Update.
404         * gnulib/import/m4/getcwd.m4: Update.
405         * gnulib/import/m4/getdtablesize.m4: Update.
406         * gnulib/import/m4/getlogin.m4: Update.
407         * gnulib/import/m4/getlogin_r.m4: Update.
408         * gnulib/import/m4/getpagesize.m4: Update.
409         * gnulib/import/m4/getprogname.m4: Update.
410         * gnulib/import/m4/gettimeofday.m4: Update.
411         * gnulib/import/m4/glibc21.m4: Update.
412         * gnulib/import/m4/glob.m4: Update.
413         * gnulib/import/m4/glob_h.m4: Update.
414         * gnulib/import/m4/gnulib-cache.m4: Update.
415         * gnulib/import/m4/gnulib-common.m4: Update.
416         * gnulib/import/m4/gnulib-comp.m4: Update.
417         * gnulib/import/m4/gnulib-tool.m4: Update.
418         * gnulib/import/m4/hard-locale.m4: Update.
419         * gnulib/import/m4/include_next.m4: Update.
420         * gnulib/import/m4/inttypes-pri.m4: Update.
421         * gnulib/import/m4/inttypes.m4: Update.
422         * gnulib/import/m4/isnand.m4: Update.
423         * gnulib/import/m4/isnanl.m4: Update.
424         * gnulib/import/m4/largefile.m4: Update.
425         * gnulib/import/m4/limits-h.m4: Update.
426         * gnulib/import/m4/localcharset.m4: Update.
427         * gnulib/import/m4/locale-fr.m4: Update.
428         * gnulib/import/m4/locale-ja.m4: Update.
429         * gnulib/import/m4/locale-zh.m4: Update.
430         * gnulib/import/m4/localtime-buffer.m4: Update.
431         * gnulib/import/m4/longlong.m4: Update.
432         * gnulib/import/m4/lstat.m4: Update.
433         * gnulib/import/m4/malloc.m4: Update.
434         * gnulib/import/m4/malloca.m4: Update.
435         * gnulib/import/m4/math_h.m4: Update.
436         * gnulib/import/m4/mbrtowc.m4: Update.
437         * gnulib/import/m4/mbsinit.m4: Update.
438         * gnulib/import/m4/mbsrtowcs.m4: Update.
439         * gnulib/import/m4/mbstate_t.m4: Update.
440         * gnulib/import/m4/memchr.m4: Update.
441         * gnulib/import/m4/memmem.m4: Update.
442         * gnulib/import/m4/mempcpy.m4: Update.
443         * gnulib/import/m4/memrchr.m4: Update.
444         * gnulib/import/m4/mkdir.m4: Update.
445         * gnulib/import/m4/mkstemp.m4: Update.
446         * gnulib/import/m4/mmap-anon.m4: Update.
447         * gnulib/import/m4/mode_t.m4: Update.
448         * gnulib/import/m4/msvc-inval.m4: Update.
449         * gnulib/import/m4/msvc-nothrow.m4: Update.
450         * gnulib/import/m4/multiarch.m4: Update.
451         * gnulib/import/m4/nocrash.m4: Update.
452         * gnulib/import/m4/off_t.m4: Update.
453         * gnulib/import/m4/onceonly.m4: Update.
454         * gnulib/import/m4/open-cloexec.m4: Update.
455         * gnulib/import/m4/open.m4: Update.
456         * gnulib/import/m4/openat.m4: Update.
457         * gnulib/import/m4/opendir.m4: Update.
458         * gnulib/import/m4/pathmax.m4: Update.
459         * gnulib/import/m4/rawmemchr.m4: Update.
460         * gnulib/import/m4/readdir.m4: Update.
461         * gnulib/import/m4/readlink.m4: Update.
462         * gnulib/import/m4/realloc.m4: Update.
463         * gnulib/import/m4/rename.m4: Update.
464         * gnulib/import/m4/rewinddir.m4: Update.
465         * gnulib/import/m4/rmdir.m4: Update.
466         * gnulib/import/m4/save-cwd.m4: Update.
467         * gnulib/import/m4/secure_getenv.m4: Update.
468         * gnulib/import/m4/setenv.m4: Update.
469         * gnulib/import/m4/signal_h.m4: Update.
470         * gnulib/import/m4/ssize_t.m4: Update.
471         * gnulib/import/m4/stat-time.m4: Update.
472         * gnulib/import/m4/stat.m4: Update.
473         * gnulib/import/m4/std-gnu11.m4: Update.
474         * gnulib/import/m4/stdbool.m4: Update.
475         * gnulib/import/m4/stddef_h.m4: Update.
476         * gnulib/import/m4/stdint.m4: Update.
477         * gnulib/import/m4/stdio_h.m4: Update.
478         * gnulib/import/m4/stdlib_h.m4: Update.
479         * gnulib/import/m4/strchrnul.m4: Update.
480         * gnulib/import/m4/strdup.m4: Update.
481         * gnulib/import/m4/strerror.m4: Update.
482         * gnulib/import/m4/string_h.m4: Update.
483         * gnulib/import/m4/strstr.m4: Update.
484         * gnulib/import/m4/strtok_r.m4: Update.
485         * gnulib/import/m4/sys_socket_h.m4: Update.
486         * gnulib/import/m4/sys_stat_h.m4: Update.
487         * gnulib/import/m4/sys_time_h.m4: Update.
488         * gnulib/import/m4/sys_types_h.m4: Update.
489         * gnulib/import/m4/tempname.m4: Update.
490         * gnulib/import/m4/time_h.m4: Update.
491         * gnulib/import/m4/unistd-safer.m4: Update.
492         * gnulib/import/m4/unistd_h.m4: Update.
493         * gnulib/import/m4/warn-on-use.m4: Update.
494         * gnulib/import/m4/wchar_h.m4: Update.
495         * gnulib/import/m4/wchar_t.m4: Update.
496         * gnulib/import/m4/wctype_h.m4: Update.
497         * gnulib/import/m4/wint_t.m4: Update.
498         * gnulib/import/malloc.c: Update.
499         * gnulib/import/malloc/scratch_buffer.h: Update.
500         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
501         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
502         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
503         * gnulib/import/malloca.c: Update.
504         * gnulib/import/malloca.h: Update.
505         * gnulib/import/malloca.valgrind: Update.
506         * gnulib/import/math.in.h: Update.
507         * gnulib/import/mbrtowc.c: Update.
508         * gnulib/import/mbsinit.c: Update.
509         * gnulib/import/mbsrtowcs-impl.h: Update.
510         * gnulib/import/mbsrtowcs-state.c: Update.
511         * gnulib/import/mbsrtowcs.c: Update.
512         * gnulib/import/memchr.c: Update.
513         * gnulib/import/memmem.c: Update.
514         * gnulib/import/mempcpy.c: Update.
515         * gnulib/import/memrchr.c: Update.
516         * gnulib/import/mkdir.c: Update.
517         * gnulib/import/mkstemp.c: Update.
518         * gnulib/import/msvc-inval.c: Update.
519         * gnulib/import/msvc-inval.h: Update.
520         * gnulib/import/msvc-nothrow.c: Update.
521         * gnulib/import/msvc-nothrow.h: Update.
522         * gnulib/import/open.c: Update.
523         * gnulib/import/openat-die.c: Update.
524         * gnulib/import/openat-priv.h: Update.
525         * gnulib/import/openat-proc.c: Update.
526         * gnulib/import/openat.c: Update.
527         * gnulib/import/openat.h: Update.
528         * gnulib/import/opendir.c: Update.
529         * gnulib/import/pathmax.h: Update.
530         * gnulib/import/pipe-safer.c: Update.
531         * gnulib/import/rawmemchr.c: Update.
532         * gnulib/import/readdir.c: Update.
533         * gnulib/import/readlink.c: Update.
534         * gnulib/import/realloc.c: Update.
535         * gnulib/import/ref-add.sin: Update.
536         * gnulib/import/ref-del.sin: Update.
537         * gnulib/import/rename.c: Update.
538         * gnulib/import/rewinddir.c: Update.
539         * gnulib/import/rmdir.c: Update.
540         * gnulib/import/same-inode.h: Update.
541         * gnulib/import/save-cwd.c: Update.
542         * gnulib/import/save-cwd.h: Update.
543         * gnulib/import/scratch_buffer.h: Update.
544         * gnulib/import/secure_getenv.c: Update.
545         * gnulib/import/setenv.c: Update.
546         * gnulib/import/signal.in.h: Update.
547         * gnulib/import/stat-time.c: Update.
548         * gnulib/import/stat-time.h: Update.
549         * gnulib/import/stat-w32.c: Update.
550         * gnulib/import/stat-w32.h: Update.
551         * gnulib/import/stat.c: Update.
552         * gnulib/import/stdbool.in.h: Update.
553         * gnulib/import/stddef.in.h: Update.
554         * gnulib/import/stdint.in.h: Update.
555         * gnulib/import/stdio.in.h: Update.
556         * gnulib/import/stdlib.in.h: Update.
557         * gnulib/import/str-two-way.h: Update.
558         * gnulib/import/strchrnul.c: Update.
559         * gnulib/import/strdup.c: Update.
560         * gnulib/import/streq.h: Update.
561         * gnulib/import/strerror-override.c: Update.
562         * gnulib/import/strerror-override.h: Update.
563         * gnulib/import/strerror.c: Update.
564         * gnulib/import/string.in.h: Update.
565         * gnulib/import/stripslash.c: Update.
566         * gnulib/import/strnlen1.c: Update.
567         * gnulib/import/strnlen1.h: Update.
568         * gnulib/import/strstr.c: Update.
569         * gnulib/import/strtok_r.c: Update.
570         * gnulib/import/sys_stat.in.h: Update.
571         * gnulib/import/sys_time.in.h: Update.
572         * gnulib/import/sys_types.in.h: Update.
573         * gnulib/import/tempname.c: Update.
574         * gnulib/import/tempname.h: Update.
575         * gnulib/import/time.in.h: Update.
576         * gnulib/import/unistd--.h: Update.
577         * gnulib/import/unistd-safer.h: Update.
578         * gnulib/import/unistd.in.h: Update.
579         * gnulib/import/unsetenv.c: Update.
580         * gnulib/import/verify.h: Update.
581         * gnulib/import/extra/snippet/warn-on-use.h: Update.
582         * gnulib/import/wchar.in.h: Update.
583         * gnulib/import/wctype.in.h: Update.
584         * gnulib/import/xalloc-oversized.h: Update.
585         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
586         "53e2c179f26a890fa6685af4b6c1397ee370433b".
587
588 2018-08-16  Gary Benson <gbenson@redhat.com>
589
590         PR gdb/13000:
591         * gdb/main.c (captured_main_1): Exit with nonzero status
592         in batch mode if the last command to be executed failed.
593         * NEWS: Mention the above.
594
595 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
596
597         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
598         end of warning message.
599
600 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
601
602         PR gdb/22943:
603         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
604         (aarch64_extract_return_value): Use
605         aapcs_is_vfp_call_or_return_candidate.
606         (aarch64_return_in_memory): Likewise.
607         (aarch64_store_return_value): Likewise.
608
609 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
610
611         * aarch64-tdep.c
612         (aapcs_is_vfp_call_or_return_candidate): Make static
613         (pass_in_v_or_stack): Remove function.
614         (pass_in_v_vfp_candidate): New function.
615         (aarch64_push_dummy_call): Check for float register candidates.
616
617 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
618
619         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
620         (aapcs_is_vfp_call_or_return_candidate_1): New function.
621         (aapcs_is_vfp_call_or_return_candidate): Likewise.
622
623 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
624
625         PR build/23399
626         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
627         (struct ipa_sym_addresses): Rename to...
628         (struct ipa_sym_addresses_common): ... this.
629         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
630
631 2018-08-28  Tom Tromey  <tom@tromey.com>
632
633         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
634         (token_fifo): Now a std::vector.
635         (yylex, c_parse): Update.
636         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
637         (token_fifo): Now a std::vector.
638         (yylex, d_parse): Update.
639         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
640         (token_fifo): Now a std::vector.
641         (yylex, go_parse): Update.
642
643 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
644
645         * parser-defs.h (struct type_stack) <elements>: Change type to
646         std::vector<union type_stack_elt>.
647         <depth, size>: Remove.
648         * parse.c (parse_exp_in_context_1): Adjust.
649         (type_stack_reserve): Remove.
650         (check_type_stack_depth): Remove.
651         (insert_into_type_stack): Adjust to std::vector.
652         (insert_type): Likewise.
653         (push_type): Likewise.
654         (push_type_int): Likewise.
655         (insert_type_address_space): Likewise.
656         (pop_type): Likewise.
657         (pop_type_int): Likewise.
658         (pop_typelist): Likewise.
659         (pop_type_stack): Likewise.
660         (append_type_stack): Likewise.
661         (push_type_stack): Likewise.
662         (get_type_stack): Likewise.
663         (type_stack_cleanup): Likewise.
664         (push_typelist): Likewise.
665         (follow_types): Likewise.
666         (_initialize_parse): Likewise.
667
668 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
669
670         * NEWS: Mention csky target.
671
672 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
673             Hafiz Abid Qadeer  <abidh@codesourcery.com>
674             Don Breazeal  <donb@codesourcery.com>
675
676         * csky-linux-tdep.c: New file.
677         * csky-tdep.c: Likewise.
678         * csky-tdep.h: Likewise.
679         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
680         csky-tdep.o.
681         (HFILES_NO_SRCDIR): Add csky-tdep.h.
682         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
683         * configure.tgt: Add csky support.
684
685 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
686
687         * python/py-framefilter.c (py_print_frame): Print frame architecture
688         when printing on an MI output.
689
690 2018-08-27  Tom Tromey  <tom@tromey.com>
691
692         PR build/23087:
693         * configure: Rebuild.
694         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
695
696 2018-08-27  Tom Tromey  <tom@tromey.com>
697
698         * aarch64-linux-tdep.c
699         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
700         casts to int.
701
702 2018-08-27  Tom Tromey  <tom@tromey.com>
703
704         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
705         unsigned.
706         (ppc64_standard_linkage1, ppc64_standard_linkage2)
707         (ppc64_standard_linkage3, ppc64_standard_linkage4)
708         (ppc64_standard_linkage5, ppc64_standard_linkage6)
709         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
710         unsigned.
711
712 2018-08-27  Tom Tromey  <tom@tromey.com>
713
714         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
715         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
716
717 2018-08-27  Tom Tromey  <tom@tromey.com>
718
719         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
720         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
721         ULONGEST_MAX.
722         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
723         ULONGEST_MAX.
724         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
725         ULONGEST_MAX.
726         * sparc-linux-tdep.c (sparc32_linux_sigframe)
727         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
728         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
729         ULONGEST_MAX.
730         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
731         (ppc64_linux_sigaction_tramp_frame)
732         (ppc32_linux_sighandler_tramp_frame)
733         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
734         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
735         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
736         * mn10300-linux-tdep.c (am33_linux_sigframe)
737         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
738         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
739         * mips-linux-tdep.c (mips_linux_o32_sigframe)
740         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
741         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
742         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
743         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
744         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
745         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
746         * microblaze-linux-tdep.c
747         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
748         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
749         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
750         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
751         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
752         * common/common-types.h (ULONGEST_MAX): New define.
753         (CORE_ADDR_MAX): Fix formatting.
754         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
755         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
756         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
757         (arm_linux_rt_sigreturn_tramp_frame)
758         (arm_eabi_linux_sigreturn_tramp_frame)
759         (arm_eabi_linux_rt_sigreturn_tramp_frame)
760         (thumb2_eabi_linux_sigreturn_tramp_frame)
761         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
762         (arm_linux_restart_syscall_tramp_frame)
763         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
764         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
765         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
766         ULONGEST_MAX.
767         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
768
769 2018-08-27  Tom Tromey  <tom@tromey.com>
770
771         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
772         CORE_ADDR_MAX.
773         * mips-tdep.c (mips_deal_with_atomic_sequence)
774         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
775         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
776         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
777         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
778         CORE_ADDR_MAX.
779         * aarch64-tdep.c (aarch64_software_single_step): Use
780         CORE_ADDR_MAX.
781
782 2018-08-27  Tom Tromey  <tom@tromey.com>
783
784         * linespec.c (complete_linespec_component): Add cast to "char".
785         * completer.c (completion_tracker::build_completion_result): Add
786         cast to "char".
787
788 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
789
790         * solist.h (struct solist, struct target_so_ops): Fix
791         indentation.
792
793 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
794
795         * ada-tasks.c (ada_task_info_s): Remove typedef.
796         (DEF_VEC_O(ada_task_info_s)): Remove.
797         (struct ada_tasks_inferior_data): Initialize fields.
798         <task_list>: Make an std::vector.
799         (get_ada_tasks_inferior_data): Allocate with new.
800         (ada_get_task_number): Adjust.
801         (get_task_number_from_id): Likewise.
802         (valid_task_id): Likewise.
803         (ada_get_task_info_from_ptid): Likewise.
804         (iterate_over_live_ada_tasks): Likewise.
805         (add_ada_task): Likewise.
806         (read_known_tasks): Likewise.
807         (ada_build_task_list): Likewise.
808         (print_ada_task_info): Likewise.
809         (info_task): Likewise.
810         (task_command_1): Likewise.
811
812 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
813
814         * ada-lang.c (add_angle_brackets): Return std::string.
815
816 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
817
818         * python/py-threadevent.c (py_get_event_thread): Initialize
819         pythread.
820
821 2018-08-24  Pedro Alves  <palves@redhat.com>
822
823         * python/py-bpevent.c (create_breakpoint_event_object): Use
824         copy-initialization.
825         * python/py-continueevent.c (emit_continue_event): Use
826         copy-initialization.
827         * python/py-exitedevent.c (create_exited_event_object): Return a
828         gdbpy_ref<>.
829         (emit_exited_event): Use copy-initialization.
830         * python/py-inferior.c (python_new_inferior)
831         (python_inferior_deleted, add_thread_object): Use
832         copy-initialization.
833         * python/py-infevents.c (create_inferior_call_event_object)
834         (create_register_changed_event_object)
835         (create_memory_changed_event_object): Return a gdbpy_ref<>.
836         (emit_inferior_call_event, emit_memory_changed_event)
837         (emit_register_changed_event): Use copy-initialization.
838         * python/py-newobjfileevent.c (create_new_objfile_event_object):
839         Return a gdbpy_ref<>.
840         (emit_new_objfile_event): Use copy-initialization.
841         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
842         (emit_clear_objfiles_event): Use copy-initialization.
843         * python/py-signalevent.c (create_signal_event_object): Use
844         copy-initialization.
845         * python/py-threadevent.c (create_thread_event_object): Use
846         copy-initialization.
847
848 2018-08-24  Pedro Alves  <palves@redhat.com>
849             Simon Marchi  <simon.marchi@ericsson.com>
850
851         PR gdb/23379
852         * python/py-continueevent.c: Include "gdbthread.h".
853         (create_continue_event_object): Add intro comment.  Add 'ptid'
854         parameter.  Use it to find thread to pass to
855         create_thread_event_object.
856         (emit_continue_event): Pass PTID down to
857         create_continue_event_object.
858         * python/py-event.h (py_get_event_thread): Declare.
859         (create_thread_event_object): Remove default from 'thread'
860         parameter.
861         * python/py-stopevent.c (create_stop_event_object): Use
862         py_get_event_thread.
863         * python/py-threadevent.c (get_event_thread): Rename to ...
864         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
865         and use it to find the thread.
866         (create_thread_event_object): Assert that THREAD isn't null.
867         Don't find the event thread here.
868
869 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
870
871         * block.h (blockrange, blockranges): New struct declarations.
872         (struct block): Add new field named `ranges'.
873         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
874         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
875         macros for accessing ranges in struct block.
876         (make_blockranges): New declaration.
877         block.c (make_blockranges): New function.
878         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
879         for block.
880         * symtab.h (find_pc_partial_function): Add new parameter `block'.
881         * blockframe.c (cache_pc_function_block): New static global.
882         (clear_pc_function_cache): Clear cache_pc_function_block.
883         (find_pc_partial_function): Move comment to symtab.h.  Add
884         support for non-contiguous blocks.
885         * cli/cli-cmds.c (block.h): Include.
886         (print_disassembly): Handle printing of non-contiguous blocks.
887         (disassemble_current_function): Likewise.
888         (disassemble_command): Likewise.
889
890         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
891         BLOCK_START.
892         * blockframe.c (get_pc_function_start): Likewise.
893         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
894         (gcc_symbol_address): Likewise.
895         * compile/compile-object-run.c (compile_object_run): Likewise.
896         * compile/compile.c (get_expr_block_and_pc): Likewise.
897         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
898         (func_addr_to_tail_call_list): Likewise.
899         * findvar.c (default_read_var_value): Likewise.
900         * inline-frame.c (inline_frame_this_id): Likewise.
901         (skip-inline_frames): Likewise.
902         * infcmd.c (until_next_command): Likewise.
903         * linespec.c (convert_linespec_to_sals): Likewise.
904         * parse.c (parse_exp_in_context_1): Likewise.
905         * printcmd.c (build_address_symbolic): likewise.
906         (info_address_command): Likewise.
907         symtab.c (find_function_start_sal): Likewise.
908         (skip_prologue_sal): Likewise.
909         (find_function_alias_target): Likewise.
910         (find_gnu_ifunc): Likewise.
911         * stack.c (find_frame_funname): Likewise.
912         * symtab.c (fixup_symbol_section): Likewise.
913         (find_function_start_sal): Likewise.
914         (skip_prologue_sal): Likewsie.
915         (find_function_alias_target): Likewise.
916         (find_gnu_ifunc): Likewise.
917         * tracepoint.c (info_scope_command): Likewise.
918         * value.c (value_fn_field): Likewise.
919
920         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
921         in place of find_pc_partial_function.
922         * blockframe.c (find_function_entry_range_from_pc): New function.
923         * symtab.h (find_function_entry_range_from_pc): Declare and document.
924         * objfiles.c (objfile_relocate1): Relocate start and end addresses
925         for each range in a block.
926
927
928 2018-08-23  Xavier Roirand  <roirand@adacore.com>
929
930         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
931         incrementation.
932
933 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
934
935         * solib-svr4.c (read_program_headers_from_bfd): Return
936         gdb::optional<gdb::byte_vector>.
937         (svr4_exec_displacement): Adjust.
938
939 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
940
941         * solib-svr4.c (read_program_header): Return
942         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
943         (find_program_interpreter): Return
944         gdb::optional<gdb::byte_vector>.
945         (scan_dyntag_auxv): Adjust.
946         (enable_break): Adjust.
947         (svr4_exec_displacement): Adjust.
948
949 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
950
951         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
952         * inf-child.c (inf_child_target::terminal_save_inferior): New.
953
954 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
955
956         * guile/scm-string.c (gdbscm_scm_from_printf): Use
957         string_vprintf.
958         * guile/scm-utils.c (gdbscm_printf): Likewise.
959         * serial.c (serial_printf): Likewise.
960         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
961
962 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
963
964         * stack.c (print_frame): Print frame architecture when printing on
965         an MI output.
966         * NEWS: Mention new "arch" attribute in frame output.
967
968 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
969
970         * arch/aarch64.h (aarch64_regnum): Update comment.
971
972 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
973
974         * NEWS: Add SVE to 8.2 section.
975
976 2018-08-21  Pedro Alves  <palves@redhat.com>
977
978         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
979         out from gdbscm_parse_function_args.
980         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
981         gdbscm_parse_function_args_1.
982
983 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
984
985         PR gdb/17816
986         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
987         operator.
988
989 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
990
991         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
992
993 2018-08-19  Michael Spang  <spang@google.com>
994
995         PR gdb/11786
996         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
997         for PT_TLS segments.
998
999 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1000
1001         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1002         dwarf_variable_value.
1003         * dwarf2-frame.c (class dwarf_expr_executor):
1004         Add override for dwarf_variable_value.
1005         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1006         (class symbol_needs_eval_context): Likewise.
1007         (indirect_synthetic_pointer): Add forward declaration.
1008         (sect_variable_value): New function.
1009         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1010         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1011         for DW_OP_GNU_variable_value.
1012
1013 2018-08-16  Tom Tromey  <tom@tromey.com>
1014
1015         * top.c (read_command_file): Update.
1016         (command_line_input): Remove "repeat" argument.
1017         * ada-lang.c (get_selections): Update.
1018         * linespec.c (decode_line_2): Update.
1019         * defs.h (command_line_input): Remove argument.
1020         * cli/cli-script.c (read_next_line): Update.
1021         * python/py-gdb-readline.c: Update.
1022
1023 2018-08-17  Tom Tromey  <tom@tromey.com>
1024
1025         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1026         command_line_input.
1027
1028 2018-08-15  Tom Tromey  <tom@tromey.com>
1029
1030         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1031
1032 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1033
1034         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1035         If used, use find_pc_partial_function to find address range
1036         to disassemble.
1037         * mi/mi-main.c (mi_cmd_list_features): Report
1038         "data-disassemble-a-option" feature.
1039         * NEWS: Mention new -data-disassemble option -a.
1040
1041 2018-08-13  Tom Tromey  <tom@tromey.com>
1042
1043         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1044
1045 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1046
1047         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1048         (aarch64_linux_collect_sve_regset): Likewise.
1049         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1050         * regcache.h (regcache_map_entry_size): New function.
1051
1052 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1053
1054         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1055         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1056         (SVE_HEADER_VL_LENGTH): Likewise.
1057         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1058         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1059         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1060         (SVE_HEADER_SIZE_OFFSET): Likewise.
1061         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1062         (SVE_HEADER_VL_OFFSET): Likewise.
1063         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1064         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1065         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1066         (SVE_HEADER_SIZE): Likewise.
1067         (aarch64_linux_core_read_vq): Add function.
1068         (aarch64_linux_core_read_description): Check for SVE section.
1069
1070 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1071
1072         * aarch64-fbsd-tdep.c
1073         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1074         collect_size.
1075         * aarch64-linux-tdep.c
1076         (aarch64_linux_iterate_over_regset_sections): Likewise.
1077         * alpha-linux-tdep.c
1078         (alpha_linux_iterate_over_regset_sections):
1079         * alpha-nbsd-tdep.c
1080         (alphanbsd_iterate_over_regset_sections): Likewise.
1081         * amd64-fbsd-tdep.c
1082         (amd64fbsd_iterate_over_regset_sections): Likewise.
1083         * amd64-linux-tdep.c
1084         (amd64_linux_iterate_over_regset_sections): Likewise.
1085         * arm-bsd-tdep.c
1086         (armbsd_iterate_over_regset_sections): Likewise.
1087         * arm-fbsd-tdep.c
1088         (arm_fbsd_iterate_over_regset_sections): Likewise.
1089         * arm-linux-tdep.c
1090         (arm_linux_iterate_over_regset_sections): Likewise.
1091         * corelow.c (get_core_registers_cb): Likewise.
1092         (core_target::fetch_registers): Likewise.
1093         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1094         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1095         * gdbarch.h (void): Regenerate.
1096         * gdbarch.sh: Add supply_size and collect_size.
1097         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1098         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1099         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1100         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1101         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1102         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1103         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1104         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1105         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1106         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1107         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1108         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1109         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1110         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1111         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1112         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1113         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1114         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1115         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1116         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1117         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1118         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1119         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1120         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1121         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1122         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1123         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1124         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1125         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1126         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1127
1128 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1129
1130         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1131         with string_printf.
1132
1133 2018-08-10  Keith Seitz  <keiths@redhat.com>
1134
1135         * compile/compile-c-support.c (add_code_header, add_code_footer):
1136         Move into policy class.
1137         (c_push_user_expression, pop_user_expression_nop)
1138         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1139         (compile_program): New host class.
1140         (c_compile_program): New typedef.
1141         (c_compute_porgram): Use c_compile_program.
1142
1143 2018-08-10  Keith Seitz  <keiths@redhat.com>
1144
1145         * compile/compile-internal.h (compile_instance::~compile_instance):
1146         Remove calls to htab_delete.
1147         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1148         * compile.c (compile_instance::compile_instance): Initialize
1149         htab unique pointers.
1150         (compile_instance::get_cached_type, compile_instance::insert_type)
1151         (compile_instance::error_symbol_once): Update for unique_ptr.
1152
1153 2018-08-10  Keith Seitz  <keiths@redhat.com>
1154
1155         * compile/compile-c-symbols.c (struct symbol_error)
1156         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1157         (compile_instance::insert_symbol_error)
1158         (compile_instance::error_symbol_once): Move to ...
1159         * compile/compile.c: ... here.
1160
1161 2018-08-10  Keith Seitz  <keiths@redhat.com>
1162
1163         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1164         instead of `new_compile_instance'.
1165         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1166         Update description.
1167         If the symbol error map is not initialized, create it.
1168         (generate_c_for_for_one_symbol): Do not check/initialize
1169         the symbol error map.
1170         * compile/compile-c-types.c (compile_c_instance): Make a class.
1171         Update all callers.
1172         (compile_instance::compile_instance): Initialize the type cache.
1173         (get_cached_type): New function.
1174         (insert_type): Update description.
1175         (compile_c_instance::m_default_cflags): Define.
1176         (convert_type): Update description.  Use get_cached_type.
1177         (delete_instance): Moved to destructor.
1178         (new_compile_instance): Moved to constructor.
1179         * compile/compile-c.h (compile_c_instance): Make class inheriting
1180         from compile_instance.
1181         <base>: Remove field.
1182         <type_map, symbol_err_map>: Move to base class.
1183         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1184         * compile/compile-internal.h (compile_instance): Make class.
1185         <type_map_t, symbol_err_map_t>: Define.
1186         <fe>: Rename to `m_gcc_fe'.
1187         <scope, block, gcc_target_options>: Add `m_' prefix.
1188         <m_type_map, m_symbol_err_map>: New fields, moved from
1189         compile_c_instance.
1190         <destroy>: Remove.
1191         (convert_type, new_compile_instance): Remove.
1192         * compile/compile.c (cleanup_compile_instance): Remove.
1193         (compile_to_object): Use unique_ptr to eliminate cleanups.
1194         (compile_instance::set_print_callback, compile_instance::version)
1195         (compile_instance::set_verbose)
1196         (compile_instance::set_driver_filename)
1197         (compile_instance::set_triplet_regexp)
1198         (compile_instance::set_arguments)
1199         (compile_instance::set_source_file)
1200         (compile_instance::compile): Define.
1201
1202 2018-08-10  Keith Seitz  <keiths@redhat.com>
1203
1204         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1205         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1206         gcc-c-fe.def to define C plugin.
1207         (delete_instance): Delete `c_plugin'.
1208         (new_compile_instance): Initialize `c_plugin'.
1209         * compile/compile-c.h: Include gcc_c_plugin.h.
1210         (struct compile_c_instance) <c_plugin>: New member.
1211         * gcc-c-plugin.h: New file.
1212         Update all callers with API change.
1213
1214 2018-08-10  Keith Seitz  <keiths@redhat.com>
1215
1216         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1217         (HFILES_NO_SRCDIR): ... to here.
1218         Add compile-internal.h and compile-c.h.
1219         * compile/compile-c-support.c: Include compile-c.h.
1220         * compile/compile-c-symbols.c: Include compile-c.h.
1221         (generate_c_for_variable_locations): Update comment.
1222         * compile/compile-c-types.c: Include compile-c.h.
1223         * compile/compile-c.h: New file -- moved C language declarations
1224         from other files here.
1225         * compile/compile-internal.h: Do not include hashtab.h or
1226         common/enum-flags.h.
1227         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1228         (gcc_convert_symbol, gcc_symbol_address)
1229         (generate_c_for_variable_locations, c_get_mode_for_size)
1230         (c_get_range_decl_name): Definitions moved to compile-c.h.
1231         * compile/compile-loc2c.c: Include compile-c.h.
1232
1233 2018-08-10  Keith Seitz  <keiths@redhat.com>
1234
1235         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1236         (c_symbol_substitution_name): ... this.
1237         Update all callers.
1238
1239 2018-08-10  Keith Seitz  <keiths@redhat.com>
1240
1241         * compile/compile-c-support.c (c_compute_program): Use
1242         unique_xmalloc_ptr to eliminate cleanup.
1243         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1244         Return a unique_xmalloc_ptr and eliminate cleanup.
1245         * compile/compile-internal.h (generate_c_for_variable_locations):
1246         Return unique_xmalloc_ptr and update description.
1247
1248 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1249
1250         * corelow.c (core_target::get_core_register_section): Rename
1251         min_size to section_min_size.
1252
1253 2018-08-09  Jim Wilson  <jimw@sifive.com>
1254
1255         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1256         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1257         * NEWS: Mention new GNU/Linux RISC-V target.
1258         * configure.host: Add riscv*-*-linux*.
1259         * configure.nat: Add riscv*.
1260         * configure.tgt: Add riscv*-*-linux*.
1261         * riscv-linux-nat.c: New file.
1262         * riscv-linux-tdep.c: New file.
1263
1264 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1265
1266         * infrun.c (resume): Make static, add forward declaration.
1267         (proceed): Update header comment.
1268         * infrun.h (resume): Delete declaration.
1269
1270 2018-08-09  Tom Tromey  <tom@tromey.com>
1271
1272         * riscv-tdep.h: Minor formatting fixes.
1273
1274 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1275
1276         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1277         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1278         (test_mkdir_recursive): Likewise.
1279         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1280
1281 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1282
1283         * valarith.c (value_subscripted_rvalue): If an array is not in
1284         memory, and we don't know the upper bound, then we can't know that
1285         the requested element exists or not.
1286
1287 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1288
1289         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1290         (target_options_to_string): Add comment.
1291
1292 2018-08-08  Tom Tromey  <tom@tromey.com>
1293
1294         * unittests/scoped_mmap-selftests.c: Check result of "write".
1295
1296 2018-08-08  Jim Wilson  <jimw@sifive.com>
1297
1298         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1299         (decode_register_index_short): New.
1300         (decode_j_type_insn, decode_cj_type_insn): New.
1301         (decode_b_type_insn, decode_cb_type_insn): New.
1302         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1303         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1304         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1305         is_c_sw_insn instead of is_sw_insn.
1306         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1307         (riscv_software_single_step): New.
1308         * riscv-tdep.h (riscv_software_single_step): Declare.
1309
1310         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1311         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1312
1313 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1314
1315         PR gdb/18050:
1316         * target.c (dispose_inferior): Don't dispose of inferiors that are
1317         already killed.
1318
1319 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1320
1321         * remote.c (remote_target::download_tracepoint): Change char* to
1322         const char*.
1323
1324 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1325
1326         * target.h (target_options_to_string): Return an std::string.
1327         * target.c (str_comma_list_concat_elem): Return void, use
1328         std::string.
1329         (do_option): Likewise.
1330         (target_options_to_string): Return an std::string.
1331         * linux-nat.c (linux_nat_target::wait): Adjust.
1332         * target-debug.h (target_debug_print_options): Adjust.
1333
1334 2018-08-07  Tom Tromey  <tom@tromey.com>
1335
1336         * Makefile.in (CPPFLAGS): New variable.
1337         (INTERNAL_CPPFLAGS): Use it.
1338
1339 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1340
1341         * NEWS: Mention the index cache.
1342
1343 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1344
1345         * common/pathstuff.h (get_standard_cache_dir): New.
1346         * common/pathstuff.c (get_standard_cache_dir): New.
1347         * build-id.h (build_id_to_string): New.
1348         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1349         DEBUG_STR_SUFFIX): Move to here.
1350         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1351         DEBUG_STR_SUFFIX): Move from there.
1352         (write_psymtabs_to_index): Make non-static, add basename
1353         parameter.  Write to temporary files, rename when done.
1354         (save_gdb_index_command): Adjust call to
1355         write_psymtabs_to_index.
1356         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1357         field.
1358         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1359         (get_gdb_index_contents_from_cache): New.
1360         (get_gdb_index_contents_from_cache_dwz): New.
1361         (dwarf2_initialize_objfile): Read index from cache.
1362         (dwarf2_build_psymtabs): Save to index.
1363         * dwarf-index-cache.h: New file.
1364         * dwarf-index-cache.c: New file.
1365         * dwarf-index-write.h: New file.
1366
1367 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1368
1369         * gnulib/aclocal.m4: Re-generate.
1370         * gnulib/config.in: Re-generate.
1371         * gnulib/configure: Re-generate.
1372         * gnulib/import/Makefile.am: Re-generate.
1373         * gnulib/import/Makefile.in: Re-generate.
1374         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1375         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1376         * gnulib/import/m4/mkdir.m4: New file.
1377         * gnulib/import/mkdir.c: New file.
1378         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1379         module.
1380
1381 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1382
1383         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1384         * common/scoped_mmap.c: New file.
1385         * common/scoped_mmap.h (destroy): New method.
1386         (~scoped_mmap, reset): Use destroy.
1387         (scoped_mmap): New move constructor.
1388         (mmap_file): New declaration.
1389         * unittests/scoped_mmap-selftests.c (test_normal,
1390         test_invalid_filename, run_tests): New functions.
1391         (_initialize_scoped_mmap_selftests): Register selftest.
1392
1393 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1394
1395         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1396         (read_gdb_index_from_buffer): ... this.  Remove section
1397         parameter, add buffer parameter.
1398         (get_gdb_index_contents_ftype,
1399         get_gdb_index_contents_dwz_ftype): New typedefs.
1400         (dwarf2_read_gdb_index): Add callback parameters to get the
1401         index contents.
1402         (get_gdb_index_contents_from_section): New.
1403         (dwarf2_initialize_objfile): Update call to
1404         dwarf2_read_gdb_index.
1405
1406 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1407
1408         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1409         (gdb_open_cloexec): Likewise.
1410         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1411         (commandline_from_pid): Likewise.
1412         (linux_xfer_osdata_threads): Likewise.
1413         (linux_xfer_osdata_fds): Likewise.
1414         * ada-lang.c (is_package_name): Likewise.
1415         * auxv.c (procfs_xfer_auxv): Likewise.
1416         * breakpoint.c (print_one_breakpoint_location): Use
1417         uiout::field_fmt.
1418         (print_one_catch_solib): Use string_printf.
1419         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1420         (add_pe_forwarded_sym): Likewise.
1421         * dwarf2read.c (create_type_unit_group): Likewise.
1422         (build_error_marker_type): Likewise.
1423         * infcall.c (get_function_name): Likewise.
1424         * valprint.c (print_converted_chars_to_obstack): Likewise.
1425         * xtensa-tdep.c (xtensa_register_type): Likewise.
1426
1427 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1428
1429         * remote.c (remote_target::download_tracepoint): Fix format
1430         string errors.
1431
1432 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1433
1434         * tracefile.c: Include common/byte-vector.h.
1435         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1436         with trace_regblock_size if needed.  Update uses of buf.
1437
1438 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1439
1440         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1441         std::vector<unsigned char>.
1442         * tracepoint.c (collection_list::collection_list): Remove
1443         m_regs_mask initializer from initializer list.  Resize
1444         m_regs_mask using the largest remote register number.
1445         (collection_list::add_remote_register): Remove size check on
1446         m_regs_mask.  Use at to access element.
1447         (collection_list::stringify): Change type of temp_buf to
1448         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1449         stringify the register mask.  Use pack_hex_byte for the register
1450         mask.
1451
1452 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1453
1454         * tracepoint.h (class collection_list) <add_register>: Remove.
1455         <add_remote_register, add_ax_registers, add_local_register>:
1456         Declare.
1457         <add_memrange>: Add scope parameter.
1458         * tracepoint.c (encode_actions_1): Likewise.
1459         (collection_list::add_register): Rename to ...
1460         (collection_list::add_remote_register): ... this.  Update
1461         comment.
1462         (collection_list::add_ax_registers, add_local_register): New
1463         methods.
1464         (collection_list::add_memrange): Add scope parameter.  Call
1465         add_local_register instead of add_register.
1466         (finalize_tracepoint_aexpr): New function.
1467         (collection_list::collect_symbol): Update calls to add_memrange.
1468         Call add_local_register instead of add_register.  Call
1469         add_ax_registers.  Call finalize_tracepoint_aexpr.
1470         (encode_actions_1): Get remote regnos for $reg action.  Call
1471         add_remote_register, add_ax_registers, and add_local_register.
1472         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1473         (validate_actionline): Call finalize_tracepoint_aexpr.
1474
1475 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1476
1477         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1478         Replace array buf with gdb::char_vector buf, of size
1479         get_remote_packet_size ().  Replace references to buf and
1480         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1481         and xsnprintf with snprintf.  Raise errors if the buffer is too
1482         small.
1483
1484 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1485
1486         * remote.c (remote_target::download_tracepoint): Fix the has_more
1487         predicate in the QTDP action list iteration.
1488
1489 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1490
1491         * remote.c (remote_target::download_tracepoint): Fix indentation
1492         in for block.
1493
1494 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1495
1496         * proc-api.c (_initialize_proc_api): Remove c, unused.
1497         * procfs.c (procfs_init_inferior): Remove signals, unused.
1498         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1499         unused.
1500
1501 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1502             Andrew Burgess  <andrew.burgess@embecosm.com>
1503
1504         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1505         'W_STOPCODE (0)' as this could be ambiguous.
1506
1507 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1508
1509         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1510         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1511         "ai_socktype").
1512
1513 2018-08-02  Tom Tromey  <tom@tromey.com>
1514
1515         PR symtab/16842.
1516         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1517         symbols.
1518         (process_structure_scope): Likewise.
1519
1520 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1521
1522         PR gdb/22629:
1523         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1524         kill inferior.
1525
1526 2018-08-02  Tom Tromey  <tom@tromey.com>
1527
1528         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1529         (darwin_suspend_inferior, darwin_resume_inferior)
1530         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1531         (darwin_check_new_threads): Check result of get_darwin_inferior.
1532
1533 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1534
1535         GDB 8.1.1 released.
1536
1537 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1538
1539         * varobj.c (varobj_get_path_expr_parent): Report an error if
1540         parent is a dynamic varobj.
1541
1542 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1543
1544         * gnulib/aclocal.m4: Re-generate.
1545         * gnulib/config.in: Re-generate.
1546         * gnulib/configure: Re-generate.
1547         * gnulib/import/Makefile.in: Re-generate.
1548         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1549         * gnulib/import/m4/onceonly.m4: Re-generate.
1550
1551 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1552
1553         * target-descriptions.c (struct xml_test_tdesc): New.
1554         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1555         (record_xml_tdesc): Update.
1556         (maintenance_check_xml_descriptions): Update.
1557         * target-descriptions.h (record_xml_tdesc): Update comment.
1558
1559 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1560
1561         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1562         checking array bounds are defined.
1563
1564 2018-07-30  Tom Tromey  <tom@tromey.com>
1565
1566         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1567         irreflexivity violation.
1568
1569 2018-07-30  Tom Tromey  <tom@tromey.com>
1570
1571         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1572         * value.c (unpack_long): Remove lint code.
1573         * valops.c (value_ind): Remove lint code.
1574         * valarith.c (value_x_binop, value_x_unop, value_equal)
1575         (value_pos): Remove lint code.
1576
1577 2018-07-28  Tom de Vries  <tdevries@suse.de>
1578
1579         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1580         with undefined upper bound as <optimized out>.
1581
1582 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1583
1584         * gcore.in: Rename variable "name" to "prefix".  Expand
1585         "usage" text.
1586
1587 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1588
1589         * windows-nat.c (windows_nat_target::create_inferior): Update to
1590         call close() in global namespace.
1591
1592 2018-07-26  Tom Tromey  <tom@tromey.com>
1593
1594         * dwarf-index-write.c (add_address_entry): Don't add objfile
1595         offsets.
1596         * dbxread.c (find_stab_function): Rename from
1597         find_stab_function_addr.  Return a bound_minimal_symbol.
1598         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1599         Don't add objfile offsets.
1600         (end_psymtab): Use raw_text_low, raw_text_high,
1601         MSYMBOL_VALUE_RAW_ADDRESS.
1602         (read_ofile_symtab): Update.
1603         (process_one_symbol): Update.
1604         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1605         offsets.
1606         (dw2_relocate): Remove.
1607         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1608         searching addrmap.
1609         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1610         Update.
1611         (process_psymtab_comp_unit_reader, add_partial_symbol)
1612         (add_partial_subprogram, dwarf2_ranges_read): Update.
1613         (load_partial_dies): Update.
1614         (add_address_entry): Don't add objfile offsets.
1615         (dwarf2_build_include_psymtabs): Update.
1616         (create_addrmap_from_aranges): Don't add objfile offsets.
1617         (dw2_find_pc_sect_compunit_symtab): Update.
1618         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1619         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1620         Update.
1621         (parse_partial_symbols): Don't add objfile offsets.  Use
1622         raw_text_low, raw_text_high.  Update.
1623         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1624         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1625         or call 'relocate' quick function.  Clear psymbol_map.
1626         * psympriv.h (struct partial_symbol) <address>: Add section
1627         offset.
1628         <set_unrelocated_address>: Rename from set_address.
1629         <raw_text_low, raw_text_high>: New methods.
1630         <text_low, text_high>: Add objfile parameter.
1631         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1632         set_unrelocated_address.
1633         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1634         (find_pc_psymbol): Update.
1635         (fixup_psymbol_section, relocate_psymtabs): Remove.
1636         (dump_psymtab, psym_functions): Update.
1637         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1638         parameter.
1639         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1640         (start_psymtab_common): Update.
1641         * symfile-debug.c (debug_qf_relocate): Remove.
1642         (debug_sym_quick_functions): Update.
1643         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1644         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1645         Update.
1646
1647 2018-07-26  Tom Tromey  <tromey@redhat.com>
1648
1649         * dbxread.c (end_psymtab): Use text_high_valid and
1650         text_low_valid.
1651         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1652         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1653         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1654         Update comment.
1655         <text_low_valid, text_high_valid>: New fields.
1656         <set_text_low, set_text_high>: Update.
1657         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1658
1659 2018-07-26  Tom Tromey  <tom@tromey.com>
1660
1661         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1662         Update.
1663         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1664         textlow and texthigh fields.
1665         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1666         Update.
1667         * mdebugread.c (parse_lines, parse_partial_symbols)
1668         (psymtab_to_symtab_1): Update.
1669         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1670         Rename fields.  Update comment.  Now private.
1671         <text_low, text_high, set_text_low, set_text_high>: New methods.
1672         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1673         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1674         (start_psymtab_common, maintenance_info_psymtabs)
1675         (maintenance_check_psymtabs): Update.
1676         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1677         texthigh fields.
1678         (scan_xcoff_symtab): Update.
1679
1680 2018-07-26  Tom Tromey  <tromey@redhat.com>
1681
1682         * psympriv.h (struct partial_symbol) <unrelocated_address,
1683         address, set_address>: New methods.
1684         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1685         (fixup_psymbol_section, relocate_psymtabs): Update.
1686         (print_partial_symbols): Add 'objfile' parameter.  Update.
1687         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1688         Update.
1689
1690 2018-07-26  Tom Tromey  <tom@tromey.com>
1691
1692         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1693         (debug_names::write_psymbols): Update.
1694         * psympriv.h (struct partial_symbol): Derive from
1695         general_symbol_info.
1696         <obj_section>: New method.
1697         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1698         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1699         (find_pc_sect_psymbol, fixup_psymbol_section)
1700         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1701         (print_partial_symbols, recursively_search_psymtabs)
1702         (compare_psymbols, psymbol_hash, psymbol_compare)
1703         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1704         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1705
1706 2018-07-26  Tom Tromey  <tromey@redhat.com>
1707
1708         * dbxread.c (end_psymtab): Remove dead code.
1709
1710 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1711
1712         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1713         DWARF unwinders are disabled.
1714         * dwarf2-frame.c: Add dwarf2read.h include.
1715         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1716         disabled.
1717         (dwarf2_frame_unwinders_enabled_p): Define.
1718         (show_dwarf_unwinders_enabled_p): New function.
1719         (_initialize_dwarf2_frame): Register switch to control DWARF
1720         unwinder use.
1721         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1722         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1723         (show_dwarf_cmdlist): Remove static keyword.
1724         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1725         (show_dwarf_cmdlist): Declare.
1726         * NEWS: Document new feature.
1727
1728 2018-07-26  Tom de Vries  <tdevries@suse.de>
1729
1730         PR breakpoints/23366
1731         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1732
1733 2018-07-26  Tom de Vries  <tdevries@suse.de>
1734
1735         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1736         DW_AT_count can't be translated to a dynamic prop.
1737
1738 2018-07-25  Tom de Vries  <tdevries@suse.de>
1739
1740         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1741         try/catch.
1742
1743 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1744
1745         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1746
1747 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1748
1749         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1750
1751 2018-07-24  Keith Seitz  <keiths@redhat.comt
1752
1753         PR symtab/23010
1754         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1755         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1756         instead of add_symbol_to_list.
1757         (read_file_scope): Call prepare_one_comp_unit before reading
1758         any other DIEs.
1759
1760 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1761
1762         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1763
1764 2018-07-24  Tom Tromey  <tom@tromey.com>
1765
1766         * utils.c (malloc, realloc, free): Don't declare.
1767         * configure, config.in: Rebuild.
1768         * configure.ac: Don't check for declarations of free, malloc, or
1769         realloc.
1770
1771 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1772
1773         * aarch64-linux-nat.c
1774         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1775         variable.
1776         * arm-linux-nat.c (fetch_regs): Likewise.
1777         (store_regs): Likewise.
1778         (fetch_vfp_regs): Likewise.
1779         (store_vfp_regs): Likewise.
1780         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1781         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1782         (arm_linux_nat_target::insert_watchpoint): Likewise.
1783         (arm_linux_nat_target::remove_watchpoint): Likewise.
1784         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1785         Likewise.
1786         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1787         Likewise.
1788         * ppc-linux-nat.c (fetch_register): Likewise.
1789         (fetch_all_gp_regs): Likewise.
1790         (fetch_ppc_registers): Likewise.
1791         (store_all_gp_regs): Likewise.
1792         (store_ppc_registers): Likewise.
1793         (hwdebug_insert_point): Likewise.
1794         (can_use_watchpoint_cond_accel): Likewise.
1795         * remote-sim.c (gdb_os_write_stdout): Likewise.
1796
1797 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1798             Tom Tromey  <tom@tromey.com>
1799
1800         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1801         test for it.
1802         * configure: Rebuild.
1803
1804 2018-07-22  Tom Tromey  <tom@tromey.com>
1805
1806         * regformats/regdat.sh: Define xmltarget_${name} inside
1807         #ifndef IN_PROCESS_AGENT.
1808
1809 2018-07-22  Tom Tromey  <tom@tromey.com>
1810
1811         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1812
1813 2018-07-22  Tom Tromey  <tom@tromey.com>
1814
1815         * symfile.c (reread_symbols): Notify iter, not objfile.
1816
1817 2018-07-22  Tom Tromey  <tom@tromey.com>
1818
1819         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1820         Use arch_ops.
1821         (ravenscar_thread_target::prepare_to_store): Likewise.
1822
1823 2018-07-22  Tom Tromey  <tom@tromey.com>
1824
1825         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1826         unused variable.  Call value_fetch_lazy when needed.
1827         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1828         Remove unused variable.  Call value_fetch_lazy when needed.
1829
1830 2018-07-22  Tom Tromey  <tom@tromey.com>
1831
1832         * m32c-tdep.c (mark_dma): Return void.
1833         (make_regs): Remove unused declarations.
1834
1835 2018-07-22  Tom Tromey  <tom@tromey.com>
1836
1837         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1838         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1839         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1840         bkscm_get_valid_block_smob_arg_unsafe for effect.
1841
1842 2018-07-22  Tom Tromey  <tom@tromey.com>
1843
1844         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1845         value_type.
1846
1847 2018-07-22  Tom Tromey  <tom@tromey.com>
1848
1849         * windows-nat.c (saved_context): Conditionally define.
1850         * remote.c (remote_target::remote_btrace_maybe_reopen):
1851         Conditionally declare "warned".
1852         * inflow.c (sigquit_ours): Conditionally define.
1853         (new_tty): Move "tty" declaration inside #if.
1854         * guile/guile.c (guile_datadir): Conditionally define.
1855         * charset.c (set_be_le_names): Move some declarations inside #if.
1856         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1857         #if.
1858         (parse_xml_btrace_conf): Likewise.
1859
1860 2018-07-22  Tom Tromey  <tom@tromey.com>
1861
1862         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1863
1864 2018-07-22  Tom Tromey  <tom@tromey.com>
1865
1866         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1867         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1868         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1869         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1870         * stack.c (frame_apply_level_command): Remove unused variable.
1871         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1872         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1873         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1874         unused variable.
1875         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1876         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1877         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1878         variable.
1879         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1880         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1881         variable.
1882         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1883         Remove unused variable.
1884         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1885         variable.
1886         * common/tdesc.c (print_xml_feature::visit): Remove unused
1887         variable.
1888         * compile/compile-object-load.c (store_regs): Remove unused
1889         variables.
1890         * complaints.c (clear_complaints): Remove unused variable.
1891         * corelow.c (core_target_open): Remove unused variable.
1892         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1893         variable.
1894         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1895         variable.
1896         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1897         variable.
1898         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1899         variable.
1900         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1901         variable.
1902         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1903         variable.
1904         * ia64-tdep.c (examine_prologue): Remove unused variable.
1905         * infcall.c (run_inferior_call): Remove unused variable.
1906         * inferior.c (exit_inferior): Remove unused variable.
1907         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1908         * linespec.c (decode_line_2): Remove unused variable.
1909         * linux-nat.c (super_close): Remove.
1910         * linux-tdep.c (linux_info_proc): Remove unused variable.
1911         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1912         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1913         Remove unused variable.
1914         * parse.c (find_minsym_type_and_address): Remove unused variable.
1915         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1916         variable.
1917         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1918         variable.
1919         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1920         variables.
1921         * record-btrace.c (record_btrace_target::store_registers): Remove
1922         unused variable.
1923         (cmd_show_record_btrace_cpu): Remove unused variable.
1924         * riscv-tdep.c (riscv_register_reggroup_p)
1925         (riscv_push_dummy_call, riscv_return_value): Remove unused
1926         variable.
1927         * rust-exp.y (literal): Remove unused variable.
1928         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1929         unused variable.
1930         <STRUCTOP_ANONYMOUS>: Likewise.
1931         * s390-linux-tdep.c (s390_linux_init_abi_31)
1932         (s390_linux_init_abi_64): Remove unused variable.
1933         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1934         (file_select_thread, net_windows_open, _initialize_ser_windows):
1935         Remove unused variables.
1936         * symtab.c (find_pc_sect_line): Remove unused variable.
1937         * target-memory.c (compute_garbled_blocks): Remove unused
1938         variable.
1939         (target_write_memory_blocks): Remove unused variable.
1940         * target.c (target_stack::unpush): Remove unused variables.
1941         * tracepoint.c (start_tracing, all_tracepoint_actions)
1942         (merge_uploaded_trace_state_variables)
1943         (print_one_static_tracepoint_marker): Remove unused variable.
1944         * unittests/basic_string_view/element_access/char/1.cc (test01):
1945         Remove unused variable.
1946         * windows-nat.c (windows_continue, windows_add_all_dlls)
1947         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1948         Remove unused variables.
1949
1950 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1951
1952         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1953         attr_profile in HAVE_ELF.
1954         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1955         HAVE_ELF.
1956
1957 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1958
1959         * frame.c (frame_register_unwind): Change parameter name.
1960         (frame_unwind_register): Likewise.
1961         (frame_unwind_register_value): Likewise.
1962         (frame_unwind_register_signed): Likewise.
1963         (frame_unwind_register_unsigned): Likewise.
1964         * frame.h (frame_register_unwind): Likewise.
1965         (frame_unwind_register): Likewise.
1966         (frame_unwind_register_value): Likewise.
1967         (frame_unwind_register_signed): Likewise.
1968         (frame_unwind_register_unsigned): Likewise.
1969         (frame_unwind_arch): Likewise.
1970
1971 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1972
1973         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1974         ISA maintenance.
1975
1976 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1977
1978         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1979         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1980         hand.
1981
1982 2018-07-20  Keith Seitz  <keiths@redhat.com>
1983
1984         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1985         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1986         m_compunit_symtab, m_language>: Add "m_" prefix.
1987         Update all uses.
1988         * buildsym.c: Update all uses.
1989
1990 2018-07-20  Tom Tromey  <tom@tromey.com>
1991
1992         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1993         * buildsym.h (record_line_ftype): Remove typedef.
1994
1995 2018-07-20  Tom Tromey  <tom@tromey.com>
1996
1997         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1998         (end_expandable_symtab): Likewise.
1999         (end_symtab_get_static_block): Likewise.
2000         (end_symtab_from_static_block): Likewise.
2001         * buildsym-legacy.c (augment_type_symtab): Remove.
2002         (end_expandable_symtab): Remove.
2003         (end_symtab_get_static_block): Remove.
2004         (end_symtab_from_static_block): Remove.
2005
2006 2018-07-20  Tom Tromey  <tom@tromey.com>
2007
2008         * dwarf2read.c: Include buildsym.h.
2009         (struct dwarf2_cu) <builder>: New method.
2010         (fixup_go_packaging): Update.
2011         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2012         use scoped_free_pendings.
2013         (using_directives): Add "cu" parameter, remove "language".
2014         (read_import_statement, setup_type_unit_groups, )
2015         (read_func_scope, read_lexical_block_scope)
2016         (dwarf2_record_block_ranges, read_namespace): Update.
2017         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2018         (lnp_state_machine::handle_end_sequence): Update.
2019         (class lnp_state_machine) <m_cu>: New member.
2020         <m_record_line_callback>: Remove.
2021         <m_currently_recording_lines>: New member.
2022         (lnp_state_machine::handle_set_file): Update.
2023         (noop_record_line): Remove.
2024         (dwarf_record_line_p): Add cu parameter.
2025         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2026         (lnp_state_machine::record_line)
2027         (lnp_state_machine::lnp_state_machine)
2028         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2029         (dwarf_decode_lines): Update.
2030         (dwarf2_start_subfile): Add cu parameter.
2031         (dwarf2_start_symtab, new_symbol): Update.
2032         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2033         Remove dwarf2_per_objfile parameter.
2034         (dwarf_decode_macros): Update.
2035
2036 2018-07-20  Tom Tromey  <tom@tromey.com>
2037
2038         * stabsread.c (define_symbol): Update.
2039         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2040         * dwarf2read.c (new_symbol): Update.
2041         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2042         * cp-namespace.c: Include buildsym.h.
2043         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2044         * buildsym-legacy.c (get_buildsym_compunit): New function.
2045
2046 2018-07-20  Tom Tromey  <tom@tromey.com>
2047
2048         * xcoffread.c: Include buildsym-legacy.h.
2049         * windows-nat.c: Include buildsym-legacy.h.
2050         * stabsread.c: Include buildsym-legacy.h.
2051         * mdebugread.c: Include buildsym-legacy.h.
2052         * buildsym-legacy.h: New file.
2053         * buildsym-legacy.c: New file, from buildsym.c.
2054         * go32-nat.c: Include buildsym-legacy.h.
2055         * dwarf2read.c: Include buildsym-legacy.h.
2056         * dbxread.c: Include buildsym-legacy.h.
2057         * cp-namespace.c: Include buildsym-legacy.h.
2058         * coffread.c: Include buildsym-legacy.h.
2059         * buildsym.h: Move some contents to buildsym-legacy.h.
2060         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2061         buildsym-legacy.c.
2062         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2063
2064 2018-07-20  Tom Tromey  <tom@tromey.com>
2065
2066         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2067         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2068         (buildsym_compunit::buildsym_compunit)
2069         (buildsym_compunit::~buildsym_compunit)
2070         (buildsym_compunit::get_macro_table): Define.
2071
2072 2018-07-20  Tom Tromey  <tom@tromey.com>
2073
2074         * buildsym.c (reset_symtab_globals): Remove.
2075         (buildsym_compunit::end_symtab_from_static_block): Update.
2076         (buildsym_compunit::augment_type_symtab): Update.
2077         (end_symtab_from_static_block): Call free_buildsym_compunit.
2078         (augment_type_symtab, end_symtab, end_expandable_symtab):
2079         Likewise.
2080
2081 2018-07-20  Tom Tromey  <tom@tromey.com>
2082
2083         * arch-utils.c: Do not include buildsym.h.
2084         * mipsread.c: Do not include buildsym.h.
2085         * machoread.c: Do not include buildsym.h.
2086         * elfread.c: Do not include buildsym.h.
2087
2088 2018-07-20  Tom Tromey  <tom@tromey.com>
2089
2090         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2091         initialization.
2092         (buildsym_compunit): Add new constructor.
2093         (struct buildsym_compunit) <get_last_source_file, finish_block,
2094         record_block_range, start_subfile, patch_subfile_names,
2095         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2096         set_last_source_start_addr, get_last_source_start_addr,
2097         get_local_using_directives, set_local_using_directives,
2098         get_global_using_directives, outermost_context_p,
2099         get_current_context_stack, get_context_stack_depth,
2100         get_current_subfile, get_local_symbols, get_file_symbols,
2101         get_global_symbols, record_debugformat, record_producer,
2102         push_context, pop_context, end_symtab_get_static_block,
2103         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2104         New public methods.
2105         <record_pending_block, finish_block_internal, make_blockvector,
2106         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2107         private methods.
2108         Update all users.
2109
2110 2018-05-22  Tom Tromey  <tom@tromey.com>
2111
2112         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2113         parameter.
2114         (finish_block_internal): Update.
2115
2116 2018-07-20  Tom Tromey  <tom@tromey.com>
2117
2118         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2119         parameter.
2120         (finish_block_internal): Update.
2121
2122 2018-07-20  Tom Tromey  <tom@tromey.com>
2123
2124         * buildsym.h (EXTERN): Don't define or undef.
2125         * buildsym.c (EXTERN): Don't define.
2126
2127 2018-07-20  Tom Tromey  <tom@tromey.com>
2128
2129         * buildsym.c: Remove TODO comment.
2130
2131 2018-07-20  Tom Tromey  <tom@tromey.com>
2132
2133         * coffread.c (coff_symtab_read): Update.
2134         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2135         (xcoff_new_init): Update.
2136         * mipsread.c (mipscoff_new_init): Update.
2137         * mdebugread.c (mdebug_build_psymtabs): Update.
2138         * elfread.c (elf_new_init): Update.
2139         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2140         Update.
2141         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2142         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2143         (stabsect_build_psymtabs): Update.
2144         * buildsym.h (buildsym_init): Don't declare.
2145         * buildsym.c: Update comment.
2146         (prepare_for_building): Remove.
2147         (start_symtab, restart_symtab): Update.
2148         (reset_symtab_globals): Update comment.
2149         (buildsym_init): Remove.
2150
2151 2018-07-20  Tom Tromey  <tom@tromey.com>
2152
2153         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2154         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2155         (read_enum_type, common_block_start, common_block_end)
2156         (cleanup_undefined_types_1, finish_global_stabs): Update.
2157         * mdebugread.c (psymtab_to_symtab_1): Update.
2158         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2159         (read_lexical_block_scope, new_symbol): Update.
2160         * dbxread.c (process_one_symbol): Update.
2161         * coffread.c (coff_symtab_read, process_coff_symbol)
2162         (coff_read_enum_type): Update.
2163         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2164         declare.
2165         (get_local_symbols, get_file_symbols, get_global_symbols): New
2166         functions.
2167         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2168         m_global_symbols.
2169         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2170         (~scoped_free_pendings): Update.
2171         (finish_block, prepare_for_building, reset_symtab_globals)
2172         (end_symtab_get_static_block, end_symtab_with_blockvector)
2173         (augment_type_symtab, push_context): Update.
2174         (get_local_symbols, get_file_symbols, get_global_symbols): New
2175         functions.
2176         (buildsym_init): Update.
2177
2178 2018-07-20  Tom Tromey  <tom@tromey.com>
2179
2180         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2181         (process_full_type_unit): Likewise.
2182         (dwarf2_start_symtab): Set list_in_scope.
2183
2184 2018-07-20  Tom Tromey  <tom@tromey.com>
2185
2186         * dwarf2read.c (process_psymtab_comp_unit_reader)
2187         (build_type_psymtabs_reader): Do not set list_in_scope.
2188
2189 2018-07-20  Tom Tromey  <tom@tromey.com>
2190
2191         * buildsym.c (free_pendings): Remove.
2192         (add_symbol_to_list, scoped_free_pendings)
2193         (finish_block_internal, buildsym_init): Update.
2194
2195 2018-07-20  Tom Tromey  <tom@tromey.com>
2196
2197         * xcoffread.c (read_xcoff_symtab): Update.
2198         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2199         Update.
2200         * dbxread.c (process_one_symbol): Update.
2201         * coffread.c (coff_symtab_read): Update.
2202         * buildsym.h (finish_block): Update.
2203         * buildsym.c (finish_block): Remove "listhead" argument.
2204         (end_symtab_get_static_block): Update.
2205
2206 2018-07-20  Tom Tromey  <tom@tromey.com>
2207
2208         * buildsym.h (class scoped_free_pendings): Remove constructor.
2209         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2210         method.
2211         <m_pending_block_obstack, m_pending_blocks>: New members.
2212         (pending_block_obstack, pending_blocks): Remove.
2213         (scoped_free_pendings::scoped_free_pendings): Default.
2214         (~scoped_free_pendings): Update.
2215         (free_pending_blocks): Remove.
2216         (finish_block_internal, record_pending_block, make_blockvector)
2217         (end_symtab_get_static_block, augment_type_symtab, push_context)
2218         (buildsym_init): Update.
2219
2220 2018-07-20  Tom Tromey  <tom@tromey.com>
2221
2222         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2223         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2224         members.
2225         (pending_addrmap, pending_addrmap_obstack)
2226         (pending_addrmap_interesting): Remove.
2227         (scoped_free_pendings, record_block_range, make_blockvector)
2228         (prepare_for_building, reset_symtab_globals, buildsym_init):
2229         Update.
2230
2231 2018-07-20  Tom Tromey  <tom@tromey.com>
2232
2233         * xcoffread.c (process_linenos): Update.
2234         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2235         * mdebugread.c (psymtab_to_symtab_1): Update.
2236         * dwarf2read.c (setup_type_unit_groups)
2237         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2238         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2239         * dbxread.c (process_one_symbol): Update.
2240         * coffread.c (coff_symtab_read, enter_linenos)
2241         (process_coff_symbol): Update.
2242         * buildsym.h (current_subfile): Don't declare.
2243         (get_current_subfile): Declare.
2244         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2245         member.
2246         (start_subfile, free_buildsym_compunit, push_subfile)
2247         (prepare_for_building, start_symtab): Update.
2248         (get_current_subfile): New function.
2249
2250 2018-07-20  Tom Tromey  <tom@tromey.com>
2251
2252         * coffread.c (coff_symtab_read): Update.
2253         * xcoffread.c (read_xcoff_symtab): Update.
2254         * dwarf2read.c (new_symbol): Update.
2255         (read_func_scope, read_lexical_block_scope): Update.
2256         * dbxread.c (process_one_symbol): Update.
2257         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2258         (outermost_context_p): Remove macro.
2259         (outermost_context_p, get_current_context_stack)
2260         (get_context_stack_depth): Declare.
2261         (pop_context): Return struct context_stack.
2262         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2263         member.
2264         (context_stack_size): Remove.
2265         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2266         (prepare_for_building, end_symtab_get_static_block)
2267         (augment_type_symtab, push_context): Update.
2268         (pop_context): Return struct context_stack.
2269         (outermost_context_p, get_current_context_stack)
2270         (get_context_stack_depth): New functions.
2271         (buildsym_init): Update.
2272
2273 2018-07-20  Tom Tromey  <tom@tromey.com>
2274
2275         * rust-exp.y: Now a pure parser.  Update all rules.
2276         (%union): Move earlier.
2277         (current_parser, work_obstack): Remove globals.
2278         (rust_parser, ~rust_parser): Update.
2279         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2280         lex_character, lex_number, lex_string, lex_identifier,
2281         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2282         convert_name, convert_params_to_expression,
2283         convert_ast_to_expression, ast_basic_type, ast_operation,
2284         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2285         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2286         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2287         ast_array_type, ast_slice_type, ast_reference_type,
2288         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2289         (rust_parse): Update.
2290         (rustyyerror, rustyylex): Add parser parameter.
2291         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2292         (rust_lex_stringish_test, rust_lex_test_sequence)
2293         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2294         (rust_lex_test_push_back, rust_lex_tests): Update.
2295
2296 2018-07-19  Pedro Alves  <palves@redhat.com>
2297
2298         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2299         gdb::unique_xmalloc_ptr.
2300         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2301         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2302         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2303         copy-initialization.
2304         * guile/scm-pretty-print.c (ppscm_print_children): Use
2305         gdb::unique_xmalloc_ptr instead of cleanups.
2306         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2307         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2308         gdb::unique_xmalloc_ptr.
2309         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2310         Adjust to use gdb::unique_xmalloc_ptr.
2311         * guile/scm-utils.c (extract_arg): Adjust.
2312         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2313         gdb::unique_xmalloc_ptr instead of a cleanup.
2314
2315 2018-07-19  Tom Tromey  <tom@tromey.com>
2316
2317         * utils.c (do_value_free_to_mark)
2318         (make_cleanup_value_free_to_mark): Remove.
2319         * utils.h (make_cleanup_value_free_to_mark): Remove.
2320
2321 2018-07-19  Pedro Alves  <palves@redhat.com>
2322
2323         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2324         forwarding reference.
2325
2326 2018-07-18  Pedro Alves  <palves@redhat.com>
2327
2328         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2329         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2330         cleanup.
2331
2332 2018-07-18  Pedro Alves  <palves@redhat.com>
2333
2334         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2335         exceptions.
2336         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2337         (gdbscm_wrap): New.
2338         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2339         directly instead of a cleanup.
2340         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2341         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2342         (vlscm_binop_gdbthrow): New, factored out from ...
2343         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2344         (vlscm_rich_compare): Use gdbscm_wrap.
2345         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2346         instead of a cleanup.
2347         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2348         cleanup.
2349         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2350         Use xfree directly instead of a cleanup.
2351         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2352         Adjust to use gdbscm_wrap and scoped_value_mark.
2353         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2354         (gdbscm_value_address, gdbscm_value_dereference)
2355         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2356         scoped_value_mark.
2357         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2358         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2359         scoped_value_mark.
2360         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2361         gdbscm_wrap and scoped_value_mark.
2362         (gdbscm_value_to_string): Use xfree directly instead of a
2363         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2364         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2365         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2366         scoped_value_mark.
2367         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2368         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2369         scoped_value_mark.
2370         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2371         gdbscm_wrap.
2372
2373 2018-07-18  Tom de Vries  <tdevries@suse.de>
2374
2375         * findvar.c (default_read_var_value): Also resolve dynamic type for
2376         LOC_OPTIMIZED_OUT vars.
2377
2378 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2379
2380         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2381         decoding.
2382
2383 2018-07-17  Tom Tromey  <tom@tromey.com>
2384
2385         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2386         (compute_enum_list, pascm_set_param_value_x)
2387         (gdbscm_parameter_value): Update.
2388         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2389         (gdbscm_scm_to_host_string): Update.
2390         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2391         Update.
2392         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2393         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2394         * guile/scm-string.c (gdbscm_scm_to_string): Return
2395         unique_xmalloc_ptr.
2396         (gdbscm_scm_to_host_string): Likewise.
2397
2398 2018-07-17  Tom Tromey  <tom@tromey.com>
2399
2400         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2401         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2402         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2403         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2404         unique_xmalloc_ptr.
2405
2406 2018-07-17  Tom Tromey  <tom@tromey.com>
2407
2408         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2409         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2410         Update.
2411         * guile/scm-cmd.c (cmdscm_function): Update.
2412         * guile/scm-pretty-print.c
2413         (ppscm_print_exception_unless_memory_error): Update.
2414         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2415         Return unique_xmalloc_ptr.
2416
2417 2018-07-17  Tom Tromey  <tom@tromey.com>
2418
2419         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2420         Use string_printf.
2421
2422 2018-07-17  Jim Wilson  <jimw@sifive.com>
2423
2424         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2425         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2426         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2427         unecessary braces after EF_RISCV_RVC test.  Delete call to
2428         set_gdbarch_decr_pc_after_break.
2429
2430         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2431         RISCV_LAST_FP_REGNUM + 1.
2432         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2433
2434 2018-07-17  Tom Tromey  <tom@tromey.com>
2435
2436         * configure.ac: Remove --disable-gdbcli.
2437         * configure: Rebuild.
2438         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2439         (SUBDIR_CLI_CFLAGS): Remove.
2440         (SFILES): Use SUBDIR_CLI_SRCS.
2441         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2442
2443 2018-07-17  Tom Tromey  <tom@tromey.com>
2444
2445         PR gdb/18624:
2446         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2447
2448 2018-07-16  Jim Wilson  <jimw@sifive.com>
2449
2450         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2451
2452 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2453
2454         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2455         variable.
2456         (libunwind_frame_sniffer): Likewise.
2457         (libunwind_frame_prev_register): Likewise.
2458         (libunwind_sigtramp_frame_sniffer): Likewise.
2459         * ia64-tdep.c (ia64_access_reg): Likewise.
2460         (ia64_access_rse_reg): Likewise.
2461         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2462         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2463
2464 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2465
2466         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2467
2468 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2469
2470         * remote-sim.c (gdbsim_target::close,
2471         gdbsim_target::mourn_inferior): Remove unused variables.
2472
2473 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2474
2475         * ia64-tdep.c (ktab_buf): New global.
2476         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2477         (get_kernel_table): Adjust.
2478
2479 2018-07-16  Tom Tromey  <tom@tromey.com>
2480
2481         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2482         * dwarf2read.c (using_directives, new_symbol): Use
2483         outermost_context_p.
2484         * dbxread.c (process_one_symbol): Use outermost_context_p.
2485         * coffread.c (coff_symtab_read): Use outermost_context_p.
2486
2487 2018-07-16  Tom Tromey  <tom@tromey.com>
2488
2489         * dwarf2read.c (using_directives, read_func_scope)
2490         (read_lexical_block_scope): Update.
2491         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2492         * buildsym.h (local_using_directives, global_using_directives):
2493         Don't declare.
2494         (get_local_using_directives, set_local_using_directives)
2495         (get_global_using_directives): Declare.
2496         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2497         m_global_using_directives>: New members.
2498         (finish_block_internal, prepare_for_building)
2499         (reset_symtab_globals, end_symtab_get_static_block)
2500         (push_context): Update.
2501         (get_local_using_directives, set_local_using_directives)
2502         (get_global_using_directives): New functions.
2503         (buildsym_init): Update.
2504
2505 2018-07-16  Tom Tromey  <tom@tromey.com>
2506
2507         * xcoffread.c (xcoff_initial_scan): Don't call
2508         free_pending_blocks.
2509         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2510         * buildsym.h (class scoped_free_pendings): Add constructor.
2511         (free_pending_blocks): Don't declare.
2512         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2513         (free_pending_blocks): Now static.
2514
2515 2018-07-16  Tom Tromey  <tom@tromey.com>
2516
2517         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2518         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2519         member.
2520         (struct subfile_stack): Remove.
2521         (subfile_stack): Remove.
2522         (push_subfile, pop_subfile, buildsym_init): Update.
2523
2524 2018-07-16  Tom Tromey  <tom@tromey.com>
2525
2526         * buildsym.c (push_subfile): Use gdb_assert.
2527         (pop_subfile): Use gdb_assert.
2528
2529 2018-07-16  Tom Tromey  <tom@tromey.com>
2530
2531         * buildsym.h (merge_symbol_lists): Remove.
2532         * buildsym.c (merge_symbol_lists): Remove.
2533
2534 2018-07-16  Tom Tromey  <tom@tromey.com>
2535
2536         * stabsread.c (scan_file_globals): Update comment.
2537         * stabsread.h (scan_file_globals): Move from buildsym.h.
2538         * buildsym.h (scan_file_globals): Move to stabsread.h.
2539
2540 2018-07-16  Tom Tromey  <tom@tromey.com>
2541
2542         * xcoffread.c (xcoff_new_init): Update.
2543         * mipsread.c (mipscoff_new_init): Update.
2544         * mdebugread.c (mdebug_build_psymtabs): Update.
2545         * elfread.c (elf_new_init): Update.
2546         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2547         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2548         * buildsym.h (buildsym_new_init): Don't declare.
2549         * buildsym.c (buildsym_new_init): Remove.
2550
2551 2018-07-16  Tom Tromey  <tom@tromey.com>
2552
2553         * stabsread.h (within_function): Move from buildsym.h.
2554         * stabsread.c (start_stabs): Clear within_function.
2555         * coffread.c (coff_start_symtab): Clear within_function.
2556         * buildsym.h (within_function): Move to stabsread.h.
2557         * buildsym.c (prepare_for_building): Update.
2558
2559 2018-07-16  Tom Tromey  <tom@tromey.com>
2560
2561         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2562         * dwarf2read.c (dwarf2_start_symtab): Don't set
2563         processing_gcc_compilation.
2564         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2565
2566 2018-07-16  Tom Tromey  <tom@tromey.com>
2567
2568         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2569         (next_symbol_text_func): Move from buildsym.h.
2570         * stabsread.c (hashname): Move from buildsym.c.
2571         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2572         (next_symbol_text_func, hashname): Move to stabsread.h.
2573         * buildsym.c: Don't include bcache.h
2574         (hashname): Move to stasbread.c.
2575
2576 2018-07-16  Tom Tromey  <tom@tromey.com>
2577
2578         * buildsym.h (context_stack_size): Don't declare.
2579         * buildsym.c (context_stack_size): New global.
2580
2581 2018-07-16  Tom Tromey  <tom@tromey.com>
2582
2583         * dbxread.c (processing_acc_compilation): New global.
2584         * buildsym.h (processing_acc_compilation): Don't declare.
2585
2586 2018-07-16  Tom Tromey  <tom@tromey.com>
2587
2588         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2589         * dbxread.c (read_ofile_symtab): Update.
2590         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2591         * buildsym.h (last_source_start_addr): Remove.
2592         (set_last_source_start_addr, get_last_source_start_addr):
2593         Declare.
2594         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2595         parameter.
2596         (struct buildsym_compunit) <m_last_source_start_addr>: New
2597         member.
2598         (prepare_for_building): Remove start_addr parameter.
2599         (start_symtab, restart_symtab, end_symtab_get_static_block)
2600         (end_symtab_with_blockvector): Update.
2601         (set_last_source_start_addr, get_last_source_start_addr): New
2602         functions.
2603
2604 2018-07-16  Tom Tromey  <tom@tromey.com>
2605
2606         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2607         member.
2608         (have_line_numbers): Remove.
2609         (record_line, prepare_for_building, end_symtab_get_static_block)
2610         (augment_type_symtab): Update.
2611
2612 2018-07-16  Tom Tromey  <tom@tromey.com>
2613
2614         * buildsym.c (~buildsym_compunit): Free the macro table.
2615         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2616         methods.
2617         <m_pending_macros>: New member.
2618         (pending_macros): Remove.
2619         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2620         (reset_symtab_globals, end_symtab_get_static_block)
2621         (end_symtab_with_blockvector, augment_type_symtab)
2622         (buildsym_init): Update.
2623
2624 2018-07-16  Tom Tromey  <tom@tromey.com>
2625
2626         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2627         parameter.
2628         (buildsym_compunit::set_last_source_file): New method.
2629         <m_last_source_file>: New member.
2630         (prepare_for_building): Remove "name" parameter.
2631         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2632         (last_source_file): Remove.
2633         (set_last_source_file, get_last_source_file): Update.
2634
2635 2018-07-16  Tom Tromey  <tom@tromey.com>
2636
2637         * buildsym.c (prepare_for_building): Add assert.
2638
2639 2018-07-16  Tom Tromey  <tom@tromey.com>
2640
2641         * buildsym.c (~buildsym_compunit): Update.
2642         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2643         (start_subfile, patch_subfile_names)
2644         (end_symtab_with_blockvector): Update.
2645
2646 2018-07-16  Tom Tromey  <tom@tromey.com>
2647
2648         * buildsym.c (struct buildsym_compunit): Add constructor,
2649         destructor, initializers.
2650         (start_buildsym_compunit): Remove.
2651         (free_buildsym_compunit): Use "delete".
2652         (start_symtab, restart_symtab): Use "new".
2653
2654 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2655
2656         * symfile.c (set_objfile_default_section_offset): Remove struct
2657         keyword.
2658
2659 2018-07-14  Stafford Horne  <shorne@gmail.com>
2660
2661         * (Responsible Maintainers): Add myself as or1k maintainer.
2662
2663 2018-07-13  Tom Tromey  <tom@tromey.com>
2664
2665         * symfile.c (set_objfile_default_section_offset): Use extra braces
2666         around initializer.
2667
2668 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2669
2670         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2671         non-branching basr.
2672
2673 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2674
2675         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2676         unittests/cli-utils-selftests.c
2677         * unittests/cli-utils-selftests.c: New file.
2678
2679 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2680
2681         * NEWS: Mention new commands. Mention change to 'thread apply'.
2682
2683 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2684
2685         * thread.c (thr_try_catch_cmd): New function.
2686         (thread_apply_all_command): Handle qcs flags.
2687         (thread_apply_command): Handle qcs flags.
2688         (taas_command): New function.
2689         (tfaas_command): New function.
2690         (_initialize_thread): Update to setup the new commands 'taas
2691         and 'tfaas'. Change doc string for 'thread apply'.
2692
2693 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2694
2695         * stack.c: (trailing_outermost_frame): New function, mostly
2696         extracted from backtrace_command_1.
2697         (leading_innermost_frame): New function.
2698         (backtrace_command_1): Update to call trailing_outermost_frame.
2699         (frame_apply_command_count): New function.
2700         (frame_apply_level_command): New function.
2701         (frame_apply_all_command): New function.
2702         (frame_apply_command): New function.
2703         (faas_command): New function.
2704         (frame_cmd_list): New variable.
2705         (_initialize_stack): Update to setup the new commands 'frame apply'
2706         and 'faas'.
2707
2708 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2709
2710         * cli-utils.c (number_or_range_parser::get_number): Only handle
2711         numbers or convenience var as numbers.
2712         (parse_flags): New function.
2713         (parse_flags_qcs): New function.
2714         (number_or_range_parser::finished): Ensure parsing end is detected
2715         before end of string.
2716         * cli-utils.h (parse_flags): New function.
2717         (parse_flags_qcs): New function.
2718         (number_or_range_parser): Remove m_finished bool.
2719         (number_or_range_parser::skip_range): Set m_in_range to false.
2720
2721 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2722
2723         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2724         on Windows.
2725
2726 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2727             Jan Kratochvil  <jan.kratochvil@redhat.com>
2728             Paul Fertser  <fercerpav@gmail.com>
2729             Tsutomu Seki  <sekiriki@gmail.com>
2730             Pedro Alves  <palves@redhat.com>
2731
2732         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2733         'unittests/parse-connection-spec-selftests.c'.
2734         (COMMON_SFILES): Add 'common/netstuff.c'.
2735         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2736         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2737         * common/netstuff.c: New file.
2738         * common/netstuff.h: New file.
2739         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2740         (wait_for_connect): Update comment.  New parameter
2741         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2742         Use 'sock' directly instead of 'scb->fd'.
2743         (try_connect): New function, with code from 'net_open'.
2744         (net_open): Rewrite main loop to deal with multiple
2745         sockets/addresses.  Handle IPv6-style hostnames; implement
2746         support for IPv6 connections.
2747         * unittests/parse-connection-spec-selftests.c: New file.
2748
2749 2018-07-11  Pedro Alves  <palves@redhat.com>
2750
2751         PR gdb/23377
2752         * remote.c (remote_target::remote_detach_pid): Call
2753         set_current_process.
2754
2755 2018-07-11  Pedro Alves  <palves@redhat.com>
2756
2757         * h8300-tdep.c (h8300_gdbarch_init): Remove
2758         set_gdbarch_ecoff_reg_to_regnum calls.
2759
2760 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2761
2762         PR c++/23373
2763         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2764         offsets/sizes for static members of a class/struct.
2765
2766 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2767
2768         * target-descriptions.c (tdesc_register_bitsize): Rename.
2769         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2770         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2771         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2772
2773 2018-07-10  Tom Tromey  <tom@tromey.com>
2774
2775         * breakpoint.c (moribund_locations): Now static and a
2776         std::vector.
2777         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2778         (build_bpstat_chain, update_global_location_list)
2779         (breakpoint_retire_moribund): Update.
2780         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2781         VEC.
2782
2783 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2784
2785         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2786         (riscv_register_reggroup_p): Use new function, remove unneeded
2787         parenthesis.
2788         (riscv_push_dummy_call): Extend assert to compare against xlen or
2789         flen based on register type.
2790
2791 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2792
2793         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2794
2795 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2796
2797         * remote.c (show_hardware_watchpoint_limit): New function.
2798         (show_hardware_watchpoint_length_limit): New function.
2799         (show_hardware_breakpoint_limit): New function.
2800         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2801         where appropriate, update help text.
2802
2803 2018-07-09  Tom Tromey  <tom@tromey.com>
2804
2805         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2806         (CLIBS): Don't mention NAT_CLIBS.
2807
2808 2018-07-09  Tom Tromey  <tom@tromey.com>
2809
2810         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2811         (LIBGDB_OBS, clean mostlyclean): Update.
2812         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2813
2814 2018-07-09  Tom Tromey  <tom@tromey.com>
2815
2816         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2817         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2818         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2819
2820 2018-07-09  Tom Tromey  <tom@tromey.com>
2821
2822         * Makefile.in (ALLDEPFILES): Remove exec.c.
2823         (COMMON_OBS): Remove exec.o.
2824         (COMMON_SFILES): Add exec.c.
2825
2826 2018-07-09  Tom Tromey  <tom@tromey.com>
2827
2828         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2829
2830 2018-07-09  Tom Tromey  <tom@tromey.com>
2831
2832         * Makefile.in (clean mostlyclean): Remove stamp-version.
2833         (version.c): Depend on stamp-version.
2834         (stamp-version): New rule, from version.c rule.
2835
2836 2018-07-09  Tom Tromey  <tom@tromey.com>
2837
2838         * Makefile.in (init.c): Depend on stamp-init.
2839         (stamp-init): New rule, from init.c rule.
2840         (clean mostlyclean): Remove stamp-init.
2841
2842 2018-07-09  Tom Tromey  <tom@tromey.com>
2843
2844         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2845         SUBDIR_GCC_COMPILE_SRCS.
2846
2847 2018-07-09  Tom Tromey  <tom@tromey.com>
2848
2849         * Makefile.in (init.c): Remove some unused sed rules.
2850
2851 2018-07-09  Tom Tromey  <tom@tromey.com>
2852
2853         * Makefile.in (TSOBS): Remove.
2854         (INIT_FILES): Update.
2855         (LIBGDB_OBS): Update.
2856         (COMMON_SFILES): Add inflow.c.
2857         (SFILES): Remove inflow.c.
2858
2859 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2860
2861         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2862
2863 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2864
2865         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2866         get_saveloc_name, is_signal_frame_name, step_name,
2867         init_remote_name, create_addr_space_name,
2868         destroy_addr_space_name, search_unwind_table_name,
2869         find_dyn_list_name): Constify.
2870
2871 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2872
2873         * darwin-nat.c (darwin_pthread_kill): New function.
2874         (darwin_resume_thread): Use darwin_pthread_kill.
2875
2876 2018-07-05  Tom de Vries  <tdevries@suse.de>
2877
2878         * macroexp.c (macro_buffer) <operator=>: New member function.
2879
2880 2018-07-04  Tom Tromey  <tom@tromey.com>
2881
2882         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2883
2884 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2885
2886         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2887         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2888         * maint.c: Likewise.
2889         * top.c: Likewise.
2890
2891 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2892
2893         * NEWS: Create a new section for the next release branch.
2894         Rename the section of the current branch, now that it has
2895         been cut.
2896
2897 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2898
2899         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2900         * version.in: Bump version to 8.2.50.DATE-git.
2901
2902 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2903             Pedro Alves  <palves@redhat.com>
2904
2905         * linux-nat.c (linux_init_ptrace): Rename to ...
2906         (linux_init_ptrace_procfs): ... this.  Call
2907         linux_proc_init_warnings.
2908         (linux_nat_target::post_attach)
2909         (linux_nat_target::post_startup_inferior): Adjust.
2910         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2911         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2912
2913 2018-07-04  Tom de Vries  <tdevries@suse.de>
2914
2915         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2916         check ...
2917         (read_comp_unit_head): ... here.
2918
2919 2018-07-03  Tom Tromey  <tom@tromey.com>
2920
2921         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2922         (stop_tracing, tstatus_command)
2923         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2924         (print_one_static_tracepoint_marker): Update.
2925         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2926         std::vector.
2927         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2928         VEC.
2929         (all_tracepoints, static_tracepoints_here): Return std::vector.
2930
2931 2018-07-03  Tom Tromey  <tom@tromey.com>
2932
2933         * common/ptid.c (ptid_equal): Remove.
2934         * common/ptid.h (ptid_equal): Don't declare.
2935         * ada-tasks.c: Update.
2936         * breakpoint.c: Update.
2937         * common/agent.c: Update.
2938         * corelow.c: Update.
2939         * darwin-nat-info.c: Update.
2940         * darwin-nat.c: Update.
2941         * dcache.c: Update.
2942         * dtrace-probe.c: Update.
2943         * dummy-frame.c: Update.
2944         * fbsd-nat.c: Update.
2945         * frame.c: Update.
2946         * gdbthread.h: Update.
2947         * gnu-nat.c: Update.
2948         * go32-nat.c: Update.
2949         * inf-loop.c: Update.
2950         * inf-ptrace.c: Update.
2951         * infcall.c: Update.
2952         * infcmd.c: Update.
2953         * inflow.c: Update.
2954         * infrun.c: Update.
2955         * linux-fork.c: Update.
2956         * linux-nat.c: Update.
2957         * linux-thread-db.c: Update.
2958         * mi/mi-cmd-var.c: Update.
2959         * mi/mi-interp.c: Update.
2960         * mi/mi-main.c: Update.
2961         * nto-procfs.c: Update.
2962         * ppc-linux-tdep.c: Update.
2963         * procfs.c: Update.
2964         * python/py-inferior.c: Update.
2965         * python/py-record-btrace.c: Update.
2966         * python/py-record.c: Update.
2967         * ravenscar-thread.c: Update.
2968         * regcache.c: Update.
2969         * remote-sim.c: Update.
2970         * remote.c: Update.
2971         * sol-thread.c: Update.
2972         * solib.c: Update.
2973         * target.c: Update.
2974         * tui/tui-stack.c: Update.
2975         * varobj.c: Update.
2976         * windows-nat.c: Update.
2977         * windows-tdep.c: Update.
2978
2979 2018-07-03  Tom Tromey  <tom@tromey.com>
2980
2981         * common/ptid.c (ptid_match): Remove.
2982         * common/ptid.h (ptid_match): Don't declare.
2983         * fbsd-nat.c: Update.
2984         * infcmd.c: Update.
2985         * infrun.c: Update.
2986         * linux-nat.c: Update.
2987         * record-btrace.c: Update.
2988         * regcache.c: Update.
2989         * remote.c: Update.
2990
2991 2018-07-03  Tom Tromey  <tom@tromey.com>
2992
2993         * common/ptid.c (ptid_tid_p): Remove.
2994         * common/ptid.h (ptid_tid_p): Don't declare.
2995         * sol-thread.c: Update.
2996
2997 2018-07-03  Tom Tromey  <tom@tromey.com>
2998
2999         * common/ptid.c (ptid_lwp_p): Remove.
3000         * common/ptid.h (ptid_lwp_p): Don't declare.
3001         * fbsd-nat.c: Update.
3002         * linux-nat.c: Update.
3003         * nat/linux-procfs.c: Update.
3004         * nat/x86-linux-dregs.c: Update.
3005         * sol-thread.c: Update.
3006
3007 2018-07-03  Tom Tromey  <tom@tromey.com>
3008
3009         * common/ptid.c (ptid_is_pid): Remove.
3010         * common/ptid.h (ptid_is_pid): Don't declare.
3011         * infrun.c: Update.
3012         * linux-nat.c: Update.
3013         * mi/mi-interp.c: Update.
3014         * remote.c: Update.
3015         * thread.c: Update.
3016
3017 2018-07-03  Tom Tromey  <tom@tromey.com>
3018
3019         * common/ptid.c (ptid_get_tid): Remove.
3020         * common/ptid.h (ptid_get_tid): Don't declare.
3021         * ada-tasks.c: Update.
3022         * aix-thread.c: Update.
3023         * bsd-uthread.c: Update.
3024         * darwin-nat.c: Update.
3025         * fbsd-nat.c: Update.
3026         * i386-darwin-nat.c: Update.
3027         * infrun.c: Update.
3028         * linux-tdep.c: Update.
3029         * nto-procfs.c: Update.
3030         * ppc-ravenscar-thread.c: Update.
3031         * python/py-infthread.c: Update.
3032         * ravenscar-thread.c: Update.
3033         * sol-thread.c: Update.
3034         * sparc-ravenscar-thread.c: Update.
3035         * windows-nat.c: Update.
3036
3037 2018-07-03  Tom Tromey  <tom@tromey.com>
3038
3039         * common/ptid.c (ptid_get_lwp): Remove.
3040         * common/ptid.h (ptid_get_lwp): Don't declare.
3041         * aarch64-linux-nat.c: Update.
3042         * ada-tasks.c: Update.
3043         * aix-thread.c: Update.
3044         * amd64-linux-nat.c: Update.
3045         * arm-linux-nat.c: Update.
3046         * corelow.c: Update.
3047         * fbsd-nat.c: Update.
3048         * fbsd-tdep.c: Update.
3049         * gnu-nat.c: Update.
3050         * i386-cygwin-tdep.c: Update.
3051         * i386-gnu-nat.c: Update.
3052         * i386-linux-nat.c: Update.
3053         * ia64-linux-nat.c: Update.
3054         * inf-ptrace.c: Update.
3055         * infrun.c: Update.
3056         * linux-fork.c: Update.
3057         * linux-nat.c: Update.
3058         * linux-tdep.c: Update.
3059         * linux-thread-db.c: Update.
3060         * mips-linux-nat.c: Update.
3061         * nat/aarch64-linux-hw-point.c: Update.
3062         * nat/aarch64-linux.c: Update.
3063         * nat/linux-btrace.c: Update.
3064         * nat/linux-osdata.c: Update.
3065         * nat/linux-procfs.c: Update.
3066         * nat/x86-linux-dregs.c: Update.
3067         * obsd-nat.c: Update.
3068         * ppc-fbsd-nat.c: Update.
3069         * ppc-linux-nat.c: Update.
3070         * procfs.c: Update.
3071         * python/py-infthread.c: Update.
3072         * ravenscar-thread.c: Update.
3073         * remote.c: Update.
3074         * s390-linux-nat.c: Update.
3075         * sol-thread.c: Update.
3076         * sol2-tdep.c: Update.
3077         * spu-linux-nat.c: Update.
3078         * x86-linux-nat.c: Update.
3079         * xtensa-linux-nat.c: Update.
3080
3081 2018-07-03  Tom Tromey  <tom@tromey.com>
3082
3083         * common/ptid.c (ptid_get_pid): Remove.
3084         * common/ptid.h (ptid_get_pid): Don't declare.
3085         * aarch64-linux-nat.c: Update.
3086         * ada-lang.c: Update.
3087         * aix-thread.c: Update.
3088         * alpha-bsd-nat.c: Update.
3089         * amd64-fbsd-nat.c: Update.
3090         * amd64-linux-nat.c: Update.
3091         * arm-linux-nat.c: Update.
3092         * arm-nbsd-nat.c: Update.
3093         * auxv.c: Update.
3094         * break-catch-syscall.c: Update.
3095         * breakpoint.c: Update.
3096         * bsd-uthread.c: Update.
3097         * corelow.c: Update.
3098         * ctf.c: Update.
3099         * darwin-nat.c: Update.
3100         * fbsd-nat.c: Update.
3101         * fbsd-tdep.c: Update.
3102         * gcore.c: Update.
3103         * gnu-nat.c: Update.
3104         * hppa-nbsd-nat.c: Update.
3105         * hppa-obsd-nat.c: Update.
3106         * i386-fbsd-nat.c: Update.
3107         * ia64-linux-nat.c: Update.
3108         * inf-ptrace.c: Update.
3109         * infcmd.c: Update.
3110         * inferior.c: Update.
3111         * inferior.h: Update.
3112         * inflow.c: Update.
3113         * infrun.c: Update.
3114         * linux-fork.c: Update.
3115         * linux-nat.c: Update.
3116         * linux-tdep.c: Update.
3117         * linux-thread-db.c: Update.
3118         * m68k-bsd-nat.c: Update.
3119         * mi/mi-interp.c: Update.
3120         * mi/mi-main.c: Update.
3121         * mips-linux-nat.c: Update.
3122         * mips-nbsd-nat.c: Update.
3123         * mips64-obsd-nat.c: Update.
3124         * nat/aarch64-linux-hw-point.c: Update.
3125         * nat/aarch64-linux.c: Update.
3126         * nat/linux-btrace.c: Update.
3127         * nat/linux-osdata.c: Update.
3128         * nat/linux-procfs.c: Update.
3129         * nat/x86-linux-dregs.c: Update.
3130         * nto-procfs.c: Update.
3131         * obsd-nat.c: Update.
3132         * ppc-linux-nat.c: Update.
3133         * ppc-nbsd-nat.c: Update.
3134         * ppc-obsd-nat.c: Update.
3135         * proc-service.c: Update.
3136         * procfs.c: Update.
3137         * python/py-inferior.c: Update.
3138         * python/py-infthread.c: Update.
3139         * ravenscar-thread.c: Update.
3140         * record.c: Update.
3141         * remote-sim.c: Update.
3142         * remote.c: Update.
3143         * rs6000-nat.c: Update.
3144         * s390-linux-nat.c: Update.
3145         * sh-nbsd-nat.c: Update.
3146         * sol-thread.c: Update.
3147         * sparc-nat.c: Update.
3148         * sparc64-tdep.c: Update.
3149         * spu-linux-nat.c: Update.
3150         * spu-tdep.c: Update.
3151         * target-debug.h: Update.
3152         * target.c: Update.
3153         * thread.c: Update.
3154         * tid-parse.c: Update.
3155         * tracefile-tfile.c: Update.
3156         * vax-bsd-nat.c: Update.
3157         * windows-nat.c: Update.
3158         * x86-linux-nat.c: Update.
3159         * x86-nat.c: Update.
3160
3161 2018-07-03  Tom Tromey  <tom@tromey.com>
3162
3163         * common/ptid.c (pid_to_ptid): Remove.
3164         * common/ptid.h (pid_to_ptid): Don't declare.
3165         * aix-thread.c: Update.
3166         * arm-linux-nat.c: Update.
3167         * common/ptid.c: Update.
3168         * common/ptid.h: Update.
3169         * corelow.c: Update.
3170         * ctf.c: Update.
3171         * darwin-nat.c: Update.
3172         * fbsd-nat.c: Update.
3173         * fork-child.c: Update.
3174         * gnu-nat.c: Update.
3175         * go32-nat.c: Update.
3176         * inf-ptrace.c: Update.
3177         * infcmd.c: Update.
3178         * inferior.c: Update.
3179         * infrun.c: Update.
3180         * linux-fork.c: Update.
3181         * linux-nat.c: Update.
3182         * nat/aarch64-linux-hw-point.c: Update.
3183         * nat/fork-inferior.c: Update.
3184         * nat/x86-linux-dregs.c: Update.
3185         * nto-procfs.c: Update.
3186         * obsd-nat.c: Update.
3187         * procfs.c: Update.
3188         * progspace.c: Update.
3189         * remote.c: Update.
3190         * rs6000-nat.c: Update.
3191         * s390-linux-nat.c: Update.
3192         * sol-thread.c: Update.
3193         * spu-linux-nat.c: Update.
3194         * target.c: Update.
3195         * top.c: Update.
3196         * tracefile-tfile.c: Update.
3197         * windows-nat.c: Update.
3198
3199 2018-07-03  Tom Tromey  <tom@tromey.com>
3200
3201         * common/ptid.h (ptid_build): Don't declare.
3202         * common/ptid.c (ptid_build): Remove.
3203         * aix-thread.c: Update.
3204         * bsd-kvm.c: Update.
3205         * bsd-uthread.c: Update.
3206         * common/agent.c: Update.
3207         * common/ptid.c: Update.
3208         * common/ptid.h: Update.
3209         * corelow.c: Update.
3210         * darwin-nat.c: Update.
3211         * fbsd-nat.c: Update.
3212         * gnu-nat.c: Update.
3213         * linux-fork.c: Update.
3214         * linux-nat.c: Update.
3215         * linux-thread-db.c: Update.
3216         * nat/linux-osdata.c: Update.
3217         * nat/linux-procfs.c: Update.
3218         * nto-procfs.c: Update.
3219         * obsd-nat.c: Update.
3220         * proc-service.c: Update.
3221         * procfs.c: Update.
3222         * ravenscar-thread.c: Update.
3223         * remote-sim.c: Update.
3224         * remote.c: Update.
3225         * sol-thread.c: Update.
3226         * target.c: Update.
3227         * windows-nat.c: Update.
3228
3229 2018-07-03  Tom Tromey  <tom@tromey.com>
3230
3231         * infrun.c (follow_exec): Use exit_inferior_silent.
3232         * inferior.c (exit_inferior_num_silent): Remove.
3233         * inferior.h (exit_inferior_num_silent): Don't declare.
3234
3235 2018-07-03  Tom Tromey  <tom@tromey.com>
3236
3237         PR cli/23340:
3238         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3239         inferior_ptid on error.
3240
3241 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3242             Simon Marchi  <simon.marchi@polymtl.ca>
3243
3244         PR tdep/8282
3245         * disasm.h (gdb_disassembler): Add
3246         `m_disassembler_options_holder'. member
3247         * disasm.c (get_all_disassembler_options): New function.
3248         (gdb_disassembler::gdb_disassembler): Use it.
3249         (gdb_buffered_insn_length_init_dis): Likewise.
3250         (gdb_buffered_insn_length): Adjust accordingly.
3251         (set_disassembler_options): Handle options with arguments.
3252         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3253         line if showing options with descriptions.
3254         (disassembler_options_completer): Adapt to using the
3255         `disasm_options_and_args_t' structure.
3256         * mips-tdep.c (mips_disassembler_options): New variable.
3257         (mips_disassembler_options_o32): Likewise.
3258         (mips_disassembler_options_n32): Likewise.
3259         (mips_disassembler_options_n64): Likewise.
3260         (gdb_print_insn_mips): Don't set `disassembler_options'.
3261         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3262         functions.
3263         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3264         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3265         `gdbarch_disassembler_options_implicit' and
3266         `gdbarch_valid_disassembler_options'.
3267         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3268         `disasm_options_and_args_t' structure.
3269         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3270         method.
3271         (valid_disassembler_options): Switch from `disasm_options_t' to
3272         the `disasm_options_and_args_t' structure.
3273         * NEWS: Document `set disassembler-options' support for the MIPS
3274         target.
3275         * gdbarch.h: Regenerate.
3276         * gdbarch.c: Regenerate.
3277
3278 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3279
3280         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3281
3282 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3283
3284         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3285         parameter in call to amd64_target_description.
3286         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3287         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3288         (amd64fbsd_init_abi): Likewise.
3289         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3290         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3291         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3292         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3293
3294 2018-06-29  Pedro Alves  <palves@redhat.com>
3295
3296         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3297         "segments" parameter.
3298         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3299         (_initialize_amd64_tdep): Update call to
3300         amd64_create_target_description.
3301         (amd64_target_description): Add "segments" parameter.  Adjust
3302         the implementation to use it.
3303         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3304         call to amd64_create_target_description.
3305         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3306         * gdb/arch/amd64.h (amd64_create_target_description): Add
3307         "segments" register.
3308         * gdb/arch/amd64.c (amd64_create_target_description): Add
3309         "segments" parameter.  Call create_feature_i386_64bit_segments
3310         only if SEGMENTS is true.
3311         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3312         call to amd64_create_target_description.
3313
3314 2018-06-29  Pedro Alves  <palves@redhat.com>
3315
3316         * thread.c (thread_target_id_str): New, factored out from ...
3317         (print_thread_info_1): ... here.  Use it to compute the max
3318         "Target Id" column width.
3319
3320 2018-06-29  Pedro Alves  <palves@redhat.com>
3321
3322         * remote.c (remote_target::extra_thread_info): Delete
3323         'display_buf' and 'n' locals.  from the cache, regardless of
3324         packet mechanims is in use.  Use cache for qThreadExtra and qP
3325         methods too.
3326
3327 2018-06-29  Pedro Alves  <palves@redhat.com>
3328
3329         * blockframe.c (find_pc_sect_containing_function): New function.
3330         * breakpoint.c (print_breakpoint_location): Don't call
3331         find_pc_sect_function.
3332         * linespec.c (create_sals_line_offset): Record the location's
3333         symbol in the sal.
3334         * linespec.c (convert_address_location_to_sals): Fill in sal's
3335         symbol with find_pc_sect_containing_function.
3336         * symtab.c (find_function_start_sal): Rename to ...
3337         (find_function_start_sal_1): ... this.
3338         (find_function_start_sal): Reimplement as wrapper around
3339         find_function_start_sal_1, and use
3340         find_pc_sect_containing_function to fill in the sal's symbol.
3341         (find_function_start_sal(symbol*, bool)): Adjust.
3342         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3343         comments.
3344         (find_pc_sect_containing_function): Declare.
3345
3346 2018-06-29  Pedro Alves  <palves@redhat.com>
3347
3348         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3349         true if the the location has no symbol.
3350
3351 2018-06-28  Tom Tromey  <tom@tromey.com>
3352
3353         * NEWS: Mention --enable-codesign.
3354         * silent-rules.mk (ECHO_SIGN): New variable.
3355         * configure.ac: Add --enable-codesign.
3356         * configure: Rebuild.
3357         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3358         (gdb$(EXEEXT)): Optionally invoke codesign.
3359
3360 2018-06-28  Pedro Alves  <palves@redhat.com>
3361
3362         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3363         comments.
3364         (switch_to_thread_no_regs): Adjust comment.
3365         * infcmd.c (stop_pc): Delete.
3366         (post_create_inferior, info_program_command): Replace references
3367         to stop_pc with references to thread_info->suspend.stop_pc.
3368         * inferior.h (stop_pc): Delete declaration.
3369         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3370         (handle_inferior_event_1, handle_signal_stop)
3371         (process_event_stop_test, keep_going_stepped_thread)
3372         (handle_step_into_function, handle_step_into_function_backward)
3373         (print_stop_location): Replace references to stop_pc with
3374         references to thread_info->suspend.stop_pc.
3375         (struct infcall_suspend_state) <stop_pc>: Delete field.
3376         (save_infcall_suspend_state, restore_infcall_suspend_state):
3377         Remove references to inf_stat->stop_pc.
3378         * linux-fork.c (fork_load_infrun_state): Likewise.
3379         * record-btrace.c (record_btrace_set_replay): Likewise.
3380         * record-full.c (record_full_goto_entry): Likewise.
3381         * remote.c (print_one_stopped_thread): Likewise.
3382         * target.c (target_resume): Extend comment.
3383         * thread.c (set_executing_thread): New.
3384         (set_executing): Use it.
3385         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3386         Remove references to stop_pc.
3387
3388 2018-06-28  Pedro Alves  <palves@redhat.com>
3389
3390         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3391         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3392
3393 2018-06-28  Tom Tromey  <tom@tromey.com>
3394
3395         * coffread.c (coff_symfile_finish): Update.
3396         * xcoffread.c (xcoff_symfile_finish): Update.
3397         * elfread.c (elf_symfile_finish): Update.
3398         * symfile.h (dwarf2_free_objfile): Don't declare.
3399         * dwarf2read.c (_initialize_dwarf2_read): Use
3400         register_objfile_data_with_cleanup.
3401         (dwarf2_free_objfile): Now static.  Change signature.
3402
3403 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3404
3405         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3406         option "-o" to add-symbol-file-load to add an offset to each
3407         section's load address.
3408         * symfile.c (set_objfile_default_section_offset): New function.
3409
3410 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3411
3412         * symfile.c (add_symbol_file_command): Make sure that sections
3413         with the same name are sorted in the same order.
3414
3415 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3416
3417         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3418         require the second argument.  If omitted, load sections at the
3419         addresses specified in the file.
3420
3421 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3422
3423         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3424         (_initialize_symfile): Add option "-o" to symbol-file to add an
3425         offset to each section of the symbol file.
3426
3427 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3428
3429         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3430
3431 2018-06-27  Tom Tromey  <tom@tromey.com>
3432
3433         * stack.c (_initialize_stack): Update "func" help text.
3434
3435 2018-06-27  Tom Tromey  <tom@tromey.com>
3436
3437         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3438         std::vector.
3439         (unwind_infopy_str, pyuw_create_unwind_info)
3440         (unwind_infopy_add_saved_register, pyuw_sniffer)
3441         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3442         Update.
3443         (struct saved_reg): Add constructor.
3444         <value>: Now a gdbpy_ref<>.
3445
3446 2018-06-27  Tom Tromey  <tom@tromey.com>
3447
3448         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3449
3450 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3451
3452         * gdb-gdb.py.in: Format using autopep8.
3453
3454 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3455
3456         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3457         (type_lookup_function): Recognize CORE_ADDR values.
3458
3459 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3460
3461         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3462         print tag_name.
3463
3464 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3465
3466         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3467         <__lt__>: Add.
3468
3469 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3470
3471         * gdb-gdb.py: Move to...
3472         * gdb-gdb.py.in: ... here.
3473         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3474         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3475         dependencies.
3476         (distclean): Remove gdb-gdb.py when cleaning.
3477         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3478         * configure: Re-generate.
3479
3480 2018-06-27  Pedro Alves  <palves@redhat.com>
3481
3482         * proc-service.c (get_ps_regcache): New.
3483         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3484         (ps_lsetfpregs): Use it.
3485
3486 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3487
3488         PR gdb/21695
3489         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3490         (dwarf_decode_lines_1): Adjust.
3491
3492 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3493
3494         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3495         override.
3496         <info_proc>: Likewise.
3497
3498 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3499
3500         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3501         to windows_fetch_one_register, and only handle the case of
3502         fetching one register.  Move the code that reloads the context
3503         and iterates over all registers if R is negative to...
3504         (windows_nat_target::fetch_registers): ... here.
3505         (do_windows_store_inferior_registers): Rename to
3506         windows_store_one_register, and only handle the case of storing
3507         one register.  Move the code that handles the case where r is
3508         negative to...
3509         (windows_nat_target::store_registers) ... here.
3510
3511 2018-06-26  Tom Tromey  <tom@tromey.com>
3512
3513         PR rust/22574:
3514         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3515         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3516         Update.
3517         (rust_internal_print_type): Add podata parameter.
3518         (rust_print_type): Update.
3519
3520 2018-06-26  Tom Tromey  <tom@tromey.com>
3521
3522         * typeprint.h (struct print_offset_data) <update, finish,
3523         maybe_print_hole>: New methods.
3524         <indentation>: New constant.
3525         * typeprint.c (print_offset_data::indentation): Define.
3526         (print_offset_data::maybe_print_hole, print_offset_data::update)
3527         (print_offset_data::finish): Move from c-typeprint.c and rename.
3528         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3529         (print_spaces_filtered_with_print_options): Update.
3530         (c_print_type_union_field_offset, maybe_print_hole)
3531         (c_print_type_struct_field_offset): Move to typeprint.c and
3532         rename.
3533         (c_type_print_base_struct_union): Update.
3534
3535 2018-06-25  Pedro Alves  <palves@redhat.com>
3536
3537         * gdbthread.h (thread_info_ref, delete_thread)
3538         (delete_thread_silent, first_thread_of_inferior)
3539         (any_thread_of_inferior, switch_to_thread)
3540         (enable_thread_stack_temporaries)
3541         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3542         (get_last_thread_stack_temporary)
3543         (value_in_thread_stack_temporaries, can_access_registers_thread):
3544         Spell out "struct thread_info" instead of just "thread_info".
3545         * inferior.h (notice_new_inferior): Likewise.
3546
3547 2018-06-25  Pedro Alves  <palves@redhat.com>
3548
3549         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3550         pass thread_info pointer to delete_thread.
3551         (windows_nat_target::detach): Pass inferior pointer to
3552         detach_inferior.
3553         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3554         delete_thread.
3555         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3556         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3557         and pass a thread_info pointer to delete_thread.
3558         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3559         pass thread_info pointer to delete_thread.
3560         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3561         delete_thread_silent call.
3562         * procfs.c (procfs_target::detach): Pass inferior pointer to
3563         detach_inferior.
3564         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3565         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3566         delete_thread_silent call.
3567         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3568         pass thread_info pointer to delete_thread.
3569         (windows_nat_target::detach): Pass inferior pointer to
3570         delete_inferior.
3571
3572 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3573
3574         * regcache.c (readable_regcache::read_part): Fix asserts.
3575         (reg_buffer::raw_collect_part): New function.
3576         (regcache::write_part): Fix asserts.
3577         (reg_buffer::raw_supply_part): New function.
3578         (regcache::transfer_regset_register): New helper function.
3579         (regcache::transfer_regset): Call new functions.
3580         (regcache_supply_regset): Use gdb_byte*.
3581         (regcache::supply_regset): Likewise.
3582         (regcache_collect_regset): Likewise.
3583         (regcache::collect_regset): Likewise.
3584         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3585         (reg_buffer::raw_supply_part): Likewise.
3586         (regcache::transfer_regset_register): Likewise.
3587         (regcache::transfer_regset): Use gdb_byte*.
3588
3589 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3590
3591         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3592
3593 2018-06-21  Pedro Alves  <palves@redhat.com>
3594
3595         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3596         instead of a ptid_t.  All callers adjusted.
3597         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3598         adjusted.
3599         (print_ada_task_info, display_current_task_id, task_command_1):
3600         Adjust.
3601         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3602         inferior_thread.
3603         (breakpoint_kind): Adjust.
3604         (remove_breakpoints_pid): Rename to ...
3605         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3606         pointer.  All callers adjusted.
3607         (bpstat_clear_actions): Use inferior_thread.
3608         (get_bpstat_thread): New.
3609         (bpstat_do_actions): Use it.
3610         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3611         to take a thread_info pointer.  All callers adjusted.
3612         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3613         (breakpoint_re_set_thread): Use inferior_thread.
3614         * breakpoint.h (struct inferior): Forward declare.
3615         (bpstat_stop_status): Update.
3616         (remove_breakpoints_pid): Delete.
3617         (remove_breakpoints_inf): New.
3618         * bsd-uthread.c (bsd_uthread_target::wait)
3619         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3620         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3621         (maint_btrace_packet_history_cmd)
3622         (maint_btrace_clear_packet_history_cmd): Adjust.
3623         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3624         inferior_thread.
3625         * cli/cli-interp.c: Include "inferior.h".
3626         * common/refcounted-object.h (struct
3627         refcounted_object_ref_policy): New.
3628         * compile/compile-object-load.c: Include gdbthread.h.
3629         (store_regs): Use inferior_thread.
3630         * corelow.c (core_target::close): Use current_inferior.
3631         (core_target_open): Adjust to use first_thread_of_inferior and use
3632         the current inferior.
3633         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3634         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3635         <thread>: ... this new field.  All references adjusted.
3636         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3637         Take a thread_info pointer instead of a ptid_t.
3638         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3639         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3640         thread_info pointer instead of a ptid_t.
3641         * elfread.c: Include "inferior.h".
3642         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3643         Use inferior_thread.
3644         * eval.c (evaluate_subexp): Likewise.
3645         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3646         inferior_thread.
3647         * gdb_proc_service.h (struct thread_info): Forward declare.
3648         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3649         <thread>: ... this new field.  All references adjusted.
3650         * gdbarch.h, gdbarch.c: Regenerate.
3651         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3652         'thread' parameter.  All implementations and callers adjusted.
3653         * gdbthread.h (thread_info) <set_running>: New method.
3654         (delete_thread, delete_thread_silent): Take a thread_info pointer
3655         instead of a ptid.
3656         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3657         (first_thread_of_process): Delete, replaced by ...
3658         (first_thread_of_inferior): ... this new function.  All callers
3659         adjusted.
3660         (any_live_thread_of_process): Delete, replaced by ...
3661         (any_live_thread_of_inferior): ... this new function.  All callers
3662         adjusted.
3663         (switch_to_thread, switch_to_no_thread): Declare.
3664         (is_executing): Delete.
3665         (enable_thread_stack_temporaries): Update comment.
3666         <enable_thread_stack_temporaries>: Take a thread_info pointer
3667         instead of a ptid_t.  Incref the thread.
3668         <~enable_thread_stack_temporaries>: Decref the thread.
3669         <m_ptid>: Delete
3670         <m_thr>: New.
3671         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3672         (get_last_thread_stack_temporary)
3673         (value_in_thread_stack_temporaries, can_access_registers_thread):
3674         Take a thread_info pointer instead of a ptid_t.  All callers
3675         adjusted.
3676         * infcall.c (get_call_return_value): Use inferior_thread.
3677         (run_inferior_call): Work with thread pointers instead of ptid_t.
3678         (call_function_by_hand_dummy): Work with thread pointers instead
3679         of ptid_t.  Use thread_info_ref.
3680         * infcmd.c (proceed_thread_callback): Access thread's state
3681         directly.
3682         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3683         access thread's state directly.
3684         (continue_command): Use inferior_thread.
3685         (info_program_command): Use find_thread_ptid and access thread
3686         state directly.
3687         (proceed_after_attach_callback): Use thread state directly.
3688         (notice_new_inferior): Take a thread_info pointer instead of a
3689         ptid_t.  All callers adjusted.
3690         (exit_inferior): Take an inferior pointer instead of a pid.  All
3691         callers adjusted.
3692         (exit_inferior_silent): New.
3693         (detach_inferior): Delete.
3694         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3695         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3696         (detach_inferior_command, kill_inferior_command): Use
3697         find_inferior_id instead of valid_gdb_inferior_id and
3698         gdb_inferior_id_to_pid.
3699         (inferior_command): Use inferior and thread pointers.
3700         * inferior.h (struct thread_info): Forward declare.
3701         (notice_new_inferior): Take a thread_info pointer instead of a
3702         ptid_t.  All callers adjusted.
3703         (detach_inferior): Delete declaration.
3704         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3705         instead of a pid.  All callers adjusted.
3706         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3707         (valid_gdb_inferior_id): Delete.
3708         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3709         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3710         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3711         ...
3712         <inf>: ... this new field.
3713         <step_ptid>: Delete, replaced by ...
3714         <step_thread>: ... this new field.
3715         (get_displaced_stepping_state): Take an inferior pointer instead
3716         of a pid.  All callers adjusted.
3717         (displaced_step_in_progress_any_inferior): Adjust.
3718         (displaced_step_in_progress_thread): Take a thread pointer instead
3719         of a ptid_t.  All callers adjusted.
3720         (displaced_step_in_progress, add_displaced_stepping_state): Take
3721         an inferior pointer instead of a pid.  All callers adjusted.
3722         (get_displaced_step_closure_by_addr): Adjust.
3723         (remove_displaced_stepping_state): Take an inferior pointer
3724         instead of a pid.  All callers adjusted.
3725         (displaced_step_prepare_throw, displaced_step_prepare)
3726         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3727         All callers adjusted.
3728         (start_step_over): Adjust.
3729         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3730         displaced step queue.
3731         (do_target_resume): Adjust.
3732         (fetch_inferior_event): Use inferior_thread.
3733         (context_switch, get_inferior_stop_soon): Take an
3734         execution_control_state pointer instead of a ptid_t.  All callers
3735         adjusted.
3736         (switch_to_thread_cleanup): Delete.
3737         (stop_all_threads): Use scoped_restore_current_thread.
3738         * inline-frame.c: Include "gdbthread.h".
3739         (inline_state) <inline_state>: Take a thread pointer instead of a
3740         ptid_t.  All callers adjusted.
3741         <ptid>: Delete, replaced by ...
3742         <thread>: ... this new field.
3743         (find_inline_frame_state): Take a thread pointer instead of a
3744         ptid_t.  All callers adjusted.
3745         (skip_inline_frames, step_into_inline_frame)
3746         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3747         pointer instead of a ptid_t.  All callers adjusted.
3748         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3749         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3750         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3751         pointers directly.
3752         * linux-nat.c (get_detach_signal): Likewise.
3753         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3754         (thread_db_notice_clone): Adjust.
3755         (thread_db_find_new_threads_silently)
3756         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3757         a thread pointer instead of a ptid_t.  All callers adjusted.
3758         * mi/mi-cmd-var.c: Include "inferior.h".
3759         (mi_cmd_var_update_iter): Update to use thread pointers.
3760         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3761         inferior directly.
3762         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3763         out to ...
3764         (mi_output_running): ... this new function.
3765         (mi_on_resume_1): Adjust to use it.
3766         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3767         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3768         directly.
3769         (interrupt_thread_callback): : Adjust to use thread and inferior
3770         pointers.
3771         * proc-service.c: Include "gdbthread.h".
3772         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3773         * progspace-and-thread.c: Include "inferior.h".
3774         * progspace.c: Include "inferior.h".
3775         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3776         hold a reference to an inferior_object.
3777         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3778         inferior_thread.
3779         * python/py-inferior.c (struct inferior_object): Give the type a
3780         tag name instead of a typedef.
3781         (python_on_normal_stop): No need to check if the current thread is
3782         listed.
3783         (inferior_to_inferior_object): Change return type to
3784         inferior_object.  All callers adjusted.
3785         (find_thread_object): Delete, bits factored out to ...
3786         (thread_to_thread_object): ... this new function.
3787         * python/py-infthread.c (create_thread_object): Use
3788         inferior_to_inferior_object.
3789         (thpy_is_stopped): Use thread pointer directly.
3790         (gdbpy_selected_thread): Use inferior_thread.
3791         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3792         field, replaced with ...
3793         <thread>: ... this new field.  All users adjusted.
3794         (btpy_insn_or_gap_new): Drop const.
3795         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3796         callers adjusted.
3797         * python/py-record.c: Include "gdbthread.h".
3798         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3799         a ptid_t.  All callers adjusted.
3800         (gdbpy_current_recording): Use inferior_thread.
3801         * python/py-record.h (recpy_record_object) <ptid>: Delete
3802         field, replaced with ...
3803         <thread>: ... this new field.  All users adjusted.
3804         (recpy_element_object) <ptid>: Delete
3805         field, replaced with ...
3806         <thread>: ... this new field.  All users adjusted.
3807         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3808         a ptid_t.  All callers adjusted.
3809         * python/py-threadevent.c: Include "gdbthread.h".
3810         (get_event_thread): Use thread_to_thread_object.
3811         * python/python-internal.h (struct inferior_object): Forward
3812         declare.
3813         (find_thread_object, find_inferior_object): Delete declarations.
3814         (thread_to_thread_object, inferior_to_inferior_object): New
3815         declarations.
3816         * record-btrace.c: Include "inferior.h".
3817         (require_btrace_thread): Use inferior_thread.
3818         (record_btrace_frame_sniffer)
3819         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3820         (get_thread_current_frame): Use scoped_restore_current_thread and
3821         switch_to_thread.
3822         (get_thread_current_frame): Use thread pointer directly.
3823         (record_btrace_replay_at_breakpoint): Use thread's inferior
3824         pointer directly.
3825         * record-full.c: Include "inferior.h".
3826         * regcache.c: Include "gdbthread.h".
3827         (get_thread_arch_regcache): Use the inferior's address space
3828         directly.
3829         (get_thread_regcache, registers_changed_thread): New.
3830         * regcache.h (get_thread_regcache(thread_info *thread)): New
3831         overload.
3832         (registers_changed_thread): New.
3833         (remote_target) <remote_detach_1>: Swap order of parameters.
3834         (remote_add_thread): <remote_add_thread>: Return the new thread.
3835         (get_remote_thread_info(ptid_t)): New overload.
3836         (remote_target::remote_notice_new_inferior): Use thread pointers
3837         directly.
3838         (remote_target::process_initial_stop_replies): Use
3839         thread_info::set_running.
3840         (remote_target::remote_detach_1, remote_target::detach)
3841         (extended_remote_target::detach): Adjust.
3842         * stack.c (frame_show_address): Use inferior_thread.
3843         * target-debug.h (target_debug_print_thread_info_pp): New.
3844         * target-delegates.c: Regenerate.
3845         * target.c (default_thread_address_space): Delete.
3846         (memory_xfer_partial_1): Use current_inferior.
3847         (target_detach): Use current_inferior.
3848         (target_thread_address_space): Delete.
3849         (generic_mourn_inferior): Use current_inferior.
3850         * target.h (struct target_ops) <thread_address_space>: Delete.
3851         (target_thread_address_space): Delete.
3852         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3853         pointers directly.
3854         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3855         thread pointer instead of a ptid_t.  Adjust all callers.
3856         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3857         (first_thread_of_process): Delete, replaced by ...
3858         (first_thread_of_inferior): ... this new function.  All callers
3859         adjusted.
3860         (any_thread_of_process): Rename to ...
3861         (any_thread_of_inferior): ... this, and take an inferior pointer.
3862         (any_live_thread_of_process): Rename to ...
3863         (any_live_thread_of_inferior): ... this, and take an inferior
3864         pointer.
3865         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3866         (value_in_thread_stack_temporaries)
3867         (get_last_thread_stack_temporary): Take a thread pointer instead
3868         of a ptid_t.  Adjust all callers.
3869         (thread_info::set_running): New.
3870         (validate_registers_access): Use inferior_thread.
3871         (can_access_registers_ptid): Rename to ...
3872         (can_access_registers_thread): ... this, and take a thread
3873         pointer.
3874         (print_thread_info_1): Adjust to compare thread pointers instead
3875         of ptids.
3876         (switch_to_no_thread, switch_to_thread): Make extern.
3877         (scoped_restore_current_thread::~scoped_restore_current_thread):
3878         Use m_thread pointer directly.
3879         (scoped_restore_current_thread::scoped_restore_current_thread):
3880         Use inferior_thread.
3881         (thread_command): Use thread pointer directly.
3882         (thread_num_make_value_helper): Use inferior_thread.
3883         * top.c (execute_command): Use inferior_thread.
3884         * tui/tui-interp.c: Include "inferior.h".
3885         * varobj.c (varobj_create): Use inferior_thread.
3886         (value_of_root_1): Use find_thread_global_id instead of
3887         global_thread_id_to_ptid.
3888
3889 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3890
3891         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3892         possible.
3893         (regcache::write_part): Likewise.
3894         (readable_regcache::cooked_read_part): Update comment.
3895         (readable_regcache::cooked_write_part): Likewise.
3896         * regcache.h: (readable_regcache::read_part): Likewise.
3897         (regcache::write_part): Likewise.
3898
3899 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3900             Dirk Schubert  <dirk.schubert@arm.com>
3901
3902         * aarch64-linux-nat.c (post_attach): New.
3903         (aarch64_linux_nat_target::post_attach): Override post_attach to
3904         record the number of hardware debug registers.
3905
3906 2018-06-20  Tom Tromey  <tom@tromey.com>
3907
3908         * python/py-param.c (add_setshow_generic): Make parameters const.
3909         (parmpy_init): Update.
3910
3911 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3912
3913         * regcache.h (regcache_cooked_read_ftype): Rename to...
3914         (register_read_ftype): ...this, change type to function_view.
3915         (class reg_buffer) <save>: Remove src parameter.
3916         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3917         parameter non-const in first overload.  Remove src parameter in
3918         second overload.
3919         * regcache.c (do_cooked_read): Remove.
3920         (readonly_detached_regcache::readonly_detached_regcache): Make
3921         parameter non-const, adjust call to other constructor.
3922         (reg_buffer::save): Remove src parameter.
3923         * frame.c (do_frame_register_read): Remove.
3924         (frame_save_as_regcache): Use lambda function.
3925         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3926         parameter to ppu2spu_data *.
3927         (ppu2spu_sniffer): Use lambda function.
3928
3929 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3930
3931         * record-full.c (record_full_target::insert_breakpoint): Remove
3932         "struct" keyword, add const.
3933
3934 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3935
3936         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3937         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3938         * configure.ac: Remove AC_PREREQ, add missing quoting.
3939         * gnulib/configure.ac: Modernize usage of
3940         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3941         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3942         (AUTOMAKE_VERSION): Bump to 1.15.1.
3943         * configure: Re-generate.
3944         * config.in: Re-generate.
3945         * aclocal.m4: Re-generate.
3946         * gnulib/aclocal.m4: Re-generate.
3947         * gnulib/config.in: Re-generate.
3948         * gnulib/configure: Re-generate.
3949         * gnulib/import/Makefile.in: Re-generate.
3950
3951 2018-06-19  Pedro Alves  <palves@redhat.com>
3952
3953         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3954         (lookup_minimal_symbol_by_pc_section): ... here with
3955         gdb_assert_not_reached added.
3956
3957 2018-06-19  Pedro Alves  <palves@redhat.com>
3958
3959         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3960         parameter with a block parameter.  Compare location's block symbol
3961         with the frame's block instead of addresses.
3962         (skip_inline_frames): Pass the current block instead of the
3963         frame's address.  Break out as soon as we determine the frame
3964         should not be skipped.
3965
3966 2018-06-18  Tom Tromey  <tom@tromey.com>
3967
3968         * solib-aix.c (solib_aix_get_section_offsets): Return
3969         unique_xmalloc_ptr.
3970         (solib_aix_solib_create_inferior_hook): Update.
3971
3972 2018-06-18  Tom Tromey  <tom@tromey.com>
3973
3974         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3975
3976 2018-06-18  Tom Tromey  <tom@tromey.com>
3977
3978         * solib-frv.c (frv_relocate_main_executable): Use
3979         unique_xmalloc_ptr.
3980         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3981         unique_xmalloc_ptr.
3982
3983 2018-06-18  Tom Tromey  <tom@tromey.com>
3984
3985         * objfiles.h (inhibit_section_map_updates): Update.
3986         (resume_section_map_updates, resume_section_map_updates_cleanup):
3987         Remove.
3988         * solib-svr4.c (svr4_handle_solib_event): Update.
3989         * objfiles.c (inhibit_section_map_updates): Return
3990         scoped_restore_tmpl<int>.
3991         (resume_section_map_updates, resume_section_map_updates_cleanup):
3992         Remove.
3993
3994 2018-06-18  Tom Tromey  <tom@tromey.com>
3995
3996         * valprint.h (read_string): Update.
3997         * valprint.c (read_string): Change type of "buffer".
3998         (val_print_string): Update.
3999         * python/py-value.c (valpy_string): Update.
4000         * language.h (struct language_defn) <la_get_string>: Change
4001         type of "buffer".
4002         (default_get_string, c_get_string): Update.
4003         * language.c (default_get_string): Change type of "buffer".
4004         * guile/scm-value.c (gdbscm_value_to_string): Update.
4005         * c-lang.c (c_get_string): Change type of "buffer".
4006
4007 2018-06-18  Tom Tromey  <tom@tromey.com>
4008
4009         * ser-mingw.c (struct pipe_state_destroyer): New.
4010         (pipe_state_up): New typedef.
4011         (cleanup_pipe_state): Remove.
4012         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4013
4014 2018-06-18  Tom Tromey  <tom@tromey.com>
4015
4016         * rust-lang.h (rust_yyerror): Don't declare.
4017         * rust-lang.c (rust_language_defn): Update.
4018         * rust-exp.y (yyerror): Now static.
4019         * parse.c (parse_exp_in_context_1): Update.
4020         * p-lang.h (p_yyerror): Don't declare.
4021         * p-lang.c (p_language_defn): Update.
4022         * p-exp.y (yyerror): Now static.
4023         * opencl-lang.c (opencl_language_defn): Update.
4024         * objc-lang.c (objc_language_defn): Update.
4025         * m2-lang.h (m2_yyerror): Don't declare.
4026         * m2-lang.c (m2_language_defn): Update.
4027         * m2-exp.y (yyerror): Now static.
4028         * language.h (struct language_defn) <la_error>: Remove.
4029         * language.c (unk_lang_error): Remove.
4030         (unknown_language_defn, auto_language_defn): Remove.
4031         * go-lang.h (go_yyerror): Don't declare.
4032         * go-lang.c (go_language_defn): Update.
4033         * go-exp.y (yyerror): Now static.
4034         * f-lang.h (f_yyerror): Don't declare.
4035         * f-lang.c (f_language_defn): Update.
4036         * f-exp.y (yyerror): Now static.
4037         * d-lang.h (d_yyerror): Don't declare.
4038         * d-lang.c (d_language_defn): Update.
4039         * d-exp.y (yyerror): Now static.
4040         * c-lang.h (c_yyerror): Don't declare.
4041         * c-lang.c (c_language_defn, cplus_language_defn)
4042         (asm_language_defn, minimal_language_defn): Update.
4043         * c-exp.y (yyerror): Now static.
4044         * ada-lang.h (ada_yyerror): Don't declare.
4045         * ada-lang.c (ada_language_defn): Update.
4046         * ada-exp.y (yyerror): Now static.
4047
4048 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4049
4050         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4051         (store_sveregs_to_thread): Likewise.
4052         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4053         (aarch64_linux_store_inferior_registers): Likewise.
4054         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4055         function.
4056         (aarch64_sve_regs_copy_to_regcache): Likewise.
4057         (aarch64_sve_regs_copy_from_regcache): Likewise.
4058         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4059         declaration.
4060         (aarch64_sve_regs_copy_to_regcache): Likewise.
4061         (aarch64_sve_regs_copy_from_regcache): Likewise.
4062         (sve_context): Structure from Linux headers.
4063         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4064         (SVE_SIG_ZREG_SIZE): Likewise.
4065         (SVE_SIG_PREG_SIZE): Likewise.
4066         (SVE_SIG_FFR_SIZE): Likewise.
4067         (SVE_SIG_REGS_OFFSET): Likewise.
4068         (SVE_SIG_ZREGS_OFFSET): Likewise.
4069         (SVE_SIG_ZREG_OFFSET): Likewise.
4070         (SVE_SIG_ZREGS_SIZE): Likewise.
4071         (SVE_SIG_PREGS_OFFSET): Likewise.
4072         (SVE_SIG_PREG_OFFSET): Likewise.
4073         (SVE_SIG_PREGS_SIZE): Likewise.
4074         (SVE_SIG_FFR_OFFSET): Likewise.
4075         (SVE_SIG_REGS_SIZE): Likewise.
4076         (SVE_SIG_CONTEXT_SIZE): Likewise.
4077         (SVE_PT_REGS_MASK): Likewise.
4078         (SVE_PT_REGS_FPSIMD): Likewise.
4079         (SVE_PT_REGS_SVE): Likewise.
4080         (SVE_PT_VL_INHERIT): Likewise.
4081         (SVE_PT_VL_ONEXEC): Likewise.
4082         (SVE_PT_REGS_OFFSET): Likewise.
4083         (SVE_PT_FPSIMD_OFFSET): Likewise.
4084         (SVE_PT_FPSIMD_SIZE): Likewise.
4085         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4086         (SVE_PT_SVE_PREG_SIZE): Likewise.
4087         (SVE_PT_SVE_FFR_SIZE): Likewise.
4088         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4089         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4090         (__SVE_SIG_TO_PT): Likewise.
4091         (SVE_PT_SVE_OFFSET): Likewise.
4092         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4093         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4094         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4095         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4096         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4097         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4098         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4099         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4100         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4101         (SVE_PT_SVE_SIZE): Likewise.
4102         (SVE_PT_SIZE): Likewise.
4103         (HAS_SVE_STATE): New define.
4104
4105 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4106
4107         * nat/aarch64-sve-linux-sigcontext.h: New file.
4108         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4109         new files.
4110         (SVE_VQ_MIN): Likewise.
4111         (SVE_VQ_MAX): Likewise.
4112         (SVE_VL_MIN): Likewise.
4113         (SVE_VL_MAX): Likewise.
4114         (SVE_NUM_ZREGS): Likewise.
4115         (SVE_NUM_PREGS): Likewise.
4116         (sve_vl_valid): Likewise.
4117         (struct user_sve_header): Likewise.
4118
4119 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4120             Richard Bunt <Richard.Bunt@arm.com>
4121
4122         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4123         was requested by GDB.
4124
4125 2018-06-15  Tom de Vries  <tdevries@suse.de>
4126
4127         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4128
4129 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4130
4131         * gnulib/update-gnulib.sh: Print expected versions of
4132         autoconf/aclocal.
4133
4134 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4135
4136         * arch-utils.c (default_type_align): Use type_length_units.
4137         * gdbtypes.c (type_align): Use type_length_units.
4138
4139 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4140
4141         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4142         of 'define' command.
4143
4144 2018-06-14  Tom de Vries  <tdevries@suse.de>
4145
4146         PR cli/22573
4147         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4148         get_no_prettyformat_print_options.
4149
4150 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4151
4152         * sparc-nat.h: Include target.h.
4153         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4154         <fetch_registers>: Remove this argument in function call.
4155         <store_registers>: Remove this argument in function call, remove
4156         extra semicolon.
4157         <low_forget_process>: Call sparc64_forget_process instead of
4158         sparc_forget_process.
4159
4160 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4161
4162         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4163         (procfs_target::make_corefile_notes): Adjust to new
4164         target_read_alloc return type.
4165
4166 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4167             Stephen Roberts  <stephen.roberts@arm.com>
4168
4169         PR gdb/22882
4170         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4171         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4172         Move should_notify_stop local into more inner scope.
4173
4174 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4175             Stephen Roberts  <stephen.roberts@arm.com>
4176
4177         PR gdb/22882
4178         * infrun.c (resume_1): Add call to mark_async_event_handler.
4179
4180 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4181
4182         * infrun.c (do_target_wait): Change old version of $pc printed.
4183
4184 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4185
4186         * dwarf2read.c (read_index_from_section): Rename to...
4187         (read_gdb_index_from_section): ... this, update all callers.
4188         (dwarf2_read_index): Rename to...
4189         (dwarf2_read_gdb_index): ... this, update all callers.
4190
4191 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4192
4193         * gdb/hppa-linux-nat.c
4194         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4195         hppa_linux_nat_target::fetch_registers.
4196
4197 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4198
4199         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4200         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4201         (AARCH64_DWARF_SVE_FFR): Likewise.
4202         (AARCH64_DWARF_SVE_P0): Likewise.
4203         (AARCH64_DWARF_SVE_Z0): Likewise.
4204
4205 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4206
4207         * common/common-regcache.h (raw_compare): New function.
4208         * regcache.c (regcache::raw_compare): Likewise.
4209         * regcache.h (regcache::raw_compare): New declaration.
4210
4211 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4212
4213         * common/common-regcache.h (reg_buffer_common): New structure.
4214         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4215         (reg_buffer::raw_supply): Likewise.
4216         (reg_buffer::raw_supply_integer): Likewise.
4217         (reg_buffer::raw_supply_zeroed): Likewise.
4218         (reg_buffer::raw_collect): Likewise.
4219         (reg_buffer::raw_collect_integer): Likewise.
4220         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4221         (reg_buffer::raw_supply): Likewise.
4222         (reg_buffer::raw_supply_integer): Likewise.
4223         (reg_buffer::raw_supply_zeroed): Likewise.
4224         (reg_buffer::raw_collect): Likewise.
4225         (reg_buffer::raw_collect_integer): Likewise.
4226
4227 2018-06-10  Tom Tromey  <tom@tromey.com>
4228
4229         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4230         (class remote_state) <stop_reply_queue>: Now std::vector.
4231         (remote_state::~remote_state)
4232         (remote_target::stop_reply_queue_length): Update.
4233         (struct queue_iter_param, remove_child_of_pending_fork)
4234         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4235         (check_pending_event_prevents_wildcard_vcont_callback)
4236         (remove_stop_reply_for_inferior)
4237         (remove_stop_reply_of_remote_state)
4238         (remote_notif_remove_once_on_match)
4239         (stop_reply_match_ptid_and_ws)
4240         (remote_kill_child_of_pending_fork): Remove.
4241         (remote_target::remove_new_fork_children)
4242         (remote_target::check_pending_events_prevent_wildcard_vcont)
4243         (remote_target::discard_pending_stop_replies)
4244         (remote_target::discard_pending_stop_replies_in_queue)
4245         (remote_target::remote_notif_remove_queued_reply)
4246         (remote_target::queued_stop_reply)
4247         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4248         (remote_target::wait, remote_target::kill_new_fork_children)
4249         (remote_target::async): Update.
4250
4251 2018-06-10  Tom Tromey  <tom@tromey.com>
4252
4253         * record-full.c (record_full_arch_list_cleanups): Remove.
4254         (record_full_message): Use try/catch.
4255         (record_full_wait_cleanups): Remove.
4256         (record_full_wait_1): Use try/catch.
4257         (record_full_restore): Likewise.
4258
4259 2018-06-10  Tom Tromey  <tom@tromey.com>
4260
4261         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4262         declare VEC.  Add constructor.
4263         <in_target_beneath>: Now bool.
4264         (record_full_breakpoints): Now a std::vector, static.
4265         (record_full_sync_record_breakpoints)
4266         (record_full_init_record_breakpoints)
4267         (record_full_target::insert_breakpoint)
4268         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4269
4270 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4271
4272         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4273         * serial.c (serial_interface_lookup): Remove struct keyword.
4274
4275 2018-06-10  Tom Tromey  <tom@tromey.com>
4276
4277         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4278         method.
4279         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4280         a method.
4281         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4282         method.
4283         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4284         "beneath" as a method.
4285         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4286         Use "beneath" as a method.
4287
4288 2018-06-10  Tom Tromey  <tom@tromey.com>
4289
4290         * tracefile.c (struct trace_file_writer_deleter): New.
4291         <operator()>: Rename from trace_file_writer_xfree.
4292         (trace_file_writer_up): New typedef.
4293         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4294
4295 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4296
4297         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4298         <m_registers, m_register_status>: Change type to
4299         std::unique_ptr.
4300         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4301         XCNEWVEC.
4302
4303 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4304
4305         * common/common-regcache.h (enum register_status): Add
4306         underlying type "signed char".
4307         * regcache.h (reg_buffer) <m_register_status>: Change type to
4308         register_status *.
4309         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4310         register_status instead of signed char.
4311         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4312         (reg_buffer::get_register_status): Remove cast.
4313         (readable_regcache::raw_read): Remove cast.
4314         (readable_regcache::cooked_read): Remove cast.
4315
4316 2018-06-09  Tom Tromey  <tom@tromey.com>
4317
4318         * source.c (reverse_search_command, forward_search_command): Use
4319         scoped_fd.
4320
4321 2018-06-09  Tom Tromey  <tom@tromey.com>
4322
4323         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4324         (serial_ops_list): Now static, std::vector.
4325         (serial_interface_lookup, serial_add_interface): Update.
4326
4327 2018-06-09  Tom Tromey  <tom@tromey.com>
4328
4329         * dwarf2read.c (process_cu_includes): Update.
4330         (process_full_comp_unit): Update.
4331         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4332         std::vector.
4333
4334 2018-06-08  Paul Koning  <paul_koning@dell.com>
4335
4336         PR gdb/23252
4337
4338         * python/python.c (do_start_initialization):
4339         Avoid call to internal Python API.
4340         (init__gdb_module): New function.
4341
4342 2018-06-08  Gary Benson <gbenson@redhat.com>
4343
4344         * linux-thread-db.c (valprint.h): New include.
4345         (struct check_thread_db_info): New structure.
4346         (check_thread_db_on_load, tdb_testinfo): New static globals.
4347         (check_thread_db, check_thread_db_callback): New functions.
4348         (try_thread_db_load_1): Run integrity checks if requested.
4349         (maintenance_check_libthread_db): New function.
4350         (_initialize_thread_db): Register "maint check libthread-db"
4351         and "maint set/show check-libthread-db".
4352         * NEWS: Mention the above new commands.
4353
4354 2018-06-08  Tom Tromey  <tom@tromey.com>
4355
4356         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4357         now a method.
4358
4359 2018-06-08  Tom Tromey  <tom@tromey.com>
4360
4361         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4362
4363 2018-06-08  Tom Tromey  <tom@tromey.com>
4364
4365         * common/btrace-common.h (struct btrace_data): Add constructor,
4366         destructor, move assignment operator.
4367         <empty, clear, fini>: New methods.
4368         <format>: Initialize.
4369         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4370         (btrace_data_empty): Don't declare.
4371         * common/btrace-common.c (btrace_data_init): Remove.
4372         (btrace_data::fini): Rename from btrace_data_fini.
4373         (btrace_data::empty): Rename from btrace_data_empty.
4374         (btrace_data::clear): Rename from btrace_data_clear.  Return
4375         bool.
4376         * btrace.h (make_cleanup_btrace_data): Don't declare.
4377         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4378         (parse_xml_btrace): Update.
4379         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4380         (maint_btrace_clear_packet_history_cmd): Update.
4381
4382 2018-06-07  Pedro Alves  <palves@redhat.com>
4383
4384         * target.h (target_ops) <beneath>: Now a method.  All references
4385         updated.
4386         (class target_stack): New.
4387         * target.c (g_target_stack): New.
4388         (g_current_top_target): Delete.
4389         (current_top_target): Get the top target out of g_target_stack.
4390         (target_stack::push, target_stack::unpush): New.
4391         (push_target, unpush_target): Reimplement.
4392         (target_is_pushed): Reimplement in terms of g_target_stack.
4393         (target_ops::beneath, target_stack::find_beneath): New.
4394
4395 2018-06-07  Pedro Alves  <palves@redhat.com>
4396
4397         * target.h (find_target_beneath): Delete declaration.
4398         * target.c (find_target_beneath): Delete definition.
4399         * aix-thread.c: All callers of find_target_beneath adjusted to
4400         call target_ops::beneath instead.
4401         * bsd-uthread.c: Likewise.
4402         * linux-thread-db.c: Likewise.
4403         * ravenscar-thread.c: Likewise.
4404         * sol-thread.c: Likewise.
4405         * spu-multiarch.c: Likewise.
4406
4407 2018-06-07  Pedro Alves  <palves@redhat.com>
4408
4409         * target.h (target_ops) <beneath>: Now a method.  All references
4410         updated.
4411         (target_ops) <m_beneath>: New.
4412         * target.c (target_ops::beneath): New.
4413         * corelow.c: Adjust all references to target_ops::beneath.
4414         * linux-thread-db.c: Likewise.
4415         * make-target-delegates: Likewise.
4416         * record-btrace.c: Likewise.
4417         * record-full.c: Likewise.
4418         * remote.c: Likewise.
4419         * target.c: Likewise.
4420         * target-delegates.c: Regenerate.
4421
4422 2018-06-07  Pedro Alves  <palves@redhat.com>
4423
4424         * target.h (target_stack): Delete.
4425         (current_top_target): Declare function.
4426         * target.c (target_stack): Delete.
4427         (g_current_top_target): New.
4428         (current_top_target): New function.
4429         * auxv.c: Use current_top_target instead of target_stack
4430         throughout.
4431         * avr-tdep.c: Likewise.
4432         * breakpoint.c: Likewise.
4433         * corefile.c: Likewise.
4434         * elfread.c: Likewise.
4435         * eval.c: Likewise.
4436         * exceptions.c: Likewise.
4437         * frame.c: Likewise.
4438         * gdbarch-selftests.c: Likewise.
4439         * gnu-v3-abi.c: Likewise.
4440         * ia64-tdep.c: Likewise.
4441         * ia64-vms-tdep.c: Likewise.
4442         * infcall.c: Likewise.
4443         * infcmd.c: Likewise.
4444         * infrun.c: Likewise.
4445         * linespec.c: Likewise.
4446         * linux-tdep.c: Likewise.
4447         * minsyms.c: Likewise.
4448         * ppc-linux-nat.c: Likewise.
4449         * ppc-linux-tdep.c: Likewise.
4450         * procfs.c: Likewise.
4451         * regcache.c: Likewise.
4452         * remote.c: Likewise.
4453         * rs6000-tdep.c: Likewise.
4454         * s390-linux-nat.c: Likewise.
4455         * s390-tdep.c: Likewise.
4456         * solib-aix.c: Likewise.
4457         * solib-darwin.c: Likewise.
4458         * solib-dsbt.c: Likewise.
4459         * solib-spu.c: Likewise.
4460         * solib-svr4.c: Likewise.
4461         * solib-target.c: Likewise.
4462         * sparc-tdep.c: Likewise.
4463         * sparc64-tdep.c: Likewise.
4464         * spu-tdep.c: Likewise.
4465         * symfile.c: Likewise.
4466         * symtab.c: Likewise.
4467         * target-descriptions.c: Likewise.
4468         * target-memory.c: Likewise.
4469         * target.c: Likewise.
4470         * target.h: Likewise.
4471         * tracefile-tfile.c: Likewise.
4472         * tracepoint.c: Likewise.
4473         * valops.c: Likewise.
4474         * valprint.c: Likewise.
4475         * value.c: Likewise.
4476         * windows-tdep.c: Likewise.
4477         * mi/mi-main.c: Likewise.
4478
4479 2018-06-07  Tom Tromey  <tom@tromey.com>
4480
4481         * valprint.h (build_address_symbolic): Declare.
4482         * printcmd.c (print_address_symbolic): Update.
4483         (build_address_symbolic): Change "name" and "filename" to
4484         std::string.
4485         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4486         Update.
4487         * defs.h (build_address_symbolic): Remove declaration.
4488
4489 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4490
4491         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4492         (aarch64_vnv_type): Add function.
4493         (aarch64_pseudo_register_name): Add V regs for SVE.
4494         (aarch64_pseudo_register_type): Likewise.
4495         (aarch64_pseudo_register_reggroup_p): Likewise.
4496         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4497         (aarch64_pseudo_read_value): Add V regs for SVE.
4498         (aarch64_pseudo_write_2): Use V0 offset for SVE
4499         (aarch64_pseudo_write): Add V regs for SVE.
4500         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4501
4502 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4503
4504         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4505         (sve_vl_from_vq): Likewise.
4506
4507 2018-06-05  Tom Tromey  <tom@tromey.com>
4508
4509         * cli/cli-cmds.c (show_version): Update.
4510         * top.c (print_gdb_version): Add "interactive" parameter.
4511         Update.
4512         * main.c (captured_main_1): Update.
4513         * top.h (print_gdb_version): Add "interactive" parameter and a
4514         comment.
4515
4516 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4517
4518         * common/enum-flags.h: Add trailing semicolon to example in
4519         comment.
4520
4521 2018-06-05  Tom Tromey  <tom@tromey.com>
4522
4523         PR cli/12326:
4524         * NEWS: Add entry about pager.
4525         * utils.c (pagination_disabled_for_command): New global.
4526         (prompt_for_continue): Allow "c" response to prompt.
4527         (reinitialize_more_filter): Clear
4528         pagination_disabled_for_command.
4529         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4530
4531 2018-06-04  Tom Tromey  <tom@tromey.com>
4532
4533         * ada-lang.h (ada_lookup_symbol_list): Update.
4534         * ada-lang.c (resolve_subexp): Update.
4535         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4536         parameter.
4537         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4538         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4539         results parameter to std::vector.
4540         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4541         Update.
4542         * ada-exp.y (block_lookup): Update.
4543         (select_possible_type_sym): Change type of syms.  Remove nsyms
4544         parameter.
4545         (write_var_or_type, write_name_assoc): Update.
4546
4547 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4548
4549         * windows-nat.c (windows_nat_target::xfer_partial): Return
4550         TARGET_XFER_E_IO if we need to delegate to the target beneath
4551         but BENEATH is NULL.
4552
4553 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4554
4555         * Makefile.in (config.status): Add configure.nat as a
4556         dependency.
4557
4558 2018-06-04  Tom Tromey  <tom@tromey.com>
4559
4560         * cp-name-parser.y (cpname_state): Add method declarations.
4561         (HANDLE_QUAL): Update.
4562         (cpname_state::d_grab, cpname_state::fill_comp)
4563         (cpname_state::make_operator, cpname_state::make_dtor)
4564         (cpname_state::make_builtin_type, cpname_state::make_name)
4565         (cpname_state::d_qualify, cpname_state::d_int_type)
4566         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4567         (%union): Move earlier.
4568
4569 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4570
4571         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4572
4573 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4574
4575         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4576         (aarch64_pseudo_write_1): Likewise.
4577         (aarch64_pseudo_read_value): Use helper.
4578         (aarch64_pseudo_write): Likewise.
4579
4580 2018-06-04  Pedro Alves  <palves@redhat.com>
4581
4582         * darwin-nat.c (darwin_ops): Delete.
4583         (darwin_attach_pid): Use get_native_target.
4584
4585 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4586
4587         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4588         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4589
4590 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4591
4592         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4593         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4594         (aarch64_gdbarch_init): Check for SVE.
4595         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4596
4597 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4598
4599         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4600         * aarch64-tdep.h (aarch64_read_description): Likewise.
4601         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4602         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4603         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4604         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4605         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4606
4607 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4608
4609         * value.c (value_fetch_lazy_bitfield): New.
4610         (value_fetch_lazy_memory): New.
4611         (value_fetch_lazy_register): New.
4612         (value_fetch_lazy): Factor out to smaller functions.
4613
4614 2018-06-01  Tom Tromey  <tom@tromey.com>
4615
4616         * cp-name-parser.y (backslashable, represented): Now const.
4617
4618 2018-06-01  Tom Tromey  <tom@tromey.com>
4619
4620         * cp-name-parser.y: Include parser-defs.h.
4621         (parser_fprintf): Remove declaration.
4622
4623 2018-06-01  Tom Tromey  <tom@tromey.com>
4624
4625         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4626         %parse-param.
4627         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4628         (global_result): Remove globals.
4629         (struct cpname_state): New.
4630         (yyparse): Don't declare.
4631         (yylex, yyerror): Move declarations after %union.
4632         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4633         (make_name): Add state parameter.
4634         Update all callers.
4635         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4636         parameter.
4637         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4638         Update.
4639         (yylex): Add lvalp, state parameters.
4640         (yyerror): Add state parameter.
4641         (cp_demangled_name_to_comp): Update.
4642
4643 2018-06-01  Tom Tromey  <tom@tromey.com>
4644
4645         * cp-name-parser.y (parser_fprintf): Declare.
4646         (GDB_YY_REMAP_PREFIX): Define.
4647         Include yy-remap.h.  Don't redefine yy* identifiers.
4648
4649 2018-06-01  Tom Tromey  <tom@tromey.com>
4650
4651         * python/py-type.c (typy_legacy_template_argument): Update.
4652         * cp-support.h (cp_demangled_name_to_comp): Update.
4653         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4654         parameter to be a "std::string *".
4655         (main): Update.
4656
4657 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4658
4659         * ada-lex.l: Include "diagnostics.h" instead of
4660         "common/diagnostics.h".
4661         * unittests/environ-selftests.c: Likewise.
4662         * common/diagnostics.h: Moved to ../include.
4663
4664 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4665
4666         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4667         to language_mode_manual while calling breakpoint_re_set_one.
4668
4669 2018-06-01  Tom Tromey  <tom@tromey.com>
4670
4671         * valops.c (value_cast_structs, destructor_name_p): Update.
4672         * symtab.c (gdb_mangle_name): Update.
4673         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4674         Update.
4675         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4676         (pascal_object_print_value_fields, pascal_object_print_value):
4677         Update.
4678         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4679         * linespec.c (find_methods): Update.
4680         * gdbtypes.h (type_name_no_tag): Remove.
4681         (type_name_or_error): Rename from type_name_no_tag_or_error.
4682         * gdbtypes.c (type_name_no_tag): Remove.
4683         (type_name_or_error): Rename from type_name_no_tag_or_error.
4684         (lookup_struct_elt_type, check_typedef): Update.
4685         * expprint.c (print_subexp_standard): Update.
4686         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4687         * d-namespace.c (d_lookup_nested_symbol): Update.
4688         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4689         (cp_print_class_member): Update.
4690         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4691         * completer.c (add_struct_fields): Update.
4692         * c-typeprint.c (cp_type_print_derivation_info)
4693         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4694         Update.
4695         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4696         (ada_prefer_type, ada_is_exception_sym): Update.
4697
4698 2018-06-01  Tom Tromey  <tom@tromey.com>
4699
4700         * valops.c (enum_constant_from_type, value_namespace_elt)
4701         (value_maybe_namespace_elt): Update.
4702         * valarith.c (find_size_for_pointer_math): Update.
4703         * target-descriptions.c (make_gdb_type): Update.
4704         * symmisc.c (print_symbol): Update.
4705         * stabsread.c (define_symbol, read_type)
4706         (complain_about_struct_wipeout, add_undefined_type)
4707         (cleanup_undefined_types_1): Update.
4708         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4709         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4710         (rust_internal_print_type, rust_composite_type)
4711         (rust_evaluate_funcall, rust_evaluate_subexp)
4712         (rust_inclusive_range_type_p): Update.
4713         * python/py-type.c (typy_get_tag): Update.
4714         * p-typeprint.c (pascal_type_print_base): Update.
4715         * mdebugread.c (parse_symbol, parse_type): Update.
4716         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4717         Update.
4718         * guile/scm-type.c (gdbscm_type_tag): Update.
4719         * go-lang.c (sixg_string_p): Update.
4720         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4721         Update.
4722         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4723         (TYPE_TAG_NAME): Remove.
4724         * gdbtypes.c (type_name_no_tag): Simplify.
4725         (check_typedef, check_types_equal, recursive_dump_type)
4726         (copy_type_recursive, arch_composite_type): Update.
4727         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4728         in summary mode when needed.
4729         * eval.c (evaluate_funcall): Update.
4730         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4731         (process_structure_scope, read_enumeration_type)
4732         (read_namespace_type, read_module_type, determine_prefix): Update.
4733         * cp-support.c (inspect_type): Update.
4734         * coffread.c (process_coff_symbol, decode_base_type): Update.
4735         * c-varobj.c (c_is_path_expr_parent): Update.
4736         * c-typeprint.c (c_type_print_base_struct_union): Update.
4737         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4738         summary when using C language.
4739         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4740         (gen_maybe_namespace_elt): Update.
4741         * ada-lang.c (ada_type_name): Simplify.
4742         (empty_record, ada_template_to_fixed_record_type_1)
4743         (template_to_static_fixed_type)
4744         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4745
4746 2018-06-01  Tom Tromey  <tom@tromey.com>
4747
4748         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4749         c_print_type.
4750         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4751         (c_print_type): Update.
4752         (c_print_type): New overload.
4753         (c_type_print_varspec_prefix, c_type_print_args)
4754         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4755         (c_type_print_base_struct_union, c_type_print_base_1)
4756         (cp_type_print_method_args): Add "language" parameter.
4757         (c_type_print_base): Update.
4758         * c-lang.h (c_print_type): Add new overload.
4759
4760 2018-06-01  Tom Tromey  <tom@tromey.com>
4761
4762         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4763         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4764
4765 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4766
4767         * aarch64-tdep.c (aarch64_sve_register_names): New const
4768         var.
4769         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4770         (AARCH64_SVE_Z_REGS_NUM): New define.
4771         (AARCH64_SVE_P_REGS_NUM): Likewise.
4772         (AARCH64_SVE_NUM_REGS): Likewise.
4773
4774 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4775
4776         * nat/linux-ptrace.h [__alpha__]
4777         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4778         definitions.
4779
4780 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4781
4782         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4783         the endianness selected.
4784         * NEWS: Document `set endian auto' mode operation update.
4785
4786 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4787
4788         * Makefile.in: Add new header.
4789         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4790         (sve_vl_from_vg): Likewise.
4791         (sve_vq_from_vl): Likewise.
4792         (sve_vl_from_vq): Likewise.
4793         (sve_vq_from_vg): Likewise.
4794         (sve_vg_from_vq): Likewise.
4795         * configure.nat: Add new c file.
4796         * nat/aarch64-sve-linux-ptrace.c: New file.
4797         * nat/aarch64-sve-linux-ptrace.h: New file.
4798
4799 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4800
4801         * aarch64-linux-nat.c (aarch64_linux_read_description):
4802         Add parmeter zero.
4803         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4804         Likewise.
4805         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4806         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4807         (aarch64_gdbarch_init): Add parmeter zero.
4808         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4809         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4810         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4811         parmeter.
4812         * doc/gdb.texinfo: Describe SVE feature
4813         * features/aarch64-sve.c: New file.
4814
4815 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4816
4817         PR gdb/23210
4818         * gdbarch.sh (significant_addr_bit): Default to zero when
4819         not set by target architecture.
4820         * gdbarch.c: Re-generated.
4821         * utils.c (address_significant): Update.
4822
4823 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4824
4825         * stack.c (func_command): Remove trailing newline in call to error.
4826
4827 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4828
4829         * regcache.h (regcache_raw_collect): Remove, update callers to
4830         use regcache::raw_collect.
4831         * regcache.c (regcache_raw_collect): Remove.
4832
4833 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4834
4835         * regcache.h (regcache_raw_supply): Remove, update callers to
4836         use detached_regcache::raw_supply.
4837         * regcache.c (regcache_raw_supply): Remove.
4838
4839 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4840
4841         * regcache.h (regcache_cooked_write_part): Remove, update
4842         callers to use regcache::cooked_write_part.
4843         * regcache.c (regcache_cooked_write_part): Remove.
4844
4845 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4846
4847         * regcache.h (regcache_cooked_read_part): Remove, update callers
4848         to use readable_regcache::cooked_read_part.
4849         * regcache.c (regcache_cooked_read_part): Remove.
4850
4851 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4852
4853         * regcache.h (regcache_cooked_read_value): Remove, update
4854         callers to use readable_regcache::cooked_read_value.
4855         * regcache.c (regcache_cooked_read_value): Remove.
4856
4857 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4858
4859         * regcache.h (regcache_cooked_write): Remove, update callers to
4860         use regcache::cooked_write.
4861         * regcache.c (regcache_cooked_write): Remove.
4862
4863 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4864
4865         * regcache.h (regcache_invalidate): Remove, update callers to
4866         use detached_regcache::invalidate instead.
4867         * regcache.c (regcache_invalidate): Remove.
4868
4869 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4870
4871         * regcache.h (regcache_raw_write_part): Remove, update callers
4872         to use regcache::raw_write_part instead.
4873         * regcache.c (regcache_raw_write_part): Remove.
4874
4875 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4876
4877         * regcache.h (regcache_raw_read_part): Remove, update callers to
4878         use readable_regcache::raw_read_part instead.
4879         * regcache.c (regcache_raw_read_part): Remove.
4880
4881 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4882
4883         * regcache.h (regcache_cooked_read): Remove, update callers to
4884         use readable_regcache::cooked_read instead.
4885         * regcache.c (regcache_cooked_read): Remove.
4886
4887 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4888
4889         * regcache.h (regcache_raw_write): Remove, update callers to use
4890         regcache::raw_write instead.
4891         * regcache.c (regcache_raw_write): Remove.
4892
4893 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4894
4895         * regcache.h (regcache_raw_read): Remove, update callers to use
4896         readable_regcache::raw_read instead.
4897         * regcache.c (regcache_raw_read): Remove.
4898
4899 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4900
4901         * regcache.h (regcache_raw_update): Remove, update callers to
4902         use readable_regcache::raw_update instead.
4903         * regcache.c (regcache_raw_update): Remove.
4904
4905 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4906
4907         * regcache.h (regcache_register_status): Remove, update callers
4908         to use reg_buffer::get_register_status directly instead.
4909         * regcache.c (regcache_register_status): Remove.
4910
4911 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4912
4913         * regcache.h (regcache_get_ptid): Remove, update all callers to
4914         call regcache::ptid instead.
4915         * regcache.c (regcache_get_ptid): Remove.
4916
4917 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4918
4919         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4920
4921 2018-05-30  Pedro Alves  <palves@redhat.com>
4922
4923         * common/common-exceptions.h (exception_rethrow): Use
4924         ATTRIBUTE_NORETURN.
4925
4926 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4927
4928         * breakpoint.c (print_solib_event, check_status_catch_solib):
4929         Remove struct keyword in range-based for loops.
4930         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4931         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4932         Likewise.
4933         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4934         Likewise.
4935         * symfile.c (addr_info_make_relative): Likewise.
4936         * thread.c (value_in_thread_stack_temporaries): Likewise.
4937
4938 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4939
4940         PR gdb/16841
4941         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4942         aggregate type to get its real type before accessing it.
4943
4944 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4945
4946         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4947         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4948         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4949         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4950         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4951         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4952         * printcmd.c (info_address_command): Likewise.
4953
4954 2018-05-29  Tom Tromey  <tom@tromey.com>
4955
4956         * windows-nat.c (handle_exception): Update fall-through comment.
4957
4958 2018-05-29  Tom Tromey  <tom@tromey.com>
4959
4960         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4961         (struct program_space) <added_solibs>: Now a std::vector.
4962         * breakpoint.c (print_solib_event): Update.
4963         (check_status_catch_solib): Update.
4964         * progspace.c (clear_program_space_solib_cache): Update.
4965         * solib.c (update_solib_list): Update.
4966
4967 2018-05-29  Tom Tromey  <tom@tromey.com>
4968
4969         * python/py-type.c (typy_richcompare): Update.
4970         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4971         * gdbtypes.h (types_deeply_equal): Return bool.
4972         (types_equal): Likewise.
4973         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4974         declare VEC.
4975         (check_types_equal): Change worklist to std::vector.  Return
4976         bool.
4977         (struct type_equality_entry): Add constructor.
4978         (compare_maybe_null_strings): Return bool.
4979         (check_types_worklist): Return bool.  Change worklist to
4980         std::vector.
4981         (types_deeply_equal): Use std::vector.
4982         (types_equal): Return bool.
4983         (compare_maybe_null_strings): Simplify.
4984
4985 2018-05-29  Tom Tromey  <tom@tromey.com>
4986
4987         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4988
4989 2018-05-29  Tom Tromey  <tom@tromey.com>
4990
4991         * objc-lang.h: Don't include cp-support.h.
4992         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4993         declare VEC.
4994
4995 2018-05-27  Tom Tromey  <tom@tromey.com>
4996
4997         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4998
4999 2018-05-25  Tom Tromey  <tom@tromey.com>
5000
5001         * value.c (value::location): Initialize.
5002
5003 2018-05-25  Tom Tromey  <tom@tromey.com>
5004
5005         * dbxread.c (init_bincl_list): Remove.
5006         (bincl_list): Now a std::vector.
5007         (bincls_allocated, next_bincl): Remove.
5008         (free_bincl_list, do_free_bincl_list_cleanup)
5009         (make_cleanup_free_bincl_list): Remove.
5010         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5011         unique_xmalloc_ptr.
5012         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5013         (struct header_file_location): Add constructor.
5014         (add_bincl_to_list): Remove.
5015
5016 2018-05-25  Tom Tromey  <tom@tromey.com>
5017
5018         * tui/tui.c (tui_enable): Update.
5019         * mi/mi-interp.c (mi_interp::init): Update.
5020         * interps.h (class interp) <name>: New method.
5021         <m_name>: Rename from name.
5022         (~scoped_restore_interp): Update.
5023         * interps.c (interp::interp): Update.
5024         (interp_add, interp_set, interp_lookup_existing)
5025         (current_interp_named_p): Update.
5026
5027 2018-05-25  Tom Tromey  <tom@tromey.com>
5028
5029         * interps.c (interp_name): Remove.
5030         * mi/mi-interp.c (mi_interp::init): Update.
5031         * interps.h (interp_name): Remove.
5032         (~scoped_restore_interp): Update.
5033         * tui/tui.c (tui_enable): Update.
5034
5035 2018-05-25  Tom Tromey  <tom@tromey.com>
5036
5037         * utils.c (fputs_maybe_filtered): Update.
5038         * linespec.c (decode_line_full): Update.
5039         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5040         (mi_print_breakpoint_for_event, mi_solib_loaded)
5041         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5042         (mi_user_selected_context_changed): Update.
5043         * mi/mi-main.c (mi_execute_command): Update.
5044         * cli/cli-script.c (execute_control_command): Update.
5045         * python/python.c (execute_gdb_command): Update.
5046         * solib.c (info_sharedlibrary_command): Update.
5047         * interps.c (interp_ui_out): Remove.
5048         * interps.h (interp_ui_out): Remove.
5049
5050 2018-05-25  Tom Tromey  <tom@tromey.com>
5051
5052         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5053         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5054         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5055
5056 2018-05-25  Tom Tromey  <tom@tromey.com>
5057
5058         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5059         * interps.c (interp_exec): Use scoped_restore.
5060
5061 2018-05-25  Tom Tromey  <tom@tromey.com>
5062
5063         * remote.c (remote_target::remote_file_get): Use
5064         gdb::byte_vector.
5065         (remote_target::remote_file_put): Likewise.
5066
5067 2018-05-25  Tom Tromey  <tom@tromey.com>
5068
5069         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5070         a std::string.
5071         (get_pe_section_index, add_pe_exported_sym): Update.
5072         (read_pe_exported_syms): Use gdb::def_vector.
5073
5074 2018-05-25  Tom Tromey  <tom@tromey.com>
5075
5076         * frame.c (remove_prev_frame): Remove.
5077         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5078
5079 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5080
5081         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5082         Remove prototypes.
5083         * mips-linux-nat.c (supply_fpregset): Always call
5084         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5085         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5086         `mips_fill_fpregset'.
5087         * mips-linux-tdep.c (mips_supply_fpregset)
5088         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5089         (mips_fill_fpregset_wrapper): Remove functions.
5090         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5091         (mips_linux_fpregset): Remove variable.
5092         (mips_linux_iterate_over_regset_sections): Use
5093         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5094         (mips_linux_o32_sigframe_init): Remove comment.
5095
5096 2018-05-25  Pedro Alves  <palves@redhat.com>
5097
5098         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5099         (struct readahead_cache, struct packet_reg, struct
5100         remote_arch_state, class remote_state): Move higher up in the
5101         file.
5102         (remote_target::m_remote_state): Now an object instead of a pointer.
5103         (remote_target::get_remote_state): Adjust.
5104
5105 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5106
5107         * stack.c (select_and_print_frame): Delete.
5108         (struct function_bounds): Move struct within function.
5109         (func_command): Most content moved into new function
5110         find_frame_for_function, use new function, print result, add
5111         function comment.
5112         (find_frame_for_function): New function, now returns a result.
5113
5114 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5115
5116         * stack.c (iterate_over_block_arg_vars): Fix comment.
5117         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5118
5119 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5120
5121         PR gdb/23203
5122         * frame.c
5123         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5124         Define.
5125         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5126         Define.
5127         * frame.h (class scoped_restore_selected_frame): New class.
5128         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5129         of any exception, use scoped_restore_selected_frame to restore the
5130         frame instead.
5131
5132 2018-05-24  Pedro Alves  <palves@redhat.com>
5133
5134         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5135         override.
5136
5137 2018-05-23  Tom Tromey  <tom@tromey.com>
5138
5139         * complaints.c (struct complaints): Remove.
5140         (symfile_complaint_book): Remove.
5141         (series): New global.
5142         (complaint_internal): Update.
5143         (clear_complaints): Update.
5144
5145 2018-05-23  Tom Tromey  <tom@tromey.com>
5146
5147         * complaints.c (counters): New global.
5148         (struct complain): Remove.
5149         (struct complaints) <root>: Remove.
5150         (complaint_sentinel): Remove.
5151         (symfile_complaint_book): Update.
5152         (find_complaint) Remove.
5153         (complaint_internal, clear_complaints): Update.
5154
5155 2018-05-23  Tom Tromey  <tom@tromey.com>
5156
5157         * complaints.c (struct complain) <file, line>: Remove.
5158         (find_complaint): Remove file, line parameters.
5159         (complaint_internal): Update.
5160
5161 2018-05-23  Tom Tromey  <tom@tromey.com>
5162
5163         * complaints.c (vcomplaint): Remove.
5164         (complaint_internal) Merge in contents of vcomplaint.
5165
5166 2018-05-23  Tom Tromey  <tom@tromey.com>
5167
5168         * complaints.c (struct complaints) <explanation>: Remove.
5169         (symfile_explanations): Remove.
5170         (symfile_complaint_book): Update.
5171         (vcomplaint): Update.
5172         (struct explanation): Remove.
5173
5174 2018-05-23  Tom Tromey  <tom@tromey.com>
5175
5176         * complaints.c (symfile_complaints): Remove.
5177         (complaint_internal): Remove "complaints" parameter.
5178         (clear_complaints, vcomplaint): Remove "c" parameter.
5179         (get_complaints): Remove.
5180         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5181         (dwarf2_debug_line_missing_file_complaint)
5182         (dwarf2_debug_line_missing_end_sequence_complaint)
5183         (dwarf2_complex_location_expr_complaint)
5184         (dwarf2_const_value_length_mismatch_complaint)
5185         (dwarf2_section_buffer_overflow_complaint)
5186         (dwarf2_macro_malformed_definition_complaint)
5187         (dwarf2_invalid_attrib_class_complaint)
5188         (create_addrmap_from_index, dw2_symtab_iter_next)
5189         (dw2_expand_marked_cus)
5190         (dw2_debug_names_iterator::find_vec_in_debug_names)
5191         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5192         (create_debug_type_hash_table, init_cutu_and_read_dies)
5193         (partial_die_parent_scope, add_partial_enumeration)
5194         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5195         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5196         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5197         (create_cus_hash_table, create_dwp_hash_table)
5198         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5199         (dwarf2_rnglists_process, dwarf2_ranges_process)
5200         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5201         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5202         (handle_struct_member_die, process_structure_scope)
5203         (read_array_type, read_common_block, read_module_type)
5204         (read_tag_pointer_type, read_typedef, read_base_type)
5205         (read_subrange_type, load_partial_dies, partial_die_info::read)
5206         (partial_die_info::read, partial_die_info::read)
5207         (partial_die_info::read, read_checked_initial_length_and_offset)
5208         (dwarf2_string_attr, read_formatted_entries)
5209         (dwarf_decode_line_header)
5210         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5211         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5212         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5213         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5214         (get_signatured_type, get_DW_AT_signature_type)
5215         (decode_locdesc, file_file_name, consume_improper_spaces)
5216         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5217         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5218         (dwarf2_symbol_mark_computed, set_die_type)
5219         (read_attribute_value): Update.
5220         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5221         Update.
5222         * dbxread.c (unknown_symtype_complaint)
5223         (lbrac_mismatch_complaint, repeated_header_complaint)
5224         (set_namestring, function_outside_compilation_unit_complaint)
5225         (read_dbx_symtab, process_one_symbol): Update.
5226         * gdbtypes.c (stub_noname_complaint): Update.
5227         * windows-nat.c (handle_unload_dll): Update.
5228         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5229         (decode_base_type): Update.
5230         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5231         (eb_complaint, record_include_begin, record_include_end)
5232         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5233         (process_xcoff_symbol, read_symbol)
5234         (function_outside_compilation_unit_complaint)
5235         (scan_xcoff_symtab): Update.
5236         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5237         * buildsym.c (finish_block_internal, make_blockvector)
5238         (end_symtab_get_static_block, augment_type_symtab): Update.
5239         * dtrace-probe.c (dtrace_process_dof)
5240         (dtrace_static_probe_ops::get_probes): Update.
5241         * complaints.h (struct complaint): Don't declare.
5242         (symfile_complaints): Remove.
5243         (complaint_internal): Remove "complaints" parameter.
5244         (complaint): Likewise.
5245         (clear_complaints): Likewise.
5246         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5247         (reread_symbols): Update.
5248         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5249         (dwarf2_frame_cache, decode_frame_entry): Update.
5250         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5251         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5252         (info_selectors_command): Update.
5253         * macrotab.c (macro_include, check_for_redefinition)
5254         (macro_undef): Update.
5255         * objfiles.c (filter_overlapping_sections): Update.
5256         * stabsread.c (invalid_cpp_abbrev_complaint)
5257         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5258         (define_symbol, error_type, read_type, rs6000_builtin_type)
5259         (stabs_method_name_from_physname, read_member_functions)
5260         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5261         (attach_fields_to_type, complain_about_struct_wipeout)
5262         (read_range_type, read_args, common_block_start)
5263         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5264         Update.
5265         * mdebugread.c (index_complaint, unknown_ext_complaint)
5266         (basic_type_complaint, bad_tag_guess_complaint)
5267         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5268         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5269         (parse_procedure, parse_lines)
5270         (function_outside_compilation_unit_complaint)
5271         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5272         (bad_tag_guess_complaint, reg_value_complaint): Update.
5273         * cp-support.c (demangled_name_complaint): Update.
5274         * macroscope.c (sal_macro_scope): Update.
5275         * dwarf-index-write.c (class debug_names): Update.
5276
5277 2018-05-23  Tom Tromey  <tom@tromey.com>
5278
5279         * complaints.c (clear_complaints): Remove "noisy" parameter.
5280         * complaints.h (clear_complaints): Update.
5281         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5282         (reread_symbols): Update.
5283
5284 2018-05-23  Tom Tromey  <tom@tromey.com>
5285
5286         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5287         SUBSEQUENT_MESSAGE.
5288         (vcomplaint, clear_complaints): Update.
5289         (symfile_explanations): Remove some messages.
5290
5291 2018-05-23  Tom Tromey  <tom@tromey.com>
5292
5293         * complaints.c (internal_complaint): Remove.
5294         * complaints.h (internal_complaint): Remove.
5295
5296 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5297
5298         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5299
5300 2018-05-22  Pedro Alves  <palves@redhat.com>
5301
5302         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5303         (remote_fileio_badfd, remote_fileio_return_errno)
5304         (remote_fileio_return_success, remote_fileio_func_open)
5305         (remote_fileio_func_open, remote_fileio_func_close)
5306         (remote_fileio_func_read, remote_fileio_func_write)
5307         (remote_fileio_func_lseek, remote_fileio_func_rename)
5308         (remote_fileio_func_unlink, remote_fileio_func_stat)
5309         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5310         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5311         remote_target parameter.
5312         (remote_fio_func_map) <func>: Add remote_target parameter.
5313         (do_remote_fileio_request, remote_fileio_request):
5314         * remote-fileio.h (remote_fileio_request):
5315         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5316         remote_target parameter.
5317         (remote_notif_process, handle_notification): Adjust to pass down
5318         the remote.
5319         (remote_notif_state_allocate): Add remote_target parameter.  Save
5320         it.
5321         * remote-notif.h (struct remote_target): Forward declare.
5322         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5323         remote_target parameter.
5324         (struct remote_notif_state) <remote>: New field.
5325         (remote_notif_ack, remote_notif_parse): Add remote_target
5326         parameter.
5327         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5328         remote_target parameter.
5329         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5330         (threads_listing_context, rmt_thread_action, protocol_feature)
5331         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5332         (packet_result, struct threads_listing_context, remote_state):
5333         Move definitions and declarations higher up.
5334         (remote_target) <~remote_target>: Declare.
5335         (remote_download_command_source, remote_file_put, remote_file_get)
5336         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5337         (remote_hostio_pread_vFile, remote_hostio_send_command)
5338         (remote_hostio_set_filesystem, remote_hostio_open)
5339         (remote_hostio_close, remote_hostio_unlink, remote_state)
5340         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5341         (get_memory_write_packet_size, get_memory_read_packet_size)
5342         (append_pending_thread_resumptions, remote_detach_1)
5343         (append_resumption, remote_resume_with_vcont)
5344         (add_current_inferior_and_thread, wait_ns, wait_as)
5345         (process_stop_reply, remote_notice_new_inferior)
5346         (process_initial_stop_replies, remote_add_thread)
5347         (btrace_sync_conf, remote_btrace_maybe_reopen)
5348         (remove_new_fork_children, kill_new_fork_children)
5349         (discard_pending_stop_replies, stop_reply_queue_length)
5350         (check_pending_events_prevent_wildcard_vcont)
5351         (discard_pending_stop_replies_in_queue, stop_reply)
5352         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5353         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5354         (remote_interrupt_as, remote_interrupt_ns)
5355         (remote_get_noisy_reply, remote_query_attached)
5356         (remote_add_inferior, remote_current_thread, get_current_thread)
5357         (set_thread, set_general_thread, set_continue_thread)
5358         (set_general_process, write_ptid)
5359         (remote_unpack_thread_info_response, remote_get_threadinfo)
5360         (parse_threadlist_response, remote_get_threadlist)
5361         (remote_threadlist_iterator, remote_get_threads_with_ql)
5362         (remote_get_threads_with_qxfer)
5363         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5364         (get_offsets, remote_check_symbols, remote_supported_packet)
5365         (remote_query_supported, remote_packet_size)
5366         (remote_serial_quit_handler, remote_detach_pid)
5367         (remote_vcont_probe, remote_resume_with_hc)
5368         (send_interrupt_sequence, interrupt_query)
5369         (remote_notif_get_pending_events, fetch_register_using_p)
5370         (send_g_packet, process_g_packet, fetch_registers_using_g)
5371         (store_register_using_P, store_registers_using_G)
5372         (set_remote_traceframe, check_binary_download)
5373         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5374         (remote_xfer_live_readonly_partial, remote_read_bytes)
5375         (remote_send_printf, remote_flash_write, readchar)
5376         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5377         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5378         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5379         (extended_remote_disable_randomization, extended_remote_run)
5380         (send_environment_packet, extended_remote_environment_support)
5381         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5382         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5383         (packet_command): Now methods of ...
5384         (remote_target): ... this class.
5385         (m_remote_state) <remote_target>: New field.
5386         (struct remote_state) <stop_reply_queue,
5387         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5388         fields.
5389         (remote_state::remote_state): Allocate stop_reply_queue.
5390         (remote_state): Delete global.
5391         (get_remote_state_raw): Delete.
5392         (remote_target::get_remote_state): Allocate m_remote_state on
5393         demand.
5394         (get_current_remote_target): New.
5395         (remote_ops, extended_remote_ops): Delete.
5396         (wait_forever_enabled_p, remote_async_inferior_event_token):
5397         Delete, moved to struct remote_state.
5398         (remote_target::close): Delete self.  Destruction bits split to
5399         ...
5400         (remote_target::~remote_target): ... this.
5401         (show_memory_packet_size): Adjust to use
5402         get_current_remote_target.
5403         (struct protocol_feature) <func>: Add remote_target parameter.
5404         All callers adjusted.
5405         (curr_quit_handler_target): New.
5406         (remote_serial_quit_handler): Reimplement.
5407         (remote_target::open_1): Adjust to use get_current_remote_target.
5408         Heap-allocate remote_target/extended_remote_target instances.
5409         (vcont_builder::vcont_builder): Add remote_target parameter, and
5410         save it in m_remote.  All callers adjusted.
5411         (vcont_builder::m_remote): New field.
5412         (vcont_builder::restart, vcont_builder::flush)
5413         (vcont_builder::push_action): Use it.
5414         (remote_target::commit_resume): Use it.
5415         (struct queue_iter_param) <remote>: New field.
5416         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5417         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5418         (check_pending_event_prevents_wildcard_vcont_callback)
5419         (remote_target::check_pending_events_prevent_wildcard_vcont)
5420         (remote_target::discard_pending_stop_replies)
5421         (remote_target::discard_pending_stop_replies_in_queue)
5422         (remote_target::remote_notif_remove_queued_reply): Fill in
5423         'remote' field.
5424         (remote_notif_get_pending_events): New.
5425         (remote_target::readchar, remote_target::remote_serial_write):
5426         Save/restore curr_quit_handler_target.
5427         (putpkt): New.
5428         (kill_new_fork_children): Fill in 'remote' field.
5429         (packet_command): Use get_current_remote_target, defer to
5430         remote_target method of same name.
5431         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5432         parameter, and save it in m_remote.  All callers adjusted.
5433         (scoped_remote_fd::release): Use m_remote.
5434         (scoped_remote_fd::m_remote): New field.
5435         (remote_file_put, remote_file_get, remote_file_delete): Use
5436         get_current_remote_target, defer to remote_target method of same
5437         name.
5438         (remote_btrace_reset): Add remote_state paremeter.  Update all
5439         callers.
5440         (remote_async_inferior_event_handler). Pass down 'data'.
5441         (remote_new_objfile): Use get_current_remote_target.
5442         (remote_target::vcont_r_supported): New.
5443         (set_range_stepping): Use get_current_remote_target and
5444         remote_target::vcont_r_supported.
5445         (_initialize_remote): Don't allocate 'remote_state' and
5446         'stop_reply_queue' globals.
5447         * remote.h (struct remote_target): Forward declare.
5448         (getpkt, putpkt, remote_notif_get_pending_events): Add
5449         'remote_target' parameter.
5450
5451 2018-05-22  Pedro Alves  <palves@redhat.com>
5452
5453         * remote.c (vcont_builder): Now a class.  Make all data members
5454         private.
5455         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5456         Declare methods.
5457         (vcont_builder_restart): Rename to ...
5458         (vcont_builder::restart): ... this.
5459         (vcont_builder_flush): Rename to ...
5460         (vcont_builder::flush): ... this.
5461         (vcont_builder_push_action): Rename to ...
5462         (vcont_builder::push_action): ... this.
5463         (remote_target::commit_resume): Adjust.
5464
5465 2018-05-22  Pedro Alves  <palves@redhat.com>
5466
5467         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5468         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5469         (get_fixed_memory_packet_size): New.
5470         (get_memory_packet_size): Use it.
5471         (set_memory_packet_size): Don't override the config size with
5472         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5473         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5474         Don't refer to get_memory_packet_size if not connected to a remote
5475         target.  Show "(default)" if configured size is 0.
5476
5477 2018-05-22  Pedro Alves  <palves@redhat.com>
5478
5479         * remote.c (remote_target::mourn_inferior): Move
5480         discard_pending_stop_replies call here from ...
5481         (_initialize_remote): ... here.
5482
5483 2018-05-22  Pedro Alves  <palves@redhat.com>
5484
5485         * remote.c (compare_section_command): Remove set_general_process
5486         call.
5487
5488 2018-05-22  Pedro Alves  <palves@redhat.com>
5489
5490         * remote.c (struct packet_reg, struct remote_arch_state):
5491         Move higher up in the file.
5492         (remote_state) <m_arch_states>: Store remote_arch_state values
5493         instead of remote_arch_state pointers.
5494         (remote_state::get_remote_arch_state): Adjust.
5495
5496 2018-05-22  Pedro Alves  <palves@redhat.com>
5497
5498         * remote.c: Include <unordered_map>.
5499         (remote_state): Now a class.
5500         (remote_state) <get_remote_arch_state>: Declare method.
5501         <get_remote_arch_state>: New field.
5502         (remote_arch_state) <remote_arch_state>: Declare ctor.
5503         <regs>: Now a unique_ptr.
5504         (remote_gdbarch_data_handle): Delete.
5505         (get_remote_arch_state): Delete.
5506         (remote_state::get_remote_arch_state): New.
5507         (get_remote_state): Adjust to call remote_state's
5508         get_remote_arch_state method.
5509         (init_remote_state): Delete, bits factored out to ...
5510         (remote_arch_state::remote_arch_state): ... this new method.
5511         (get_remote_packet_size, get_memory_packet_size)
5512         (process_g_packet, remote_target::fetch_registers)
5513         (remote_target::prepare_to_store, store_registers_using_G)
5514         (remote_target::store_registers, remote_target::get_trace_status):
5515         Adjust to call remote_state's method.
5516         (_initialize_remote): Remove reference to
5517         remote_gdbarch_data_handle.
5518
5519 2018-05-22  Pedro Alves  <palves@redhat.com>
5520
5521         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5522         pread>: New method declarations.
5523         (remote_target::open_1): Adjust.
5524         (readahead_cache_invalidate): Rename to ...
5525         (readahead_cache::invalidate): ... this, and adjust to be a class
5526         method.
5527         (readahead_cache_invalidate_fd): Rename to ...
5528         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5529         class method.
5530         (remote_hostio_pwrite): Adjust.
5531         (remote_hostio_pread_from_cache): Rename to ...
5532         (readahead_cache::pread): ... this, and adjust to be a class
5533         method.
5534         (remote_hostio_close): Adjust.
5535
5536 2018-05-22  Pedro Alves  <palves@redhat.com>
5537
5538         * remote.c (remote_hostio_close_cleanup): Delete.
5539         (class scoped_remote_fd): New.
5540         (remote_file_put, remote_file_get): Use it.
5541
5542 2018-05-22  Pedro Alves  <palves@redhat.com>
5543
5544         (struct vCont_action_support): Use bool and initialize all fields.
5545         (struct readahead_cache): Initialize all fields.
5546         (remote_state): Use bool and initialize all fields.
5547         (remote_state::remote_state, remote_state::~remote_state): New.
5548         (new_remote_state): Delete.
5549         (_initialize_remote): Use new to allocate remote_state.
5550
5551 2018-05-22  Pedro Alves  <palves@redhat.com>
5552             張俊芝  <zjz@zjz.name>
5553
5554         PR gdb/22973
5555         * c-exp.y: Include "c-support.h".
5556         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5557         of tolower.  Use c_ident_is_alpha to scan names.
5558         * c-lang.c: Include "c-support.h".
5559         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5560         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5561         * c-support.h: New file, with bits factored out from ...
5562         * cp-name-parser.y: ... this file.
5563         Include "c-support.h".
5564         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5565         c-support.h and renamed.
5566         (symbol_end, yylex): Adjust.
5567
5568 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5569
5570         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5571         parameter type to CORE_ADDR.
5572         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5573         parameter type in declaration to CORE_ADDR.
5574         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5575         target_auxv_search to get AT_HWCAP and use the result to get the
5576         target description.
5577         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5578         to CORE_ADDR. Remove the cast of the return value to unsigned
5579         long. Fix error predicate of target_auxv_search.
5580         (ppc_linux_nat_target::read_description): Change the type of the
5581         hwcap variable to CORE_ADDR.
5582
5583 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5584
5585         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5586         if the size of fpscr is larger than 32 bits.
5587
5588 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5589
5590         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5591         (ppc32_linux_vsxregmap): New global.
5592         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5593         regcache_supply_regset, and regcache_collect_regset.
5594         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5595         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5596         (fetch_vsx_register, store_vsx_register): Remove.
5597         (fetch_vsx_registers): Add regno parameter. Get regset using
5598         ppc_linux_vsxregset. Use regset to supply registers.
5599         (store_vsx_registers): Add regno parameter. Get regset using
5600         ppc_linux_vsxregset. Use regset to collect registers.
5601         (fetch_register): Call fetch_vsx_registers instead of
5602         fetch_vsx_register.
5603         (store_register): Call store_vsx_registers instead of
5604         store_vsx_register.
5605         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5606         new regno parameter.
5607         (store_ppc_registers): Call store_vsx_registers with -1 for the
5608         new regno parameter.
5609         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5610         (ppc_collect_vsxregset): Remove.
5611
5612 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5613
5614         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5615         offset fields.
5616         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5617         for vector register offset fields.
5618         (ppc64_fbsd_reg_offsets): Likewise.
5619         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5620         to vector register offset fields.
5621         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5622         to vector register offset fields.
5623         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5624         vector register offset fields.
5625         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5626         initializers for vector register offset fields.
5627         (rs6000_aix64_reg_offsets): Likewise.
5628         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5629         (ppc_supply_vrregset): Remove.
5630         (ppc_collect_vrregset): Remove.
5631         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5632         (ppc_linux_vrregset) : New function.
5633         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5634         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5635         (ppc32_linux_vrregset): Remove.
5636         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5637         and use result instead of ppc32_linux_vrregset.
5638         (ppc32_linux_reg_offsets): Remove initializers for vector register
5639         offset fields.
5640         (ppc64_linux_reg_offsets): Likewise.
5641         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5642         * ppc-linux-nat.c: Include regset.h.
5643         (gdb_vrregset_t): Adjust comment to account for little-endian
5644         mode.
5645         (supply_vrregset, fill_vrregset): Remove.
5646         (fetch_altivec_register, store_altivec_register): Remove.
5647         (fetch_altivec_registers): Add regno parameter. Get regset using
5648         ppc_linux_vrregset. Use regset to supply registers.
5649         (store_altivec_registers): Add regno parameter. Get regset using
5650         ppc_linux_vrregset. Use regset to collect registers.
5651         (fetch_register): Call fetch_altivec_registers instead of
5652         fetch_altivec_register.
5653         (store_register): Call store_altivec_registers instead of
5654         store_altivec_register.
5655         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5656         the new regno parameter.
5657         (store_ppc_registers): Call store_altivec_registers with -1 for
5658         the new regno parameter.
5659
5660 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5661
5662         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5663         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5664         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5665         (gdb_vrregset_t): Change array type size to
5666         PPC_LINUX_SIZEOF_VRREGSET.
5667         (gdb_vsxregset_t): Change array type size to
5668         PPC_LINUX_SIZEOF_VSXREGSET.
5669         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5670         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5671         PPC_LINUX_SIZEOF_VSXREGSET.
5672
5673 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5674
5675         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5676         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5677         nat/ppc-linux.c.
5678         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5679         ppc_linux_target_wordsize with tid.
5680         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5681         wordsize with tid.
5682         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5683         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5684         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5685         tid parameter. Remove static specifier.
5686         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5687         (ppc_linux_target_wordsize): New declaration.
5688
5689 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5690
5691         * arch/ppc-linux-common.c: New file.
5692         * arch/ppc-linux-common.h: New file.
5693         * arch/ppc-linux-tdesc.h: New file.
5694         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5695         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5696         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5697         arch/ppc-linux-tdesc.h.
5698         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5699         arch/ppc-linux-tdesc.h.
5700         (ppc_linux_nat_target::read_description): Remove target
5701         description matching code. Fill a ppc_linux_features struct and
5702         call ppc_linux_match_description with it. Move comment about ISA
5703         2.05 to ppc-linux-common.c.
5704         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5705         arch/ppc-linux-tdesc.h.
5706         (ppc_linux_core_read_description): Remove target description
5707         matching code. Fill a ppc_linux_features struct and call
5708         ppc_linux_match_description with it.
5709         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5710         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5711         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5712         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5713         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5714         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5715         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5716         (tdesc_powerpc_e500l): Remove.
5717
5718 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5719
5720         * ada-lang.c (catch_assert_command): Pass empty string instead
5721         of NULL for excep_string argument.
5722
5723 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5724
5725         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5726         the width of the requested register exceeds the width of the
5727         `ptrace' data type.
5728
5729 2018-05-21  Tom Tromey  <tom@tromey.com>
5730
5731         * printcmd.c (output_command): Remove.
5732         (output_command_const): Rename to output_command.
5733         * valprint.h (output_command): Rename from output_command_const.
5734         * tracepoint.c (trace_dump_actions): Call output_command.
5735
5736 2018-05-21  Tom Tromey  <tom@tromey.com>
5737
5738         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5739         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5740         * ada-lang.h (create_ada_exception_catchpoint): Update.
5741         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5742         std::string.
5743         (create_excep_cond_exprs, ~ada_catchpoint)
5744         (should_stop_exception, print_one_exception)
5745         (print_mention_exception, print_recreate_exception): Update.
5746         (ada_get_next_arg): Remove.
5747         (catch_ada_exception_command_split): Use std::string.  Change type
5748         of "excep_string", "cond_string".
5749         (catch_ada_exception_command): Update.
5750         (create_ada_exception_catchpoint): Change type of excep_string.
5751         (ada_exception_sal): Remove excep_string parameter.
5752         (~ada_catchpoint): Remove.
5753
5754 2018-05-21  Tom Tromey  <tom@tromey.com>
5755
5756         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5757         cleanup.
5758
5759 2018-05-21  Tom Tromey  <tom@tromey.com>
5760
5761         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5762         Return unique_xmalloc_ptr.
5763         (print_it_exception): Update.
5764
5765 2018-05-21  Tom Tromey  <tom@tromey.com>
5766
5767         * tracepoint.c (trace_dump_actions): Use std::string.
5768
5769 2018-05-21  Tom Tromey  <tom@tromey.com>
5770
5771         * symfile.c (reread_symbols): Use std::string for original_name.
5772
5773 2018-05-21  Tom Tromey  <tom@tromey.com>
5774
5775         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5776         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5777         constructor.
5778
5779 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5780
5781         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5782         instance to...
5783         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5784         * objfiles.c (get_objfile_bfd_data): Allocate
5785         objfile_per_bfd_storage with obstack_new when allocating on
5786         obstack.
5787
5788 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5789
5790         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5791         OBSTACK_ZALLOC.
5792         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5793         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5794         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5795         (add_pending): Likewise.
5796         (parse_symbol): Likewise.
5797         (parse_partial_symbols): Likewise.
5798         (psymtab_to_symtab_1): Likewise.
5799         (new_psymtab): Likewise.
5800         (elfmdebug_build_psymtabs): Likewise.
5801         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5802         * objfiles.c (get_objfile_bfd_data): Likewise.
5803         (objfile_register_static_link): Likewise.
5804         * psymtab.c (allocate_psymtab): Likewise.
5805         * stabsread.c (read_member_functions): Likewise.
5806         * xcoffread.c (xcoff_end_psymtab): Likewise.
5807
5808 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5809
5810         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5811         compiler supports std::is_trivially_constructible.
5812         * common/poison.h: Include obstack.h.
5813         (IsMallocable): Define to is_trivially_constructible if the
5814         compiler supports it, define to true_type otherwise.
5815         (xobnew): New.
5816         (XOBNEW): Redefine.
5817         (xobnewvec): New.
5818         (XOBNEWVEC): Redefine.
5819         * gdb_obstack.h (obstack_zalloc): New.
5820         (OBSTACK_ZALLOC): Redefine.
5821         (obstack_calloc): New.
5822         (OBSTACK_CALLOC): Redefine.
5823         (obstack_new): New.
5824         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5825         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5826         gdbarch.c.
5827         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5828         obstack_calloc/obstack_zalloc.
5829         (gdbarch_obstack_zalloc): Remove.
5830         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5831
5832 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5833
5834         * stack.c (backtrace_command_1): Remove useless variable int i.
5835
5836 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5837
5838         * stack.c (print_frame_info): Fix comment.
5839
5840 2018-05-18  Tom Tromey  <tom@tromey.com>
5841
5842         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5843         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5844         (~dwarf2_per_objfile): Update
5845         (dwarf2_get_dwz_file): Use new.
5846         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5847         unique_ptr.
5848
5849 2018-05-18  Tom Tromey  <tom@tromey.com>
5850
5851         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5852         unique_ptr.
5853         * dwarf2read.c (struct dwp_file): Add constructor and
5854         initializers.
5855         (open_and_init_dwp_file): Return a unique_ptr.
5856         (dwarf2_per_objfile, create_dwp_hash_table)
5857         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5858         (lookup_dwo_unit_in_dwp): Update.
5859         (open_and_init_dwp_file, get_dwp_file): Update.
5860
5861 2018-05-18  Tom Tromey  <tom@tromey.com>
5862
5863         * dwarf2read.c (dwarf2_per_objfile): Update.
5864         (struct mapped_index): Add initializers.
5865         (dwarf2_read_index): Use new.
5866         (dw2_symtab_iter_init): Update.
5867         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5868         unique_ptr.
5869
5870 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5871
5872         * dwarf2read.c (mapped_index) <total_size>: Remove.
5873
5874 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5875
5876         * unittests/format_pieces-selftests.c (test_format_specifier):
5877         Add ARI comments.
5878
5879 2018-05-18  Tom Tromey  <tom@tromey.com>
5880
5881         * c-typeprint.c (maybe_print_hole): New function.
5882         (c_print_type_struct_field_offset): Update.
5883         (c_type_print_base_struct_union): Call maybe_print_hole.
5884
5885 2018-05-17  Keith Seitz  <keiths@redhat.com>
5886
5887         * breakpoint.c (build_bpstat_chain): New function, moved from
5888         bpstat_stop_status.
5889         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5890         If no stop chain is passed, call build_bpstat_chain to build it.
5891         * breakpoint.h (build_bpstat_chain): Declare.
5892         (bpstat_stop_status): Move documentation here from breakpoint.c.
5893         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5894         build the stop chain and pass it to skip_inline_frames.
5895         Pass this stop chain to bpstat_stop_status.
5896         * inline-frame.c: Include breakpoint.h.
5897         (stopped_by_user_bp_inline_frame): New function.
5898         (skip_inline_frames): Add parameter `stop_chain'.
5899         Move documention to inline-frame.h.
5900         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5901         whether the frame should be elided.
5902         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5903         Add moved documentation and update for new parameter.
5904
5905 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5906
5907         PR cli/14975
5908         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5909         unittests/format_pieces-selftests.c.
5910         * common/format.h (format_piece) <operator==>: New.
5911         (format_pieces) <operator[]>: Remove.
5912         * common/format.c (format_pieces::format_pieces): Handle \e.
5913         * unittests/format_pieces-selftests.c: New.
5914
5915 2018-05-17  Tom Tromey  <tom@tromey.com>
5916
5917         PR symtab/23010:
5918         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5919         (dw2_instantiate_symtab): Add skip_partial parameter.
5920         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5921         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5922         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5923         (dw2_expand_symtabs_matching_one)
5924         (dw2_find_pc_sect_compunit_symtab)
5925         (dw2_debug_names_lookup_symbol)
5926         (dw2_debug_names_expand_symtabs_for_function): Update.
5927         (init_cutu_and_read_dies): Add skip_partial parameter.
5928         (process_psymtab_comp_unit, build_type_psymtabs_1)
5929         (process_skeletonless_type_unit, load_partial_comp_unit)
5930         (psymtab_to_symtab_1): Update.
5931         (load_full_comp_unit): Add skip_partial parameter.
5932         (process_imported_unit_die, dwarf2_read_addr_index)
5933         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5934         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5935         (read_signatured_type): Update.
5936
5937 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5938
5939         * value.c (release_value): Remove unused variable.
5940         (record_latest_value): Likewise.
5941         (access_value_history): Likewise.
5942         (preserve_values): Likewise.
5943
5944 2018-05-17  Tom Tromey  <tom@tromey.com>
5945
5946         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5947         Initialize.
5948
5949 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5950
5951         PR gdb/22286
5952         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5953         Also handle registers whose width is not a multiple of
5954         PTRACE_TYPE_RET.
5955         (linux_nat_trad_target::store_register): Likewise.
5956
5957 2018-05-16  Tom Tromey  <tom@tromey.com>
5958
5959         * gdbcore.h (core_bfd): Redefine.
5960         * corelow.c (core_target::close): Update.
5961         (core_target_open): Update.
5962         * progspace.h (struct program_space) <cbfd>: Now a
5963         gdb_bfd_ref_ptr.
5964
5965 2018-05-16  Tom Tromey  <tom@tromey.com>
5966
5967         PR cli/19551:
5968         * symfile-add-flags.h (enum symfile_add_flags)
5969         <SYMFILE_NOT_FILENAME>: New constant.
5970         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5971         objfile name from BFD.
5972         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5973         * minidebug.c (find_separate_debug_file_in_section): Put
5974         ".gnu_debugdata" into BFD's file name.
5975
5976 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5977
5978         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5979         Remove.
5980
5981 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5982
5983         PR binutils/21446
5984         * aarch64-tdep.c (aarch64_analyze_prologue,
5985         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5986         Indicate not interested in errors.
5987
5988 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5989
5990         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5991         Supply the MIPS_ZERO_REGNUM register.
5992
5993 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5994
5995         * mips-tdep.c (mask_address_var): Make variable static.
5996
5997 2018-05-14  Tom Tromey  <tom@tromey.com>
5998
5999         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6000
6001 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6002
6003         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6004         FXSAVE_ADDR for the mxcsr register.
6005
6006 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6007
6008         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6009
6010 2018-05-11  Pedro Alves  <palves@redhat.com>
6011
6012         * corelow.c (core_target) <core_target>: No longer inline.
6013         Initialize m_core_gdbarch, m_core_vec and build the section table
6014         here.
6015         <~core_target>: New.
6016         <core_gdbarch, get_core_register_section>: New methods.
6017         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6018         factored out from ...
6019         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6020         (core_ops): Delete.
6021         (sniff_core_bfd): Add gdbarch parameter.
6022         (core_close): Delete, merged into ...
6023         (core_target::close): ... here.  Delete self.
6024         (core_close_cleanup): Delete.
6025         (core_target_open): Allocate a core_target on the heap.  Use a
6026         unique_ptr instead of a cleanup.  Bits moved into the core_target
6027         ctor.  Adjust to use core_target methods instead of globals.
6028         (get_core_register_section): Rename to ...
6029         (core_target::get_core_register_section): ... this and adjust.
6030         (struct get_core_registers_cb_data): New.
6031         (get_core_registers_cb): Use it.  Use bool.
6032         (core_target::fetch_registers, core_target::files_info)
6033         (core_target::xfer_partial, core_target::read_description)
6034         (core_target::pid_to, core_target::thread_name): Adjust to
6035         reference class fields instead of globals.
6036         * target.h (struct target_ops_deleter, target_ops_up): New.
6037
6038 2018-05-11  Pedro Alves  <palves@redhat.com>
6039
6040         * corefile.c (core_file_command): Move to corelow.c.
6041         * corelow.c (the_core_target): Delete.
6042         (core_file_command): Moved from corefile.c.  Check exec_bfd
6043         instead of the_core_target.  Use target_detach instead of calling
6044         into the_core_target directly.
6045         (maybe_say_no_core_file_now): New.
6046         (core_target::detach): Use it.
6047         (_initialize_corelow): Remove references to the_core_target.
6048         * gdbcore.h (the_core_target): Delete.
6049
6050 2018-05-11  Tom Tromey  <tromey@redhat.com>
6051             Pedro Alves  <palves@redhat.com>
6052
6053         * corefile.c (core_bfd): Remove.
6054         * gdbcore.h (core_bfd): Now a macro.
6055         * progspace.h (struct program_space) <cbfd>: New field.
6056
6057 2018-05-11  Tom Tromey  <tom@tromey.com>
6058
6059         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6060         gdb::def_vector.
6061
6062 2018-05-10  Tom Tromey  <tom@tromey.com>
6063
6064         * configure: Rebuild.
6065         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6066
6067 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6068
6069         PR server/23158:
6070         * regformats/regdat.sh: Adjust script, following the addition
6071         of the new expedite_regs parameter to init_target_desc.
6072
6073 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6074     
6075         PR gdb/23127
6076         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6077         set_gdbarch_significant_addr_bit.
6078         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6079         set_gdbarch_significant_addr_bit.
6080         * utils.c (address_significant): Update to sign extend addr.
6081
6082 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6083
6084         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6085         (xtensa_linux_init_abi): Limit tdep->num_regs by
6086         tdep->num_nopriv_regs.
6087         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6088         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6089         not initialized.
6090
6091 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6092
6093         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6094
6095 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6096
6097         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6098         (I387_MXCSR_INIT_VAL): New constant.
6099         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6100         buffer if it was supplied by the inferior.
6101         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6102         (i387_xsave_get_clear_bv): New function.
6103         (i387_supply_xsave): Only read x87 control registers from the
6104         xsave buffer if the feature is enabled, and the state will have
6105         been written, otherwise, provide a suitable default.
6106         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6107         including x87 control registers.  Update control registers if they
6108         have changed from the default value, and mark features as enabled
6109         as required.
6110         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6111
6112 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6113
6114         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6115
6116 2018-05-07  Tom Tromey  <tom@tromey.com>
6117
6118         * configure: Rebuild.
6119         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6120
6121 2018-05-07  Tom Tromey  <tom@tromey.com>
6122
6123         PR tdep/20362:
6124         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6125         bit.  Use correct value for VDIV.
6126
6127 2018-05-04  Tom Tromey  <tom@tromey.com>
6128
6129         * configure: Rebuild.
6130         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6131
6132 2018-05-04  Tom Tromey  <tom@tromey.com>
6133
6134         * linux-record.c (record_linux_system_call) <case
6135         RECORD_SYS_RECVFROM>: Add "break".
6136
6137 2018-05-04  Tom Tromey  <tom@tromey.com>
6138
6139         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6140         Add missing "break".
6141         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6142         Add missing "break".
6143
6144 2018-05-04  Tom Tromey  <tom@tromey.com>
6145
6146         * rs6000-tdep.c (ppc_process_record_op4)
6147         (ppc_process_record_op63): Add fall-through comment.
6148
6149 2018-05-04  Tom Tromey  <tom@tromey.com>
6150
6151         * i386-tdep.c (i386_process_record): Add fall-through comment.
6152
6153 2018-05-04  Tom Tromey  <tom@tromey.com>
6154
6155         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6156         comment.
6157
6158 2018-05-04  Tom Tromey  <tom@tromey.com>
6159
6160         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6161         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6162         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6163         comment.
6164         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6165         comment.
6166         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6167         comment.
6168
6169 2018-05-04  Tom Tromey  <tom@tromey.com>
6170
6171         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6172
6173 2018-05-04  Tom Tromey  <tom@tromey.com>
6174
6175         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6176         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6177         * symfile.c (section_is_mapped): Fix fall-through comment.
6178         * stabsread.c (define_symbol, read_member_functions): Fix
6179         fall-through comment.
6180         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6181         comment.
6182         * remote.c (remote_wait_as): Fix fall-through comment.
6183         * p-exp.y (yylex): Fix fall-through comment.
6184         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6185         comment.
6186         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6187         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6188         * jv-exp.y (yylex): Fix fall-through comment.
6189         * go-exp.y (lex_one_token): Fix fall-through comment.
6190         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6191         fall-through comment.
6192         * f-exp.y (yylex): Fix fall-through comment.
6193         * dwarf2read.c (process_die): Fix fall-through comments.
6194         * dbxread.c (process_one_symbol): Fix fall-through comment.
6195         * d-exp.y (lex_one_token): Fix fall-through comment.
6196         * cp-name-parser.y (yylex): Fix fall-through comment.
6197         * coffread.c (coff_symtab_read): Fix fall-through comment.
6198         * c-exp.y (lex_one_token): Fix fall-through comment.
6199         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6200         comment.
6201         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6202         comment.
6203
6204 2018-05-04  Tom Tromey  <tom@tromey.com>
6205
6206         PR python/22730:
6207         * NEWS: Mention gdb.execute change.
6208         * gdbcmd.h (execute_control_command): Don't declare.
6209         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6210         execute_control_commands, execute_control_commands_to_string.
6211         * cli/cli-script.h (execute_control_commands)
6212         (execute_control_commands_to_string): Declare.
6213         (execute_control_command): Add from_tty parameter.
6214         * cli/cli-script.c (execute_control_commands)
6215         (execute_control_commands_to_string): New functions.
6216         (execute_user_command): Use execute_control_commands.
6217         (execute_control_command_1): Add "from_tty" parameter.  Update.
6218         (execute_control_command): Likewise.
6219
6220 2018-05-04  Tom Tromey  <tom@tromey.com>
6221
6222         PR python/22731:
6223         * NEWS: Mention that breakpoint commands are writable.
6224         * python/py-breakpoint.c (bppy_set_commands): New function.
6225         (breakpoint_object_getset) <"commands">: Use it.
6226
6227 2018-05-04  Tom Tromey  <tom@tromey.com>
6228
6229         * tracepoint.c (actions_command): Update.
6230         * mi/mi-cmd-break.c (mi_command_line_array)
6231         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6232         (mi_read_next_line): Remove.
6233         (mi_cmd_break_commands): Update.
6234         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6235         function_view.
6236         * cli/cli-script.c (get_command_line): Update.
6237         (process_next_line): Use function_view.  Constify.
6238         (recurse_read_control_structure, read_command_lines)
6239         (read_command_lines_1): Change argument types to function_view.
6240         (do_define_command, document_command): Update.
6241         * breakpoint.h (check_tracepoint_command): Don't declare.
6242         * breakpoint.c (check_tracepoint_command): Remove.
6243         (commands_command_1, create_tracepoint_from_upload): Update.
6244
6245 2018-05-04  Tom Tromey  <tom@tromey.com>
6246
6247         PR gdb/11750:
6248         * cli/cli-script.h (enum command_control_type) <define_control>:
6249         New constant.
6250         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6251         (build_command_line, execute_control_command_1)
6252         (process_next_line): Likewise.
6253         (do_define_command): New function, extracted from define_command.
6254         (define_command): Use it.
6255
6256 2018-05-04  Tom Tromey  <tom@tromey.com>
6257
6258         * tracepoint.c (actions_command): Update.
6259         * cli/cli-script.h (read_command_lines): Update.
6260         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6261         (MAX_TMPBUF): Remove define.
6262         (define_command): Use string_printf.
6263         (document_command): Likewise.
6264         * breakpoint.c (commands_command_1): Update.
6265
6266 2018-05-04  Tom Tromey  <tom@tromey.com>
6267
6268         * top.c (execute_command): Update.
6269         * cli/cli-script.h (print_command_lines): Now varargs.
6270         * cli/cli-script.c (print_command_lines): Now varargs.
6271         (execute_control_command_1) <case while_control, case if_control>:
6272         Update.
6273
6274 2018-05-04  Tom Tromey  <tom@tromey.com>
6275
6276         * tracepoint.c (all_tracepoint_actions): Rename from
6277         all_tracepoint_actions_and_cleanup.  Change return type.
6278         (actions_command, encode_actions_1, encode_actions)
6279         (trace_dump_actions, tdump_command): Update.
6280         * remote.c (remote_download_command_source): Update.
6281         * python/python.c (gdbpy_eval_from_control_command)
6282         (python_command, python_interactive_command): Update.
6283         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6284         * guile/guile.c (guile_command)
6285         (gdbscm_eval_from_control_command, guile_command): Update.
6286         * compile/compile.c (compile_code_command)
6287         (compile_print_command, compile_to_object): Update.
6288         * cli/cli-script.h (struct command_lines_deleter): New.
6289         (counted_command_line): New typedef.
6290         (struct command_line): Add constructor, destructor.
6291         <body_list>: Remove.
6292         <body_list_0, body_list_1>: New members.
6293         (command_line_up): Remove typedef.
6294         (read_command_lines, read_command_lines_1, get_command_line):
6295         Update.
6296         (copy_command_lines): Don't declare.
6297         * cli/cli-script.c (build_command_line): Use "new".
6298         (get_command_line): Return counted_command_line.
6299         (print_command_lines, execute_user_command)
6300         (execute_control_command_1, while_command, if_command): Update.
6301         (realloc_body_list): Remove.
6302         (process_next_line, recurse_read_control_structure): Update.
6303         (read_command_lines, read_command_lines_1): Return counted_command_line.
6304         (free_command_lines): Use "delete".
6305         (copy_command_lines): Remove.
6306         (define_command, document_command, show_user_1): Update.
6307         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6308         a counted_command_line.
6309         * breakpoint.h (counted_command_line): Remove typedef.
6310         (breakpoint_set_commands): Update.
6311         * breakpoint.c (check_no_tracepoint_commands)
6312         (validate_commands_for_breakpoint): Update.
6313         (breakpoint_set_commands): Change commands to be a
6314         counted_command_line.
6315         (commands_command_1, update_dprintf_command_list)
6316         (create_tracepoint_from_upload): Update.
6317
6318 2018-05-04  Tom Tromey  <tom@tromey.com>
6319
6320         * cli/cli-decode.h (cmd_list_element): New constructor.
6321         (~cmd_list_element): New destructor.
6322         (struct cmd_list_element): Add initializers.
6323         * cli/cli-decode.c (do_add_cmd): Use "new".
6324         (delete_cmd): Use "delete".
6325
6326 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6327             Pedro Alves <palves@redhat.com>
6328
6329         PR breakpoints/19806 and support for PR external/20207.
6330         * NEWS: Mention Aarch64 watchpoint improvements.
6331         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6332         watchpoints and PR external/20207 watchpoints.
6333         * nat/aarch64-linux-hw-point.c
6334         (kernel_supports_any_contiguous_range): New.
6335         (aarch64_watchpoint_offset): New.
6336         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6337         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6338         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6339         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6340         next_addr_orig_p.  Support PR external/20207 watchpoints.
6341         (aarch64_downgrade_regs): New.
6342         (aarch64_dr_state_insert_one_point): New parameters offset and
6343         addr_orig.
6344         (aarch64_dr_state_remove_one_point): Likewise.
6345         (aarch64_handle_breakpoint): Update caller.
6346         (aarch64_handle_aligned_watchpoint): Likewise.
6347         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6348         aligned_offset.
6349         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6350         aarch64_downgrade_regs.
6351         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6352         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6353         (DR_CONTROL_MASK): ... this.
6354         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6355         (unsigned int aarch64_watchpoint_offset): New prototype.
6356         (aarch64_linux_set_debug_regs): Remove const from state.
6357         * utils.c (align_up, align_down): Move to ...
6358         * common/common-utils.c (align_up, align_down): ... here.
6359         * utils.h (align_up, align_down): Move to ...
6360         * common/common-utils.h (align_up, align_down): ... here.
6361
6362 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6363
6364         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6365         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6366         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6367         Re-implement to match the ABI as summarized in GCC's
6368         gcc/config/sparc/sparc.c.  All callers updated.
6369         (sparc32_store_arguments): Remove assertion.
6370
6371 2018-05-04  Tom Tromey  <tom@tromey.com>
6372
6373         * printcmd.c: Don't include tui.h.
6374         (decode_format): Use skip_spaces.
6375
6376 2018-05-04  Tom Tromey  <tom@tromey.com>
6377
6378         PR gdb/22619:
6379         * printcmd.c (last_count): New global.
6380         (x_command): Use saved count when repeating.
6381
6382 2018-05-04  Tom Tromey  <tom@tromey.com>
6383
6384         * nto-procfs.c (do_closedir_cleanup): Remove.
6385         (procfs_pidlist): Use gdb_dir_up.
6386         * procfs.c (do_closedir_cleanup): Remove.
6387         (proc_update_threads): Use gdb_dir_up.
6388         * common/filestuff.h (struct gdb_dir_deleter): New.
6389         (gdb_dir_up): New typedef.
6390
6391 2018-05-04  Tom Tromey  <tom@tromey.com>
6392
6393         * ada-lang.c (print_mention_exception): Use std::string.
6394
6395 2018-05-04  Tom Tromey  <tom@tromey.com>
6396
6397         * ada-lang.c (create_excep_cond_exprs): Update.
6398         (ada_exception_catchpoint_cond_string): Use std::string.
6399
6400 2018-05-04  Tom Tromey  <tom@tromey.com>
6401
6402         * ada-lang.c (xget_renaming_scope): Return std::string.
6403         (old_renaming_is_invisible): Update.
6404
6405 2018-05-04  Tom Tromey  <tom@tromey.com>
6406
6407         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6408         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6409
6410 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6411
6412         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6413
6414 2018-05-04  Tom Tromey  <tom@tromey.com>
6415
6416         * remote.c (remote_query_supported_append): Change type.
6417         (remote_check_symbols): Update.
6418
6419 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6420
6421         PR gdb/11420
6422         * configure.ac: Prepend libpython.
6423         * python/python-config.py: Likewise.
6424         * configure: Regenerate.
6425
6426 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6427
6428         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6429
6430 2018-05-03  Pedro Alves  <palves@redhat.com>
6431
6432         * s390-linux-nat.c
6433         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6434         override.  Write 'true' instead of '1'.
6435         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6436         declaration.
6437
6438 2018-05-02  Pedro Alves  <palves@redhat.com>
6439
6440         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6441         add_inf_child_target.
6442         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6443         add_inf_child_target.
6444         * aix-thread.c (aix_thread_target_info): New.
6445         (aix_thread_target) <shortname, longname, doc>: Delete.
6446         <info>: New.
6447         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6448         add_inf_child_target.
6449         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6450         add_inf_child_target.
6451         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6452         add_inf_child_target.
6453         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6454         add_inf_child_target.
6455         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6456         add_inf_child_target.
6457         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6458         add_inf_child_target.
6459         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6460         add_inf_child_target.
6461         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6462         add_inf_child_target.
6463         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6464         add_inf_child_target.
6465         * bfd-target.c (target_bfd_target_info): New.
6466         (target_bfd) <shortname, longname, doc>: Delete.
6467         <info>: New.
6468         * bsd-kvm.c (bsd_kvm_target_info): New.
6469         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6470         <info>: New.
6471         (bsd_kvm_target::open): Rename to ...
6472         (bsd_kvm_target_open): ... this.  Adjust.
6473         * bsd-uthread.c (bsd_uthread_target_info): New.
6474         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6475         <info>: New.
6476         * corefile.c (core_file_command): Adjust.
6477         * corelow.c (core_target_info): New.
6478         (core_target) <shortname, longname, doc>: Delete.
6479         <info>: New.
6480         (core_target::open): Rename to ...
6481         (core_target_open): ... this.  Adjust.
6482         * ctf.c (ctf_target_info): New.
6483         (ctf_target) <shortname, longname, doc>: Delete.
6484         <info>: New.
6485         (ctf_target::open): Rename to ...
6486         (ctf_target_open): ... this.
6487         (_initialize_ctf): Adjust.
6488         * exec.c (exec_target_info): New.
6489         (exec_target) <shortname, longname, doc>: Delete.
6490         <info>: New.
6491         (exec_target::open): Rename to ...
6492         (exec_target_open): ... this.
6493         * gdbcore.h (core_target_open): Declare.
6494         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6495         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6496         add_inf_child_target.
6497         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6498         add_inf_child_target.
6499         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6500         add_inf_child_target.
6501         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6502         add_inf_child_target.
6503         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6504         add_inf_child_target.
6505         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6506         add_inf_child_target.
6507         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6508         add_inf_child_target.
6509         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6510         add_inf_child_target.
6511         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6512         add_inf_child_target.
6513         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6514         add_inf_child_target.
6515         * inf-child.c (inf_child_target_info): New.
6516         (inf_child_target::info): New.
6517         (inf_child_open_target): Remove 'target' parameter.  Use
6518         get_native_target instead.
6519         (inf_child_target::open): Delete.
6520         (add_inf_child_target): New.
6521         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6522         Delete.
6523         <info>: New.
6524         (add_inf_child_target): Declare.
6525         (inf_child_open_target): Declare.
6526         * linux-thread-db.c (thread_db_target_info): New.
6527         (thread_db_target) <shortname, longname, doc>: Delete.
6528         <info>: New.
6529         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6530         add_inf_child_target.
6531         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6532         add_inf_child_target.
6533         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6534         add_inf_child_target.
6535         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6536         add_inf_child_target.
6537         * make-target-delegates (print_class): Adjust.
6538         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6539         add_inf_child_target.
6540         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6541         add_inf_child_target.
6542         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6543         add_inf_child_target.
6544         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6545         add_inf_child_target.
6546         * nto-procfs.c (nto_native_target_info): New.
6547         (nto_procfs_target_native) <shortname, longname, doc>:
6548         Delete.
6549         <info>: New.
6550         (nto_procfs_target_info): New.
6551         (nto_procfs_target_procfs) <shortname, longname, doc>:
6552         Delete.
6553         <info>: New.
6554         (init_procfs_targets): Adjust.
6555         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6556         add_inf_child_target.
6557         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6558         add_inf_child_target.
6559         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6560         add_inf_child_target.
6561         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6562         add_inf_child_target.
6563         * ravenscar-thread.c (ravenscar_target_info): New.
6564         (ravenscar_thread_target) <shortname, longname, doc>:
6565         Delete.
6566         <info>: New.
6567         * record-btrace.c (record_btrace_target_info):
6568         (record_btrace_target) <shortname, longname, doc>: Delete.
6569         <info>: New.
6570         (record_btrace_target::open): Rename to ...
6571         (record_btrace_target_open): ... this.  Adjust.
6572         * record-full.c (record_longname, record_doc): New.
6573         (record_full_base_target) <shortname, longname, doc>: Delete.
6574         <info>: New.
6575         (record_full_target_info): New.
6576         (record_full_target): <shortname>: Delete.
6577         <info>: New.
6578         (record_full_core_open_1, record_full_open_1): Update comments.
6579         (record_full_base_target::open): Rename to ...
6580         (record_full_open): ... this.
6581         (cmd_record_full_restore): Update.
6582         (_initialize_record_full): Update.
6583         * remote-sim.c (remote_sim_target_info): New.
6584         (gdbsim_target) <shortname, longname, doc>: Delete.
6585         <info>: New.
6586         (gdbsim_target::open): Rename to ...
6587         (gdbsim_target_open): ... this.
6588         (_initialize_remote_sim): Adjust.
6589         * remote.c (remote_doc): New.
6590         (remote_target_info): New.
6591         (remote_target) <shortname, longname, doc>: Delete.
6592         <info>: New.
6593         (extended_remote_target_info): New.
6594         (extended_remote_target) <shortname, longname, doc>: Delete.
6595         <info>: New.
6596         (remote_target::open_1): Make static.  Adjust.
6597         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6598         * s390-linux-nat.c (_initialize_s390_nat): Use
6599         add_inf_child_target.
6600         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6601         add_inf_child_target.
6602         * sol-thread.c (thread_db_target_info): New.
6603         (sol_thread_target) <shortname, longname, doc>: Delete.
6604         <info>: New.
6605         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6606         add_inf_child_target.
6607         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6608         add_inf_child_target.
6609         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6610         add_inf_child_target.
6611         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6612         add_inf_child_target.
6613         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6614         add_inf_child_target.
6615         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6616         add_inf_child_target.
6617         * spu-linux-nat.c (_initialize_spu_nat): Use
6618         add_inf_child_target.
6619         * spu-multiarch.c (spu_multiarch_target_info): New.
6620         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6621         <info>: New.
6622         * target-delegates.c: Regenerate.
6623         * target.c: Include <unordered_map>.
6624         (target_ops_p): Delete.
6625         (DEF_VEC_P(target_ops_p)): Delete.
6626         (target_factories): New.
6627         (test_target_info): New.
6628         (test_target_ops::info): New.
6629         (open_target): Adjust to use target_factories.
6630         (add_target_with_completer): Rename to ...
6631         (add_target): ... this.  Change prototype.  Register target_info
6632         and open callback in target_factories.  Register target_info in
6633         command context instead of target_ops.
6634         (add_target): Delete old implementation.
6635         (add_deprecated_target_alias): Change prototype.  Adjust.
6636         (the_native_target): New.
6637         (set_native_target, get_native_target): New.
6638         (find_default_run_target): Use the_native_target.
6639         (find_attach_target, find_run_target): Simplify.
6640         (target_ops::open): Delete.
6641         (dummy_target_info): New.
6642         (dummy_target::shortname, dummy_target::longname)
6643         (dummy_target::doc): Delete.
6644         (dummy_target::info): New.
6645         (debug_target::shortname, debug_target::longname)
6646         (debug_target::doc): Delete.
6647         (debug_target::info): New.
6648         * target.h (struct target_info): New.
6649         (target_ops::~target_ops): Add comment.
6650         (target_ops::info): New.
6651         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6652         longer virtual.  Implement in terms of target_info.
6653         (set_native_target, get_native_target): Declare.
6654         (target_open_ftype): New.
6655         (add_target, add_target_with_completer)
6656         (add_deprecated_target_alias): Change prototype.
6657         (test_target) <shortname, longname, doc>: Delete.
6658         <info>: New.
6659         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6660         add_inf_child_target.
6661         * tracefile-tfile.c (tfile_target_info): New.
6662         (tfile_target) <shortname, longname, doc>: Delete.
6663         <info>: New.
6664         (tfile_target::open): Rename to ...
6665         (tfile_target_open): ... this.
6666         (_initialize_tracefile_tfile): Adjust.
6667         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6668         add_inf_child_target.
6669         * windows-nat.c (_initialize_windows_nat): Use
6670         add_inf_child_target.
6671         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6672         add_inf_child_target.
6673
6674 2018-05-02  Pedro Alves  <palves@redhat.com>
6675
6676         * linux-nat.h (linux_nat_target) <low_new_thread,
6677         low_delete_thread, low_new_fork, low_forget_process,
6678         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6679         New virtual methods.
6680         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6681         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6682         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6683         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6684         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6685         Delete.
6686         * linux-fork.c (delete_fork): Adjust to call low method.
6687         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6688         (linux_nat_new_fork, linux_nat_forget_process_hook)
6689         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6690         (linux_nat_status_is_event):
6691         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6692         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6693         to call low method.
6694         (sigtrap_is_event): Rename to ...
6695         (linux_nat_target::low_status_is_event): ... this.
6696         (linux_nat_set_status_is_event): Delete.
6697         (save_stop_reason, linux_nat_wait_1)
6698         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6699         low methods.
6700         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6701         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6702         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6703         (linux_nat_set_prepare_to_resume): Delete.
6704         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6705         low virtual methods.
6706         * amd64-linux-nat.c: Likewise.
6707         * arm-linux-nat.c: Likewise.
6708         * i386-linux-nat.c: Likewise.
6709         * ia64-linux-nat.c: Likewise.
6710         * mips-linux-nat.c: Likewise.
6711         * ppc-linux-nat.c: Likewise.
6712         * s390-linux-nat.c: Likewise.
6713         * sparc64-linux-nat.c: Likewise.
6714         * x86-linux-nat.c: Likewise.
6715         * x86-linux-nat.h: Include "nat/x86-linux.h".
6716         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6717         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6718         Override methods.
6719
6720 2018-05-02  Pedro Alves  <palves@redhat.com>
6721
6722         * target.h (target_ops)
6723         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6724         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6725         stopped_by_watchpoint, have_continuable_watchpoint,
6726         stopped_data_address, watchpoint_addr_within_range,
6727         can_accel_watchpoint_condition, can_run, thread_alive,
6728         has_all_memory, has_memory, has_stack, has_registers,
6729         has_execution, can_async_p, is_async_p, supports_non_stop,
6730         always_non_stop_p, can_execute_reverse, supports_multi_process,
6731         supports_enable_disable_tracepoint,
6732         supports_disable_randomization, supports_string_tracing,
6733         supports_evaluation_of_breakpoint_conditions,
6734         can_run_breakpoint_commands, filesystem_is_local,
6735         can_download_tracepoint, get_trace_state_variable_value,
6736         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6737         record_is_replaying, record_will_replay,
6738         augmented_libraries_svr4_read>: Adjust to return bool.
6739         * aarch64-linux-nat.c: All implementations adjusted.
6740         * aix-thread.c: All implementations adjusted.
6741         * arm-linux-nat.c: All implementations adjusted.
6742         * breakpoint.c: All implementations adjusted.
6743         * bsd-kvm.c: All implementations adjusted.
6744         * bsd-uthread.c: All implementations adjusted.
6745         * corelow.c: All implementations adjusted.
6746         * ctf.c: All implementations adjusted.
6747         * darwin-nat.c: All implementations adjusted.
6748         * darwin-nat.h: All implementations adjusted.
6749         * exec.c: All implementations adjusted.
6750         * fbsd-nat.c: All implementations adjusted.
6751         * fbsd-nat.h: All implementations adjusted.
6752         * gnu-nat.c: All implementations adjusted.
6753         * gnu-nat.h: All implementations adjusted.
6754         * go32-nat.c: All implementations adjusted.
6755         * ia64-linux-nat.c: All implementations adjusted.
6756         * inf-child.c: All implementations adjusted.
6757         * inf-child.h: All implementations adjusted.
6758         * inf-ptrace.c: All implementations adjusted.
6759         * inf-ptrace.h: All implementations adjusted.
6760         * linux-nat.c: All implementations adjusted.
6761         * linux-nat.h: All implementations adjusted.
6762         * mips-linux-nat.c: All implementations adjusted.
6763         * nto-procfs.c: All implementations adjusted.
6764         * ppc-linux-nat.c: All implementations adjusted.
6765         * procfs.c: All implementations adjusted.
6766         * ravenscar-thread.c: All implementations adjusted.
6767         * record-btrace.c: All implementations adjusted.
6768         * record-full.c: All implementations adjusted.
6769         * remote-sim.c: All implementations adjusted.
6770         * remote.c: All implementations adjusted.
6771         * s390-linux-nat.c: All implementations adjusted.
6772         * sol-thread.c: All implementations adjusted.
6773         * spu-multiarch.c: All implementations adjusted.
6774         * target-delegates.c: All implementations adjusted.
6775         * target.c: All implementations adjusted.
6776         * target.h: All implementations adjusted.
6777         * tracefile-tfile.c: All implementations adjusted.
6778         * tracefile.c: All implementations adjusted.
6779         * tracefile.h: All implementations adjusted.
6780         * windows-nat.c: All implementations adjusted.
6781         * x86-linux-nat.h: All implementations adjusted.
6782         * x86-nat.h: All implementations adjusted.
6783
6784 2018-05-02  Pedro Alves  <palves@redhat.com>
6785
6786         * make-target-delegates (scan_target_h): Don't trim lines here.
6787         Replace sequences of tabs and/or whitespace with a single
6788         whitespace.
6789         (top level, parsing methods): Trim each line before processing it
6790         here.
6791
6792 2018-05-02  Pedro Alves  <palves@redhat.com>
6793             John Baldwin  <jhb@freebsd.org>
6794
6795         * target.h (enum strata) <debug_stratum>: New.
6796         (struct target_ops) <all delegation methods>: Replace by C++
6797         virtual methods, and drop "to_" prefix.  All references updated
6798         throughout.
6799         <to_shortname, to_longname, to_doc, to_data,
6800         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6801         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6802         virtual methods.  All references updated throughout.
6803         <can_attach, supports_terminal_ours, can_create_inferior,
6804         get_thread_control_capabilities, attach_no_wait>: New
6805         virtual methods.
6806         <insert_breakpoint, remove_breakpoint>: Now
6807         TARGET_DEFAULT_NORETURN methods.
6808         <info_proc>: Now returns bool.
6809         <to_magic>: Delete.
6810         (OPS_MAGIC): Delete.
6811         (current_target): Delete.  All references replaced by references
6812         to ...
6813         (target_stack): ... this.  New.
6814         (target_shortname, target_longname): Adjust.
6815         (target_can_run): Now a function declaration.
6816         (default_child_has_all_memory, default_child_has_memory)
6817         (default_child_has_stack, default_child_has_registers)
6818         (default_child_has_execution): Remove target_ops parameter.
6819         (complete_target_initialization): Delete.
6820         (memory_breakpoint_target): New template class.
6821         (test_target_ops): Refactor as a C++ class with virtual methods.
6822         * make-target-delegates (NAME_PART): Tighten.
6823         (POINTER_PART, CP_SYMBOL): New.
6824         (SIMPLE_RETURN_PART): Reimplement.
6825         (VEC_RETURN_PART): Expect less.
6826         (RETURN_PART, VIRTUAL_PART): New.
6827         (METHOD): Adjust to C++ virtual methods.
6828         (scan_target_h): Remove reference to C99.
6829         (dname): Output "target_ops::" prefix.
6830         (write_function_header): Adjust to output a C++ class method.
6831         (write_declaration): New.
6832         (write_delegator): Adjust to output a C++ class method.
6833         (tdname): Output "dummy_target::" prefix.
6834         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6835         method.
6836         (tdefault_names, debug_names): Delete.
6837         (return_types, tdefaults, styles, argtypes_array): New.
6838         (top level): All methods are delegators.
6839         (print_class): New.
6840         (top level): Print dummy_target and debug_target classes.
6841         * target-delegates.c: Regenerate.
6842         * target-debug.h (target_debug_print_enum_info_proc_what)
6843         (target_debug_print_thread_control_capabilities)
6844         (target_debug_print_thread_info_p): New.
6845         * target.c (dummy_target): Delete.
6846         (the_dummy_target, the_debug_target): New.
6847         (target_stack): Now extern.
6848         (set_targetdebug): Push/unpush debug target.
6849         (default_child_has_all_memory, default_child_has_memory)
6850         (default_child_has_stack, default_child_has_registers)
6851         (default_child_has_execution): Remove target_ops parameter.
6852         (complete_target_initialization): Delete.
6853         (add_target_with_completer): No longer call
6854         complete_target_initialization.
6855         (target_supports_terminal_ours): Use regular delegation.
6856         (update_current_target): Delete.
6857         (push_target): No longer check magic number.  Don't call
6858         update_current_target.
6859         (unpush_target): Don't call update_current_target.
6860         (target_is_pushed): No longer check magic number.
6861         (target_require_runnable): Skip for all stratums over
6862         process_stratum.
6863         (target_ops::info_proc): New.
6864         (target_info_proc): Use find_target_at and
6865         find_default_run_target.
6866         (target_supports_disable_randomization): Use regular delegation.
6867         (target_get_osdata): Use find_target_at.
6868         (target_ops::open, target_ops::close, target_ops::can_attach)
6869         (target_ops::attach, target_ops::can_create_inferior)
6870         (target_ops::create_inferior, target_ops::can_run)
6871         (target_can_run): New.
6872         (default_fileio_target): Use regular delegation.
6873         (target_ops::fileio_open, target_ops::fileio_pwrite)
6874         (target_ops::fileio_pread, target_ops::fileio_fstat)
6875         (target_ops::fileio_close, target_ops::fileio_unlink)
6876         (target_ops::fileio_readlink): New.
6877         (target_fileio_open_1, target_fileio_unlink)
6878         (target_fileio_readlink): Always call the target method.  Handle
6879         FILEIO_ENOSYS.
6880         (return_zero, return_zero_has_execution): Delete.
6881         (init_dummy_target): Delete.
6882         (dummy_target::dummy_target, dummy_target::shortname)
6883         (dummy_target::longname, dummy_target::doc)
6884         (debug_target::debug_target, debug_target::shortname)
6885         (debug_target::longname, debug_target::doc): New.
6886         (target_supports_delete_record): Use regular delegation.
6887         (setup_target_debug): Delete.
6888         (maintenance_print_target_stack): Skip debug_stratum.
6889         (initialize_targets): Instantiate the_dummy_target and
6890         the_debug_target.
6891         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6892         use target_stack.
6893         (target_auxv_search, fprint_target_auxv): Adjust.
6894         (info_auxv_command): Adjust to use target_stack.
6895         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6896         * exceptions.c (print_flush): Handle a NULL target_stack.
6897         * regcache.c (target_ops_no_register): Refactor as class with
6898         virtual methods.
6899
6900         * exec.c (exec_target): New class.
6901         (exec_ops): Now an exec_target.
6902         (exec_open, exec_close_1, exec_get_section_table)
6903         (exec_xfer_partial, exec_files_info, exec_has_memory)
6904         (exec_make_note_section): Refactor as exec_target methods.
6905         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6906         Delete.
6907         (exec_target::find_memory_regions): New.
6908         (_initialize_exec): Don't call init_exec_ops.
6909         * gdbcore.h (exec_file_clear): Delete.
6910
6911         * corefile.c (core_target): Delete.
6912         (core_file_command): Adjust.
6913         * corelow.c (core_target): New class.
6914         (the_core_target): New.
6915         (core_close): Remove target_ops parameter.
6916         (core_close_cleanup): Adjust.
6917         (core_target::close): New.
6918         (core_open, core_detach, get_core_registers, core_files_info)
6919         (core_xfer_partial, core_thread_alive, core_read_description)
6920         (core_pid_to_str, core_thread_name, core_has_memory)
6921         (core_has_stack, core_has_registers, core_info_proc): Rework as
6922         core_target methods.
6923         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6924         (_initialize_corelow): Initialize the_core_target.
6925         * gdbcore.h (core_target): Delete.
6926         (the_core_target): New.
6927
6928         * ctf.c: (ctf_target): New class.
6929         (ctf_ops): Now a ctf_target.
6930         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6931         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6932         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6933         methods.
6934         (init_ctf_ops): Delete.
6935         (_initialize_ctf): Don't call it.
6936         * tracefile-tfile.c (tfile_target): New class.
6937         (tfile_ops): Now a tfile_target.
6938         (tfile_open, tfile_close, tfile_files_info)
6939         (tfile_get_tracepoint_status, tfile_trace_find)
6940         (tfile_fetch_registers, tfile_xfer_partial)
6941         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6942         Refactor as tfile_target methods.
6943         (tfile_xfer_partial_features): Remove target_ops parameter.
6944         (init_tfile_ops): Delete.
6945         (_initialize_tracefile_tfile): Don't call it.
6946         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6947         (tracefile_has_stack, tracefile_has_registers)
6948         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6949         tracefile_target methods.
6950         (init_tracefile_ops): Delete.
6951         (tracefile_target::tracefile_target): New.
6952         * tracefile.h: Include "target.h".
6953         (tracefile_target): New class.
6954         (init_tracefile_ops): Delete.
6955
6956         * spu-multiarch.c (spu_multiarch_target): New class.
6957         (spu_ops): Now a spu_multiarch_target.
6958         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6959         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6960         (spu_search_memory, spu_mourn_inferior): Refactor as
6961         spu_multiarch_target methods.
6962         (init_spu_ops): Delete.
6963         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6964         complete_target_initialization.
6965
6966         * ravenscar-thread.c (ravenscar_thread_target): New class.
6967         (ravenscar_ops): Now a ravenscar_thread_target.
6968         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6969         (ravenscar_thread_alive, ravenscar_pid_to_str)
6970         (ravenscar_fetch_registers, ravenscar_store_registers)
6971         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6972         (ravenscar_stopped_by_hw_breakpoint)
6973         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6974         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6975         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6976         methods.
6977         (init_ravenscar_thread_ops): Delete.
6978         (_initialize_ravenscar): Remove references to
6979         init_ravenscar_thread_ops and complete_target_initialization.
6980
6981         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6982         (bsd_uthread_target): New class.
6983         (bsd_uthread_ops): Now a bsd_uthread_target.
6984         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6985         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6986         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6987         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6988         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6989         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6990         (bsd_uthread_target): Delete function.
6991         (_initialize_bsd_uthread): Remove reference to
6992         complete_target_initialization.
6993
6994         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6995         (target_bfd): ... this new class.
6996         (target_bfd_xfer_partial, target_bfd_get_section_table)
6997         (target_bfd_close): Refactor as target_bfd methods.
6998         (target_bfd::~target_bfd): New.
6999         (target_bfd_reopen): Adjust.
7000         (target_bfd::close): New.
7001
7002         * record-btrace.c (record_btrace_target): New class.
7003         (record_btrace_ops): Now a record_btrace_target.
7004         (record_btrace_open, record_btrace_stop_recording)
7005         (record_btrace_disconnect, record_btrace_close)
7006         (record_btrace_async, record_btrace_info)
7007         (record_btrace_insn_history, record_btrace_insn_history_range)
7008         (record_btrace_insn_history_from, record_btrace_call_history)
7009         (record_btrace_call_history_range)
7010         (record_btrace_call_history_from, record_btrace_record_method)
7011         (record_btrace_is_replaying, record_btrace_will_replay)
7012         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7013         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7014         (record_btrace_store_registers, record_btrace_prepare_to_store)
7015         (record_btrace_to_get_unwinder)
7016         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7017         (record_btrace_commit_resume, record_btrace_wait)
7018         (record_btrace_stop, record_btrace_can_execute_reverse)
7019         (record_btrace_stopped_by_sw_breakpoint)
7020         (record_btrace_supports_stopped_by_sw_breakpoint)
7021         (record_btrace_stopped_by_hw_breakpoint)
7022         (record_btrace_supports_stopped_by_hw_breakpoint)
7023         (record_btrace_update_thread_list, record_btrace_thread_alive)
7024         (record_btrace_goto_begin, record_btrace_goto_end)
7025         (record_btrace_goto, record_btrace_stop_replaying_all)
7026         (record_btrace_execution_direction)
7027         (record_btrace_prepare_to_generate_core)
7028         (record_btrace_done_generating_core): Refactor as
7029         record_btrace_target methods.
7030         (init_record_btrace_ops): Delete.
7031         (_initialize_record_btrace): Remove reference to
7032         init_record_btrace_ops.
7033         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7034         the execution_direction global.
7035         (record_full_base_target, record_full_target)
7036         (record_full_core_target): New classes.
7037         (record_full_ops): Now a record_full_target.
7038         (record_full_core_ops): Now a record_full_core_target.
7039         (record_full_target::detach, record_full_target::disconnect)
7040         (record_full_core_target::disconnect)
7041         (record_full_target::mourn_inferior, record_full_target::kill):
7042         New.
7043         (record_full_open, record_full_close, record_full_async): Refactor
7044         as methods of the record_full_base_target class.
7045         (record_full_resume, record_full_commit_resume): Refactor
7046         as methods of the record_full_target class.
7047         (record_full_wait, record_full_stopped_by_watchpoint)
7048         (record_full_stopped_data_address)
7049         (record_full_stopped_by_sw_breakpoint)
7050         (record_full_supports_stopped_by_sw_breakpoint)
7051         (record_full_stopped_by_hw_breakpoint)
7052         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7053         methods of the record_full_base_target class.
7054         (record_full_store_registers, record_full_xfer_partial)
7055         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7056         Refactor as methods of the record_full_target class.
7057         (record_full_can_execute_reverse, record_full_get_bookmark)
7058         (record_full_goto_bookmark, record_full_execution_direction)
7059         (record_full_record_method, record_full_info, record_full_delete)
7060         (record_full_is_replaying, record_full_will_replay)
7061         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7062         (record_full_stop_replaying): Refactor as methods of the
7063         record_full_base_target class.
7064         (record_full_core_resume, record_full_core_kill)
7065         (record_full_core_fetch_registers)
7066         (record_full_core_prepare_to_store)
7067         (record_full_core_store_registers, record_full_core_xfer_partial)
7068         (record_full_core_insert_breakpoint)
7069         (record_full_core_remove_breakpoint)
7070         (record_full_core_has_execution): Refactor
7071         as methods of the record_full_core_target class.
7072         (record_full_base_target::supports_delete_record): New.
7073         (init_record_full_ops): Delete.
7074         (init_record_full_core_ops): Delete.
7075         (record_full_save): Refactor as method of the
7076         record_full_base_target class.
7077         (_initialize_record_full): Remove references to
7078         init_record_full_ops and init_record_full_core_ops.
7079
7080         * remote.c (remote_target, extended_remote_target): New classes.
7081         (remote_ops): Now a remote_target.
7082         (extended_remote_ops): Now an extended_remote_target.
7083         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7084         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7085         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7086         (remote_pass_signals, remote_set_syscall_catchpoint)
7087         (remote_program_signals, )
7088         (remote_thread_always_alive): Remove target_ops parameter.
7089         (remote_thread_alive, remote_thread_name)
7090         (remote_update_thread_list, remote_threads_extra_info)
7091         (remote_static_tracepoint_marker_at)
7092         (remote_static_tracepoint_markers_by_strid)
7093         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7094         (remote_open): Refactor as methods of remote_target.
7095         (extended_remote_open, extended_remote_detach)
7096         (extended_remote_attach, extended_remote_post_attach):
7097         (extended_remote_supports_disable_randomization)
7098         (extended_remote_create_inferior): : Refactor as method of
7099         extended_remote_target.
7100         (remote_set_permissions, remote_open_1, remote_detach)
7101         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7102         (remote_resume, remote_commit_resume, remote_stop)
7103         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7104         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7105         (remote_prepare_to_store, remote_store_registers)
7106         (remote_flash_erase, remote_flash_done, remote_files_info)
7107         (remote_kill, remote_mourn, remote_insert_breakpoint)
7108         (remote_remove_breakpoint, remote_insert_watchpoint)
7109         (remote_watchpoint_addr_within_range)
7110         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7111         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7112         (remote_supports_stopped_by_sw_breakpoint)
7113         (remote_stopped_by_hw_breakpoint)
7114         (remote_supports_stopped_by_hw_breakpoint)
7115         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7116         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7117         (remote_verify_memory): Refactor as methods of remote_target.
7118         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7119         parameter.
7120         (remote_xfer_partial, remote_get_memory_xfer_limit)
7121         (remote_search_memory, remote_rcmd, remote_memory_map)
7122         (remote_pid_to_str, remote_get_thread_local_address)
7123         (remote_get_tib_address, remote_read_description): Refactor as
7124         methods of remote_target.
7125         (remote_target::fileio_open, remote_target::fileio_pwrite)
7126         (remote_target::fileio_pread, remote_target::fileio_close): New.
7127         (remote_hostio_readlink, remote_hostio_fstat)
7128         (remote_filesystem_is_local, remote_can_execute_reverse)
7129         (remote_supports_non_stop, remote_supports_disable_randomization)
7130         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7131         (remote_supports_enable_disable_tracepoint)
7132         (remote_supports_string_tracing)
7133         (remote_can_run_breakpoint_commands, remote_trace_init)
7134         (remote_download_tracepoint, remote_can_download_tracepoint)
7135         (remote_download_trace_state_variable, remote_enable_tracepoint)
7136         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7137         (remote_trace_start, remote_get_trace_status)
7138         (remote_get_tracepoint_status, remote_trace_stop)
7139         (remote_trace_find, remote_get_trace_state_variable_value)
7140         (remote_save_trace_data, remote_get_raw_trace_data)
7141         (remote_set_disconnected_tracing, remote_core_of_thread)
7142         (remote_set_circular_trace_buffer, remote_traceframe_info)
7143         (remote_get_min_fast_tracepoint_insn_len)
7144         (remote_set_trace_buffer_size, remote_set_trace_notes)
7145         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7146         (remote_disable_btrace, remote_teardown_btrace)
7147         (remote_read_btrace, remote_btrace_conf)
7148         (remote_augmented_libraries_svr4_read, remote_load)
7149         (remote_pid_to_exec_file, remote_can_do_single_step)
7150         (remote_execution_direction, remote_thread_handle_to_thread_info):
7151         Refactor as methods of remote_target.
7152         (init_remote_ops, init_extended_remote_ops): Delete.
7153         (remote_can_async_p, remote_is_async_p, remote_async)
7154         (remote_thread_events, remote_upload_tracepoints)
7155         (remote_upload_trace_state_variables): Refactor as methods of
7156         remote_target.
7157         (_initialize_remote): Remove references to init_remote_ops and
7158         init_extended_remote_ops.
7159
7160         * remote-sim.c (gdbsim_target): New class.
7161         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7162         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7163         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7164         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7165         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7166         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7167         Refactor as methods of gdbsim_target.
7168         (gdbsim_ops): Now a gdbsim_target.
7169         (init_gdbsim_ops): Delete.
7170         (gdbsim_cntrl_c): Adjust.
7171         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7172
7173         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7174         (the_amd64_linux_nat_target): New.
7175         (amd64_linux_fetch_inferior_registers)
7176         (amd64_linux_store_inferior_registers): Refactor as methods of
7177         amd64_linux_nat_target.
7178         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7179         * i386-linux-nat.c: Don't include "linux-nat.h".
7180         (i386_linux_nat_target): New class.
7181         (the_i386_linux_nat_target): New.
7182         (i386_linux_fetch_inferior_registers)
7183         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7184         as methods of i386_linux_nat_target.
7185         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7186         * inf-child.c (inf_child_ops): Delete.
7187         (inf_child_fetch_inferior_registers)
7188         (inf_child_store_inferior_registers): Delete.
7189         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7190         methods of inf_child_target.
7191         (inf_child_target::supports_terminal_ours)
7192         (inf_child_target::terminal_init)
7193         (inf_child_target::terminal_inferior)
7194         (inf_child_target::terminal_ours_for_output)
7195         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7196         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7197         New.
7198         (inf_child_open, inf_child_disconnect, inf_child_close)
7199         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7200         (inf_child_post_startup_inferior, inf_child_can_run)
7201         (inf_child_pid_to_exec_file): Refactor as methods of
7202         inf_child_target.
7203         (inf_child_follow_fork): Delete.
7204         (inf_child_target::can_create_inferior)
7205         (inf_child_target::can_attach): New.
7206         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7207         (inf_child_target::has_stack, inf_child_target::has_registers)
7208         (inf_child_target::has_execution): New.
7209         (inf_child_fileio_open, inf_child_fileio_pwrite)
7210         (inf_child_fileio_pread, inf_child_fileio_fstat)
7211         (inf_child_fileio_close, inf_child_fileio_unlink)
7212         (inf_child_fileio_readlink, inf_child_use_agent)
7213         (inf_child_can_use_agent): Refactor as methods of
7214         inf_child_target.
7215         (return_zero, inf_child_target): Delete.
7216         (inf_child_target::inf_child_target): New.
7217         * inf-child.h: Include "target.h".
7218         (inf_child_target): Delete function prototype.
7219         (inf_child_target): New class.
7220         (inf_child_open_target, inf_child_mourn_inferior)
7221         (inf_child_maybe_unpush_target): Delete.
7222         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7223         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7224         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7225         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7226         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7227         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7228         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7229         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7230         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7231         methods of inf_ptrace_target.
7232         (inf_ptrace_target): Delete function.
7233         * inf-ptrace.h: Include "inf-child.h".
7234         (inf_ptrace_target): Delete function declaration.
7235         (inf_ptrace_target): New class.
7236         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7237         * linux-nat.c (linux_target): New.
7238         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7239         (linux_nat_target::~linux_nat_target): New.
7240         (linux_child_post_attach, linux_child_post_startup_inferior)
7241         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7242         (linux_child_remove_fork_catchpoint)
7243         (linux_child_insert_vfork_catchpoint)
7244         (linux_child_remove_vfork_catchpoint)
7245         (linux_child_insert_exec_catchpoint)
7246         (linux_child_remove_exec_catchpoint)
7247         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7248         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7249         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7250         (linux_nat_stopped_data_address)
7251         (linux_nat_stopped_by_sw_breakpoint)
7252         (linux_nat_supports_stopped_by_sw_breakpoint)
7253         (linux_nat_stopped_by_hw_breakpoint)
7254         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7255         (linux_nat_kill, linux_nat_mourn_inferior)
7256         (linux_nat_xfer_partial, linux_nat_thread_alive)
7257         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7258         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7259         (linux_child_static_tracepoint_markers_by_strid)
7260         (linux_nat_is_async_p, linux_nat_can_async_p)
7261         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7262         (linux_nat_supports_multi_process)
7263         (linux_nat_supports_disable_randomization, linux_nat_async)
7264         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7265         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7266         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7267         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7268         methods of linux_nat_target.
7269         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7270         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7271         parameter.
7272         (check_stopped_by_watchpoint): Adjust.
7273         (linux_xfer_partial): Delete.
7274         (linux_target_install_ops, linux_target, linux_nat_add_target):
7275         Delete.
7276         (linux_nat_target::linux_nat_target): New.
7277         * linux-nat.h: Include "inf-ptrace.h".
7278         (linux_nat_target): New.
7279         (linux_target, linux_target_install_ops, linux_nat_add_target):
7280         Delete function declarations.
7281         (linux_target): Declare global.
7282         * linux-thread-db.c (thread_db_target): New.
7283         (thread_db_target::thread_db_target): New.
7284         (thread_db_ops): Delete.
7285         (the_thread_db_target): New.
7286         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7287         (thread_db_update_thread_list, thread_db_pid_to_str)
7288         (thread_db_extra_thread_info)
7289         (thread_db_thread_handle_to_thread_info)
7290         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7291         (thread_db_resume): Refactor as methods of thread_db_target.
7292         (init_thread_db_ops): Delete.
7293         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7294         * x86-linux-nat.c: Don't include "linux-nat.h".
7295         (super_post_startup_inferior): Delete.
7296         (x86_linux_nat_target::~x86_linux_nat_target): New.
7297         (x86_linux_child_post_startup_inferior)
7298         (x86_linux_read_description, x86_linux_enable_btrace)
7299         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7300         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7301         methods of x86_linux_nat_target.
7302         (x86_linux_create_target): Delete.  Bits folded ...
7303         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7304         pointer.
7305         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7306         (x86_linux_nat_target): New class.
7307         (x86_linux_create_target): Delete.
7308         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7309         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7310         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7311         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7312         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7313         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7314         make extern.
7315         (x86_use_watchpoints): Delete.
7316         * x86-nat.h: Include "breakpoint.h" and "target.h".
7317         (x86_use_watchpoints): Delete.
7318         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7319         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7320         (x86_insert_watchpoint, x86_remove_watchpoint)
7321         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7322         (x86_stopped_by_hw_breakpoint): New declarations.
7323         (x86_nat_target): New template class.
7324
7325         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7326         (the_ppc_linux_nat_target): New.
7327         (ppc_linux_fetch_inferior_registers)
7328         (ppc_linux_can_use_hw_breakpoint)
7329         (ppc_linux_region_ok_for_hw_watchpoint)
7330         (ppc_linux_ranged_break_num_registers)
7331         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7332         (ppc_linux_insert_mask_watchpoint)
7333         (ppc_linux_remove_mask_watchpoint)
7334         (ppc_linux_can_accel_watchpoint_condition)
7335         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7336         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7337         (ppc_linux_watchpoint_addr_within_range)
7338         (ppc_linux_masked_watch_num_registers)
7339         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7340         (ppc_linux_read_description): Refactor as methods of
7341         ppc_linux_nat_target.
7342         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7343
7344         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7345         (procfs_target): New class.
7346         (the_procfs_target): New.
7347         (procfs_target): Delete function.
7348         (procfs_auxv_parse, procfs_attach, procfs_detach)
7349         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7350         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7351         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7352         (procfs_create_inferior, procfs_update_thread_list)
7353         (procfs_thread_alive, procfs_pid_to_str)
7354         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7355         (procfs_stopped_data_address, procfs_insert_watchpoint)
7356         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7357         (proc_find_memory_regions, procfs_info_proc)
7358         (procfs_make_note_section): Refactor as methods of procfs_target.
7359         (_initialize_procfs): Adjust.
7360         * sol-thread.c (sol_thread_target): New class.
7361         (sol_thread_ops): Now a sol_thread_target.
7362         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7363         (sol_thread_fetch_registers, sol_thread_store_registers)
7364         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7365         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7366         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7367         (init_sol_thread_ops): Delete.
7368         (_initialize_sol_thread): Adjust.  Remove references to
7369         init_sol_thread_ops and complete_target_initialization.
7370
7371         * windows-nat.c (windows_nat_target): New class.
7372         (windows_fetch_inferior_registers)
7373         (windows_store_inferior_registers, windows_resume, windows_wait)
7374         (windows_attach, windows_detach, windows_pid_to_exec_file)
7375         (windows_files_info, windows_create_inferior)
7376         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7377         (windows_close, windows_pid_to_str, windows_xfer_partial)
7378         (windows_get_tib_address, windows_get_ada_task_ptid)
7379         (windows_thread_name, windows_thread_alive): Refactor as
7380         windows_nat_target methods.
7381         (do_initial_windows_stuff): Adjust.
7382         (windows_target): Delete function.
7383         (_initialize_windows_nat): Adjust.
7384
7385         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7386         (darwin_mourn_inferior, darwin_kill_inferior)
7387         (darwin_create_inferior, darwin_attach, darwin_detach)
7388         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7389         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7390         (darwin_supports_multi_process): Refactor as darwin_nat_target
7391         methods.
7392         (darwin_resume_to, darwin_files_info): Delete.
7393         (_initialize_darwin_inferior): Rename to ...
7394         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7395         * darwin-nat.h: Include "inf-child.h".
7396         (darwin_nat_target): New class.
7397         (darwin_complete_target): Delete.
7398         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7399         (darwin_target): New.
7400         (i386_darwin_fetch_inferior_registers)
7401         (i386_darwin_store_inferior_registers): Refactor as methods of
7402         darwin_nat_target.
7403         (darwin_complete_target): Delete, with ...
7404         (_initialize_i386_darwin_nat): ... bits factored out here.
7405
7406         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7407         (the_alpha_linux_nat_target): New.
7408         (alpha_linux_register_u_offset): Refactor as
7409         alpha_linux_nat_target method.
7410         (_initialize_alpha_linux_nat): Adjust.
7411         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7412         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7413         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7414         methods of linux_nat_trad_target.
7415         (linux_trad_target): Delete.
7416         * linux-nat-trad.h (linux_trad_target): Delete function.
7417         (linux_nat_trad_target): New class.
7418         * mips-linux-nat.c (mips_linux_nat_target): New class.
7419         (super_fetch_registers, super_store_registers, super_close):
7420         Delete.
7421         (the_mips_linux_nat_target): New.
7422         (mips64_linux_regsets_fetch_registers)
7423         (mips64_linux_regsets_store_registers)
7424         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7425         (mips_linux_register_u_offset, mips_linux_read_description)
7426         (mips_linux_can_use_hw_breakpoint)
7427         (mips_linux_stopped_by_watchpoint)
7428         (mips_linux_stopped_data_address)
7429         (mips_linux_region_ok_for_hw_watchpoint)
7430         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7431         (mips_linux_close): Refactor as methods of mips_linux_nat.
7432         (_initialize_mips_linux_nat): Adjust to C++ification.
7433
7434         * aix-thread.c (aix_thread_target): New class.
7435         (aix_thread_ops): Now an aix_thread_target.
7436         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7437         (aix_thread_fetch_registers, aix_thread_store_registers)
7438         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7439         (aix_thread_thread_alive, aix_thread_pid_to_str)
7440         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7441         Refactor as methods of aix_thread_target.
7442         (init_aix_thread_ops): Delete.
7443         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7444         and complete_target_initialization.
7445         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7446         (rs6000_nat_target): New class.
7447         (the_rs6000_nat_target): New.
7448         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7449         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7450         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7451         (super_create_inferior): Delete.
7452         (_initialize_rs6000_nat): Adjust to C++ification.
7453
7454         * arm-linux-nat.c (arm_linux_nat_target): New class.
7455         (the_arm_linux_nat_target): New.
7456         (arm_linux_fetch_inferior_registers)
7457         (arm_linux_store_inferior_registers, arm_linux_read_description)
7458         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7459         (arm_linux_remove_hw_breakpoint)
7460         (arm_linux_region_ok_for_hw_watchpoint)
7461         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7462         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7463         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7464         arm_linux_nat_target.
7465         (_initialize_arm_linux_nat): Adjust to C++ification.
7466
7467         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7468         (the_aarch64_linux_nat_target): New.
7469         (aarch64_linux_fetch_inferior_registers)
7470         (aarch64_linux_store_inferior_registers)
7471         (aarch64_linux_child_post_startup_inferior)
7472         (aarch64_linux_read_description)
7473         (aarch64_linux_can_use_hw_breakpoint)
7474         (aarch64_linux_insert_hw_breakpoint)
7475         (aarch64_linux_remove_hw_breakpoint)
7476         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7477         (aarch64_linux_region_ok_for_hw_watchpoint)
7478         (aarch64_linux_stopped_data_address)
7479         (aarch64_linux_stopped_by_watchpoint)
7480         (aarch64_linux_watchpoint_addr_within_range)
7481         (aarch64_linux_can_do_single_step): Refactor as methods of
7482         aarch64_linux_nat_target.
7483         (super_post_startup_inferior): Delete.
7484         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7485
7486         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7487         (the_hppa_linux_nat_target): New.
7488         (hppa_linux_fetch_inferior_registers)
7489         (hppa_linux_store_inferior_registers): Refactor as methods of
7490         hppa_linux_nat_target.
7491         (_initialize_hppa_linux_nat): Adjust to C++ification.
7492
7493         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7494         (the_ia64_linux_nat_target): New.
7495         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7496         (ia64_linux_stopped_data_address)
7497         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7498         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7499         ia64_linux_nat_target methods.
7500         (super_xfer_partial): Delete.
7501         (_initialize_ia64_linux_nat): Adjust to C++ification.
7502
7503         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7504         (the_m32r_linux_nat_target): New.
7505         (m32r_linux_fetch_inferior_registers)
7506         (m32r_linux_store_inferior_registers): Refactor as
7507         m32r_linux_nat_target methods.
7508         (_initialize_m32r_linux_nat): Adjust to C++ification.
7509
7510         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7511         (the_m68k_linux_nat_target): New.
7512         (m68k_linux_fetch_inferior_registers)
7513         (m68k_linux_store_inferior_registers): Refactor as
7514         m68k_linux_nat_target methods.
7515         (_initialize_m68k_linux_nat): Adjust to C++ification.
7516
7517         * s390-linux-nat.c (s390_linux_nat_target): New class.
7518         (the_s390_linux_nat_target): New.
7519         (s390_linux_fetch_inferior_registers)
7520         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7521         (s390_insert_watchpoint, s390_remove_watchpoint)
7522         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7523         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7524         (s390_auxv_parse, s390_read_description): Refactor as methods of
7525         s390_linux_nat_target.
7526         (_initialize_s390_nat): Adjust to C++ification.
7527
7528         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7529         (the_sparc_linux_nat_target): New.
7530         (_initialize_sparc_linux_nat): Adjust to C++ification.
7531         * sparc-nat.c (sparc_fetch_inferior_registers)
7532         (sparc_store_inferior_registers): Remove target_ops parameter.
7533         * sparc-nat.h (sparc_fetch_inferior_registers)
7534         (sparc_store_inferior_registers): Remove target_ops parameter.
7535         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7536         (the_sparc64_linux_nat_target): New.
7537         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7538
7539         * spu-linux-nat.c (spu_linux_nat_target): New class.
7540         (the_spu_linux_nat_target): New.
7541         (spu_child_post_startup_inferior, spu_child_post_attach)
7542         (spu_child_wait, spu_fetch_inferior_registers)
7543         (spu_store_inferior_registers, spu_xfer_partial)
7544         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7545         methods.
7546         (_initialize_spu_nat): Adjust to C++ification.
7547
7548         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7549         (the_tilegx_linux_nat_target): New.
7550         (fetch_inferior_registers, store_inferior_registers):
7551         Refactor as methods.
7552         (_initialize_tile_linux_nat): Adjust to C++ification.
7553
7554         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7555         (the_xtensa_linux_nat_target): New.
7556         (xtensa_linux_fetch_inferior_registers)
7557         (xtensa_linux_store_inferior_registers): Refactor as
7558         xtensa_linux_nat_target methods.
7559         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7560
7561         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7562         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7563         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7564         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7565         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7566         (fbsd_stopped_by_sw_breakpoint)
7567         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7568         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7569         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7570         (fbsd_post_startup_inferior, fbsd_post_attach)
7571         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7572         (fbsd_set_syscall_catchpoint)
7573         (super_xfer_partial, super_resume, super_wait)
7574         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7575         (fbsd_handle_debug_trap): Remove target_ops parameter.
7576         (fbsd_nat_add_target): Delete.
7577         * fbsd-nat.h: Include "inf-ptrace.h".
7578         (fbsd_nat_add_target): Delete.
7579         (USE_SIGTRAP_SIGINFO): Define.
7580         (fbsd_nat_target): New class.
7581
7582         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7583         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7584         (amd64bsd_target): Delete.
7585         * amd64-bsd-nat.h: New file.
7586         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7587         "x86-bsd-nat.h".
7588         (amd64_fbsd_nat_target): New class.
7589         (the_amd64_fbsd_nat_target): New.
7590         (amd64fbsd_read_description): Refactor as method of
7591         amd64_fbsd_nat_target.
7592         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7593         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7594         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7595         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7596         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7597         (i386bsd_target): Delete.
7598         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7599         (i386bsd_fetch_inferior_registers)
7600         (i386bsd_store_inferior_registers): Declare.
7601         (i386_bsd_nat_target): New class.
7602         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7603         (the_i386_fbsd_nat_target): New.
7604         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7605         i386_fbsd_nat_target methods.
7606         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7607         (_initialize_i386fbsd_nat): Adjust to C++ification.
7608         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7609         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7610         (_initialize_x86_bsd_nat): Adjust to C++ification.
7611         * x86-bsd-nat.h: Include "x86-nat.h".
7612         (x86bsd_target): Delete declaration.
7613         (x86bsd_nat_target): New class.
7614
7615         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7616         (the_aarch64_fbsd_nat_target): New.
7617         (aarch64_fbsd_fetch_inferior_registers)
7618         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7619         aarch64_fbsd_nat_target.
7620         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7621         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7622         (the_alpha_bsd_nat_target): New.
7623         (alphabsd_fetch_inferior_registers)
7624         (alphabsd_store_inferior_registers): Refactor as
7625         alpha_bsd_nat_target methods.
7626         (_initialize_alphabsd_nat): Refactor as methods of
7627         alpha_bsd_nat_target.
7628         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7629         (the_amd64_nbsd_nat_target): New.
7630         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7631         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7632         (the_amd64_obsd_nat_target): New.
7633         (_initialize_amd64obsd_nat): Adjust to C++ification.
7634         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7635         (the_arm_fbsd_nat_target): New.
7636         (arm_fbsd_fetch_inferior_registers)
7637         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7638         (_initialize_arm_fbsd_nat): Refactor as methods of
7639         arm_fbsd_nat_target.
7640         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7641         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7642         (the_arm_netbsd_nat_target): New.
7643         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7644         arm_netbsd_nat_target.
7645         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7646         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7647         (the_hppa_nbsd_nat_target): New.
7648         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7649         hppa_nbsd_nat_target methods.
7650         (_initialize_hppanbsd_nat): Adjust to C++ification.
7651         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7652         (the_hppa_obsd_nat_target): New.
7653         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7654         methods of hppa_obsd_nat_target.
7655         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7656         add_target.
7657         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7658         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7659         add_target.
7660         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7661         (_initialize_i386obsd_nat): Use add_target.
7662         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7663         (the_m68k_bsd_nat_target): New.
7664         (m68kbsd_fetch_inferior_registers)
7665         (m68kbsd_store_inferior_registers): Refactor as methods of
7666         m68k_bsd_nat_target.
7667         (_initialize_m68kbsd_nat): Adjust to C++ification.
7668         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7669         (the_mips_fbsd_nat_target): New.
7670         (mips_fbsd_fetch_inferior_registers)
7671         (mips_fbsd_store_inferior_registers): Refactor as methods of
7672         mips_fbsd_nat_target.
7673         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7674         add_target.
7675         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7676         (the_mips_nbsd_nat_target): New.
7677         (mipsnbsd_fetch_inferior_registers)
7678         (mipsnbsd_store_inferior_registers): Refactor as methods of
7679         mips_nbsd_nat_target.
7680         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7681         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7682         (the_mips64_obsd_nat_target): New.
7683         (mips64obsd_fetch_inferior_registers)
7684         (mips64obsd_store_inferior_registers): Refactor as methods of
7685         mips64_obsd_nat_target.
7686         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7687         add_target.
7688         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7689         nbsd_nat_target.
7690         * nbsd-nat.h: Include "inf-ptrace.h".
7691         (nbsd_nat_target): New class.
7692         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7693         (obsd_wait): Refactor as methods of obsd_nat_target.
7694         (obsd_add_target): Delete.
7695         * obsd-nat.h: Include "inf-ptrace.h".
7696         (obsd_nat_target): New class.
7697         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7698         (the_ppc_fbsd_nat_target): New.
7699         (ppcfbsd_fetch_inferior_registers)
7700         (ppcfbsd_store_inferior_registers): Refactor as methods of
7701         ppc_fbsd_nat_target.
7702         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7703         add_target.
7704         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7705         (the_ppc_nbsd_nat_target): New.
7706         (ppcnbsd_fetch_inferior_registers)
7707         (ppcnbsd_store_inferior_registers): Refactor as methods of
7708         ppc_nbsd_nat_target.
7709         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7710         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7711         (the_ppc_obsd_nat_target): New.
7712         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7713         methods of ppc_obsd_nat_target.
7714         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7715         add_target.
7716         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7717         (the_sh_nbsd_nat_target): New.
7718         (shnbsd_fetch_inferior_registers)
7719         (shnbsd_store_inferior_registers): Refactor as methods of
7720         sh_nbsd_nat_target.
7721         (_initialize_shnbsd_nat): Adjust to C++ification.
7722         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7723         (inf_ptrace_xfer_partial): Delete.
7724         (sparc_xfer_partial, sparc_target): Delete.
7725         * sparc-nat.h (sparc_fetch_inferior_registers)
7726         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7727         (sparc_target): Delete function declaration.
7728         (sparc_target): New template class.
7729         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7730         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7731         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7732         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7733         add_target.
7734         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7735         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7736         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7737         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7738         add_target.
7739         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7740         (the_vax_bsd_nat_target): New.
7741         (vaxbsd_fetch_inferior_registers)
7742         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7743         methods.
7744         (_initialize_vaxbsd_nat): Adjust to C++ification.
7745
7746         * bsd-kvm.c (bsd_kvm_target): New class.
7747         (bsd_kvm_ops): Now a bsd_kvm_target.
7748         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7749         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7750         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7751         bsd_kvm_target.
7752         (bsd_kvm_return_one): Delete.
7753         (bsd_kvm_add_target): Adjust to C++ification.
7754
7755         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7756         (nto_procfs_target_procfs): New classes.
7757         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7758         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7759         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7760         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7761         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7762         (procfs_remove_hw_breakpoint, procfs_resume)
7763         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7764         (procfs_kill_inferior, procfs_store_registers)
7765         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7766         as methods of nto_procfs_target.
7767         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7768         (nto_native_ops): Delete.
7769         (procfs_open, procfs_native_open): Delete.
7770         (nto_native_ops): Now an nto_procfs_target_native.
7771         (init_procfs_targets): Adjust to C++ification.
7772         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7773         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7774         Refactor as methods of nto_procfs_target.
7775
7776         * go32-nat.c (go32_nat_target): New class.
7777         (the_go32_nat_target): New.
7778         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7779         (go32_store_registers, go32_xfer_partial, go32_files_info)
7780         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7781         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7782         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7783         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7784         (go32_target): Delete.
7785         (_initialize_go32_nat): Adjust to C++ification.
7786
7787         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7788         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7789         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7790         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7791         gnu_nat_target.
7792         (gnu_target): Delete.
7793         * gnu-nat.h (gnu_target): Delete.
7794         (gnu_nat_target): New class.
7795         * i386-gnu-nat.c (gnu_base_target): New.
7796         (i386_gnu_nat_target): New class.
7797         (the_i386_gnu_nat_target): New.
7798         (_initialize_i386gnu_nat): Adjust to C++ification.
7799
7800 2018-05-02  Pedro Alves  <palves@redhat.com>
7801
7802         * bfd-target.c (target_bfd_xclose): Rename to ...
7803         (target_bfd_close): ... this.
7804         (target_bfd_reopen): Adjust.
7805         * target.c (target_close): Remove references to to_xclose.
7806         * target.h (target_ops::to_xclose): Delete.
7807         (target_ops::to_close): Update comments.
7808
7809 2018-05-02  Pedro Alves  <palves@redhat.com>
7810
7811         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7812         "linux-nat.h".
7813         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7814         * inf-ptrace.c (inf_ptrace_register_u_offset)
7815         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7816         (inf_ptrace_store_register, inf_ptrace_store_registers)
7817         (inf_ptrace_trad_target): Move to ...
7818         * linux-nat-trad.c: ... this new file.
7819         * linux-nat-trad.h: New file.
7820         * linux-nat.c (linux_target_install_ops): Make extern.
7821         (linux_trad_target): Delete.
7822         * linux-nat.h (linux_trad_target): Delete declaration.
7823         (linux_target_install_ops): Declare.
7824         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7825         "linux-nat.h".
7826
7827 2018-05-02  Pedro Alves  <palves@redhat.com>
7828
7829         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7830         procfs_target/add_target here.
7831         * procfs.c (procfs_target): Make static.
7832         (_initialize_procfs): Call add_target here.
7833         * procfs.h (struct target_ops): Remove forward declaration.
7834         (procfs_target): Remove declaration.
7835         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7836
7837 2018-05-02  Pedro Alves  <palves@redhat.com>
7838
7839         * procfs.c (procfs_stopped_by_watchpoint)
7840         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7841         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7842         Forward declare.
7843         (procfs_use_watchpoints): Delete, move contents...
7844         (procfs_target): ... here.
7845         * procfs.h (procfs_use_watchpoints): Delete declaration.
7846         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7847         procfs_use_watchpoints.
7848         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7849         procfs_use_watchpoints.
7850
7851 2018-05-02  Tom Tromey  <tom@tromey.com>
7852
7853         PR python/20084:
7854         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7855         and var_zuinteger_unlimited.
7856         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7857         and PARAM_ZUINTEGER_UNLIMITED.
7858         (set_parameter_value): Handle var_zuinteger and
7859         var_zuinteger_unlimited.
7860         (add_setshow_generic): Likewise.
7861         (parmpy_init): Likewise.
7862
7863 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7864
7865         PR rust/23124
7866         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7867         pointer is not null before dereferencing it.
7868
7869 2018-04-30  Tom Tromey  <tom@tromey.com>
7870
7871         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7872         is_mi_like_p.
7873
7874 2018-04-30  Tom Tromey  <tom@tromey.com>
7875
7876         * breakpoint.c (mention): Remove use of is_mi_like_p.
7877         (print_mention_ranged_breakpoint): Likewise.
7878         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7879         of is_mi_like_p.
7880
7881 2018-04-30  Tom Tromey  <tom@tromey.com>
7882
7883         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7884
7885 2018-04-30  Tom Tromey  <tom@tromey.com>
7886
7887         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7888         (info_spu_event_command): Remove some uses of is_mi_like_p.
7889
7890 2018-04-30  Tom Tromey  <tom@tromey.com>
7891
7892         * python/py-framefilter.c (py_print_single_arg)
7893         (enumerate_locals, py_print_args, py_print_frame): Remove some
7894         uses of is_mi_like_p.
7895
7896 2018-04-30  Tom Tromey  <tom@tromey.com>
7897
7898         * ui-out.c: Update.
7899         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7900         * ui-out.h (ui_out::is_mi_like_p): Now const.
7901         (ui_out::do_is_mi_like_p): Now const.
7902         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7903
7904 2018-04-30  Tom Tromey  <tom@tromey.com>
7905
7906         * varobj.c (varobj_set_visualizer): Use new_reference.
7907         * python/python.c (gdbpy_decode_line): Use new_reference.
7908         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7909         new_reference.
7910
7911 2018-04-30  Tom Tromey  <tom@tromey.com>
7912
7913         * varobj.c (install_new_value): Use new_reference.
7914         * value.h (value_incref): Return void.  Swap intro comment with
7915         value_decref.
7916         * value.c (set_value_parent): Use new_reference.
7917         (value_incref): Return void.  Update intro comment.
7918         (release_value): Use new_reference.
7919         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7920
7921 2018-04-30  Tom Tromey  <tom@tromey.com>
7922
7923         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7924         * gdb_bfd.h (new_bfd_ref): Remove.
7925         (gdb_bfd_open): Update comment.
7926         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7927         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7928         (gdb_bfd_fdopenr): Use new_reference.
7929         * exec.c (exec_file_attach): Use new_reference.
7930
7931 2018-04-30  Tom Tromey  <tom@tromey.com>
7932
7933         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7934         method.
7935
7936 2018-04-30  Tom Tromey  <tom@tromey.com>
7937
7938         * jit.c (jit_read_code_entry): Use type_align.
7939         * i386-tdep.c (i386_gdbarch_init): Don't call
7940         set_gdbarch_long_long_align_bit.
7941         * gdbarch.sh: Remove long_long_align_bit.
7942         * gdbarch.c, gdbarch.h: Rebuild.
7943         * arc-tdep.c (arc_type_align): New function.
7944         (arc_gdbarch_init): Use arc_type_align.  Don't call
7945         set_gdbarch_long_long_align_bit.
7946
7947 2018-04-30  Tom Tromey  <tom@tromey.com>
7948
7949         * rust-lang.c (rust_type_alignment): Remove.
7950         (rust_composite_type): Use type_align.
7951
7952 2018-04-30  Tom Tromey  <tom@tromey.com>
7953
7954         * NEWS: Mention Type.align.
7955         * python/py-type.c (typy_get_alignof): New function.
7956         (type_object_getset): Add "alignof".
7957
7958 2018-04-30  Tom Tromey  <tom@tromey.com>
7959
7960         PR exp/17095:
7961         * NEWS: Update.
7962         * std-operator.def (UNOP_ALIGNOF): New operator.
7963         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7964         New.
7965         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7966         * c-lang.c (c_op_print_tab): Add alignof.
7967         * c-exp.y (ALIGNOF): New token.
7968         (exp): Add "ALIGNOF" production.
7969         (ident_tokens): Add _Alignof and alignof.
7970
7971 2018-04-30  Tom Tromey  <tom@tromey.com>
7972
7973         * i386-tdep.c (i386_type_align): New function.
7974         (i386_gdbarch_init): Update.
7975         * gdbarch.sh (type_align): New method.
7976         * gdbarch.c, gdbarch.h: Rebuild.
7977         * arch-utils.h (default_type_align): Declare.
7978         * arch-utils.c (default_type_align): New function.
7979         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7980         (struct type) <align_log2>: New field.
7981         <instance_flags>: Now a bitfield.
7982         (TYPE_RAW_ALIGN): New macro.
7983         (type_align, type_raw_align, set_type_align): Declare.
7984         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7985         functions.
7986         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7987         (get_alignment, maybe_set_alignment): New functions.
7988         (read_structure_type, read_enumeration_type, read_array_type)
7989         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7990         (read_subrange_type, read_base_type): Set type alignment.
7991
7992 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
7993
7994         * dwarf2read.c (read_index_from_section): Use bool.
7995
7996 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
7997
7998         PR gdb/22950
7999         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8000         with #ifdef.
8001
8002 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8003
8004         PR build/22873
8005         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8006         last step, and do it atomically.
8007
8008 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8009
8010         * compile/compile-c-types.c (convert_int, convert_float):
8011         Update for C FE v1.
8012
8013 2018-04-27  Tom Tromey  <tom@tromey.com>
8014
8015         PR rust/22545:
8016         * rust-lang.c (rust_inclusive_range_type_p): New function.
8017         (rust_range): Handle inclusive ranges.
8018         (rust_compute_range): Likewise.
8019         * rust-exp.y (struct rust_op) <inclusive>: New field.
8020         (DOTDOTEQ): New constant.
8021         (range_expr): Add "..=" productions.
8022         (operator_tokens): Add "..=" token.
8023         (ast_range): Add "inclusive" parameter.
8024         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8025         ranges.
8026         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8027         bounds values.
8028         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8029         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8030         Update comments.
8031         * expprint.c (print_subexp_standard): Handle new bounds values.
8032         (dump_subexp_body_standard): Likewise.
8033
8034 2018-04-27  Tom Tromey  <tom@tromey.com>
8035
8036         * configure: Rebuild.
8037         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8038         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8039         "OVERRIDE".
8040         (class symbol_needs_eval_context): Likewise.
8041         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8042         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8043         "virtual".
8044         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8045         "override".
8046         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8047         * aarch64-tdep.c (instruction_reader::read): Use "override".
8048         (instruction_reader_test::read): Likewise.
8049         * arm-tdep.c (instruction_reader::read): Use "override".
8050         (instruction_reader_thumb::read): Likewise.
8051
8052 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8053
8054         PR remote/9665
8055         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8056         instead of remote_send.
8057         (remote_send): Remove.
8058
8059 2018-04-26  Pedro Alves  <palves@redhat.com>
8060
8061         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8062         find_function_start_sal instead of find_pc_line.
8063
8064 2018-04-26  Pedro Alves  <palves@redhat.com>
8065
8066         * breakpoint.c (set_breakpoint_location_function): Handle
8067         mst_data_gnu_ifunc.
8068         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8069         * elfread.c (elf_symtab_read): Give data symbols with
8070         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8071         (elf_rel_plt_read): Update comment.
8072         * linespec.c (convert_linespec_to_sals): Handle
8073         mst_data_gnu_ifunc.
8074         (minsym_found): Handle mst_data_gnu_ifunc.
8075         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8076         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8077         * parse.c (find_minsym_type_and_address): Handle
8078         mst_data_gnu_ifunc.
8079         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8080         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8081         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8082         comment.
8083         <mst_data_gnu_ifunc>: New enumerator.
8084
8085 2018-04-26  Pedro Alves  <palves@redhat.com>
8086
8087         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8088         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8089         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8090         Handle it.
8091         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8092         (lookup_minimal_symbol_by_pc): Adjust.
8093         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8094         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8095         * minsyms.h (lookup_msym_prefer): New enum.
8096         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8097         parameter by a lookup_msym_prefer parameter.
8098
8099 2018-04-26  Pedro Alves  <palves@redhat.com>
8100
8101         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8102         ends in "@plt" instead of looking at the symbol's section.
8103
8104 2018-04-26  Pedro Alves  <palves@redhat.com>
8105
8106         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8107         all references.
8108         (find_pc_partial_function_gnu_ifunc): Rename to ...
8109         (find_pc_partial_function): ... this, and remove references to
8110         'is_gnu_ifunc_p'.
8111         (find_pc_partial_function): Delete old implementation.
8112         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8113
8114 2018-04-26  Pedro Alves  <palves@redhat.com>
8115
8116         * linespec.c (struct bound_minimal_symbol_search_key): New.
8117         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8118         skip first line if we found a GNU ifunc minimal symbol by name.
8119         (compare_msymbols): Change parameters to work with a destructured
8120         lhs minsym.
8121         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8122         functions.
8123
8124 2018-04-26  Pedro Alves  <palves@redhat.com>
8125
8126         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8127         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8128         address/name.
8129         (add_location_to_breakpoint): Store the minsym and the objfile in
8130         the breakpoint location.
8131         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8132         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8133         Record the minsym in the sal.
8134         * symtab.h (symtab_and_line) <msymbol>: New field.
8135
8136 2018-04-26  Pedro Alves  <palves@redhat.com>
8137
8138         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8139         unless we actually resolved the ifunc.
8140
8141 2018-04-26  Pedro Alves  <palves@redhat.com>
8142
8143         * c-exp.y (variable production): Prefer ifunc minsyms over
8144         regular function symbols.
8145         * symtab.c (find_gnu_ifunc): New function.
8146         * minsyms.h (lookup_msym_prefer): New enum.
8147         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8148         parameter by a lookup_msym_prefer parameter.
8149         * symtab.h (find_gnu_ifunc): New declaration.
8150
8151 2018-04-26  Pedro Alves  <palves@redhat.com>
8152
8153         * blockframe.c (find_gnu_ifunc_target_type): New function.
8154         (find_function_type): New.
8155         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8156         return a value with a memory address.
8157         (eval_call): For calls to GNU ifunc functions, try to find the
8158         type of the target function from the type that the resolver
8159         returns.
8160         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8161         symbols.
8162         * infcall.c (find_function_return_type): Delete.
8163         (find_function_addr): Add 'function_type' parameter.  For calls to
8164         GNU ifunc functions, try to find the type of the target function
8165         from the type that the resolver returns, and return it via
8166         FUNCTION_TYPE.
8167         (call_function_by_hand_dummy): Adjust to use the function type
8168         returned by find_function_addr.
8169         (find_function_addr): Add 'function_type' parameter and move
8170         description here.
8171         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8172         declarations.
8173
8174 2018-04-26  Pedro Alves  <palves@redhat.com>
8175
8176         * c-exp.y (variable production): Skip finding an alias for ifunc
8177         symbols.
8178
8179 2018-04-26  Pedro Alves  <palves@redhat.com>
8180
8181         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8182
8183 2018-04-25  Pedro Alves  <palves@redhat.com>
8184
8185         * infcmd.c (kill_command): Print the pid as string, not the whole
8186         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8187         message.
8188         * remote.c (remote_detach_1): Print the pid as string, not the
8189         whole thread's ptid.
8190
8191 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8192             Sergio Durigan Junior  <sergiodj@redhat.com>
8193             Pedro Alves  <palves@redhat.com>
8194
8195         * infcmd.c (kill_command): Print message when inferior has
8196         been killed.
8197         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8198         '1'.
8199         (add_inferior): Improve message printed when
8200         'print_inferior_events' is on.
8201         (exit_inferior): Remove message printed when
8202         'print_inferior_events' is on.
8203         (detach_inferior): Improve message printed when
8204         'print_inferior_events' is on.
8205         (initialize_inferiors): Use 'add_inferior_silent' to set
8206         'current_inferior_'.
8207         * inferior.h (print_inferior_events): Declare here as
8208         'extern'.
8209         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8210         '[Detaching...]' messages when 'print_inferior_events' is on.
8211         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8212         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8213         'Detaching after fork from child...', replace it by '... from
8214         parent...'.
8215         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8216         prefix/suffix when printing 'Detaching...' messages.  Print
8217         them when 'print_inferior_events' is on.
8218         * remote.c (remote_detach_1): Print message when detaching
8219         from inferior and '!is_fork_parent'.
8220
8221 2018-04-24  Tom Tromey  <tom@tromey.com>
8222
8223         * cli-out.h: Reindent.
8224
8225 2018-04-24  Tom Tromey  <tom@tromey.com>
8226
8227         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8228         (cli_ui_out::do_field_string): Use fputs_filtered.
8229         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8230
8231 2018-04-23  Tom Tromey  <tom@tromey.com>
8232
8233         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8234         gdb::unique_xmalloc_ptr.
8235
8236 2018-04-23  Tom Tromey  <tom@tromey.com>
8237
8238         * configure: Rebuild.
8239
8240 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8241
8242         PR gdb/23095
8243         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8244         prepare_for_testing.  Set normal_bp to r_debug_state if target
8245         is bsd.
8246
8247 2018-04-21  Pedro Alves  <palves@redhat.com>
8248             Rajendra SY  <rajendra.sy@gmail.com>
8249
8250         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8251         * remote.c (extended_remote_attach): In all-stop mode, mark the
8252         thread as executing.
8253
8254 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8255
8256         * thread.c (thread_apply_all_command): Fix comment.
8257         (thread_command): Fix comment.
8258
8259 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8260
8261         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8262         parameter.
8263         * features/aarch64-core.c (create_feature_aarch64_core):
8264         Regenerate.
8265         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8266         Likewise.
8267         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8268         Likewise.
8269         * features/i386/32bit-avx512.c
8270         (create_feature_i386_32bit_avx512): Likewise.
8271         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8272         Likewise.
8273         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8274         Likewise.
8275         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8276         Likewise.
8277         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8278         Likewise.
8279         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8280         Likewise.
8281         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8282         Likewise.
8283         * features/i386/64bit-avx512.c
8284         (create_feature_i386_64bit_avx512): Likewise.
8285         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8286         Likewise.
8287         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8288         Likewise.
8289         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8290         Likewise.
8291         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8292         Likewise.
8293         * features/i386/64bit-segments.c
8294         (create_feature_i386_64bit_segments): Likewise.
8295         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8296         Likewise.
8297         * features/i386/x32-core.c
8298         (create_feature_i386_x32_core): Likewise.
8299         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8300         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8301         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8302         * target-descriptions.c: In generated code, don't pass xml
8303         filename.
8304
8305 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8306
8307         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8308         (print_xml_feature::visit_post): Likewise.
8309         (print_xml_feature::visit): Likewise.
8310         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8311         (print_xml_feature): Add new class.
8312         * regformats/regdat.sh: Null xmltarget on feature targets.
8313         * target-descriptions.c (struct target_desc): Add xmltarget.
8314         (maintenance_check_tdesc_xml_convert): Add unittest function.
8315         (tdesc_get_features_xml): Add function to get xml.
8316         (maintenance_check_xml_descriptions): Test xml generation.
8317         * xml-tdesc.c (string_read_description_xml): Add function.
8318         * xml-tdesc.h (string_read_description_xml): Add declaration.
8319
8320 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8321
8322         * features/Makefile: Add feature marker to targets with new style
8323         target descriptions.
8324         * regformats/aarch64.dat: Regenerate.
8325         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8326         * regformats/i386/amd64-avx-linux.dat: Likewise.
8327         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8328         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8329         * regformats/i386/amd64-linux.dat: Likewise.
8330         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8331         * regformats/i386/amd64.dat: Likewise.
8332         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8333         * regformats/i386/i386-avx-linux.dat: Likewise.
8334         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8335         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8336         * regformats/i386/i386-linux.dat: Likewise.
8337         * regformats/i386/i386-mmx-linux.dat: Likewise.
8338         * regformats/i386/i386-mpx-linux.dat: Likewise.
8339         * regformats/i386/i386.dat: Likewise.
8340         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8341         * regformats/i386/x32-avx-linux.dat: Likewise.
8342         * regformats/i386/x32-linux.dat: Likewise.
8343         * regformats/tic6x-c62x-linux.dat: Likewise.
8344         * regformats/tic6x-c64x-linux.dat: Likewise.
8345         * regformats/tic6x-c64xp-linux.dat: Likewise.
8346         * regformats/regdat.sh: Parse feature marker.
8347
8348 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8349
8350         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8351         (tdesc_osabi_name): Likewise.
8352         * target-descriptions.c (tdesc_architecture_name): Add new
8353         function.
8354         (tdesc_osabi_name): Likewise.
8355
8356 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8357
8358         * common/tdesc.c (tdesc_predefined_type): Move to here.
8359         (tdesc_named_type): Likewise.
8360         (tdesc_create_vector): Likewise.
8361         (tdesc_create_struct): Likewise.
8362         (tdesc_set_struct_size): Likewise.
8363         (tdesc_create_union): Likewise.
8364         (tdesc_create_flags): Likewise.
8365         (tdesc_create_enum): Likewise.
8366         (tdesc_add_field): Likewise.
8367         (tdesc_add_typed_bitfield): Likewise.
8368         (tdesc_add_bitfield): Likewise.
8369         (tdesc_add_flag): Likewise.
8370         (tdesc_add_enum_value): Likewise.
8371         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8372         (struct tdesc_type_vector): Likewise.
8373         (struct tdesc_type_field): Likewise.
8374         (struct tdesc_type_with_fields): Likewise.
8375         (tdesc_create_enum): Add declaration.
8376         (tdesc_add_typed_bitfield): Likewise.
8377         (tdesc_add_enum_value): Likewise.
8378         * target-descriptions.c (tdesc_type_field): Move from here.
8379         (tdesc_type_builtin): Likewise.
8380         (tdesc_type_vector): Likewise.
8381         (tdesc_type_with_fields): Likewise.
8382         (tdesc_predefined_types): Likewise.
8383         (tdesc_named_type): Likewise.
8384         (tdesc_create_vector): Likewise.
8385         (tdesc_create_struct): Likewise.
8386         (tdesc_set_struct_size): Likewise.
8387         (tdesc_create_union): Likewise.
8388         (tdesc_create_flags): Likewise.
8389         (tdesc_create_enum): Likewise.
8390         (tdesc_add_field): Likewise.
8391         (tdesc_add_typed_bitfield): Likewise.
8392         (tdesc_add_bitfield): Likewise.
8393         (tdesc_add_flag): Likewise.
8394         (tdesc_add_enum_value): Likewise.
8395         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8396         (tdesc_add_typed_bitfield): Likewise.
8397         (tdesc_add_enum_value): Likewise.
8398
8399 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8400
8401         * common/tdesc.c (tdesc_feature::accept): Move to here.
8402         (tdesc_feature::operator==): Likewise.
8403         (tdesc_create_reg): Likewise.
8404         * common/tdesc.h (tdesc_type_kind): Likewise.
8405         (struct tdesc_type): Likewise.
8406         (struct tdesc_feature): Likewise.
8407         * regformats/regdat.sh: Create a feature.
8408         * target-descriptions.c (tdesc_type_kind): Move from here.
8409         (tdesc_type): Likewise.
8410         (tdesc_type_up): Likewise.
8411         (tdesc_feature): Likewise.
8412         (tdesc_create_reg): Likewise.
8413
8414 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8415
8416         * Makefile.in: Add arch/tdesc.c
8417         * common/tdesc.c: New file.
8418         * common/tdesc.h (tdesc_element_visitor): Move to here.
8419         (tdesc_element): Likewise.
8420         (tdesc_reg): Likewise.
8421         (tdesc_reg_up): Likewise.
8422         * regformats/regdef.h (reg): Add offset to constructors.
8423         * target-descriptions.c (tdesc_element_visitor): Move from here.
8424         (tdesc_element): Likewise.
8425         (tdesc_reg): Likewise.
8426         (tdesc_reg_up): Likewise.
8427
8428 2018-04-17  Tom Tromey  <tom@tromey.com>
8429
8430         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8431         discriminant field.
8432
8433 2018-04-17  Tom Tromey  <tom@tromey.com>
8434
8435         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8436
8437 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8438
8439         * symtab.c (print_symbol_info): Skip printing filename and line
8440         number when `last' is NULL.
8441         (symtab_symbol_info): Use empty string instead of NULL for first
8442         invocation of print_symbol_info.
8443         (rbreak_command): Pass NULL to `last' parameter of
8444         print_symbol_info.
8445
8446 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8447
8448         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8449         instead of nullptr.
8450
8451 2018-04-16  Pedro Alves  <palves@redhat.com>
8452
8453         * MAINTAINERS (sh): Remove.
8454         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8455         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8456         (ALLDEPFILES): Remove sh64-tdep.c.
8457         * NEWS: Mentions that support for SH-5/SH64 is removed.
8458         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8459         (sh*-*-openbsd*): Ditto.
8460         (sh64-*-elf*): Remove.
8461         (sh*): Remove.
8462         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8463         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8464         * sh-tdep.c: No longer include "sh64-tdep.h".
8465         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8466         * sh64-tdep.c, sh64-tdep.h: Remove files.
8467
8468 2018-04-16  Pedro Alves  <palves@redhat.com>
8469
8470         * MAINTAINERS: Remove m88k.
8471         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8472         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8473         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8474         * NEWS: Mention that support for m88k was removed.
8475         * configure.host (m88*-*-*): Remove support.
8476         * configure.nat (m88k-*-*): Remove support.
8477         * configure.tgt (m88*-*-openbsd*): Remove.
8478         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8479
8480 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8481
8482         * configure.tgt (x86_tobjs): New variable.
8483         (amd64_tobjs, i386_tobjs): Use it.
8484
8485 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8486
8487         * symtab.c (print_symbol_info): Precede the symbol definition by
8488         the line number when available.
8489         * NEWS: Advertise this enhancement.
8490
8491 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8492
8493         * NEWS (New options): announce set/show record btrace cpu.
8494         * btrace.c: Include record-btrace.h.
8495         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8496         the vendor is unknown.
8497         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8498         Maybe overwrite the btrace configuration's cpu.
8499         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8500         (btrace_fetch): Add cpu parameter.  Update callers.
8501         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8502         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8503         errata workarounds if the vendor is unknown.
8504         * python/py-record-btrace.c: Include record-btrace.h.
8505         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8506         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8507         * record-btrace.c (record_btrace_cpu_state_kind): New.
8508         (record_btrace_cpu): New.
8509         (set_record_btrace_cpu_cmdlist): New.
8510         (record_btrace_get_cpu): New.
8511         (require_btrace_thread, record_btrace_info)
8512         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8513         (cmd_set_record_btrace_cpu_none): New.
8514         (cmd_set_record_btrace_cpu_auto): New.
8515         (cmd_set_record_btrace_cpu): New.
8516         (cmd_show_record_btrace_cpu): New.
8517         (_initialize_record_btrace): Initialize set/show record btrace cpu
8518         commands.
8519         * record-btrace.h (record_btrace_get_cpu): New.
8520
8521 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8522
8523         * record.c (set_record_command): Fix typo in message.
8524
8525 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8526
8527         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8528
8529 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8530
8531         * infrun.c (process_event_stop_test): Call
8532         gdbarch_in_indirect_branch_thunk.
8533         * gdbarch.sh (in_indirect_branch_thunk): New.
8534         * gdbarch.c: Regenerated.
8535         * gdbarch.h: Regenerated.
8536         * x86-tdep.h: New.
8537         * x86-tdep.c: New.
8538         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8539         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8540         (ALLDEPFILES): Add x86-tdep.c.
8541         * arch-utils.h (default_in_indirect_branch_thunk): New.
8542         * arch-utils.c (default_in_indirect_branch_thunk): New.
8543         * i386-tdep: Include x86-tdep.h.
8544         (i386_in_indirect_branch_thunk): New.
8545         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8546         function.
8547         * amd64-tdep: Include x86-tdep.h.
8548         (amd64_in_indirect_branch_thunk): New.
8549         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8550
8551 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8552
8553         PR gdb/23053
8554         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8555         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8556         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8557         regression.
8558
8559 2018-04-12  Tom Tromey  <tom@tromey.com>
8560
8561         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8562         (rust_evaluate_subexp): Likewise.
8563
8564 2018-04-12  Pedro Alves  <palves@redhat.com>
8565
8566         * procfs.c (procfs_detach): Make forward declaration's prototype
8567         match definition's protototype.
8568         (proc_get_LDT_entry): Remove stale do_cleanups call.
8569
8570 2018-04-12  Pedro Alves  <palves@redhat.com>
8571
8572         * target.h (target_ops::to_has_exited): Delete.
8573         (target_has_exited): Delete.
8574         * target-delegates.c: Regenerate.
8575
8576 2018-04-11  Pedro Alves  <palves@redhat.com>
8577
8578         * target.c (fileio_fh_t::t): Add comment.
8579         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8580         (target_fileio_close): Handle a NULL target.
8581         (invalidate_fileio_fh): New.
8582         (target_close): Call it.
8583         * remote.c (remote_hostio_send_command): No longer check whether
8584         remote_desc is open.
8585
8586 2018-04-11  Pedro Alves  <palves@redhat.com>
8587
8588         * target.c (fileio_fh_t): Make it a named struct instead of a
8589         typedef.
8590         (fileio_fh_t::is_closed): New method.
8591         (DEF_VEC_O (fileio_fh_t)): Remove.
8592         (fileio_fhandles): Now a std::vector.
8593         (is_closed_fileio_fh): Delete.
8594         (acquire_fileio_fd): Adjust.  Rename parameters.
8595         (release_fileio_fd): Adjust.
8596         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8597         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8598         (target_fileio_close): Adjust.
8599
8600 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8601
8602         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8603         index.
8604
8605 2018-04-10  Pedro Alves  <palves@redhat.com>
8606
8607         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8608         (scoped_finish_thread_state): New class.
8609         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8610         cleanup.
8611         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8612         (fetch_inferior_event, normal_stop): Likewise.
8613         * thread.c (finish_thread_state_cleanup): Delete.
8614
8615 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8616             Pedro Alves  <palves@redhat.com>
8617
8618         * value.c: Include "selftest.h" and "common/array-view.h".
8619         (struct range) <operator ==>: New.
8620         (test_ranges_contain): New.
8621         (check_ranges_vector): New.
8622         (test_insert_into_bit_range_vector): New.
8623         (_initialize_values): Register selftests.
8624         * common/array-view.h (operator==, operator!=): New.
8625
8626 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8627
8628         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8629         an iterator.
8630         * inline-frame.c: Include <algorithm>.
8631         (struct inline_state): Add constructor.
8632         (inline_state_s): Remove.
8633         (DEF_VEC_O(inline_state_s)): Remove.
8634         (inline_states): Change type to std::vector.
8635         (find_inline_frame_state): Adjust to std::vector.
8636         (allocate_inline_frame_state): Remove.
8637         (clear_inline_frame_state): Adjust to std::vector.
8638         (skip_inline_frames): Adjust to std::vector.
8639
8640 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8641
8642         * tracepoint.h (struct trace_state_variable): Add constructor.
8643         <name>: Change type to std::string.
8644         * tracepoint.c (tsv_s): Remove.
8645         (DEF_VEC_O(tsv_s)): Remove.
8646         (tvariables): Change to std::vector.
8647         (create_trace_state_variable): Adjust to std::vector.
8648         (find_trace_state_variable): Likewise.
8649         (find_trace_state_variable_by_number): Likewise.
8650         (delete_trace_state_variable): Likewise.
8651         (trace_variable_command): Adjust to std::string.
8652         (delete_trace_variable_command): Likewise.
8653         (tvariables_info_1): Adjust to std::vector.
8654         (save_trace_state_variables): Likewise.
8655         (start_tracing): Likewise.
8656         (merge_uploaded_trace_state_variables): Adjust to std::vector
8657         and std::string.
8658         * target.h (struct target_ops)
8659         <to_download_trace_state_variable>: Pass reference to
8660         trace_state_variable.
8661         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8662         * target-delegates.c: Re-generate.
8663         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8664         (mi_tsv_deleted): Likewise.
8665         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8666         * remote.c (remote_download_trace_state_variable): Change
8667         pointer to reference and adjust.
8668         * make-target-delegates (parse_argtypes): Handle references.
8669         (write_function_header): Likewise.
8670         (munge_type): Likewise.
8671
8672 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8673
8674         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8675         string_view-selftests.c.
8676         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8677         testsuite.
8678         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8679         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8680         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8681         * unittests/basic_string_view/element_access/char/1.cc:
8682         Likewise.
8683         * unittests/basic_string_view/element_access/char/empty.cc:
8684         Likewise.
8685         * unittests/basic_string_view/element_access/char/front_back.cc:
8686         Likewise.
8687         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8688         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8689         Likewise.
8690         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8691         Likewise.
8692         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8693         Likewise.
8694         * unittests/basic_string_view/operations/compare/char/1.cc:
8695         Likewise.
8696         * unittests/basic_string_view/operations/compare/char/13650.cc:
8697         Likewise.
8698         * unittests/basic_string_view/operations/copy/char/1.cc:
8699         Likewise.
8700         * unittests/basic_string_view/operations/data/char/1.cc:
8701         Likewise.
8702         * unittests/basic_string_view/operations/find/char/1.cc:
8703         Likewise.
8704         * unittests/basic_string_view/operations/find/char/2.cc:
8705         Likewise.
8706         * unittests/basic_string_view/operations/find/char/3.cc:
8707         Likewise.
8708         * unittests/basic_string_view/operations/find/char/4.cc:
8709         Likewise.
8710         * unittests/basic_string_view/operations/rfind/char/1.cc:
8711         Likewise.
8712         * unittests/basic_string_view/operations/rfind/char/2.cc:
8713         Likewise.
8714         * unittests/basic_string_view/operations/rfind/char/3.cc:
8715         Likewise.
8716         * unittests/basic_string_view/operations/substr/char/1.cc:
8717         Likewise.
8718         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8719         * unittests/string_view-selftests.c: New file.
8720
8721 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8722
8723         * unittests/basic_string_view/capacity/1.cc: New file.
8724         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8725         * unittests/basic_string_view/cons/char/1.cc: New file.
8726         * unittests/basic_string_view/cons/char/2.cc: New file.
8727         * unittests/basic_string_view/cons/char/3.cc: New file.
8728         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8729         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8730         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8731         * unittests/basic_string_view/element_access/char/1.cc: New file.
8732         * unittests/basic_string_view/element_access/char/2.cc: New file.
8733         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8734         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8735         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8736         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8737         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8738         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8739         * unittests/basic_string_view/include.cc: New file.
8740         * unittests/basic_string_view/inserters/char/1.cc: New file.
8741         * unittests/basic_string_view/inserters/char/2.cc: New file.
8742         * unittests/basic_string_view/inserters/char/3.cc: New file.
8743         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8744         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8745         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8746         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8747         * unittests/basic_string_view/literals/types.cc: New file.
8748         * unittests/basic_string_view/literals/values.cc: New file.
8749         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8750         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8751         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8752         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8753         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8754         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8755         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8756         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8757         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8758         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8759         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8760         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8761         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8762         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8763         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8764         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8765         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8766         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8767         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8768         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8769         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8770         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8771         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8772         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8773         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8774         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8775         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8776         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8777         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8778         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8779         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8780         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8781         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8782         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8783         * unittests/basic_string_view/operators/char/2.cc: New file.
8784         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8785         * unittests/basic_string_view/range_access/char/1.cc: New file.
8786         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8787         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8788         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8789         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8790         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8791         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8792         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8793         * unittests/basic_string_view/typedefs.cc: New file.
8794         * unittests/basic_string_view/types/1.cc: New file.
8795
8796 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8797
8798         * common/gdb_string_view.h: Remove libstdc++ implementation
8799         details, adjust to gdb reality.
8800         * common/gdb_string_view.tcc: Likewise.
8801         * cli/cli-script.c (struct string_view): Remove.
8802         (user_args) <m_args>: Change element type to gdb::string_view.
8803         (user_args::insert_args): Adjust.
8804
8805 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8806
8807         * common/gdb_string_view.h: New file.
8808         * common/gdb_string_view.tcc: New file.
8809
8810 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8811
8812         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8813         * configure: Re-generate.
8814
8815 2018-04-09  Pedro Alves  <palves@redhat.com>
8816
8817         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8818         (set_target_gdbarch): Call
8819         gdb::observers::architecture_changed.notify instead of
8820         observer_notify_architecture_changed.
8821
8822 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8823
8824         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8825         (do_restore_current_traceframe_cleanup): Remove.
8826         (restore_current_traceframe_cleanup_dtor): Remove.
8827         (make_cleanup_restore_current_traceframe): Remove.
8828         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8829         New.
8830         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8831         * infrun.c (fetch_inferior_event): Use
8832         scoped_restore_current_traceframe.
8833
8834 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8835
8836         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8837         Remove.
8838         <n_allocated_type_units>: Remove.
8839         <all_type_units>: Change to std::vector.
8840         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8841         to std::vector change.
8842         (dwarf2_per_objfile::get_cutu): Likewise.
8843         (dwarf2_per_objfile::get_tu): Likewise.
8844         (create_signatured_type_table_from_index): Likewise.
8845         (create_signatured_type_table_from_debug_names): Likewise.
8846         (dw2_symtab_iter_next): Likewise.
8847         (dw2_print_stats): Likewise.
8848         (dw2_expand_all_symtabs): Likewise.
8849         (dw2_expand_marked_cus): Likewise.
8850         (dw2_debug_names_iterator::next): Likewise.
8851         (dwarf2_initialize_objfile): Likewise.
8852         (add_signatured_type_cu_to_table): Likewise.
8853         (create_all_type_units): Likewise.
8854         (add_type_unit): Likewise.
8855         (struct tu_abbrev_offset): Add constructor.
8856         (build_type_psymtabs_1): Adjust to std::vector change.
8857         (print_tu_stats): Likewise.
8858         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8859         (write_debug_names): Likewise.
8860
8861 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8862
8863         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8864         Make an std::vector.
8865         <n_comp_units>: Remove.
8866         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8867         to std::vector change.
8868         (dwarf2_per_objfile::get_cutu): Likewise.
8869         (dwarf2_per_objfile::get_cu): Likewise.
8870         (create_cus_from_index): Likewise.
8871         (create_addrmap_from_index): Likewise.
8872         (create_addrmap_from_aranges): Likewise.
8873         (dwarf2_read_index): Likewise.
8874         (dw2_find_last_source_symtab): Likewise.
8875         (dw2_map_symtabs_matching_filename): Likewise.
8876         (dw2_symtab_iter_next): Likewise.
8877         (dw2_print_stats): Likewise.
8878         (dw2_expand_all_symtabs): Likewise.
8879         (dw2_expand_symtabs_with_fullname): Likewise.
8880         (dw2_expand_marked_cus): Likewise.
8881         (dw2_map_symbol_filenames): Likewise.
8882         (create_cus_from_debug_names): Likewise.
8883         (dwarf2_read_debug_names): Likewise.
8884         (dw2_debug_names_iterator::next): Likewise.
8885         (dwarf2_initialize_objfile): Likewise.
8886         (set_partial_user): Likewise.
8887         (dwarf2_build_psymtabs_hard): Likewise.
8888         (read_comp_units_from_section): Remove arguments, adjust to
8889         std::vector change.
8890         (create_all_comp_units): Adjust to std::vector and
8891         read_comp_units_from_section changes.
8892         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8893         change.
8894         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8895         (psyms_seen_size): Likewise.
8896         (write_gdbindex): Likewise.
8897         (write_debug_names): Likewise.
8898
8899 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8900
8901         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8902         with dwarf2_per_objfile.
8903         (create_cus_from_index): Likewise.
8904         (create_signatured_type_table_from_index): Likewise.
8905         (dwarf2_read_index): Likewise.
8906         (dwarf2_initialize_objfile): Likewise.
8907         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8908         per_cu rather than get_dwarf2_per_objfile.
8909
8910 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8911
8912         * dwarf2read.h (struct signatured_type): Forward declare.
8913         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8914         New methods.
8915         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8916         (dw2_get_cutu): ...this.
8917         (dwarf2_per_objfile::get_cu): Rename from...
8918         (dw2_get_cu): ...this.
8919         (dwarf2_per_objfile::get_tu): New.
8920         (create_addrmap_from_index): Adjust.
8921         (create_addrmap_from_aranges): Adjust.
8922         (dw2_find_last_source_symtab): Adjust.
8923         (dw2_map_symtabs_matching_filename): Adjust.
8924         (dw2_symtab_iter_next): Adjust.
8925         (dw2_print_stats): Adjust.
8926         (dw2_expand_all_symtabs): Adjust.
8927         (dw2_expand_symtabs_with_fullname): Adjust.
8928         (dw2_expand_marked_cus): Adjust.
8929         (dw_expand_symtabs_matching_file_matcher): Adjust.
8930         (dw2_map_symbol_filenames): Adjust.
8931         (dw2_debug_names_iterator::next): Adjust.
8932         (dwarf2_initialize_objfile): Adjust.
8933         (set_partial_user): Adjust.
8934         (dwarf2_build_psymtabs_hard): Adjust.
8935
8936 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8937
8938         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8939         Remove unused variables.
8940         (dw2_map_symtabs_matching_filename): Likewise.
8941         (dwarf2_record_block_ranges): Likewise.
8942         (dwarf2_read_addr_index): Likewise.
8943         (follow_die_offset): Likewise.
8944
8945 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8946
8947         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8948         to symbol_file_add_main.
8949
8950 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8951
8952         PR mi/22299
8953         * mi/mi-console.c (do_fputc_async_safe): New.
8954         (mi_console_file::write_async_safe): New.
8955         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8956         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8957         New.
8958         * ui-file.c (ui_file::putstrn): Adjust call to
8959         fputstrn_unfiltered.
8960         * utils.c (printchar): Replace do_fputs and do_fprintf
8961         parameters by do_fputc.
8962         (fputstr_filtered): Adjust call to printchar.
8963         (fputstr_unfiltered): Likewise.
8964         (fputstrn_filtered): Likewise.
8965         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8966         printchar.
8967         * utils.h (do_fputc_ftype): New typedef.
8968         (fputstrn_unfiltered): Add do_fputc parameter.
8969
8970 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8971
8972         * regformats/i386/i386-avx.dat: Remove.
8973
8974 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8975
8976         PR gdb/22979
8977         * amd64-tdep.c (amd64_none_init_abi): New function.
8978         (amd64_x32_none_init_abi): New function.
8979         (_initialize_amd64_tdep): Register handlers for x86-64 and
8980         x64_32 with GDB_OSABI_NONE.
8981         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8982         GDB_OSABI_NONE osabi.
8983
8984 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8985
8986         PR gdb/22980
8987         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8988         GDB_OSABI_NONE.
8989         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8990         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8991
8992 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8993
8994         * common/byte-vector.h (char_vector): New type.
8995         * target.h (target_read_alloc): Return
8996         gdb::optional<byte_vector>.
8997         (target_read_stralloc): Return gdb::optional<char_vector>.
8998         (target_get_osdata): Return gdb::optional<char_vector>.
8999         * target.c (target_read_alloc_1): Templatize.  Replacement
9000         manual memory management with vector.
9001         (target_read_alloc): Change return type, adjust.
9002         (target_read_stralloc): Change return type, adjust.
9003         (target_get_osdata): Change return type, adjust.
9004         * auxv.c (struct auxv_info) <length>: Remove.
9005         <data>: Change type to gdb::optional<byte_vector>.
9006         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9007         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9008         (target_auxv_search): Adjust.
9009         (fprint_target_auxv): Adjust.
9010         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9011         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9012         (linux_make_corefile_notes): Adjust.
9013         * osdata.c (get_osdata): Adjust.
9014         * remote.c (remote_get_threads_with_qxfer): Adjust.
9015         (remote_memory_map): Adjust.
9016         (remote_traceframe_info): Adjust.
9017         (btrace_read_config): Adjust.
9018         (remote_read_btrace): Adjust.
9019         (remote_pid_to_exec_file): Adjust.
9020         * solib-aix.c (solib_aix_get_library_list): Adjust.
9021         * solib-dsbt.c (decode_loadmap): Don't free buf.
9022         (dsbt_get_initial_loadmaps): Adjust.
9023         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9024         * solib-target.c (solib_target_current_sos): Adjust.
9025         * tracepoint.c (sdata_make_value): Adjust.
9026         * xml-support.c (xinclude_start_include): Adjust.
9027         (xml_fetch_content_from_file): Adjust.
9028         * xml-support.h (xml_fetch_another): Change return type.
9029         (xml_fetch_content_from_file): Change return type.
9030         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9031         * xml-tdesc.c (file_read_description_xml): Adjust.
9032         (fetch_available_features_from_target): Change return type.
9033         (target_fetch_description_xml): Adjust.
9034         (target_read_description_xml): Adjust.
9035
9036 2018-04-06  Tom Tromey  <tom@tromey.com>
9037
9038         * value.c (~value): Update.
9039         (struct value) <contents>: Now unique_xmalloc_ptr.
9040         (value_contents_bits_eq, allocate_value_contents)
9041         (value_contents_raw, value_contents_all_raw)
9042         (value_contents_for_printing, value_contents_for_printing_const)
9043         (set_value_enclosing_type): Update.
9044
9045 2018-04-06  Tom Tromey  <tom@tromey.com>
9046
9047         * value.c (range_s): Remove typedef, VEC.
9048         (struct range): Add operator<.
9049         (range_lessthan): Remove.
9050         (ranges_contain): Change type.
9051         (~value): Update.
9052         (struct value) <unavailable, optimized_out>: Now std::vector.
9053         (value_entirely_available)
9054         (value_entirely_covered_by_range_vector)
9055         (value_entirely_unavailable, value_entirely_optimized_out):
9056         Update.
9057         (insert_into_bit_range_vector): Change argument type.
9058         (find_first_range_overlap): Likewise.
9059         (struct ranges_and_idx, value_contents_bits_eq)
9060         (require_not_optimized_out, require_available): Update.
9061         (ranges_copy_adjusted): Change argument types.
9062         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9063
9064 2018-04-06  Tom Tromey  <tom@tromey.com>
9065
9066         * value.c (~value): Update.
9067         (struct value) <parent>: Now a value_ref_ptr.
9068         (value_parent, set_value_parent, value_address, value_copy):
9069         Update.
9070
9071 2018-04-06  Tom Tromey  <tom@tromey.com>
9072
9073         * value.c (struct value): Add constructor, destructor, and member
9074         initializers.
9075         (allocate_value_lazy, value_decref): Update.
9076
9077 2018-04-06  Tom Tromey  <tom@tromey.com>
9078
9079         * value.c (struct value) <released, next>: Remove.
9080         (all_values): Now a std::vector.
9081         (allocate_value_lazy): Update.
9082         (value_next): Remove.
9083         (value_mark, value_free_to_mark, release_value)
9084         (value_release_to_mark): Update.
9085
9086 2018-04-06  Tom Tromey  <tom@tromey.com>
9087
9088         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9089         (free_value_chain): Remove.
9090         * value.c (free_value_chain): Remove.
9091         (value_release_to_mark): Return a std::vector.
9092         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9093         std::vector.
9094         (check_condition): Update.
9095         * eval.c (fetch_subexp_value): Change "val_chain" to a
9096         std::vector.
9097         * breakpoint.c (update_watchpoint): Update.
9098         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9099
9100 2018-04-06  Tom Tromey  <tom@tromey.com>
9101
9102         * value.h (free_all_values): Remove.
9103         * value.c (free_all_values): Remove.
9104
9105 2018-04-06  Tom Tromey  <tom@tromey.com>
9106
9107         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9108         (value_history_chain, value_history_count): Remove.
9109         (value_history): New global.
9110         (record_latest_value, access_value_history, show_values)
9111         (preserve_values): Update.
9112
9113 2018-04-06  Tom Tromey  <tom@tromey.com>
9114
9115         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9116         * varobj.c (varobj_set_display_format, varobj_set_value)
9117         (install_default_visualizer, construct_visualizer)
9118         (install_new_value, ~varobj, varobj_get_value_type)
9119         (my_value_of_variable, varobj_editable_p): Update.
9120         * c-varobj.c (c_describe_child, c_value_of_variable)
9121         (cplus_number_of_children, cplus_describe_child): Update.
9122         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9123         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9124         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9125
9126 2018-04-06  Tom Tromey  <tom@tromey.com>
9127
9128         * printcmd.c (last_examine_address): Change type to
9129         value_ref_ptr.
9130         (do_examine, x_command): Update.
9131
9132 2018-04-06  Tom Tromey  <tom@tromey.com>
9133
9134         * value.c (release_value): Update.
9135         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9136         (struct bpstats) <val>: Now a value_ref_ptr.
9137         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9138         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9139         (~watchpoint, print_it_watchpoint, watch_command_1)
9140         (invalidate_bp_value_on_memory_change): Update.
9141
9142 2018-04-06  Tom Tromey  <tom@tromey.com>
9143
9144         * varobj.c (varobj_clear_saved_item)
9145         (update_dynamic_varobj_children, install_new_value, ~varobj):
9146         Update.
9147         * value.h (value_incref): Move declaration earlier.
9148         (value_decref): Rename from value_free.
9149         (struct value_ref_policy): New.
9150         (value_ref_ptr): New typedef.
9151         (struct value_deleter): Remove.
9152         (gdb_value_up): Remove typedef.
9153         (release_value): Change return type.
9154         (release_value_or_incref): Remove.
9155         * value.c (set_value_parent): Update.
9156         (value_incref): Change return type.
9157         (value_decref): Rename from value_free.
9158         (value_free_to_mark, free_all_values, free_value_chain): Update.
9159         (release_value): Return value_ref_ptr.
9160         (release_value_or_incref): Remove.
9161         (record_latest_value, set_internalvar, clear_internalvar):
9162         Update.
9163         * stack.c (info_frame_command): Don't call value_free.
9164         * python/py-value.c (valpy_dealloc, valpy_new)
9165         (value_to_value_object): Update.
9166         * printcmd.c (do_examine): Update.
9167         * opencl-lang.c (lval_func_free_closure): Update.
9168         * mi/mi-main.c (register_changed_p): Don't call value_free.
9169         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9170         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9171         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9172         value_free.
9173         * guile/scm-value.c (vlscm_free_value_smob)
9174         (vlscm_scm_from_value): Update.
9175         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9176         (frame_unwind_register_unsigned, get_frame_register_bytes)
9177         (put_frame_register_bytes): Don't call value_free.
9178         * findvar.c (address_from_register): Don't call value_free.
9179         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9180         * dwarf2loc.c (entry_data_value_free_closure)
9181         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9182         (dwarf2_evaluate_loc_desc_full): Update.
9183         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9184         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9185         (~watchpoint, watch_command_1)
9186         (invalidate_bp_value_on_memory_change): Update.
9187         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9188
9189 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9190
9191         PR gdb/23022
9192         * warning.m4: Add -Wno-error=deprecated-register.
9193         * configure: Re-generate.
9194
9195 2018-04-05  Tom Tromey  <tom@tromey.com>
9196
9197         * linespec.h: Remove include of "vec.h".
9198
9199 2018-04-05  Tom Tromey  <tom@tromey.com>
9200
9201         * linespec.c (typep): Remove typedef.
9202         (find_methods, find_superclass_methods): Take a std::vector.
9203         (find_method): Use std::vector.
9204
9205 2018-04-05  Tom Tromey  <tom@tromey.com>
9206
9207         * utils.c (compare_strings): Remove.
9208         * utils.h (compare_strings): Remove.
9209         * objc-lang.h (find_imps): Update.
9210         * objc-lang.c (find_methods): Take a std::vector.
9211         (uniquify_strings, find_imps): Likewise.
9212         * linespec.c (find_methods): Take a std::vector.
9213         (decode_objc): Use std::vector.
9214         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9215         a std::vector.
9216         (find_method, find_function_symbols): Use std::vector.
9217
9218 2018-04-05  Tom Tromey  <tom@tromey.com>
9219
9220         * completer.c (completion_tracker::completion_tracker): Remove
9221         cast.
9222         (completion_tracker::discard_completions): Likewise.
9223         * breakpoint.c (ambiguous_names_p): Remove cast.
9224         * ada-lang.c (_initialize_ada_language): Remove cast.
9225         * utils.h (streq): Update.
9226         (streq_hash): Add new declaration.
9227         * utils.c (streq): Return bool.
9228         (streq_hash): New function.
9229
9230 2018-04-05  Tom Tromey  <tom@tromey.com>
9231
9232         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9233         Remove a string copy.
9234
9235 2018-04-05  Tom Tromey  <tom@tromey.com>
9236
9237         * linespec.c (filter_results): Use std::vector.
9238         (decode_line_2, decode_line_full): Update.
9239
9240 2018-04-05  Tom Tromey  <tom@tromey.com>
9241
9242         * linespec.c (canonical_to_fullform): Return std::string.
9243         (filter_results): Update.
9244         (struct decode_line_2_item): Add constructor.
9245         <fullform, displayform>: Now std::string.
9246         (decode_line_2_compare_items): Now a std::sort comparator.
9247         (decode_line_2): Update.
9248
9249 2018-04-05  Tom Tromey  <tom@tromey.com>
9250
9251         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9252         (unexpected_linespec_error): Update.
9253         (linespec_parse_basic, parse_linespec): Update.
9254
9255 2018-04-05  Tom Tromey  <tom@tromey.com>
9256
9257         * linespec.c (linespec_parse_basic): Reindent.
9258
9259 2018-04-05  Tom Tromey  <tom@tromey.com>
9260
9261         * minsyms.h (iterate_over_minimal_symbols): Update.
9262         * minsyms.c (iterate_over_minimal_symbols): Take a
9263         gdb::function_view.
9264         * linespec.c (struct collect_minsyms): Remove.
9265         (compare_msyms): Now a std::sort comparator.
9266         (add_minsym): Add parameters.
9267         (search_minsyms_for_name): Update.  Use std::vector.
9268
9269 2018-04-03  Tom Tromey  <tom@tromey.com>
9270
9271         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9272         gdb::byte_vector.
9273
9274 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9275
9276         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9277
9278 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9279
9280         PR gdb/16959
9281         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9282         printing static type.
9283
9284 2018-04-01  Tom Tromey  <tom@tromey.com>
9285
9286         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9287         (rs6000_xfer_shared_libraries): Update.
9288
9289 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9290
9291         * common/gdb_vecs.h (char_ptr): Remove.
9292         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9293
9294 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9295
9296         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9297         with std::vector.
9298         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9299
9300 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9301
9302         * tracepoint.h (struct uploaded_tp): Initialize fields.
9303         <actions, step_actions, cmd_strings>: Change type to
9304         std::vector<char *>.
9305         * tracepoint.c (get_uploaded_tp): Allocate with new.
9306         (free_uploaded_tps): Free with delete.
9307         (parse_tracepoint_definition): Adjust to std::vector change.
9308         * breakpoint.c (read_uploaded_action): Likewise.
9309         (create_tracepoint_from_upload): Likewise.
9310         * ctf.c (ctf_write_uploaded_tp): Likewise.
9311         (SET_ARRAY_FIELD): Likewise.
9312         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9313
9314 2018-03-30  Tom Tromey  <tom@tromey.com>
9315
9316         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9317         std::unique_ptr.
9318         (svr4_keep_data_in_core): Update.
9319         (svr4_read_so_list): Update.
9320
9321 2018-03-30  Tom Tromey  <tom@tromey.com>
9322
9323         * windows-nat.c (handle_output_debug_string, handle_exception):
9324         Update.
9325         * target.h (target_read_string): Update.
9326         * target.c (target_read_string): Change "string" to
9327         unique_xmalloc_ptr.
9328         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9329         Update.
9330         * solib-frv.c (frv_current_sos): Update.
9331         * solib-dsbt.c (dsbt_current_sos): Update.
9332         * solib-darwin.c (darwin_current_sos): Update.
9333         * linux-thread-db.c (inferior_has_bug): Update.
9334         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9335         Update.  Remove alloca.
9336         * ada-lang.c (ada_main_name): Update.
9337
9338 2018-03-30  Tom Tromey  <tom@tromey.com>
9339
9340         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9341         (struct dwo_file_deleter): New.
9342         (dwo_file_up): New typedef.
9343         (open_and_init_dwo_file): Use dwo_file_up.
9344         (free_dwo_file_cleanup): Remove.
9345
9346 2018-03-30  Tom Tromey  <tom@tromey.com>
9347
9348         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9349         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9350
9351 2018-03-30  Tom Tromey  <tom@tromey.com>
9352
9353         * dwarf2read.c (class free_cached_comp_units): New class.
9354         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9355         (free_cached_comp_units): Remove function.
9356
9357 2018-03-30  Tom Tromey  <tom@tromey.com>
9358
9359         * utils.h (make_cleanup_unpush_target): Remove.
9360         * inf-ptrace.c (struct target_unpusher): New.
9361         (target_unpush_up) New typedef.
9362         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9363         target_unpush_up.
9364         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9365
9366 2018-03-27  Tom Tromey  <tom@tromey.com>
9367
9368         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9369
9370 2018-03-27  Pedro Alves  <palves@redhat.com>
9371             Tom Tromey  <tom@tromey.com>
9372
9373         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9374         destructor.  Now a class.
9375         (gdb_readline_wrapper_cleanup): Remove function.
9376         (gdb_readline_wrapper): Remove cleanups.
9377
9378 2018-03-27  Tom Tromey  <tom@tromey.com>
9379
9380         * typeprint.h (struct type_print_options) <local_typedefs,
9381         global_typedefs>: Remove "struct" keyword.
9382         (class typedef_hash_table): New class.
9383         (recursively_update_typedef_hash, add_template_parameters)
9384         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9385         (find_typedef_in_hash): Don't declare.
9386         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9387         (typedef_hash_table::recursively_update): Rename from
9388         recursively_update_typedef_hash.  Now a member.
9389         (typedef_hash_table::add_template_parameters): Rename from
9390         add_template_parameters.  Now a member.
9391         (typedef_hash_table::typedef_hash_table): Now a constructor;
9392         rename from create_typedef_hash.
9393         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9394         rename from free_typedef_hash.
9395         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9396         (do_free_global_table): Remove.
9397         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9398         from copy_type_recursive.
9399         (create_global_typedef_table): Remove.
9400         (typedef_hash_table::find_global_typedef): Now a member of
9401         typedef_hash_table.
9402         (typedef_hash_table::find_typedef): Rename from
9403         find_typedef_in_hash; now a member.
9404         (whatis_exp): Update.
9405         * extension.h (struct ext_lang_type_printers): Add constructor and
9406         destructor.
9407         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9408         declare.
9409         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9410         Now a constructor; rename from start_ext_lang_type_printers.
9411         (ext_lang_type_printers): Now a destructor; rename from
9412         free_ext_lang_type_printers.
9413         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9414         Update.
9415         (c_type_print_base_struct_union): Update.  Remove cleanups.
9416
9417 2018-03-27  Tom Tromey  <tom@tromey.com>
9418
9419         * dwarf-index-write.c: Include <cmath>.
9420
9421 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9422
9423         * NEWS: Add entry describing new "set|show varsize-limit" command.
9424         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9425         command.
9426         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9427         "set variable".
9428
9429 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9430
9431         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9432         dwarf-index-write.c
9433         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9434         * dwarf-index-common.c: New file.
9435         * dwarf-index-common.h: New file.
9436         * dwarf-index-write.c: New file.
9437         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9438         (struct dwarf2_section_info): Move from here.
9439         (dwarf2_section_info_def): Likewise.
9440         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9441         (offset_type): Likewise.
9442         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9443         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9444         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9445         (byte_swap): Likewise.
9446         (MAYBE_SWAP): Likewise.
9447         (dwarf2_per_cu_ptr): Likewise.
9448         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9449         (struct tu_stats): Likewise.
9450         (struct dwarf2_per_objfile): Likewise.
9451         (struct dwarf2_per_cu_data): Likewise.
9452         (struct signatured_type): Likewise.
9453         (sig_type_ptr): Likewise.
9454         (DEF_VEC_P (sig_type_ptr)): Likewise.
9455         (INDEX4_SUFFIX): Likewise.
9456         (INDEX5_SUFFIX): Likewise.
9457         (DEBUG_STR_SUFFIX): Likewise.
9458         (dwarf2_read_section): Make non-static.
9459         (mapped_index_string_hash): Move from here.
9460         (dwarf5_djb_hash): Likewise.
9461         (file_write): Likewise.
9462         (class data_buf): Likewise.
9463         (struct symtab_index_entry): Likewise.
9464         (struct mapped_symtab): Likewise.
9465         (find_slot): Likewise.
9466         (hash_expand): Likewise.
9467         (add_index_entry): Likewise.
9468         (uniquify_cu_indices): Likewise.
9469         (class c_str_view): Likewise.
9470         (class c_str_view_hasher): Likewise.
9471         (class vector_hasher): Likewise.
9472         (write_hash_table): Likewise.
9473         (psym_index_map): Likewise.
9474         (struct addrmap_index_data): Likewise.
9475         (add_address_entry): Likewise.
9476         (add_address_entry_worker): Likewise.
9477         (write_address_map): Likewise.
9478         (symbol_kind): Likewise.
9479         (write_psymbols): Likewise.
9480         (struct signatured_type_index_data): Likewise.
9481         (write_one_signatured_type): Likewise.
9482         (recursively_count_psymbols): Likewise.
9483         (recursively_write_psymbols): Likewise.
9484         (class debug_names): Likewise.
9485         (check_dwarf64_offsets): Likewise.
9486         (psyms_seen_size): Likewise.
9487         (write_gdbindex): Likewise.
9488         (write_debug_names): Likewise.
9489         (assert_file_size): Likewise.
9490         (write_psymtabs_to_index): Likewise.
9491         (save_gdb_index_command): Likewise.
9492         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9493         command.
9494         * dwarf2read.h: New file.
9495
9496 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9497
9498         PR gdb/22670
9499         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9500         symbol name if the CU's language stores symbol names in linkage
9501         format.
9502         * language.h (struct language_defn)
9503         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9504         all instances of this struct.
9505
9506 2018-03-26  Tom Tromey  <tom@tromey.com>
9507
9508         * stack.c (backtrace_command_1): Remove verbose code.
9509
9510 2018-03-26  Tom Tromey  <tom@tromey.com>
9511
9512         * python/py-framefilter.c (py_print_type): Don't catch
9513         exceptions.  Return void.
9514         (py_print_value): Likewise.
9515         (py_print_single_arg): Likewise.
9516         (enumerate_args): Don't catch exceptions.
9517         (py_print_args): Likewise.
9518         (py_print_frame): Likewise.
9519         (gdbpy_apply_frame_filter): Catch exceptions here.
9520
9521 2018-03-26  Tom Tromey  <tom@tromey.com>
9522
9523         * stack.c (_initialize_stack): Remove trailing newlines from help
9524         text.  Add "Usage" line to "backtrace" help.
9525
9526 2018-03-26  Tom Tromey  <tom@tromey.com>
9527
9528         PR python/16486:
9529         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9530
9531 2018-03-26  Tom Tromey  <tom@tromey.com>
9532
9533         * python/py-framefilter.c (py_print_single_arg): Return
9534         EXT_LANG_BT_ERROR from catch.
9535
9536 2018-03-26  Tom Tromey  <tom@tromey.com>
9537
9538         PR backtrace/15584:
9539         * stack.c (backtrace_command_1): Move some code into no-filters
9540         "if".
9541
9542 2018-03-26  Tom Tromey  <tom@tromey.com>
9543
9544         * python/py-framefilter.c (throw_quit_or_print_exception): New
9545         function.
9546         (gdbpy_apply_frame_filter): Use it.
9547
9548 2018-03-26  Tom Tromey  <tom@tromey.com>
9549
9550         PR cli/17716:
9551         * python/py-framefilter.c (py_print_type, py_print_value)
9552         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9553         RETURN_MASK_ERROR.
9554
9555 2018-03-26  Tom Tromey  <tom@tromey.com>
9556
9557         * python/py-framefilter.c (enumerate_args): Use
9558         gdb::unique_xmalloc_ptr.
9559
9560 2018-03-26  Tom Tromey  <tom@tromey.com>
9561
9562         * python/py-framefilter.c (py_print_frame): Return
9563         EXT_LANG_BT_OK.
9564         (gdbpy_apply_frame_filter): Update comment.
9565         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9566         Remove.
9567         <EXT_LANG_BT_NO_FILTERS>: Change value.
9568
9569 2018-03-26  Tom Tromey  <tom@tromey.com>
9570
9571         PR backtrace/15582:
9572         * stack.c (backtrace_command): Parse "hide" argument.
9573         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9574         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9575         constant.
9576
9577 2018-03-26  Tom Tromey  <tom@tromey.com>
9578
9579         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9580         add "flags".
9581         (backtrace_command): Remove "fulltrace", add "flags".
9582
9583 2018-03-26  Tom Tromey  <tom@tromey.com>
9584
9585         * stack.c (backtrace_command): Rewrite command line parsing.
9586
9587 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9588
9589         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9590
9591 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9592
9593         * filename-seen-cache.h: Add include guard.
9594
9595 2018-03-26  Keith Seitz  <keiths@redhat.com>
9596
9597         * symfile.c (place_section): Remove "struct" from section_addr_info
9598         in comment.
9599         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9600         "struct" keyword from section_addr_info.
9601
9602 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9603
9604         * regformats/regdef.h (reg): Add constructors.
9605
9606 2018-03-25  Pedro Alves  <palves@redhat.com>
9607
9608         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9609         if then/else bodies in var_func_name extraction.
9610
9611 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9612
9613         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9614         lookup_minimal_symbol() to find symbol entry.
9615         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9616
9617 2018-03-23  Keith Seitz  <keiths@redhat.com>
9618
9619         PR c++/22968
9620         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9621         nested type definitions for C++, too.
9622
9623 2018-03-23  Tom Tromey  <tom@tromey.com>
9624
9625         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9626         a typedef.
9627         (macho_register_oso): Remove.
9628         (macho_symtab_read): Take a std::vector.
9629         (oso_el_compare_name): Now a std::sort comparator.
9630         (macho_symfile_read_all_oso): Take a std::vector.
9631         (macho_symfile_read): Use std::vector.  Remove cleanups.
9632
9633 2018-03-22  Tom Tromey  <tom@tromey.com>
9634
9635         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9636         (record_full_goto_bookmark): Use std::string.
9637
9638 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9639
9640         PR tdep/18295
9641         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9642         a single mask.
9643
9644 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9645
9646         * rs6000-tdep.c (store_insn_p): New function.
9647         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9648         and cr_reg to their unshifted values. Use store_insn_p to
9649         match LR saves using either R1 or fdata->alloca_reg. Use
9650         store_insn_p to match CR saves. Set alloca_reg_offset
9651         when alloca_reg and framep are set. Remove lr_reg shift
9652         when assigning to fdata->lr_register.
9653
9654 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9655
9656         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9657         command line args instead of emitting a warning.
9658
9659 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9660
9661         * tracepoint.h (struct static_tracepoint_marker): Initialize
9662         fields, define default constructor, move constructor and move
9663         assignment, disable the rest.
9664         <str_id, extra>: Make std::string.
9665         (release_static_tracepoint_marker): Remove.
9666         (free_current_marker): Remove.
9667         * tracepoint.c (free_current_marker): Remove.
9668         (parse_static_tracepoint_marker_definition): Adjust to
9669         std::string, use new hex2str overload.
9670         (release_static_tracepoint_marker): Remove.
9671         (print_one_static_tracepoint_marker): Get marker by reference
9672         and adjust to std::string.
9673         (info_static_tracepoint_markers_command): Adjust to std::vector
9674         changes
9675         * target.h (static_tracepoint_marker_p): Remove typedef.
9676         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9677         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9678         bool.
9679         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9680         * target-debug.h
9681         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9682         (target_debug_print_std_vector_static_tracepoint_marker): New.
9683         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9684         to...
9685         (target_debug_print_static_tracepoint_marker_p): ... this.
9686         * target-delegates.c: Re-generate.
9687         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9688         Make std::string.
9689         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9690         (decode_static_tracepoint_spec): Adjust to std::vector.
9691         (tracepoint_print_one_detail): Adjust to std::string.
9692         (strace_marker_decode_location): Adjust to std::string.
9693         (update_static_tracepoint): Adjust to std::string, remove call
9694         to release_static_tracepoint_marker.
9695         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9696         Adjust to std::vector.
9697         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9698         (remote_static_tracepoint_markers_by_strid): Adjust to
9699         std::vector.
9700         * common/rsp-low.h (hex2str): New overload with explicit count
9701         of bytes.
9702         * common/rsp-low.c (hex2str): New overload with explicit count
9703         of bytes.
9704         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9705         (_initialize_rsp_low_selftests): Add test_hex2str test.
9706         * unittests/tracepoint-selftests.c
9707         (test_parse_static_tracepoint_marker_definition): Adjust to
9708         std::string.
9709
9710 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9711
9712         * tracepoint.c (parse_static_tracepoint_marker_definition):
9713         Consider case where the definition is followed by more
9714         definitions.
9715         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9716         tracepoint-selftests.c.
9717         * unittests/tracepoint-selftests.c: New.
9718
9719 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9720
9721         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9722         Carvalho.
9723
9724 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9725
9726         * symtab.c (find_pc_sect_line): fixed indentation.
9727
9728 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9729
9730         * symtab.c (find_pc_sect_line): now uses binary search.
9731
9732 2018-03-19  Tom Tromey  <tom@tromey.com>
9733
9734         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9735         "IDENT" production.
9736
9737 2018-03-19  Pedro Alves  <palves@redhat.com>
9738             Tom Tromey  <tom@tromey.com>
9739
9740         * unittests/observable-selftests.c: New file.
9741         * common/observable.h: New file.
9742         * observable.h: New file.
9743         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9744         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9745         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9746         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9747         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9748         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9749         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9750         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9751         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9752         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9753         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9754         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9755         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9756         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9757         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9758         tui/tui-interp.c, valops.c: Update all users.
9759         * tui/tui-hooks.c (tui_bp_created_observer)
9760         (tui_bp_deleted_observer, tui_bp_modified_observer)
9761         (tui_inferior_exit_observer, tui_before_prompt_observer)
9762         (tui_normal_stop_observer, tui_register_changed_observer):
9763         Remove.
9764         (tui_observers_token): New global.
9765         (attach_or_detach, tui_attach_detach_observers): New functions.
9766         (tui_install_hooks, tui_remove_hooks): Use
9767         tui_attach_detach_observers.
9768         * record-btrace.c (record_btrace_thread_observer): Remove.
9769         (record_btrace_thread_observer_token): New global.
9770         * observer.sh: Remove.
9771         * observer.c: Rename to observable.c.
9772         * observable.c (namespace gdb_observers): Define new objects.
9773         (observer_debug): Move into gdb_observers namespace.
9774         (struct observer, struct observer_list, xalloc_observer_list_node)
9775         (xfree_observer_list_node, generic_observer_attach)
9776         (generic_observer_detach, generic_observer_notify): Remove.
9777         (_initialize_observer): Update.
9778         Don't include observer.inc.
9779         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9780         (clean mostlyclean): Likewise.
9781         (observer.h, observer.inc): Remove targets.
9782         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9783         (COMMON_SFILES): Use observable.c, not observer.c.
9784         * .gitignore: Remove observer.h.
9785
9786 2018-03-18  Tom Tromey  <tom@tromey.com>
9787
9788         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9789         gdb::def_vector.
9790         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9791
9792 2018-03-17  Tom Tromey  <tom@tromey.com>
9793
9794         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9795
9796 2018-03-17  Tom Tromey  <tom@tromey.com>
9797
9798         * target.c (class scoped_target_fd): New.
9799         (target_fileio_close_cleanup): Remove.
9800         (target_fileio_read_alloc_1): Use scoped_target_fd.
9801
9802 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9803
9804         * silent-rules.mk: New.
9805         * Makefile.in: Include silent-rules.mk
9806         (srcdir, VPATH, top_srcdir): Move up.
9807         (COMPILE): Add ECHO_CXX.
9808         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9809         (init.c): Add ECHO_INIT_C.
9810         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9811         (version.c): Add ECHO_GEN.
9812         (printcmd.o): Add ECHO_CXX.
9813         (target-float.o): Add ECHO_CXX.
9814         (ada-exp.o): Add ECHO_CXX.
9815         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9816         (insight$(EXEEXT)): Add ECHO_CXXLD.
9817         * gnulib/configure.ac: Add AM_SILENT_RULES.
9818         * gnulib/aclocal.m4: Re-generate.
9819         * gnulib/configure: Re-generate.
9820         * gnulib/import/Makefile.in: Re-generate.
9821
9822 2018-03-16  Tom Tromey  <tom@tromey.com>
9823
9824         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9825         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9826         * utils.c (do_free_section_addr_info)
9827         (make_cleanup_free_section_addr_info): Remove.
9828         * symfile.h (struct other_sections): Add constructor.
9829         (struct section_addr_info): Remove.
9830         (section_addr_info): New typedef.
9831         (struct sym_fns) <sym_offsets>: Change type of parameter.
9832         (build_section_addr_info_from_objfile)
9833         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9834         (default_symfile_offsets, symbol_file_add)
9835         (symbol_file_add_from_bfd)
9836         (build_section_addr_info_from_section_table): Update.
9837         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9838         * symfile.c (alloc_section_addr_info): Remove.
9839         (build_section_addr_info_from_section_table): Change return type.
9840         Update.
9841         (build_section_addr_info_from_bfd)
9842         (build_section_addr_info_from_objfile): Likewise.
9843         (free_section_addr_info): Remove.
9844         (relative_addr_info_to_section_offsets): Change type of "addrs".
9845         (addrs_section_compar): Now a std::sort comparator.
9846         (addrs_section_sort): Change return type.
9847         (addr_info_make_relative): Change type of "addrs".  Update.
9848         (default_symfile_offsets, syms_from_objfile_1)
9849         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9850         (symbol_file_add_separate): Update.
9851         (symbol_file_add): Change type of "addrs".  Update.
9852         (add_symbol_file_command): Update.  Remove cleanups.
9853         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9854         cleanups.
9855         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9856         * solib.c (solib_read_symbols): Update.
9857         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9858         * machoread.c (macho_symfile_offsets): Update.
9859         * jit.c (jit_bfd_try_read_symtab): Update.
9860
9861 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9862
9863         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9864         unittests/utils-selftests.c.
9865         * unittests/utils-selftests.c: New file.
9866
9867 2018-03-14  Tom Tromey  <tom@tromey.com>
9868
9869         PR cli/14977:
9870         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9871         for NULL.
9872
9873 2018-03-14  Tom Tromey  <tom@tromey.com>
9874
9875         PR cli/19918:
9876         * printcmd.c (printf_pointer): Allow "-" in format.
9877
9878 2018-03-14  Tom Tromey  <tom@tromey.com>
9879
9880         * printcmd.c (_initialize_printcmd): Add usage to printf.
9881
9882 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9883
9884         * MAINTAINERS: Update my email address.
9885
9886 2018-03-13  Tom Tromey  <tom@tromey.com>
9887
9888         * machoread.c (macho_check_dsym): Change filenamep to a
9889         std::string*.
9890         (macho_symfile_read): Update.
9891         * symfile.c (load_command): Use std::string.
9892
9893 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9894
9895         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9896         to error message string.
9897         (riscv_register_name): Use xsnprintf instead of sprintf.
9898         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9899         internal_error.
9900         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9901         error.
9902         (riscv_push_dummy_call): Likewise.
9903
9904 2018-03-12  Tom Tromey  <tom@tromey.com>
9905
9906         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9907         Use gdb::byte_vector.
9908         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9909
9910 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9911
9912         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9913         parameter type to readable_regcache.
9914         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9915         the declaration.
9916
9917 2018-03-11  Tom Tromey  <tom@tromey.com>
9918
9919         * dwarf2read.c (struct nextfield): Add initializers.
9920         (struct nextfnfield): Remove.
9921         (struct fnfieldlist): Add initializers.  Remove "length" and
9922         "head", use std::vector.
9923         (struct decl_field_list): Remove.
9924         (struct field_info): Add initializers.
9925         <fields, baseclasses>: Now std::vector.
9926         <nbaseclasses, nfnfields, typedef_field_list_count,
9927         nested_types_list_count>: Remove.
9928         (dwarf2_add_field, dwarf2_add_type_defn)
9929         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9930         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9931         (process_structure_scope): Update.
9932
9933 2018-03-11  Tom Tromey  <tom@tromey.com>
9934
9935         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9936         for use by std::sort.
9937         (build_type_psymtabs_1): Use std::vector.
9938
9939 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9940
9941         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9942         and LIBMPFR in the printed configuration.
9943
9944 2018-03-08  Tom Tromey  <tom@tromey.com>
9945
9946         * source.c (get_filename_and_charpos): Use scoped_fd.
9947         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9948         (procfs_pidlist): Likewise.
9949         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9950         (iterate_over_mappings): Likewise.
9951
9952 2018-03-08  Tom Tromey  <tom@tromey.com>
9953
9954         * infcall.c (struct call_return_meta_info)
9955         <stack_temporaries_enabled>: Remove.
9956         (get_call_return_value, call_function_by_hand_dummy): Update.
9957         * thread.c (disable_thread_stack_temporaries): Remove.
9958         (enable_thread_stack_temporaries): Remove.
9959         (thread_stack_temporaries_enabled_p): Return bool.
9960         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9961         (get_last_thread_stack_temporary): Update.
9962         * eval.c (evaluate_subexp): Update.
9963         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9964         class, not a function.
9965         (value_ptr, value_vec): Remove typedefs.
9966         (class thread_info) <stack_temporaries_enabled>: Now bool.
9967         <stack_temporaries>: Now a std::vector.
9968         (thread_stack_temporaries_enabled_p)
9969         (value_in_thread_stack_temporaries): Return bool.
9970
9971 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9972
9973         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9974         (getpkt_or_notif_sane_1): Likewise.
9975
9976 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9977
9978         * build-id.c (build_id_to_debug_bfd): Use std::string.
9979
9980 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9981
9982         * build-id.c (find_separate_debug_file_by_buildid): Return
9983         std::string.
9984         * build-id.h (find_separate_debug_file_by_buildid): Return
9985         std::string.
9986         * coffread.c (coff_symfile_read): Adjust to std::string.
9987         * elfread.c (elf_symfile_read): Adjust to std::string.
9988         * symfile.c (separate_debug_file_exists): Change parameter to
9989         std::string.
9990         (find_separate_debug_file): Return std::string.
9991         (find_separate_debug_file_by_debuglink): Return std::string.
9992         * symfile.h (find_separate_debug_file_by_debuglink): Return
9993         std::string.
9994
9995 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9996
9997         * common/xml-utils.c (xml_escape_text): Move code to...
9998         (xml_escape_text_append): ... this new function.
9999         * common/xml-utils.h (xml_escape_text_append): New declaration.
10000         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10001         New function.
10002         (_initialize_xml_utils): register test_xml_escape_text_append as
10003         a selftest.
10004
10005 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10006
10007         * defs.h: Remove MAX_REGISTER_SIZE.
10008         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10009         asserts.
10010         * python/py-unwind.c (pyuw_sniffer): Likewise.
10011
10012 2018-03-07  Tom Tromey  <tom@tromey.com>
10013
10014         * linux-tdep.c (linux_info_proc): Update.
10015         * target.h (struct target_ops) <to_fileio_readlink>: Return
10016         optional<string>.
10017         (target_fileio_readlink): Return optional<string>.
10018         * remote.c (remote_hostio_readlink): Return optional<string>.
10019         * inf-child.c (inf_child_fileio_readlink): Return
10020         optional<string>.
10021         * target.c (target_fileio_readlink): Return optional<string>.
10022
10023 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10024
10025         * regcache.c (cooked_read_test): Add riscv to the list of
10026         architectures that have a save_reggroup.
10027
10028 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10029
10030         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10031         value is not a dynamic class object.
10032
10033 2018-03-06  Tom Tromey  <tom@tromey.com>
10034
10035         * rust-exp.y: Formatting fixes.
10036
10037 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10038
10039         * riscv-tdep.c (riscv_register_name): Remove target description
10040         support.
10041         (riscv_gdbarch_init): Remove target description check.
10042
10043 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10044
10045         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10046         comment.
10047         * riscv-tdep.h: Likewise.
10048
10049 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10050
10051         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10052         (riscv_pseudo_register_write): Delete.
10053         (riscv_gdbarch_init): Remove all use of pseudo registers.
10054
10055 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10056
10057         * record-btrace.c (btrace_print_lines): Replace cleanup
10058         parameter with RAII equivalents.
10059         (btrace_insn_history): Replace cleanup with RAII equivalents.
10060         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10061         make_cleanup_ui_out_tuple_begin_end): Remove.
10062         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10063         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10064         make_cleanup_ui_out_list_begin_end): Remove.
10065
10066 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10067
10068         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10069         parameter types to std::vector.  Use bool.
10070         (record_btrace_wait): Replace VEC(tp_t) with
10071         std::vector<thread_info *>.
10072         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10073
10074 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10075
10076         * record-btrace.c (record_btrace_disable_callback): Remove.
10077         (struct scoped_btrace_disable): New.
10078         (record_btrace_open): Use scoped_btrace_disable.
10079
10080 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10081
10082         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10083         reading values from registers.
10084
10085 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10086
10087         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10088         where appropriate.
10089
10090 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10091
10092         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10093         change parameter type.  Use GDB's print functions, and use
10094         core_addr_to_string where appropriate.
10095         (riscv_push_dummy_call): Use core_addr_to_string where
10096         appropriate, update call to riscv_print_arg_location, and reindent
10097         a few lines.
10098         (riscv_return_value): Update call to riscv_print_arg_location.
10099
10100 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10101             Tim Newsome <tim@sifive.com>
10102             Albert Ou <a0u@eecs.berkeley.edu>
10103             Darius Rad <darius@bluespec.com>
10104
10105         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10106         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10107         (ALLDEPFILES): Add riscv-tdep.c
10108         * configure.tgt: Add riscv support.
10109         * riscv-tdep.c: New file.
10110         * riscv-tdep.h: New file.
10111         * NEWS: Mention new target.
10112         * MAINTAINERS: Add entry for riscv.
10113
10114 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10115
10116         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10117         fields within aggregates.
10118
10119 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10120
10121         * record-btrace.c (btrace_print_lines): Change type of flags to
10122         gdb_disassembly_flags.
10123
10124 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10125
10126         * fbsd-nat.c: Include "inf-ptrace.h".
10127         (USE_SIGTRAP_SIGINFO): Conditionally define.
10128         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10129         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10130         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10131         function.
10132         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10133         Likewise.
10134         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10135         Likewise.
10136         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10137         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10138         "supports_stopped_by_hw_breakpoint" target methods.
10139
10140 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10141
10142         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10143         * fbsd-nat.c (debug_fbsd_nat): New variable.
10144         (show_fbsd_nat_debug): New function.
10145         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10146         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10147
10148 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10149
10150         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10151         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10152         prototype.
10153         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10154         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10155         method.
10156
10157 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10158
10159         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10160         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10161
10162 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10163
10164         * charset.c (struct charset_vector): New.
10165         (charsets): Change type to charset_vector.
10166         (find_charset_names): Adjust.
10167         (add_one): Adjust.
10168         (_initialize_charset): Adjust.
10169
10170 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10171
10172         * progspace.h (struct program_space) <deleted_solibs>: Change
10173         type to std::vector<std::string>.
10174         * progspace.c (clear_program_space_solib_cache): Adjust.
10175         * breakpoint.c (print_solib_event): Adjust.
10176         (check_status_catch_solib): Adjust.
10177         * solib.c (update_solib_list): Adjust.
10178         * ui-out.h (class ui_out) <field_string>: New overload.
10179         * ui-out.c (ui_out::field_string): New overload.
10180
10181 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10182
10183         * progspace.h (struct program_space): Add constructor and
10184         destructor, initialize fields.
10185         (add_program_space): Remove.
10186         * progspace.c (add_program_space): Rename to...
10187         (program_space::program_space): ... this.
10188         (release_program_space): Rename to...
10189         (program_space::~program_space): ... this.
10190         (delete_program_space): Use delete to delete program_space.
10191         (initialize_progspace): Use new to allocate program_space.
10192         * inferior.c (add_inferior_with_spaces): Likewise.
10193         (clone_inferior_command): Likewise.
10194         * infrun.c (follow_fork_inferior): Likewise.
10195         (handle_vfork_child_exec_or_exit): Likewise.
10196
10197 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10198
10199         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10200         (delim_string_to_char_ptr_vec): Return std::vector of
10201         gdb::unique_xmalloc_ptr.
10202         (dirnames_to_char_ptr_vec_append): Take std::vector of
10203         gdb::unique_xmalloc_ptr.
10204         (dirnames_to_char_ptr_vec): Return std::vector of
10205         gdb::unique_xmalloc_ptr.
10206         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10207         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10208         (delim_string_to_char_ptr_vec): Return an std::vector of
10209         gdb::unique_xmalloc_ptr, adjust the code.
10210         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10211         gdb::unique_xmalloc_ptr, adjust the code.
10212         (dirnames_to_char_ptr_vec): Return an std::vector of
10213         gdb::unique_xmalloc_ptr, adjust the code.
10214         * auto-load.c (auto_load_safe_path_vec): Change type to
10215         std::vector of gdb::unique_xmalloc_ptr.
10216         (auto_load_expand_dir_vars): Return an std::vector of
10217         gdb::unique_xmalloc_ptr, adjust the code.
10218         (auto_load_safe_path_vec_update): Adjust.
10219         (filename_is_in_auto_load_safe_path_vec): Adjust.
10220         (auto_load_objfile_script_1): Adjust.
10221         * build-id.c (build_id_to_debug_bfd): Adjust.
10222         * linux-thread-db.c (thread_db_load_search): Adjust.
10223         * source.c (add_path): Adjust.
10224         (openp): Adjust.
10225         * symfile.c (find_separate_debug_file): Adjust.
10226         * utils.c (do_free_char_ptr_vec): Remove.
10227         (make_cleanup_free_char_ptr_vec): Remove.
10228
10229 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10230
10231         PR gdb/22907
10232         * common/pathstuff.c: Conditionally include "<windows.h>".
10233
10234 2018-03-01  Georg Sauthoff  <mail@georg.so>
10235
10236         PR gdb/22888
10237         * gcore.in: Quote variables and switch interpreter to bash.
10238
10239 2018-03-01  Tom Tromey  <tom@tromey.com>
10240
10241         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10242         assertion.  Add assertion for discriminant_index.
10243         (quirk_rust_enum): Use correct base type name in univariant case.
10244
10245 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10246
10247         * record.c (get_call_history_modifiers): Return a
10248         record_print_flags.
10249         (cmd_record_call_history): Adjust.
10250         * record-btrace.c (record_btrace_call_history): Adjust.
10251         (record_btrace_call_history_range): Adjust.
10252         (record_btrace_call_history_from): Adjust.
10253         * target-debug.h (target_debug_print_record_print_flags): New.
10254         * target-delegates.c: Re-generate.
10255         * target.c (target_call_history): Change flags type.
10256         (target_call_history_from): Likewise.
10257         (target_call_history_range): Likewise.
10258         * target.h (struct target_ops) <target_call_history>: Likewise.
10259         (target_call_history_from): Likewise.
10260         (target_call_history_range): Likewise.
10261
10262 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10263             Simon Marchi  <simon.marchi@polymtl.ca>
10264
10265         * common/common-utils.c: Include "sys/stat.h".
10266         (is_regular_file): Move here from "source.c"; change return
10267         type to "bool".
10268         * common/common-utils.h (is_regular_file): New prototype.
10269         * common/pathstuff.c (contains_dir_separator): New function.
10270         * common/pathstuff.h (contains_dir_separator): New prototype.
10271         * source.c: Don't include "sys/stat.h".
10272         (is_regular_file): Move to "common/common-utils.c".
10273
10274 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10275
10276         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10277         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10278         * auto-load.c: Include "common/pathstuff.h".
10279         * common/common-def.h (current_directory): Move here.
10280         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10281         function.
10282         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10283         prototype.
10284         * common/pathstuff.c: New file.
10285         * common/pathstuff.h: New file.
10286         * compile/compile.c: Include "common/pathstuff.h".
10287         * defs.h (current_directory): Move to "common/common-defs.h".
10288         * dwarf2read.c: Include "common/pathstuff.h".
10289         * exec.c: Likewise.
10290         * guile/scm-safe-call.c: Likewise.
10291         * linux-thread-db.c: Likewise.
10292         * main.c: Likewise.
10293         * nto-tdep.c: Likewise.
10294         * objfiles.c: Likewise.
10295         * source.c: Likewise.
10296         * symtab.c: Likewise.
10297         * utils.c: Include "common/pathstuff.h".
10298         (gdb_realpath): Move to "common/pathstuff.c".
10299         (gdb_realpath_keepfile): Likewise.
10300         (gdb_abspath): Likewise.
10301         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10302         (gdb_realpath_keepfile): Likewise.
10303         (gdb_abspath): Likewise.
10304
10305 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10306
10307         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10308         wildcard process pid for super_resume for kernels with a
10309         specific bug.
10310
10311 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10312
10313         * compile/compile.c (get_args): Add additional comments
10314         explaining function.
10315
10316 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10317             Tom Tromey  <tom@tromey.com>
10318
10319         * target.h (memory_write_request_s): Remove typedef.  Don't define
10320         VEC.
10321         (target_write_memory_blocks): Change argument to std::vector.
10322         (struct memory_write_request): Add constructor.
10323         * target-memory.c (compare_block_starting_address): Return bool.
10324         Change argument types.
10325         (claim_memory): Change arguments to use std::vector.
10326         (split_regular_and_flash_blocks, blocks_to_erase)
10327         (compute_garbled_blocks): Likewise.
10328         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10329         (target_write_memory_blocks): Change argument to std::vector.
10330         * symfile.c (struct load_section_data): Add constructor and
10331         destructor.  Use std::vector for "requests".
10332         (struct load_progress_data): Add initializers.
10333         (load_section_callback): Update.  Use "new".
10334         (clear_memory_write_data): Remove.
10335         (generic_load): Update.
10336
10337 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10338
10339         * arch/aarch64.h: Use common/tdesc.h.
10340
10341 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10342
10343         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10344         architecture with a 64-bit ABI.
10345
10346 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10347
10348         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10349         ahead of target description loading.
10350
10351 2018-02-26  Tom Tromey  <tom@tromey.com>
10352
10353         * stack.c (backtrace_command_1): Update.
10354         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10355         of "flags".
10356         * python/py-framefilter.c (py_print_frame)
10357         (gdbpy_apply_frame_filter): Change type of "flags".
10358         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10359         of "flags".
10360         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10361         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10362         * extension.h (enum frame_filter_flag): Rename from
10363         frame_filter_flags.
10364         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10365         (apply_ext_lang_frame_filter): Change type of "flags".
10366         * extension.c (apply_ext_lang_frame_filter): Change type of
10367         "flags".
10368         * extension-priv.h (struct extension_language_ops)
10369         <apply_frame_filter>: Change type of "flags".
10370
10371 2018-02-26  Tom Tromey  <tom@tromey.com>
10372
10373         PR python/16497:
10374         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10375         off-by-one in py_end computation.
10376         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10377         PRINT_MORE_FRAMES.
10378         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10379         constant.
10380
10381 2018-02-26  Tom Tromey  <tom@tromey.com>
10382
10383         * dwarf2read.c (struct variant_field): New.
10384         (struct nextfield) <variant>: New field.
10385         (dwarf2_add_field): Handle DW_TAG_variant_part.
10386         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10387         discriminated union.
10388         (read_structure_type): Handle DW_TAG_variant_part.
10389         (handle_struct_member_die): New function, extracted from
10390         process_structure_scope.  Handle DW_TAG_variant.
10391         (process_structure_scope): Handle discriminated unions.  Call
10392         handle_struct_member_die.
10393
10394 2018-02-26  Tom Tromey  <tom@tromey.com>
10395
10396         * rust-lang.h (rust_last_path_segment): Declare.
10397         * rust-lang.c (rust_last_path_segment): Now public.  Change
10398         contract.
10399         (struct disr_info): Remove.
10400         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10401         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10402         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10403         (rust_enum_p, rust_enum_variant): New function.
10404         (rust_underscore_fields): Remove "offset" parameter.
10405         (rust_print_enum): New function.
10406         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10407         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10408         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10409         enums.
10410         (rust_internal_print_type): New function, from rust_print_type.
10411         Remove enum code.
10412         (rust_print_type): Call rust_internal_print_type.
10413         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10414         Update enum handling.
10415         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10416         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10417         (rust_union_quirks): New functions.
10418         (process_full_comp_unit, process_full_type_unit): Call
10419         rust_union_quirks.
10420         (process_structure_scope): Update rust_unions if necessary.
10421
10422 2018-02-26  Tom Tromey  <tom@tromey.com>
10423
10424         * value.h (value_union_variant): Declare.
10425         * valops.c (value_union_variant): New function.
10426         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10427         (struct discriminant_info): New.
10428         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10429         enumerator.
10430         (struct main_type) <flag_discriminated_union>: New field.
10431
10432 2018-02-26  Tom Tromey  <tom@tromey.com>
10433
10434         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10435         unittests/unpack-selftests.c.
10436         * unittests/unpack-selftests.c: New file.
10437         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10438
10439 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10440
10441         * dwarf2read.c (struct partial_die_info) <read>: New method.
10442         (read_partial_die): Remove the declaration.
10443         (load_partial_dies): Update.
10444         (partial_die_info::partial_die_info):
10445         (read_partial_die): Change it to partial_die_info::read.
10446
10447 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10448
10449         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10450         (fixup_partial_die): Remove declaration.
10451         (scan_partial_symbols): Update.
10452         (partial_die_parent_scope): Likewise.
10453         (partial_die_full_name): Likewise.
10454         (fixup_partial_die): Change it to partial_die_info::fixup.
10455
10456 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10457
10458         * dwarf2read.c (read_partial_die): Update the declaration.
10459         (load_partial_dies): Caller update.
10460         (read_partial_die): Remove one argument abbrev_len.
10461
10462 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10463
10464         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10465         assignment operator.
10466         (load_partial_dies): Use ctor and copy ctor.
10467         (read_partial_die): Update.
10468         (dwarf2_cu::find_partial_die): Use ctor.
10469
10470 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10471
10472         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10473         (find_partial_die_in_comp_unit): Change it to
10474         dwarf2_cu::find_partial_die.
10475         (find_partial_die): Update.
10476
10477 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10478
10479         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10480         is NULL.
10481
10482 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10483
10484         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10485
10486 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10487
10488         * arch/amd64.h: Use common/tdesc.h.
10489         * arch/i386.c: Likewise.
10490         * arch/i386.h: Likewise.
10491         * arch/tic6x.c: Likewise.
10492         * arch/tdesc.h: Move file from here...
10493         * common/tdesc.h: ...to here.
10494         * features/aarch64-core.c: Regenerate.
10495         * features/aarch64-fpu.c: Regenerate.
10496         * features/i386/32bit-avx.c: Regenerate.
10497         * features/i386/32bit-avx512.c: Regenerate.
10498         * features/i386/32bit-core.c: Regenerate.
10499         * features/i386/32bit-linux.c: Regenerate.
10500         * features/i386/32bit-mpx.c: Regenerate.
10501         * features/i386/32bit-pkeys.c: Regenerate.
10502         * features/i386/32bit-sse.c: Regenerate.
10503         * features/i386/64bit-avx.c: Regenerate.
10504         * features/i386/64bit-avx512.c: Regenerate.
10505         * features/i386/64bit-core.c: Regenerate.
10506         * features/i386/64bit-linux.c: Regenerate.
10507         * features/i386/64bit-mpx.c: Regenerate.
10508         * features/i386/64bit-pkeys.c: Regenerate.
10509         * features/i386/64bit-segments.c: Regenerate.
10510         * features/i386/64bit-sse.c: Regenerate.
10511         * features/i386/x32-core.c: Regenerate.
10512         * features/tic6x-c6xp.c: Regenerate.
10513         * features/tic6x-core.c: Regenerate.
10514         * features/tic6x-gp.c: Regenerate.
10515         * target-descriptions.c: Use common/tdesc.h.
10516         * target-descriptions.h: Likewise.
10517
10518 2018-02-24  Tom Tromey  <tom@tromey.com>
10519
10520         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10521         (try_thread_db_load_from_dir, thread_db_load_search): Use
10522         std::string.
10523         (info_auto_load_libthread_db_compare): Return bool.  Change
10524         argument types.
10525         (info_auto_load_libthread_db): Use std::vector, std::string.
10526         Remove cleanups.
10527
10528 2018-02-24  Tom Tromey  <tom@tromey.com>
10529
10530         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10531         std::string.
10532         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10533         std::string*.
10534         * gdbarch.c: Rebuild.
10535         * gdbarch.h: Rebuild.
10536         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10537         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10538         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10539         std::string*.
10540
10541 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10542
10543         * gdbtypes.h (sect_offset): Change type to uint64_t.
10544         (sect_offset_str): New function.
10545         * dwarf2read.c (create_addrmap_from_aranges): Use
10546         sect_offset_str.
10547         (error_check_comp_unit_head): Likewise.
10548         (create_debug_type_hash_table): Likewise.
10549         (read_cutu_die_from_dwo): Likewise.
10550         (init_cutu_and_read_dies): Likewise.
10551         (init_cutu_and_read_dies_no_follow): Likewise.
10552         (process_psymtab_comp_unit_reader): Likewise.
10553         (partial_die_parent_scope): Likewise.
10554         (peek_die_abbrev): Likewise.
10555         (process_queue): Likewise.
10556         (dwarf2_physname): Likewise.
10557         (read_namespace_alias): Likewise.
10558         (read_import_statement): Likewise.
10559         (create_dwo_cu_reader): Likewise.
10560         (create_cus_hash_table): Likewise.
10561         (lookup_dwo_cutu): Likewise.
10562         (inherit_abstract_dies): Likewise.
10563         (read_func_scope): Likewise.
10564         (read_call_site_scope): Likewise.
10565         (dwarf2_add_member_fn): Likewise.
10566         (read_common_block): Likewise.
10567         (read_module_type): Likewise.
10568         (read_typedef): Likewise.
10569         (read_subrange_type): Likewise.
10570         (load_partial_dies): Likewise.
10571         (read_partial_die): Likewise.
10572         (find_partial_die): Likewise.
10573         (read_str_index): Likewise.
10574         (dwarf2_string_attr): Likewise.
10575         (build_error_marker_type): Likewise.
10576         (lookup_die_type): Likewise.
10577         (dump_die_shallow): Likewise.
10578         (follow_die_ref): Likewise.
10579         (dwarf2_fetch_die_loc_sect_off): Likewise.
10580         (dwarf2_fetch_constant_bytes): Likewise.
10581         (follow_die_sig): Likewise.
10582         (get_signatured_type): Likewise.
10583         (get_DW_AT_signature_type): Likewise.
10584         (dwarf2_find_containing_comp_unit): Likewise.
10585         (set_die_type): Likewise.
10586
10587 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10588
10589         * arch/aarch64.c: Include "common-defs.h".
10590         * arch/amd64.c: Likewise.
10591         * arch/i386.c: Likewise.
10592
10593 2018-02-21  Tom Tromey  <tom@tromey.com>
10594
10595         * value.h: (extract_field_op): Update.
10596         * eval.c (extract_field_op): Return a const char *.
10597         * expression.h (parse_expression_for_completion): Update.
10598         * completer.c (complete_expression): Update.
10599         (add_struct_fields): Make fieldname const.
10600         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10601         (mark_completion_tag, parse_exp_in_context_1): Update.
10602         (parse_expression_for_completion): Change "name" to
10603         unique_xmalloc_ptr*.
10604
10605 2018-02-21  Tom Tromey  <tom@tromey.com>
10606
10607         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10608
10609 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10610
10611         * avr-tdep.c (avr_read_pc): Change parameter type to
10612         readable_regcache.
10613         * gdbarch.sh (read_pc): Likewise.
10614         * gdbarch.c: Re-generated.
10615         * gdbarch.h: Re-generated.
10616         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10617         readable_regcache.
10618         * ia64-tdep.c (ia64_read_pc): Likewise.
10619         * mips-tdep.c (mips_read_pc): Likewise.
10620         * spu-tdep.c (spu_read_pc): Likewise.
10621
10622 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10623
10624         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10625         * regcache-dump.c: New file.
10626         * regcache.c: Move register_dump to regcache-dump.c.
10627         (maintenance_print_registers): Likewise.
10628         (maintenance_print_raw_registers): Likewise.
10629         (maintenance_print_cooked_registers): Likewise.
10630         (maintenance_print_register_groups): Likewise.
10631         (maintenance_print_remote_registers): Likewise.
10632         (_initialize_regcache): Likewise.
10633         * regcache.h (register_dump): Moved from regcache.c.
10634
10635 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10636
10637         * regcache.c (regcache::regcache): Update.
10638         (regcache::invalidate): Move it to detached_regcache::invalidate.
10639         (get_thread_arch_aspace_regcache): Update.
10640         (regcache::raw_update): Update.
10641         (regcache::cooked_read): Remove some code.
10642         (regcache::cooked_read_value): Likewise.
10643         (regcache::raw_write): Remove assert on m_readonly_p.
10644         (regcache::raw_supply_integer): Move it to
10645         detached_regcache::raw_supply_integer.
10646         (regcache::raw_supply_zeroed): Likewise.
10647         * regcache.h (detached_regcache) <raw_supply_integer>: New
10648         declaration.
10649         <raw_supply_zeroed, invalidate>: Likewise.
10650         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10651         <invalidate>: Likewise.
10652         <m_readonly_p>: Removed.
10653
10654 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10655
10656         * infcmd.c (get_return_value): Let stop_regs point to
10657         get_current_regcache.
10658         * regcache.c (regcache::regcache): Remove.
10659         (register_dump_reg_buffer): New class.
10660         (regcache_print): Adjust.
10661         * regcache.h (regcache): Remove constructors.
10662
10663 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10664
10665         * regcache.c (class register_dump): New class.
10666         (register_dump_regcache, register_dump_none): New class.
10667         (register_dump_remote, register_dump_groups): New class.
10668         (regcache_print): Update.
10669         * regcache.h (regcache_dump_what): Move it to regcache.c.
10670         (regcache) <dump>: Remove.
10671
10672 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10673
10674         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10675          reg_buffer_rw *.
10676         (jit_unwind_reg_set_impl): Call raw_supply.
10677         (jit_frame_sniffer): Use reg_buffer_rw.
10678         * record-full.c (record_full_core_regbuf): Change its type.
10679         (record_full_core_open_1): Use reg_buffer_rw.
10680         (record_full_close): Likewise.
10681         (record_full_core_fetch_registers): Use regcache->raw_supply.
10682         (record_full_core_store_registers): Likewise.
10683         * regcache.c (regcache::get_register_status): Move it to
10684         reg_buffer.
10685         (regcache_raw_set_cached_value): Remove.
10686         (regcache::raw_set_cached_value): Remove.
10687         (regcache::raw_write): Call raw_supply.
10688         (regcache::raw_supply): Move it to reg_buffer_rw.
10689         * regcache.h (regcache_raw_set_cached_value): Remove.
10690         (reg_buffer_rw): New class.
10691
10692 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10693
10694         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10695         readonly_detached_regcache.
10696         (dummy_frame_prev_register): Use regcache->cooked_read.
10697         * frame.c (frame_save_as_regcache): Change return type.
10698         (frame_pop): Update.
10699         * frame.h (frame_save_as_regcache): Update declaration.
10700         * inferior.h (get_infcall_suspend_state_regcache): Update
10701         declaration.
10702         * infrun.c (infcall_suspend_state) <registers>: use
10703         readonly_detached_regcache.
10704         (save_infcall_suspend_state): Don't use regcache_dup.
10705         (get_infcall_suspend_state_regcache): Change return type.
10706         * linux-fork.c (struct fork_info) <savedregs>: Change to
10707         readonly_detached_regcache.
10708         <pc>: New field.
10709         (fork_save_infrun_state): Don't use regcache_dup.
10710         (info_checkpoints_command): Adjust.
10711         * mi/mi-main.c (register_changed_p): Update declaration.
10712         (mi_cmd_data_list_changed_registers): Use
10713         readonly_detached_regcache.
10714         (register_changed_p): Change parameter type to
10715         readonly_detached_regcache.
10716         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10717         readonly_detached_regcache.
10718         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10719         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10720         New.
10721         (regcache::save): Move it to reg_buffer.
10722         (regcache::restore): Change parameter type.
10723         (regcache_dup): Remove.
10724         * regcache.h (reg_buffer) <save>: New method.
10725         (readonly_detached_regcache): New class.
10726         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10727         readonly_detached_regcache.
10728         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10729
10730 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10731
10732         * frame.c (frame_save_as_regcache): Use regcache method save.
10733         (frame_pop): Use regcache method restore.
10734         * infrun.c (restore_infcall_suspend_state): Likewise.
10735         * linux-fork.c (fork_load_infrun_state): Likewise.
10736         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10737         save.
10738         * regcache.c (regcache_save): Remove.
10739         (regcache::restore): More asserts.
10740         (regcache_cpy): Remove.
10741         * regcache.h (regcache_save): Remove the declaration.
10742         (regcache::restore): Move from private to public.
10743         Remove the friend declaration of regcache_cpy.
10744         (regcache_cpy): Remove declaration.
10745
10746 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10747
10748         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10749         parameter type to 'readable_regcache *'.
10750         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10751         * arm-tdep.c (arm_neon_quad_read): Likewise.
10752         (arm_pseudo_read): Likewise.
10753         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10754         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10755         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10756         * gdbarch.c: Re-generated.
10757         * gdbarch.h: Re-generated.
10758         * gdbarch.sh (pseudo_register_read): Change parameter type to
10759         'readable_regcache *'.
10760         (pseudo_register_read_value): Likewise.
10761         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10762         (h8300_pseudo_register_read): Likewise.
10763         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10764         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10765         (i386_pseudo_register_read_into_value): Likewise.
10766         (i386_pseudo_register_read_value): Likewise.
10767         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10768         declaration.
10769         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10770         * m32c-tdep.c (m32c_raw_read): Likewise.
10771         (m32c_read_flg): Likewise.
10772         (m32c_banked_register): Likewise.
10773         (m32c_banked_read): Likewise.
10774         (m32c_sb_read): Likewise.
10775         (m32c_part_read): Likewise.
10776         (m32c_cat_read): Likewise.
10777         (m32c_r3r2r1r0_read): Likewise.
10778         (m32c_pseudo_register_read): Likewise.
10779         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10780         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10781         (mep_pseudo_cr64_read): Likewise.
10782         (mep_pseudo_register_read): Likewise.
10783         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10784         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10785         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10786         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10787         (regcache::cooked_read): Likewise.
10788         (regcache::cooked_read_value): Likewise.
10789         (regcache_cooked_read_signed):
10790         (regcache::cooked_read): Likewise.
10791         * regcache.h (readable_regcache): New class.
10792         (regcache): Inherit readable_regcache.  Move some methods to
10793         readable_regcache.
10794         * rl78-tdep.c (rl78_pseudo_register_read): Change
10795         parameter type to 'readable_regcache *'.
10796         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10797         (e500_pseudo_register_read): Change parameter type to
10798         'readable_regcache *'.
10799         (dfp_pseudo_register_read): Likewise.
10800         (vsx_pseudo_register_read): Likewise.
10801         (efpr_pseudo_register_read): Likewise.
10802         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10803         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10804         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10805         (sh64_pseudo_register_read): Likewise.
10806         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10807         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10808         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10809         (spu_pseudo_register_read): Likewise.
10810         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10811         (xtensa_pseudo_register_read): Likewise.
10812
10813 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10814
10815         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10816         (regcache::arch): Move it to reg_buffer::arch.
10817         (regcache::register_buffer): Likewise.
10818         (regcache::assert_regnum): Likewise.
10819         (regcache::num_raw_registers): Likewise.
10820         * regcache.h (reg_buffer): New class.
10821         (regcache): Inherit reg_buffer.
10822
10823 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10824
10825         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10826         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10827
10828 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10829
10830         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10831
10832 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10833
10834         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10835         (SFILES): Remove common/*.c files.
10836         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10837         * common/common.host: Add common reference.
10838         * configure.ac: Likewise.
10839         * configure: Regenerate.
10840
10841 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10842
10843         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10844         (block_initialize_namespace): Use new.
10845         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10846         (dwarf2_free_objfile): Use delete.
10847         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10848         (copy_type_recursive): Use new.
10849         * gdb_obstack.h (allocate_on_obstack): New.
10850
10851 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10852
10853         PR gdb/22849
10854         * inferior.c (exit_inferior_1): Reset inf->control.
10855
10856 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10857
10858         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10859         declaration.
10860
10861 2018-02-14  Pedro Alves  <palves@redhat.com>
10862
10863         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10864         frame_cleanup_after_sniffer on exception.
10865
10866 2018-02-14  Tom Tromey  <tom@tromey.com>
10867
10868         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10869         const.
10870         (solib_bfd_open): Make pathname const.
10871         * solib.c (solib_bfd_open): Make pathname const.
10872         * solib-spu.c (spu_bfd_fopen): Make name const.
10873         (spu_bfd_open): Make pathname const.
10874         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10875         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10876
10877 2018-02-14  Tom Tromey  <tom@tromey.com>
10878
10879         * symfile.c (symfile_bfd_open): Update.
10880         * source.h (openp, source_full_path_of, find_and_open_source):
10881         Change argument type to unique_xmalloc_ptr.
10882         * source.c (openp): Take a unique_xmalloc_ptr.
10883         (source_full_path_of, find_and_open_source): Likewise.
10884         (open_source_file, symtab_to_fullname): Update.
10885         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10886         unique_xmalloc_ptr.
10887         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10888         (exec_file_find): Update.
10889         * psymtab.c (psymtab_to_fullname): Update.
10890         * nto-tdep.h (nto_find_and_open_solib): Update.
10891         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10892         unique_xmalloc_ptr.
10893         * exec.c (exec_file_attach): Update.
10894         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10895         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10896
10897 2018-02-14  Tom Tromey  <tom@tromey.com>
10898
10899         * solib.c: Include source.h.
10900         * nto-tdep.c: Include source.h.
10901         * mi/mi-cmd-env.c: Include source.h.
10902         * infcmd.c: Include source.h.
10903         * exec.c: Include source.h.
10904         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10905         (add_path, directory_switch, source_path, init_source_path): Move
10906         declarations...
10907         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10908         (add_path, directory_switch, source_path, init_source_path):
10909         ...here.
10910
10911 2018-02-14  Tom Tromey  <tom@tromey.com>
10912
10913         * solist.h (exec_file_find, solib_find): Return
10914         unique_xmalloc_ptr.
10915         (solib_bfd_fopen): Take a const char *.
10916         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10917         (exec_file_find, solib_find): Likewise.
10918         (solib_bfd_fopen): Do not take ownership of "pathname".
10919         (solib_bfd_open): Use unique_xmalloc_ptr.
10920         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10921         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10922         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10923         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10924
10925 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10926
10927         * ada-lang.c (name_match_type_from_name): Remove reference to
10928         ada_name_for_lookup in function's documentation.
10929         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10930
10931 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10932
10933         * defs.h (enum openp_flags): New enum.
10934         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10935         Move to enum openp_flags.
10936         (openp_flags): New enum flags.
10937         (openp): Change parameter type to openp_flags.
10938         * source.c (openp): Change parameter type to openp_flags.
10939         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10940         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10941
10942 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10943
10944         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10945         per-command.
10946
10947 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10948
10949         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10950         into...
10951         (class dwarf2_queue_guard): ...the destructor of this new class.
10952         (dw2_do_instantiate_symtab): Create instance of the new class
10953         dwarf2_queue_guard, remove cleanup.
10954
10955 2018-02-09  Tom Tromey  <tom@tromey.com>
10956
10957         * source.c (find_source_lines): Don't reference past the end of
10958         the vector.
10959
10960 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10961
10962         * remote.c (remote_btrace_maybe_reopen): Change error message.
10963         * btrace.c (btrace_enable): Likewise.
10964         (parse_xml_btrace): Likewise.
10965         (parse_xml_btrace_conf): Likewise.
10966
10967 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10968
10969         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10970         (linux_enable_pt, linux_enable_bts): Call
10971         diagnose_perf_event_open_fail.
10972
10973 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10974
10975         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10976         Remove parameter and change return type.  Update callers.  Move it.
10977         (linux_enable_bts, linux_enable_pt): Improve error message.
10978         (linux_enable_pt): Remove zero buffer size check.
10979         (linux_enable_btrace): Improve error messages.  Remove NULL return
10980         check.
10981
10982 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10983
10984         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10985         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10986         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10987         (linux_supports_pt, linux_supports_btrace): Remove.
10988         (linux_enable_bts): Call cpu_supports_bts.
10989         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10990         * remote.c (remote_supports_btrace): Remove.
10991         (init_remote_ops): Remove remote_supports_btrace.
10992         * target-delegates.c: Regenerated.
10993         * target.c (target_supports_btrace): Remove.
10994         * target.h (target_ops) <to_supports_btrace>: Remove
10995         (target_supports_btrace): Remove.
10996         * x86-linux-nat.c (x86_linux_create_target): Remove
10997         linux_supports_btrace.
10998
10999 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11000
11001         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11002         btrace failed.
11003         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11004         exception and use message in own exception.
11005
11006 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11007
11008         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11009         (perf_event_pt_event_type): Use gdb_file_up.
11010         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11011         scoped_fd, and scoped_mmap.
11012
11013 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11014
11015         * common/scoped_mmap.h: New.
11016         * unittests/scoped_mmap-selftest.c: New.
11017         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11018         unittests/scoped_mmap-selftest.c.
11019
11020 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11021
11022         * common/scoped_fd.h: New.
11023         * unittests/scoped_fd-selftest.c: New.
11024         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11025         unittests/scoped_fd-selftest.c.
11026
11027 2018-02-09  Tom Tromey  <tom@tromey.com>
11028
11029         * auto-load.c (auto_load_section_scripts): Use
11030         gdb::unique_xmalloc_ptr.
11031
11032 2018-02-09  Tom Tromey  <tom@tromey.com>
11033
11034         * auto-load.c (execute_script_contents): Use std::string.
11035
11036 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11037
11038         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11039         Python function, rather than a new command.
11040
11041 2018-02-08  Tom Tromey  <tom@tromey.com>
11042
11043         * solib.c (solib_find_1): Use std::string.
11044         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11045
11046 2018-02-08  Tom Tromey  <tom@tromey.com>
11047
11048         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11049
11050 2018-02-08  Tom Tromey  <tom@tromey.com>
11051
11052         * source.c (find_source_lines): Use gdb::def_vector.
11053
11054 2018-02-08  Tom Tromey  <tom@tromey.com>
11055
11056         * macrocmd.c (struct temporary_macro_definition): New.
11057         (macro_define_command): Use temporary_macro_definition.  Remove
11058         cleanups.
11059         (free_macro_definition_ptr): Remove.
11060
11061 2018-02-08  Tom Tromey  <tom@tromey.com>
11062
11063         * macroexp.c (maybe_expand): Use std::string.
11064
11065 2018-02-08  Tom Tromey  <tom@tromey.com>
11066
11067         * macroexp.c (struct macro_buffer): Add initializers for some
11068         members.
11069         (init_buffer, init_shared_buffer, free_buffer)
11070         (free_buffer_return_text): Remove.
11071         (macro_buffer): New constructors.
11072         (~macro_buffer): New destructor.
11073         (macro_buffer::set_shared): New method.
11074         (macro_buffer::resize_buffer, macro_buffer::appendc)
11075         (macro_buffer::appendmem): Now methods, not free functions.
11076         (set_token, append_tokens_without_splicing, stringify)
11077         (macro_stringify): Update.
11078         (gather_arguments): Change return type.  Remove argc_p argument,
11079         add args_ptr argument.  Use std::vector.
11080         (substitute_args): Remove argc argument.  Accept std::vector.
11081         (expand): Update.  Use std::vector.
11082         (scan, macro_expand, macro_expand_next): Update.
11083
11084 2018-02-08  Tom Tromey  <tom@tromey.com>
11085
11086         * symtab.c (default_collect_symbol_completion_matches_break_on):
11087         Use unique_xmalloc_ptr.
11088         * macroscope.h: (sal_macro_scope, user_macro_scope)
11089         (default_macro_scope): Return unique_xmalloc_ptr.
11090         * macroscope.c (sal_macro_scope, user_macro_scope)
11091         (default_macro_scope): Return unique_xmalloc_ptr.
11092         * macroexp.h (macro_expand, macro_expand_once): Return
11093         unique_xmalloc_ptr.
11094         * macroexp.c (macro_expand, macro_expand_once): Return
11095         unique_xmalloc_ptr.
11096         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11097         (info_macro_command, info_macros_command): Use
11098         unique_xmalloc_ptr.
11099         * compile/compile-c-support.c (write_macro_definitions): Use
11100         unique_xmalloc_ptr.
11101         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11102
11103 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11104
11105         * value.c (value_static_field): Assign field type instead of
11106         containing type when returning an optimized out value.
11107
11108 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11109
11110         * ft32-tdep.c (ft32_read_pc): Remove.
11111         (ft32_write_pc): Remove.
11112         (ft32_gdbarch_init): Update.
11113         * m32r-tdep.c (m32r_read_pc): Remove.
11114         (m32r_gdbarch_init): Update.
11115         * mep-tdep.c (mep_read_pc): Remove.
11116         (mep_gdbarch_init): Update.
11117         * microblaze-tdep.c (microblaze_write_pc): Remove.
11118         (microblaze_gdbarch_init): Update.
11119         * mn10300-tdep.c (mn10300_read_pc): Remove.
11120         (mn10300_write_pc): Remove.
11121         (mn10300_gdbarch_init): Update.
11122         * moxie-tdep.c (moxie_read_pc): Remove.
11123         (moxie_write_pc): Remove.
11124         (moxie_gdbarch_init): Update.
11125
11126 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11127
11128         * expprint.c (print_subexp_standard): Handle
11129         OP_F77_UNDETERMINED_ARGLIST.
11130         (dump_subexp_body_standard): Likewise.
11131
11132 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11133
11134         * target-descriptions.c (tdesc_element_visitor) Add empty
11135         implementations.
11136         (tdesc_type): Move make_gdb_type from here.
11137         (tdesc_type_builtin): Likewise.
11138         (tdesc_type_vector): Likewise.
11139         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11140         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11141         (make_gdb_type_union): Likewise.
11142         (make_gdb_type_flags): Likewise.
11143         (make_gdb_type_enum): Likewise.
11144         (make_gdb_type): New function.
11145         (tdesc_register_type): Use static make_gdb_type.
11146
11147 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11148
11149         * infcmd.c (default_print_one_register_info): Align natural-format
11150         column values consistently one under another.
11151         (pad_to_column): New function.
11152
11153 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11154
11155         * dwarf2read.c (dwarf2_physname): Move commment.
11156
11157 2018-02-01  Leszek Swirski  <leszeks@google.com>
11158
11159         * varobj.c (varobj_formatted_print_options): Allow recursive
11160         pretty printing if pretty printing is enabled.
11161
11162 2018-02-01  Leszek Swirski  <leszeks@google.com>
11163
11164         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11165         names after a structop as a filename.
11166
11167 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11168
11169         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11170         (arm_record_coproc_data_proc): Likewise.
11171
11172 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11173
11174         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11175
11176 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11177
11178         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11179         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11180
11181 2018-01-31  Pedro Alves  <palves@redhat.com>
11182
11183         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11184         * inflow.c (child_terminal_save_inferior): Wrap reference to
11185         tcgetpgrp in HAVE_TERMIOS_H.
11186         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11187         _WIN32.
11188         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11189         always iterate over all inferiors.
11190         (gdbsim_cntrl_c): Adjust.
11191         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11192
11193 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11194
11195         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11196         index type is objfile-owned if the element type is as well.
11197
11198 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11199
11200         GDB 8.1 released.
11201
11202 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11203
11204         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11205         "features/s390x-linux64.c".
11206         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11207         s390_linux32 and s390x_linux64.
11208         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11209         default tdesc.
11210         * s390-tdep.c: Include "features/s390-linux32.c" and
11211         "features/s390x-linux64.c".
11212         (s390_tdesc_valid): Add check for tdesc_has_registers.
11213         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11214         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11215         tdesc_s390x_linux64.
11216         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11217         tdesc_s390x_linux64 to...
11218         * s390-tdep.h: ...here.
11219
11220 2018-01-30  Pedro Alves  <palves@redhat.com>
11221
11222         PR gdb/13211
11223         * config.in, configure: Regenerate.
11224         * configure.ac: Check for getpgid.
11225         * go32-nat.c (go32_pass_ctrlc): New.
11226         (go32_target): Install it.
11227         * inf-child.c (inf_child_target): Install
11228         child_terminal_save_inferior, child_pass_ctrlc and
11229         child_interrupt.
11230         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11231         (inf_ptrace_target): No longer install it.
11232         * infcmd.c (interrupt_target_1): Adjust.
11233         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11234         (child_interrupt): Declare.
11235         (inferior::terminal_state): New.
11236         * inflow.c (struct terminal_info): Update comments.
11237         (inferior_process_group): Delete.
11238         (terminal_is_ours): Delete.
11239         (gdb_tty_state): New.
11240         (child_terminal_init): Adjust.
11241         (is_gdb_terminal, sharing_input_terminal_1)
11242         (sharing_input_terminal): New functions.
11243         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11244         Set the process's actual process group in the foreground if
11245         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11246         mark terminal as the inferior's if not sharing GDB's terminal.
11247         Don't check attach_flag.
11248         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11249         pass down a target_terminal_state.
11250         (child_terminal_save_inferior): New, factored out from ...
11251         (child_terminal_ours_1): ... this.  Handle
11252         target_terminal_state::is_ours_for_output.
11253         (child_interrupt, child_pass_ctrlc): New.
11254         (inflow_inferior_exit): Clear the inferior's terminal_state.
11255         (copy_terminal_info): Copy the inferior's terminal state.
11256         (_initialize_inflow): Remove reference to terminal_is_ours.
11257         * inflow.h (inferior_process_group): Delete.
11258         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11259         * procfs.c (procfs_target): Don't install procfs_interrupt.
11260         (procfs_interrupt): Delete.
11261         * remote.c (remote_serial_quit_handler): Adjust.
11262         (remote_interrupt): Remove ptid parameter.  Adjust.
11263         * target-delegates.c: Regenerate.
11264         * target.c: Include "terminal.h".
11265         (target_terminal::terminal_state): Rename to ...
11266         (target_terminal::m_terminal_state): ... this.
11267         (target_terminal::init): Adjust.
11268         (target_terminal::inferior): Adjust to per-inferior
11269         terminal_state.
11270         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11271         (target_terminal::ours, target_terminal::ours_for_output): Use
11272         target_terminal_is_ours_kind.
11273         (target_interrupt): Remove ptid parameter.  Adjust.
11274         (default_target_pass_ctrlc): Adjust.
11275         * target.h (target_ops::to_terminal_save_inferior): New field.
11276         (target_ops::to_interrupt): Remove ptid_t parameter.
11277         (target_interrupt): Remove ptid_t parameter.  Update comment.
11278         (target_pass_ctrlc): Update comment.
11279         * target/target.h (target_terminal_state): New scoped enum,
11280         factored out of ...
11281         (target_terminal::terminal_state): ... here.
11282         (target_terminal::inferior): Update comments.
11283         (target_terminal::restore_inferior): New.
11284         (target_terminal::is_inferior, target_terminal::is_ours)
11285         (target_terminal::is_ours_for_output): Adjust.
11286         (target_terminal::scoped_restore_terminal_state): Adjust to
11287         rename, and call restore_inferior() instead of inferior().
11288         (target_terminal::scoped_restore_terminal_state::m_state): Change
11289         type.
11290         (target_terminal::terminal_state): Rename to ...
11291         (target_terminal::m_terminal_state): ... this and change type.
11292
11293 2018-01-30  Pedro Alves  <palves@redhat.com>
11294
11295         * linux-nat.c (wait_for_signal): New function.
11296         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11297         directly.
11298         (async_terminal_is_ours)
11299         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11300         (linux_nat_add_target): Don't override
11301         to_terminal_inferior/to_terminal_ours.
11302
11303 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11304
11305         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11306
11307 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11308
11309         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11310         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11311         dwarf2_per_objfile_free here.
11312         (dwarf2_per_objfile_free): Remove.
11313         (_initialize_dwarf2_read): Don't register
11314         dwarf2_per_objfile_free as a registry cleanup.
11315
11316 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11317
11318         Avoid compilation errors in MinGW native builds
11319
11320         The error is triggered by including python-internal.h, and the
11321         error message is:
11322
11323              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11324                       from build-gnulib/import/math.h:27,
11325                       from d:/usr/Python26/include/pyport.h:235,
11326                       from d:/usr/Python26/include/Python.h:58,
11327                       from python/python-internal.h:94,
11328                       from python/py-arch.c:24:
11329              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11330         using ::hypot;
11331                 ^~~~~
11332
11333         This happens because Python headers define 'hypot' to expand t
11334         '_hypot' in the Windows builds.
11335         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11336         'hypoth'.  This avoids a compilation error.
11337
11338 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11339
11340         * MAINTAINERS (Write After Approval): Fix ordering.
11341
11342 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11343
11344         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11345
11346 2018-01-26  Alan Modra  <amodra@gmail.com>
11347
11348         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11349         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11350         Remove nop.  Make const.  Comment.
11351         (powerpc32_plt_stub_so_2): New.
11352         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11353         Correct count.  Update uses.
11354         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11355         Move common code reading PLT entry word.  Correct
11356         powerpc32_plt_stub PLT address calculation.
11357         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11358         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11359         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11360         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11361         (ppc64_standard_linkage8): Likewise.
11362         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11363         Correct insns description.
11364         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11365
11366 2018-01-24  Pedro Alves  <palves@redhat.com>
11367
11368         GCC PR libstdc++/83906
11369         * gdbtypes.c (operator==(const dynamic_prop &,
11370         const dynamic_prop &)): New.
11371         (operator==(const range_bounds &, const range_bounds &)): New.
11372         (check_types_equal): Use them instead of memcmp.
11373         * gdbtypes.h (operator==(const dynamic_prop &,
11374         const dynamic_prop &)): Declare.
11375         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11376         (operator==(const range_bounds &, const range_bounds &)): Declare.
11377         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11378
11379 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11380
11381         * s390-linux-tdep.c (s390_record_address_mask)
11382         (s390_record_calc_disp_common, s390_record_calc_disp)
11383         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11384         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11385         (s390_process_record): Move to s390-tdep.c.
11386         (s390_linux_init_abi_any): Adjust.
11387         * s390-tdep.c (s390_record_address_mask)
11388         (s390_record_calc_disp_common, s390_record_calc_disp)
11389         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11390         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11391         (s390_process_record): Moved from s390-linux-tdep.c
11392         (s390_gdbarch_init): Adjust.
11393
11394 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11395
11396         * s390-linux-nat.c (s390-tdep.h): New include.
11397         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11398         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11399         (ALLDEPFILES): Add s390-tdep.c.
11400         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11401         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11402         * s390-tdep.h: ...this.  New file.
11403         * s390-linux-tdep.c (s390-tdep.h): New include.
11404         (_initialize_s390_tdep): Rename to...
11405         (_initialize_s390_linux_tdep): ...this and adjust.
11406         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11407         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11408         s390-tdep.h.
11409         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11410         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11411         (s390_is_partial_instruction, s390_software_single_step)
11412         (is_non_branch_ril, s390_displaced_step_copy_insn)
11413         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11414         (s390_prologue_data, s390_addr, s390_store, s390_load)
11415         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11416         (s390_register_call_saved, s390_guess_tracepoint_registers)
11417         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11418         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11419         (s390_pseudo_register_name, s390_pseudo_register_type)
11420         (s390_pseudo_register_read, s390_pseudo_register_write)
11421         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11422         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11423         (s390_addr_bits_remove, s390_address_class_type_flags)
11424         (s390_address_class_type_flags_to_name)
11425         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11426         (s390_function_arg_float, s390_function_arg_vector)
11427         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11428         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11429         (s390_frame_align, s390_register_return_value, s390_return_value)
11430         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11431         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11432         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11433         (s390_trad_frame_prev_register, s390_unwind_cache)
11434         (s390_prologue_frame_unwind_cache)
11435         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11436         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11437         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11438         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11439         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11440         (s390_frame_base_address, s390_local_base_address)
11441         (s390_frame_base, s390_gcc_target_options)
11442         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11443         (s390_validate_reg_range, s390_tdesc_valid)
11444         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11445         * s390-tdep.c: ...this.  New file.
11446
11447 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11448
11449         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11450         (s390_process_record, s390_gdbarch_tdep_alloc)
11451         (s390_linux_init_abi_any): Use/set new hook.
11452
11453 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11454
11455         * s390-linux-tdep.c (osabi.h): New include.
11456         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11457         (s390_linux_init_abi_any): New functions.
11458         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11459
11460 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11461
11462         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11463         tdesc_has_registers check
11464
11465 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11466
11467         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11468         (s390_validate_reg_range): New macro.
11469         (s390_gdbarch_init): Adjust.
11470
11471 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11472
11473         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11474         (s390_gdbarch_tdep_alloc): Adjust.
11475         (s390_gdbarch_init): Adjust.
11476
11477 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11478
11479         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11480         <have_tdb>: Change type to bool.
11481         (s390_gdbarch_tdep_alloc): Adjust.
11482         (s390_gdbarch_init): Adjust.
11483
11484 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11485
11486         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11487         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11488         (s390_gdbarch_tdep_alloc): New function.
11489         (s390_gdbarch_init): Allocate tdep at start and use its fields
11490         instead of separate variables.
11491
11492 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11493
11494         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11495         when looking for cached gdbarch and add comment for remaining.
11496
11497 2018-01-22  Pedro Alves  <palves@redhat.com>
11498             Sergio Durigan Junior  <sergiodj@redhat.com>
11499
11500         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11501         case.
11502
11503 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11504
11505         * MAINTAINERS: Update my company e-mail address.
11506
11507 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11508
11509         * regcache.c (cooked_write_test): New function.
11510         (_initialize_regcache): Register the test.
11511
11512 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11513
11514         * ia64-tdep.c (ia64_pseudo_register_read): Call
11515         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11516         * m32c-tdep.c (m32c_cat_read): Likewise.
11517         (m32c_r3r2r1r0_read): Likewise.
11518         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11519         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11520
11521 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11522
11523         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11524         method raw_read instead of regcache_raw_read.
11525         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11526         * arm-tdep.c (arm_neon_quad_read): Likewise.
11527         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11528         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11529         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11530         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11531         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11532         (i386_pseudo_register_read_into_value): Likewise.
11533         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11534         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11535         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11536         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11537         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11538         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11539         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11540         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11541         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11542
11543 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11544
11545         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11546         * configure.tgt: Remove target mt.
11547         * mt-tdep.c: Remove.
11548         * regcache.c (cooked_read_test): Remove the check for mt.
11549
11550 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11551
11552         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11553         instead of gdbarch_pseudo_register_read_value.
11554
11555 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11556
11557         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11558         language is Ada.
11559
11560 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11561
11562         * linespec.c (create_sals_line_offset): Remove code that preserved
11563         the symtab_and_line's line number.
11564
11565 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11566
11567         * varobj.c (varobj_create): Don't set valid_block when creating a
11568         floating varobj.
11569
11570 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11571
11572         * varobj.c (varobj_create): Remove out of date comment.
11573
11574 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11575
11576         PR mi/20395
11577         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11578         updating innermost block.
11579         * parse.c (innermost_block_tracker::update): Take extra type
11580         parameter, and check types match before updating innermost block.
11581         (write_dollar_variable): Update innermost block for registers.
11582         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11583         (innermost_block_tracker::innermost_block_tracker): Initialise
11584         m_types member.
11585         (innermost_block_tracker::reset): Take type parameter.
11586         (innermost_block_tracker::update): Take type parameter, and pass
11587         type through as needed.
11588         (innermost_block_tracker::m_types): New member.
11589         * varobj.c (varobj_create): Pass type when reseting innermost
11590         block.
11591
11592 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11593
11594         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11595         * ada-lang.c (resolve_subexp): Likewise.
11596         * breakpoint.c (set_breakpoint_condition) Likewise.
11597         (watch_command_1) Likewise.
11598         * c-exp.y (variable): Likewise.
11599         * d-exp.y (PrimaryExpression): Likewise.
11600         * f-exp.y (variable): Likewise.
11601         * go-exp.y (variable): Likewise.
11602         * m2-exp.y (variable): Likewise.
11603         * objfiles.c (objfile::~objfile): Likewise.
11604         * p-exp.y (variable): Likewise.
11605         * parse.c (innermost_block): Change type.
11606         * parser-defs.h (class innermost_block_tracker): New.
11607         (innermost_block): Change to innermost_block_tracker.
11608         * printcmd.c (display_command): Switch to innermost_block API.
11609         (do_one_display): Likewise.
11610         * rust-exp.y (do_one_display): Likewise.
11611         * symfile.c (clear_symtab_users): Likewise.
11612         * varobj.c (varobj_create): Switch to innermost_block API, replace
11613         use of innermost_block with block stored on varobj object.
11614
11615 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11616
11617         * expression.h (innermost_block): Remove declaration.
11618         * varobj.c: Add 'parser-defs.h' include.
11619
11620 2018-01-19  Tom Tromey  <tom@tromey.com>
11621
11622         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11623         symbols in the static and global blocks.
11624
11625 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11626
11627         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11628         gdb_ptrace.h, and move including gdb_wait.h ...
11629         * nat/linux-ptrace.h: ... to here.
11630
11631 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11632
11633         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11634         inf_ptrace_detach_success.
11635         (inf_ptrace_detach_success): Add inferior parameter, use it
11636         instead of inferior_ptid, pass it to detach_inferior.
11637         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11638         parameter.
11639         * inferior.c (detach_inferior): Add overload that takes an
11640         inferior object.
11641         * inferior.h (detach_inferior): Likewise.
11642         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11643         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11644         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11645
11646 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11647
11648         * target.h (struct target_ops) <to_detach>: Add inferior
11649         parameter.
11650         (target_detach): Likewise.
11651         * target.c (dispose_inferior): Pass inferior down.
11652         (target_detach): Pass inferior down.  Assert that it is equal to
11653         the current inferior.
11654         * aix-thread.c (aix_thread_detach): Pass inferior down.
11655         * corefile.c (core_file_command): Pass current_inferior() down.
11656         * corelow.c (core_detach): Add inferior parameter.
11657         * darwin-nat.c (darwin_detach): Likewise.
11658         * gnu-nat.c (gnu_detach): Likewise.
11659         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11660         * infcmd.c (detach_command): Pass current_inferior() down to
11661         target_detach.
11662         * infrun.c (follow_fork_inferior): Pass parent_inf to
11663         target_detach.
11664         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11665         target_detach.
11666         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11667         * linux-thread-db.c (thread_db_detach): Likewise.
11668         * nto-procfs.c (procfs_detach): Likewise.
11669         * procfs.c (procfs_detach): Likewise.
11670         * record.c (record_detach): Likewise.
11671         * record.h (struct inferior): Forward-declare.
11672         (record_detach): Add inferior parameter.
11673         * remote-sim.c (gdbsim_detach): Likewise.
11674         * remote.c (remote_detach_1): Likewise.
11675         (remote_detach): Likewise.
11676         (extended_remote_detach): Likewise.
11677         * sol-thread.c (sol_thread_detach): Likewise.
11678         * target-debug.h (target_debug_print_inferior_p): New macro.
11679         * target-delegates.c: Re-generate.
11680         * top.c (kill_or_detach): Pass inferior down to target_detach.
11681         * windows-nat.c (windows_detach): Add inferior parameter.
11682
11683 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11684
11685         * target.h (struct target_ops) <to_detach>: Remove args
11686         parameter.
11687         (target_detach): Likewise.
11688         * target.c (dispose_inferior): Adjust.
11689         (target_detach): Remove args parameter, adjust.
11690         * aix-thread.c (aix_thread_detach): Adjust.
11691         * corefile.c (core_file_command): Adjust.
11692         * corelow.c (core_detach): Adjust.
11693         * darwin-nat.c (darwin_detach): Adjust.
11694         * gnu-nat.c (gnu_detach): Adjust.
11695         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11696         * infcmd.c (detach_command): Adjust
11697         * infrun.c (follow_fork_inferior): Adjust.
11698         (handle_vfork_child_exec_or_exit): Adjust.
11699         * linux-fork.c (linux_fork_detach): Remove args parameter.
11700         * linux-fork.h (linux_fork_detach): Likewise.
11701         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11702         * linux-thread-db.c (thread_db_detach): Likewise.
11703         * nto-procfs.c (procfs_detach): Likewise.
11704         * procfs.c (procfs_detach): Likewise.
11705         (do_detach): Remove signo parameter.
11706         * record.c (record_detach): Remove args parameter.
11707         * record.h (record_detach): Likewise.
11708         * remote-sim.c (gdbsim_detach): Likewise.
11709         * remote.c (remote_detach_1): Likewise.
11710         (remote_detach): Likewise.
11711         (extended_remote_detach): Likewise.
11712         * sol-thread.c (sol_thread_detach): Likewise.
11713         * target-delegates.c: Re-generate.
11714         * top.c (struct qt_args) <args>: Remove field.
11715         (kill_or_detach): Don't pass args.
11716         (quit_force): Don't set args.
11717         * windows-nat.c (windows_detach): Remove args parameter.
11718
11719 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11720
11721         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11722         (arm_linux_init_abi): Install it.
11723
11724 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11725
11726         * osabi.c (gdb_osabi_names): Extend the regexp for
11727         arm-linux-gnueabihf.
11728
11729 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11730
11731         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11732         m_abbrevs.
11733         (abbrev_table::add_abbrev): Update.
11734         (abbrev_table::lookup_abbrev): Update.
11735
11736 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11737
11738         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11739
11740 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11741
11742         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11743         to "std::string".
11744
11745 2018-01-17  Tom Tromey  <tom@tromey.com>
11746
11747         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11748
11749 2018-01-17  Tom Tromey  <tom@tromey.com>
11750
11751         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11752         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11753         (create_array_type_with_stride): Update.
11754         * dwarf2read.c (set_die_type): Update.
11755
11756 2018-01-17  Tom Tromey  <tom@tromey.com>
11757
11758         * dwarf2read.c (delayed_method_info): Remove typedef.
11759         (dwarf2_cu::method_info): Now a std::vector.
11760         (add_to_method_list): Update.
11761         (free_delayed_list): Remove.
11762         (compute_delayed_physnames): Update.
11763         (process_full_comp_unit, process_full_type_unit): Clear the method
11764         list.  Remove cleanups.
11765         (psymtab_include_file_name): Add name_holder parameter.  Use
11766         unique_xmalloc_ptr.
11767         (dwarf_decode_lines): Update.
11768
11769 2018-01-17  Tom Tromey  <tom@tromey.com>
11770             Simon Marchi  <simon.marchi@ericsson.com>
11771
11772         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11773         (dwarf2_per_objfile::free_cached_comp_units)
11774         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11775         (init_cutu_and_read_dies_no_follow): Update.
11776         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11777         (dwarf2_cu::~dwarf2_cu): New.
11778         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11779         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11780
11781 2018-01-17  Tom Tromey  <tom@tromey.com>
11782             Simon Marchi  <simon.marchi@ericsson.com>
11783
11784         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11785         (struct die_reader_specs) <abbrev_table>: New member.
11786         (struct abbrev_table): Add constructor.
11787         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11788         <abbrev_obstack>: Now an auto_obstack.
11789         (abbrev_table_up): New typedef.
11790         (init_cu_die_reader): Add abbrev_table parameter.
11791         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11792         Add result_dwo_abbrev_table.
11793         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11794         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11795         Update.
11796         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11797         parameter.
11798         (skip_children): Update.
11799         (abbrev_table::alloc_abbrev): Rename from
11800         abbrev_table_alloc_abbrev.
11801         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11802         (abbrev_table::lookup_abbrev): Rename from
11803         abbrev_table_lookup_abbrev.
11804         (abbrev_table_read_table): Return abbrev_table_up.
11805         (abbrev_table_free, abbrev_table_free_cleanup)
11806         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11807         (load_partial_dies): Update.
11808
11809 2018-01-17  Tom Tromey  <tom@tromey.com>
11810
11811         * dwarf2read.c (dwarf2_compute_name): Update comment.
11812         (read_func_scope, read_variable): Update.
11813         (new_symbol): Remove.
11814         (new_symbol_full): Rename to new_symbol.
11815
11816 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11817
11818         PR gdb/16577
11819         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11820         a warning instead of throwing an error, set section size to 0 and return
11821         NULL.
11822         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11823
11824 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11825
11826         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11827         std::string.
11828         (linux_ptrace_attach_fail_reason_string): Likewise.
11829         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11830         Likewise.
11831         (linux_ptrace_attach_fail_reason_string): Likewise.
11832         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11833
11834 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11835
11836         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11837
11838 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11839
11840         PR gdb/21559
11841         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11842         checking for fs_base/gs_base fields in struct user_regs_struct.
11843         * configure: Regenerate.
11844
11845 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11846
11847         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11848         function.
11849         (aarch64_linux_init_abi): Install it to gdbarch hook
11850         gcc_target_options.
11851
11852 2018-01-15  Pedro Alves  <palves@redhat.com>
11853
11854         * common/signals-state-save-restore.c
11855         (save_original_signals_state): Fix typos.
11856
11857 2017-01-12  Tom Tromey  <tom@tromey.com>
11858             Sergio Durigan Junior  <sergiodj@redhat.com>
11859
11860         * Makefile.in (install-only): Install gdb-add-index.
11861
11862 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11863
11864         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11865
11866 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11867
11868         * infrun.c (keep_going_pass_signal): Clear step-over info when
11869         insert_breakpoints fails.
11870
11871 2018-01-11  Pedro Alves  <palves@redhat.com>
11872
11873         PR gdb/22583
11874         * infrun.c (resume): Rename to ...
11875         (resume_1): ... this.
11876         (resume): Reimplement as wrapper around resume_1.
11877
11878 2018-01-11  Pedro Alves  <palves@redhat.com>
11879
11880         PR remote/22597
11881         * remote.c (remote_parse_stop_reply): Default to the last-set
11882         general thread instead of to 'magic_null_ptid'.
11883
11884 2018-01-10  Pedro Alves  <palves@redhat.com>
11885
11886         * language.h (language_get_symbol_name_matcher): Rename ...
11887         (get_symbol_name_matcher): ... this.
11888         * language.c (language_get_symbol_name_matcher): Ditto.
11889         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11890         callers adjusted.
11891
11892 2018-01-10  Pedro Alves  <palves@redhat.com>
11893
11894         PR gdb/22670
11895         * dwarf2read.c
11896         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11897         Adjust to use language_get_symbol_name_matcher instead of
11898         language_defn::la_get_symbol_name_matcher.
11899         * language.c (language_get_symbol_name_matcher): If in Ada mode
11900         and the lookup name is a verbatim match, return Ada's matcher.
11901         * language.h (language_get_symbol_name_matcher): Adjust comment.
11902         (ada_lookup_name_info::verbatim_p):: New method.
11903
11904 2018-01-10  Pedro Alves  <palves@redhat.com>
11905
11906         PR gdb/22670
11907         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11908         minsym's language is language_auto or language_cplus, pass down
11909         language_ada instead.
11910         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11911
11912 2018-01-10  Pedro Alves  <palves@redhat.com>
11913
11914         PR gdb/22670
11915         * minsyms.c (linkage_name_str): New function.
11916         (iterate_over_minimal_symbols): Use it.
11917
11918 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11919
11920         * NEWS: Document that 'info proc' now works on FreeBSD.
11921
11922 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11923
11924         * configure.ac: Check for kinfo_getfile in libutil.
11925         * configure: Regenerate.
11926         * config.in: Regenerate.
11927         * fbsd-nat.c: Include "fbsd-tdep.h".
11928         (fbsd_fetch_cmdline): New.
11929         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11930         rather than calling error.
11931         (fbsd_info_proc): New.
11932         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11933         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11934         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11935
11936 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11937
11938         * fbsd-nat.c (struct free_deleter): Remove.
11939         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11940
11941 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11942
11943         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11944         NULL for an empty pathname.
11945
11946 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11947
11948         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11949         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11950         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11951         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11952         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11953         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11954         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11955         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11956         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11957         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11958         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11959         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11960         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11961         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11962         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11963
11964 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11965
11966         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11967         (gnu_xfer_auxv): New function.
11968         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11969         TARGET_OBJECT_AUXV.
11970
11971 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11972             Simon Marchi  <simon.marchi@ericsson.com>
11973
11974         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11975         common/selftest.c.
11976         (COMMON_OBS): Remove selftest.o.
11977         * configure.ac: Append selftest-arch.c and common/selftest.c to
11978         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11979         * configure: Re-generated.
11980         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11981         GDB_SELF_TEST.
11982         (maintenance_info_selftests): Likewise.
11983
11984 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11985
11986         * ada-valprint.c (val_print_packed_array_elements): Use
11987         proper number of elements when printing an array indexed
11988         by an enumeration type.
11989
11990 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11991
11992         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11993         (dw2_get_file_names_reader): Adjust.
11994         (lookup_dwo_signatured_type): Adjust.
11995         (lookup_dwp_signatured_type): Adjust.
11996         (lookup_signatured_type): Adjust.
11997         (create_type_unit_group): Adjust.
11998         (get_type_unit_group): Adjust.
11999         (process_psymtab_comp_unit_reader): Adjust.
12000         (build_type_psymtabs_reader): Adjust.
12001         (scan_partial_symbols): Adjust.
12002         (add_partial_symbol): Adjust.
12003         (add_partial_subprogram): Adjust.
12004         (peek_die_abbrev): Adjust.
12005         (fixup_go_packaging): Adjust.
12006         (process_imported_unit_die): Adjust.
12007         (dwarf2_compute_name): Adjust.
12008         (dwarf2_physname): Adjust.
12009         (read_import_statement): Adjust.
12010         (handle_DW_AT_stmt_list): Adjust.
12011         (read_file_scope): Adjust.
12012         (read_func_scope): Adjust.
12013         (read_lexical_block_scope): Adjust.
12014         (read_call_site_scope): Adjust.
12015         (read_variable): Adjust.
12016         (dwarf2_rnglists_process): Adjust.
12017         (dwarf2_ranges_process): Adjust.
12018         (dwarf2_ranges_read): Adjust.
12019         (dwarf2_get_pc_bounds): Adjust.
12020         (dwarf2_record_block_ranges): Adjust.
12021         (dwarf2_add_field): Adjust.
12022         (dwarf2_add_member_fn): Adjust.
12023         (read_structure_type): Adjust.
12024         (process_structure_scope): Adjust.
12025         (read_enumeration_type): Adjust.
12026         (read_array_type): Adjust.
12027         (mark_common_block_symbol_computed): Adjust.
12028         (read_common_block): Adjust.
12029         (read_namespace_type): Adjust.
12030         (read_namespace): Adjust.
12031         (read_module_type): Adjust.
12032         (read_tag_pointer_type): Adjust.
12033         (read_tag_ptr_to_member_type): Adjust.
12034         (read_tag_string_type): Adjust.
12035         (read_subroutine_type): Adjust.
12036         (read_typedef): Adjust.
12037         (read_base_type): Adjust.
12038         (attr_to_dynamic_prop): Adjust.
12039         (read_subrange_type): Adjust.
12040         (read_unspecified_type): Adjust.
12041         (dwarf2_read_abbrevs): Adjust.
12042         (load_partial_dies): Adjust.
12043         (read_partial_die): Adjust.
12044         (find_partial_die): Adjust.
12045         (guess_partial_die_structure_name): Adjust.
12046         (fixup_partial_die): Adjust.
12047         (read_attribute_value): Adjust.
12048         (read_addr_index): Adjust.
12049         (read_addr_index_from_leb128): Adjust.
12050         (read_str_index): Adjust.
12051         (dwarf2_string_attr): Adjust.
12052         (get_debug_line_section): Adjust.
12053         (dwarf_decode_line_header): Adjust.
12054         (lnp_state_machine::check_line_address): Adjust.
12055         (dwarf_decode_lines_1): Adjust.
12056         (dwarf_decode_lines): Adjust.
12057         (dwarf2_start_symtab): Adjust.
12058         (var_decode_location): Adjust.
12059         (new_symbol_full): Adjust.
12060         (dwarf2_const_value_data): Adjust.
12061         (dwarf2_const_value_attr): Adjust.
12062         (dwarf2_const_value): Adjust.
12063         (die_type): Adjust.
12064         (die_containing_type): Adjust.
12065         (build_error_marker_type): Adjust.
12066         (lookup_die_type): Adjust.
12067         (guess_full_die_structure_name): Adjust.
12068         (anonymous_struct_prefix): Adjust.
12069         (determine_prefix): Adjust.
12070         (dwarf2_name): Adjust.
12071         (follow_die_ref_or_sig): Adjust.
12072         (follow_die_offset): Adjust.
12073         (follow_die_ref): Adjust.
12074         (follow_die_sig_1): Adjust.
12075         (follow_die_sig): Adjust.
12076         (get_signatured_type): Adjust.
12077         (get_DW_AT_signature_type): Adjust.
12078         (decode_locdesc): Adjust.
12079         (dwarf_decode_macros): Adjust.
12080         (cu_debug_loc_section): Adjust.
12081         (fill_in_loclist_baton): Adjust.
12082         (dwarf2_symbol_mark_computed): Adjust.
12083         (init_one_comp_unit): Don't assign
12084         dwarf2_cu::dwarf2_per_objfile.
12085         (set_die_type): Adjust.
12086
12087 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12088
12089         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12090         <dwarf2_per_objfile>: New field.
12091         (dwarf2_per_objfile): Remove global.
12092         (get_dwarf2_per_objfile): New function.
12093         (set_dwarf2_per_objfile): New function.
12094         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12095         dwarf2_per_objfile.
12096         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12097         (read_abbrev_offset): Likewise.
12098         (read_indirect_string): Likewise.
12099         (read_indirect_line_string): Likewise.
12100         (read_indirect_string_at_offset): Likewise.
12101         (read_indirect_string_from_dwz): Likewise.
12102         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12103         dwarf2_per_objfile.
12104         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12105         (create_all_comp_units): Change objfile parameter to
12106         dwarf2_per_objfile.
12107         (create_all_type_units): Likewise.
12108         (process_queue): Add dwarf2_per_objfile parameter.
12109         (read_and_check_comp_unit_head): Likewise.
12110         (lookup_dwo_unit_in_dwp): Likewise.
12111         (get_dwp_file): Likewise.
12112         (process_cu_includes): Likewise.
12113         (struct free_dwo_file_cleanup_data): New struct.
12114         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12115         set_dwarf2_per_objfile.
12116         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12117         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12118         context, adjust calls.
12119         (dw2_instantiate_symtab): Likewise.
12120         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12121         (dw2_get_cu): Likewise.
12122         (create_cu_from_index_list): Change objfile parameter to
12123         dwarf2_per_objfile.
12124         (create_cus_from_index_list): Get dwarf2_per_objfile from
12125         context, adjust calls.
12126         (create_cus_from_index): Likewise.
12127         (create_signatured_type_table_from_index): Change objfile
12128         parameter to dwarf2_per_objfile.
12129         (create_signatured_type_table_from_debug_names): Change objfile
12130         parameter to dwarf2_per_objfile.
12131         (create_addrmap_from_index): Likewise.
12132         (create_addrmap_from_aranges): Likewise.
12133         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12134         (dw2_setup): Remove.
12135         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12136         context.
12137         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12138         get_dwarf2_per_objfile.
12139         (dw2_forget_cached_source_info): Likewise.
12140         (dw2_map_symtabs_matching_filename): Likewise.
12141         (struct dw2_symtab_iterator) <index>: Remove.
12142         <dwarf2_per_objfile>: New field.
12143         (dw2_symtab_iter_init): Replace index parameter with
12144         dwarf2_per_objfile.
12145         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12146         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12147         (dw2_print_stats): Likewise.
12148         (dw2_dump): Likewise.
12149         (dw2_expand_symtabs_for_function): Likewise.
12150         (dw2_expand_all_symtabs): Likewise.
12151         (dw2_expand_symtabs_with_fullname): Likewise.
12152         (dw2_expand_marked_cus): Replace index and objfile parameters
12153         with dwarf2_per_objfile.
12154         (dw_expand_symtabs_matching_file_matcher): Add
12155         dwarf2_per_objfile parameter and adjust calls.
12156         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12157         adjust calls.
12158         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12159         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12160         adjust calls.
12161         (create_cus_from_debug_names_list): Replace objfile parameter
12162         with dwarf2_per_objfile and adjust calls.
12163         (create_cus_from_debug_names): Likewise.
12164         (dwarf2_read_debug_names): Likewise.
12165         (mapped_debug_names::namei_to_name): Adjust call.
12166         (dw2_debug_names_iterator::next): Likewise.
12167         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12168         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12169         (dw2_debug_names_dump): Likewise.
12170         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12171         (dw2_debug_names_expand_symtabs_matching): Likewise.
12172         (dwarf2_initialize_objfile): Likewise.
12173         (dwarf2_build_psymtabs): Likewise.
12174         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12175         this_cu.
12176         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12177         (read_and_check_comp_unit_head): Likewise.
12178         (read_abbrev_offset): Likewise.
12179         (create_debug_type_hash_table): Likewise.
12180         (create_debug_types_hash_table): Likewise.
12181         (create_all_type_units): Replace objfile parameter with
12182         dwarf2_per_objfile.
12183         (add_type_unit): Add dwarf2_per_objfile parameter.
12184         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12185         with dwarf2_per_objfile.
12186         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12187         (lookup_dwp_signatured_type): Likewise.
12188         (lookup_signatured_type): Likewise.
12189         (read_cutu_die_from_dwo): Likewise.
12190         (init_tu_and_read_dwo_dies): Likewise.
12191         (init_cutu_and_read_dies): Likewise.
12192         (init_cutu_and_read_dies_no_follow): Likewise.
12193         (allocate_type_unit_groups_table): Add objfile parameter.
12194         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12195         (get_type_unit_group): Likewise.
12196         (process_psymtab_comp_unit): Update call.
12197         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12198         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12199         (print_tu_stats): Likewise.
12200         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12201         in void* parameter.
12202         (build_type_psymtabs): Change objfile parameter to
12203         dwarf2_per_objfile.
12204         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12205         passed in void* parameter.
12206         (process_skeletonless_type_units): Change objfile parameter to
12207         dwarf2_per_objfile.
12208         (set_partial_user): Likewise.
12209         (dwarf2_build_psymtabs_hard): Likewise.
12210         (read_comp_units_from_section): Likewise.
12211         (create_all_comp_units): Likewise.
12212         (scan_partial_symbols): Update calls.
12213         (add_partial_symbol): Likewise.
12214         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12215         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12216         (process_queue): Add dwarf2_per_objfile parameter.
12217         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12218         (compute_compunit_symtab_includes): Likewise.
12219         (process_cu_includes): Add dwarf2_per_objfile parameter.
12220         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12221         (process_full_type_unit): Likewise.
12222         (process_imported_unit_die): Update call.
12223         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12224         (read_file_scope): Likewise.
12225         (allocate_dwo_file_hash_table): Add objfile parameter.
12226         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12227         (create_cus_hash_table): Likewise.
12228         (create_dwp_hash_table): Likewise.
12229         (create_dwo_unit_in_dwp_v1): Likewise.
12230         (create_dwp_v2_section): Likewise.
12231         (create_dwo_unit_in_dwp_v2): Likewise.
12232         (lookup_dwo_unit_in_dwp): Likewise.
12233         (try_open_dwop_file): Likewise.
12234         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12235         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12236         cleanup to include a reference to dwarf2_per_objfile.
12237         (open_dwp_file): Add dwarf2_per_objfile parameter.
12238         (open_and_init_dwp_file): Likewise.
12239         (get_dwp_file): Likewise.
12240         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12241         (queue_and_load_all_dwo_tus): Update call.
12242         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12243         data.
12244         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12245         (dwarf2_ranges_process): Likewise.
12246         (dwarf2_get_pc_bounds): Likewise.
12247         (mark_common_block_symbol_computed): Likewise.
12248         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12249         (dwarf2_read_abbrevs): Update call.
12250         (read_partial_die): Use dwarf2_per_objfile from cu.
12251         (find_partial_die): Likewise.
12252         (fixup_partial_die): Likewise.
12253         (read_attribute_value): Likewise.
12254         (read_indirect_string_at_offset_from): Add objfile parameter.
12255         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12256         parameter.
12257         (read_indirect_string_from_dwz): Add objfile parameter.
12258         (read_indirect_string): Add objfile parameter.
12259         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12260         (read_addr_index): Use dwarf2_per_objfile from cu.
12261         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12262         call dw2_setup.
12263         (read_str_index): Use dwarf2_per_objfile from cu.
12264         (get_debug_line_section): Likewise.
12265         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12266         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12267         (new_symbol_full): Use dwarf2_per_objfile from cu.
12268         (build_error_marker_type): Likewise.
12269         (lookup_die_type): Likewise.
12270         (determine_prefix): Likewise.
12271         (follow_die_offset): Likewise.
12272         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12273         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12274         (dwarf2_fetch_die_type_sect_off): Likewise.
12275         (dwarf2_get_die_type): Likewise.
12276         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12277         (get_signatured_type): Likewise.
12278         (get_DW_AT_signature_type): Likewise.
12279         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12280         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12281         (cu_debug_loc_section): Likewise.
12282         (fill_in_loclist_baton): Likewise.
12283         (dwarf2_symbol_mark_computed): Likewise.
12284         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12285         dwarf2_per_objfile.
12286         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12287         parameter.
12288         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12289         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12290         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12291         (set_die_type): Use dwarf2_free_objfile from cu.
12292         (get_die_type_at_offset): Likewise.
12293         (dwarf2_per_objfile_free): Don't assign global variable.
12294         (debug_names) <constructor>: Add dwarf2_per_objfile
12295         parameter, update m_debugstrlookup construction.
12296         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12297         parameter.
12298         <m_dwarf2_per_objfile>: New field.
12299         <lookup>: Use m_dwarf2_per_objfile.
12300         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12301         (psyms_seen_size): Likewise.
12302         (write_gdbindex): Replace objfile parameter with
12303         dwarf2_per_objfile.
12304         (write_debug_names): Likewise.
12305         (write_psymtabs_to_index): Likewise.
12306         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12307         calls.
12308
12309 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12310
12311         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12312         <dwarf2_per_objfile>: New field.
12313         (struct dwarf2_per_cu_data) <objfile>: Remove.
12314         <dwarf2_per_objfile>: New field.
12315         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12316         of objfile.
12317         (create_signatured_type_table_from_index): Likewise.
12318         (create_debug_type_hash_table): Likewise.
12319         (fill_in_sig_entry_from_dwo_entry): Likewise.
12320         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12321         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12322         objfile.
12323         (create_partial_symtab): Access objfile through
12324         dwarf2_per_objfile.
12325         (process_psymtab_comp_unit_reader): Likewise.
12326         (read_comp_units_from_section): Likewise.
12327         (scan_partial_symbols): Likewise.
12328         (add_partial_symbol): Likewise.
12329         (add_partial_subprogram): Likewise.
12330         (peek_die_abbrev): Likewise.
12331         (fixup_go_packaging): Likewise.
12332         (process_full_comp_unit): Likewise.
12333         (process_full_type_unit): Likewise.
12334         (process_imported_unit_die): Likewise.
12335         (dwarf2_compute_name): Likewise.
12336         (dwarf2_physname): Likewise.
12337         (read_import_statement): Likewise.
12338         (create_cus_hash_table): Assign dwarf2_physname instead of
12339         objfile.
12340         (read_func_scope): Access objfile through dwarf2_per_objfile.
12341         (read_lexical_block_scope): Likewise.
12342         (read_call_site_scope): Likewise.
12343         (read_variable): Likewise.
12344         (dwarf2_rnglists_process): Likewise.
12345         (dwarf2_ranges_process): Likewise.
12346         (dwarf2_ranges_read): Likewise.
12347         (dwarf2_record_block_ranges): Likewise.
12348         (dwarf2_add_field): Likewise.
12349         (dwarf2_add_member_fn): Likewise.
12350         (read_structure_type): Likewise.
12351         (process_structure_scope): Likewise.
12352         (read_enumeration_type): Likewise.
12353         (read_array_type): Likewise.
12354         (read_common_block): Likewise.
12355         (read_namespace_type): Likewise.
12356         (read_namespace): Likewise.
12357         (read_module_type): Likewise.
12358         (read_tag_pointer_type): Likewise.
12359         (read_tag_ptr_to_member_type): Likewise.
12360         (read_tag_string_type): Likewise.
12361         (read_subroutine_type): Likewise.
12362         (read_typedef): Likewise.
12363         (read_base_type): Likewise.
12364         (attr_to_dynamic_prop): Likewise.
12365         (read_subrange_type): Likewise.
12366         (read_unspecified_type): Likewise.
12367         (load_partial_dies): Likewise.
12368         (read_partial_die): Likewise.
12369         (find_partial_die): Likewise.
12370         (guess_partial_die_structure_name): Likewise.
12371         (fixup_partial_die): Likewise.
12372         (read_attribute_value): Likewise.
12373         (read_addr_index_from_leb128): Likewise.
12374         (dwarf2_read_addr_index): Likewise.
12375         (dwarf2_string_attr): Likewise.
12376         (lnp_state_machine::check_line_address): Likewise.
12377         (dwarf_decode_lines_1): Likewise.
12378         (dwarf_decode_lines): Likewise.
12379         (dwarf2_start_symtab): Likewise.
12380         (var_decode_location): Likewise.
12381         (new_symbol_full): Likewise.
12382         (dwarf2_const_value_data): Likewise.
12383         (dwarf2_const_value_attr): Likewise.
12384         (dwarf2_const_value): Likewise.
12385         (die_type): Likewise.
12386         (die_containing_type): Likewise.
12387         (lookup_die_type): Likewise.
12388         (guess_full_die_structure_name): Likewise.
12389         (anonymous_struct_prefix): Likewise.
12390         (dwarf2_name): Likewise.
12391         (follow_die_ref_or_sig): Likewise.
12392         (follow_die_offset): Likewise.
12393         (follow_die_ref): Likewise.
12394         (dwarf2_fetch_die_loc_sect_off): Likewise.
12395         (dwarf2_fetch_constant_bytes): Likewise.
12396         (dwarf2_fetch_die_type_sect_off): Likewise.
12397         (dwarf2_get_die_type): Likewise.
12398         (follow_die_sig): Likewise.
12399         (decode_locdesc): Likewise.
12400         (dwarf2_per_cu_objfile): Likewise.
12401         (dwarf2_per_cu_text_offset): Likewise.
12402         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12403         objfile.
12404         (set_die_type): Access objfile through
12405         dwarf2_per_objfile.
12406
12407 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12408
12409         * valprint.c (converted_character_d): Remove typedef.
12410         (DEF_VEC_O (converted_character_d)): Remove.
12411         (count_next_character): Use std::vector.
12412         (print_converted_chars_to_obstack): Likewise.
12413         (generic_printstr): Likewise.
12414
12415 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12416
12417         * xml-support.h (struct gdb_xml_value): Add constructor.
12418         <value>: Change type to unique_xmalloc_ptr.
12419         (gdb_xml_value_s): Remove typedef.
12420         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12421         (gdb_xml_element_start_handler): Change parameter type to
12422         std::vector.
12423         (xml_find_attribute): Likewise.
12424         * xml-support.c (xml_find_attribute): Change parameter type to
12425         std::vector and adjust.
12426         (gdb_xml_values_cleanup): Remove.
12427         (gdb_xml_parser::start_element): Adjust to std::vector.
12428         (xinclude_start_include): Change paraeter type to std::vector
12429         and adjust.
12430         * btrace.c (check_xml_btrace_version): Likewise.
12431         (parse_xml_btrace_block): Likewise.
12432         (parse_xml_btrace_pt_config_cpu): Likewise.
12433         (parse_xml_btrace_pt): Likewise.
12434         (parse_xml_btrace_conf_bts): Likewise.
12435         (parse_xml_btrace_conf_pt): Likewise.
12436         * memory-map.c (memory_map_start_memory): Likewise.
12437         (memory_map_start_property): Likewise.
12438         * osdata.c (osdata_start_osdata): Likewise.
12439         (osdata_start_item): Likewise.
12440         (osdata_start_column): Likewise.
12441         * remote.c (start_thread): Likewise.
12442         * solib-aix.c (library_list_start_library): Likewise.
12443         (library_list_start_list): Likewise.
12444         * solib-svr4.c (library_list_start_library): Likewise.
12445         (svr4_library_list_start_list): Likewise.
12446         * solib-target.c (library_list_start_segment): Likewise.
12447         (library_list_start_section): Likewise.
12448         (library_list_start_library): Likewise.
12449         (library_list_start_list): Likewise.
12450         * tracepoint.c (traceframe_info_start_memory): Likewise.
12451         (traceframe_info_start_tvar): Likewise.
12452         * xml-syscall.c (syscall_start_syscall): Likewise.
12453         * xml-tdesc.c (tdesc_start_target): Likewise.
12454         (tdesc_start_feature): Likewise.
12455         (tdesc_start_reg): Likewise.
12456         (tdesc_start_union): Likewise.
12457         (tdesc_start_struct): Likewise.
12458         (tdesc_start_flags): Likewise.
12459         (tdesc_start_enum): Likewise.
12460         (tdesc_start_field): Likewise.
12461         (tdesc_start_enum_value): Likewise.
12462         (tdesc_start_vector): Likewise.
12463
12464 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12465
12466         * extension.h (struct xmethod_worker) <clone>: Remove.
12467         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12468         Remove.
12469         (python_xmethod_worker::clone): Remove.
12470         * valops.c (find_overload_match): Use std::move instead of
12471         clone.
12472
12473 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12474
12475         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12476         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12477         <free_xmethod_worker_data>: Remove.
12478         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12479         <get_xmethod_arg_types>: Remove.
12480         <get_xmethod_result_type>: Remove.
12481         <invoke_xmethod>: Remove.
12482         * extension.c (new_xmethod_worker): Remove.
12483         (clone_xmethod_worker): Remove.
12484         (get_matching_xmethod_workers): Return void, pass std::vector by
12485         pointer.
12486         (get_xmethod_arg_types): Rename to...
12487         (xmethod_worker::get_arg_types): ... this, and adjust.
12488         (get_xmethod_result_type): Rename to...
12489         (xmethod_worker::get_result_type): ... this, and adjust.
12490         (invoke_xmethod): Remove.
12491         (free_xmethod_worker): Remove.
12492         (free_xmethod_worker_vec): Remove.
12493         * extension.h (enum ext_lang_rc): Move here from
12494         extension-priv.h.
12495         (struct xmethod_worker): Add constructor and destructor.
12496         <data>: Remove.
12497         <value>: Remove.
12498         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12499         virtual pure methods.
12500         <get_arg_types, get_result_type>: New methods.
12501         (xmethod_worker_ptr): Remove typedef.
12502         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12503         (xmethod_worker_vec): Remove typedef.
12504         (xmethod_worker_up): New typedef.
12505         (invoke_xmethod): Remove.
12506         (clone_xmethod_worker): Remove.
12507         (free_xmethod_worker): Remove.
12508         (free_xmethod_worker_vec): Remove.
12509         (get_xmethod_arg_types): Remove.
12510         (get_xmethod_result_type): Remove.
12511         * valops.c (find_method_list): Use std::vector, don't use
12512         intermediate vector.
12513         (value_find_oload_method_list): Use std::vector.
12514         (find_overload_match): Use std::vector.
12515         (find_oload_champ): Use std::vector.
12516         * value.c (value_free): Use operator delete.
12517         (value_of_xmethod): Rename to...
12518         (value_from_xmethod): ... this.  Don't assign
12519         xmethod_worker::value, take rvalue-reference.
12520         (result_type_of_xmethod): Adjust.
12521         (call_xmethod): Adjust.
12522         * value.h: Include extension.h.
12523         (struct xmethod_worker): Don't forward-declare.
12524         (value_of_xmethod): Rename to...
12525         (value_from_xmethod): ... this, take rvalue-reference.
12526         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12527         (struct python_xmethod_worker): ... this, add constructor and
12528         destructor.
12529         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12530         (gdbpy_free_xmethod_worker_data): Rename to...
12531         (python_xmethod_worker::~python_xmethod_worker): ... this and
12532         adjust.
12533         (gdbpy_clone_xmethod_worker_data): Rename to...
12534         (python_xmethod_worker::clone): ... this and adjust.
12535         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12536         temporary vector.
12537         (gdbpy_get_xmethod_arg_types): Rename to...
12538         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12539         (gdbpy_get_xmethod_result_type): Rename to...
12540         (python_xmethod_worker::do_get_result_type): ... this and
12541         adjust.
12542         (gdbpy_invoke_xmethod): Rename to...
12543         (python_xmethod_worker::invoke): ... this and adjust.
12544         (new_python_xmethod_worker): Rename to...
12545         (python_xmethod_worker::python_xmethod_worker): ... this and
12546         adjust.
12547         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12548         Remove.
12549         (gdbpy_free_xmethod_worker_data): Remove.
12550         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12551         (gdbpy_get_xmethod_arg_types): Remove.
12552         (gdbpy_get_xmethod_result_type): Remove.
12553         (gdbpy_invoke_xmethod): Remove.
12554         * python/python.c (python_extension_ops): Remove obsolete
12555         callbacks.
12556
12557 2018-01-05  Pedro Alves  <palves@redhat.com>
12558
12559         PR gdb/18653
12560         * common/signals-state-save-restore.c
12561         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12562         find a custom handler preinstalled, instead of internal erroring.
12563         But only warn if !quiet.
12564         * common/signals-state-save-restore.h
12565         (save_original_signals_state): New parameter 'quiet'.
12566         * main.c (captured_main_1): Move save_original_signals_state call
12567         after option handling, and pass QUIET.
12568
12569 2018-01-05  Pedro Alves  <palves@redhat.com>
12570
12571         * spu-tdep.c (spu_catch_start): Pass
12572         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12573
12574 2018-01-05  Pedro Alves  <palves@redhat.com>
12575
12576         PR gdb/22670
12577         * ada-lang.c (literal_symbol_name_matcher): New function.
12578         (ada_get_symbol_name_matcher): Use it for
12579         symbol_name_match_type::SEARCH_NAME.
12580         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12581         it down instead of assuming symbol_name_match_type::FULL.
12582         * block.h (block_lookup_symbol): New parameter 'match_type'.
12583         * c-valprint.c (print_unpacked_pointer): Use
12584         lookup_symbol_search_name instead of lookup_symbol.
12585         * compile/compile-object-load.c (get_out_value_type): Pass down
12586         symbol_name_match_type::SEARCH_NAME.
12587         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12588         symbol_name_match_type::FULL.
12589         * cp-support.c (cp_get_symbol_name_matcher): Handle
12590         symbol_name_match_type::SEARCH_NAME.
12591         * infrun.c (insert_exception_resume_breakpoint): Use
12592         lookup_symbol_search_name.
12593         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12594         * psymtab.c (maintenance_check_psymtabs): Use
12595         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12596         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12597         SYMBOL_SEARCH_NAME.
12598         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12599         if symbol_name_match_type::SEARCH_NAME.
12600         (lookup_symbol_in_language): Pass down
12601         symbol_name_match_type::FULL.
12602         (lookup_symbol_search_name): New.
12603         (lookup_language_this): Pass down
12604         symbol_name_match_type::SEARCH_NAME.
12605         (lookup_symbol_aux, lookup_local_symbol): New parameter
12606         'match_type'.  Pass it down.
12607         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12608         (lookup_symbol_search_name): New declaration.
12609         (lookup_symbol_in_block): New 'match_type' parameter.
12610
12611 2018-01-05  Pedro Alves  <palves@redhat.com>
12612
12613         PR gdb/22670
12614         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12615         ada_lookup_symbol.
12616         (ada_lookup_symbol): Reimplement in terms of
12617         ada_lookup_symbol_list, bits factored out from
12618         ada_lookup_encoded_symbol.
12619
12620 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12621
12622         * ada-exp.y (write_object_renaming): When subscripting an array
12623         using a symbol as the index, pass the block in call to
12624         ada_lookup_encoded_symbol when looking that symbol up.
12625
12626 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12627
12628         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12629         TYPE_INDEX_TYPE.
12630
12631 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12632
12633         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12634         the case where VALUE_LVAL (val0) is not lval_memory.
12635
12636 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12637
12638         * ada-valprint.c (print_optional_low_bound): Handle
12639         character-indexed array printing like boolean-indexed array
12640         printing.
12641
12642 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12643
12644         * NEWS: Create a new section for the next release branch.
12645         Rename the section of the current branch, now that it has
12646         been cut.
12647
12648 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12649
12650         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12651         * version.in: Bump version to 8.1.50.DATE-git.
12652
12653 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12654
12655         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12656         Add field.
12657         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12658         Add field.
12659         (default_exception_support_info) <catch_handlers_sym>: Add field.
12660         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12661         (ada_exception_name_addr_1): Add "catch handlers" handling.
12662         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12663         Update all callers.
12664         (create_excep_cond_exprs) <ex>: Add parameter.
12665         (re_set_exception): Update create_excep_cond_exprs call.
12666         (print_it_exception, print_one_exception, print_mention_exception)
12667         (print_recreate_exception): Add "catch handler" handling.
12668         (allocate_location_catch_handlers, re_set_catch_handlers)
12669         (check_status_catch_handlers, print_it_catch_handlers)
12670         (print_one_catch_handlers, print_mention_catch_handlers)
12671         (print_recreate_catch_handlers): New function.
12672         (catch_handlers_breakpoint_ops): New variable.
12673         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12674         Add parameter.  Add "catch handler" handling.
12675         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12676         Add "catch handler" handling.
12677         (ada_exception_catchpoint_cond_string): Add "catch handler"
12678         handling.
12679         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12680         call.
12681         (catch_ada_handlers_command): New function.
12682         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12683         operations structure.
12684         (_initialize_ada_language): Add "catch handlers" command entry.
12685         * NEWS: Document "catch handlers" feature.
12686
12687 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12688
12689         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12690         account when creating the array type of the slice.
12691         (ada_value_slice): Likewise.
12692
12693 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12694
12695         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12696         New enum value.
12697         (create_array_type_with_stride): Add byte_stride_prop parameter.
12698         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12699         New parameter.  Update all callers in this file.
12700         (array_type_has_dynamic_stride): New function.
12701         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12702         of arrays with dynamic byte strides.
12703         * dwarf2read.c (read_array_type): Add support for dynamic
12704         DW_AT_byte_stride attributes.
12705
12706 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12707
12708         * dwarf2read.c (read_unspecified_type): Treat
12709         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12710
12711 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12712
12713         Update copyright year range in all GDB files.
12714
12715 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12716
12717         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12718         and gdb/testsuite/gdb.base/step-line.c.
12719
12720 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12721
12722         * copyright.py (main): Dump the contents of
12723         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12724         even if BY_HAND is empty.
12725
12726 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12727
12728         * top.c (print_gdb_version): Update Copyright year in version
12729         message.
12730
12731 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12732
12733         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12734
12735 For older changes see ChangeLog-2017.
12736 \f
12737 Local Variables:
12738 mode: change-log
12739 left-margin: 8
12740 fill-column: 74
12741 version-control: never
12742 coding: utf-8
12743 End: