gdb/riscv: Fix an ARI warning
[external/binutils.git] / gdb / ChangeLog
1 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2
3         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4         line with '+'.
5
6 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
7
8         * riscv-tdep.c: Add 'prologue-value.h' include.
9         (struct riscv_unwind_cache): New struct.
10         (riscv_debug_unwinder): New global.
11         (riscv_scan_prologue): Update arguments, capture register details
12         from prologue scan.
13         (riscv_skip_prologue): Reformat arguments line, move end of
14         prologue calculation into riscv_scan_prologue.
15         (riscv_frame_cache): Update return type, create
16         riscv_unwind_cache, scan the prologue, and fill in remaining cache
17         details.
18         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
19         (riscv_frame_prev_register): Use the trad_frame within the
20         riscv_unwind_cache.
21         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
22         flag.
23
24 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
25
26         * trad-frame.h (trad_frame_set_realreg): Declare.
27         (trad_frame_set_addr): Declare.
28         * trad-frame.c (trad_frame_set_realreg): Define new function.
29         (trad_frame_set_addr): Define new function.
30         (trad_frame_set_reg_realreg): Use new function.
31         (trad_frame_set_reg_addr): Use new function.
32
33 2018-09-01  Keith Seitz  <keiths@redhat.com>
34
35         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
36         pulongest instead of "%lld".
37         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
38         ATTRIBUTE_UNUSED.
39
40 2018-08-31  Tom Tromey  <tom@tromey.com>
41
42         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
43         variant part type.
44
45 2018-08-31  Pedro Alves  <palves@redhat.com>
46
47         * gdbarch.h: Regenerate.
48
49 2018-08-31  Pedro Alves  <palves@redhat.com>
50
51         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
52         * target.h (Hardware watchpoint interfaces): Describe
53         continuable/steppable/non-steppable watchpoints.
54         * gdbarch.h, gdbarch.c: Regenerate.
55
56 2018-08-31  Pedro Alves  <palves@redhat.com>
57
58         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
59         Delete.
60         * s390-linux-nat.c
61         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
62         * target.h (target_ops::have_continuable_watchpoint): Delete.
63         (target_have_continuable_watchpoint): Delete.
64         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
65         * target-delegates.c: Regenerate.
66
67 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
68
69         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
70         the files present in "gnulib/import/m4/".
71
72 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
73
74         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
75         c.sw, c.swsp, and c.sdsp.
76
77 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
78
79         * riscv-tdep.c (struct riscv_inferior_data): Delete.
80         (riscv_read_misa_reg): Don't cache value read into inferior data.
81         (riscv_new_inferior_data): Delete.
82         (riscv_inferior_data_cleanup): Delete.
83         (riscv_inferior_data): Delete.
84         (riscv_invalidate_inferior_data): Delete.
85         (_initialize_riscv_tdep): Remove initialisation of inferior data.
86
87 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
88
89         * compile/compile-cplus-types.c
90         (compile_cplus_instance::leave_scope): Take the address of scope
91         object.
92         (compile_cplus_instance::convert_qualified_base): Compare quals
93         to 0.
94
95 2018-08-30  Keith Seitz  <keiths@redhat.com>
96
97         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
98         Use "%s" and host_address_to_string instead of "%p" in printf.
99
100 2018-08-29  Keith Seitz  <keiths@redhat.com>
101
102         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
103         and compile-cplus-types.c.
104         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
105         * c-lang.c (cplus_language_defn): Set C++ compile functions.
106         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
107         Declare.
108         * compile/compile-c-support.c: Include compile-cplus.h.
109         (load_libcompile): Templatize.
110         (get_compile_context): "New" function.
111         (c_get_compile_context): Use get_compile_context.
112         (cplus_get_compile_context): New function.
113         (cplus_push_user_expression, cplus_pop_user_expression)
114         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
115         (cplus_compute_program): Define new structs/functions.
116         * compile/compile-cplus-symmbols.c: New file.
117         * compile/compile-cplus-types.c: New file.
118         * compile/compile-cplus.h: New file.
119         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
120         Declare.
121         * compile/compile-object-load.c (get_out_value_type): Use
122         strncmp_iw when comparing symbol names.
123         (compile_object_load): Add mst_bss and mst_data.
124         * compile/compile.c (_initialize_compile): Remove
125         -Wno-implicit-function-declaration from `compile_args'.
126         * compile/gcc-cp-plugin.h: New file.
127         * NEWS: Mention C++ compile support and new debug options.
128
129 2018-08-29  Keith Seitz  <keiths@redhat.com>
130
131         * linespec.c (collect_info::add_symbol): Make virtual.
132         (struct symbol_searcher_collect_info): New struct.
133         (symbol_searcher::find_all_symbols): New method.
134         * symtab.h (class symbol_searcher): New class.
135
136 2018-08-29  Keith Seitz  <keiths@redhat.com>
137
138         * linespec.c (struct linespec) <function_symbols, label_symbols>:
139         Change to vector of block_symbol.  Update all users.
140         (struct collect_info) <symbols>: Likewise.
141         (collect_info::add_symbol): Take block_symbol as argument.
142         Update all callers.
143         (decode_compound_collector) <m_symbols>: Change type to vector
144         of block_symbol.  Update all users.
145         (decode_compound_collector::operator ()): Change parameter type
146         to block_symbol.
147         (find_method, find_function_symbols, find_linespec_symbols)
148         (find_label_symbols_in_block, find_label_symbols): Change symbol
149         vectors to block_symbol vectors.
150         * symtab.h (symbol_found_callback_ftype): Change parameter type to
151         block_symbol.
152
153 2018-08-29  Keith Seitz  <keiths@redhat.com>
154
155         * linespec.c (symbolp): Remove typedef and VEC definitions.
156         (bound_minimal_symbol_d): Likewise.
157
158 2018-08-29  Keith Seitz  <keiths@redhat.com>
159
160         * linespec.c (decode_compound_collector::decode_compound_collector):
161         Remove initialization for `m_symtabs'.
162         (decode_compound_collector::release_symbols): Change return type
163         to std::vector.  Update all callers.
164         (class decode_compound_collector) <m_symbols>: Change type to
165         std::vector.
166         (lookup_prefix_sym): Change return type to std::vector.  Update all
167         callers.
168         (compare_symbols): Remove.
169         (std_compare_symbols): Rename to `compare_symbols'.
170         (find_method): Change `sym_classes' parameter to std::vector.
171         Update all callers.  Use std::sort to sort sym_classes.
172         (find_linespec_symbols): Remove cleanup.
173
174 2018-08-29  Keith Seitz  <keiths@redhat.com>
175
176         * linespec.c (struct linespec) <minimal_symbols>: Change type to
177         std::vector.  Update all users.
178         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
179         (struct collect_info) <minimal_symbols>: Likewise.
180         (compare_msymbols): Return bool.  Change parameters to const
181         bound_minimal_symbol references.
182         (find_method, find_function_symbols, find_linespec_symbols): Change
183         `minsyms' parameter to std::vector.  Update all callers.
184
185 2018-08-29  Keith Seitz  <keiths@redhat.com>
186
187         * linespec.c (struct linespec) <label_symbols>: Change type to
188         std::vector.  Update all users.
189         (find_label_symbols_in_block): Change `result' parameter to
190         std::vector.  Update all callers.
191         (find_label_symbols): Return std::vector.  Update all callers.
192
193 2018-08-29  Keith Seitz  <keiths@redhat.com>
194
195         * linespec.c (struct linespec) <function_symbols>: Change type to
196         std::vector.  Update all users.
197         (struct collect_info) <function_symbols>: Likewise.
198         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
199         (std_compare_symbols): New function.
200         (find_method, find_function_symbols, find_linespec_symbols)
201         (find_label_symbols_in_block): Change `symbols' parameter to
202         std::vector.  Update all callers.
203         (find_label_symbols): Likewise for `function_symbols' and
204         `label_funcs_ret'.
205
206 2018-08-29  Keith Seitz  <keiths@redhat.com>
207
208         * linespec.c (symtab_vector_up): Define.
209         (struct linespec) <file_symtabs>: Change type to std::vector *.
210         Update all uses.
211         (struct collect_info) <file_symtabs>: Likewise.
212         (collect_symtabs_from_filename): Return symtab_vector_up.
213         Update all callers.
214         (decode_objc): Remove cleanup.
215         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
216         (symtab_collector::release_symtabs): Return symtab_vector_up.
217         Update all callers.
218         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
219         Update all users.
220         (collect_symtabs_from_filename, symtabs_from_filename): Return
221         symtab_vector_up.  Update all callers.
222
223 2018-08-29  Tom Tromey  <tom@tromey.com>
224
225         * csky-tdep.c (csky_analyze_prologue): Use
226         core_addr_to_string_nz.
227
228 2018-08-29  Tom Tromey  <tom@tromey.com>
229
230         * windows-nat.c (struct xlate_exception) <them>: Change type to
231         DWORD.
232         (xlate): Fix formatting.  Remove last entry.
233         (struct xlate_exception, xlate): Comment out.
234         (windows_nat_target::resume): Use ranged for.
235
236 2018-08-29  Jim Wilson  <jimw@sifive.com>
237
238         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
239         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
240         of NT_PRFPREG.
241         (riscv_linux_nat_target::store_registers): Likewise.
242
243 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
244
245         PR gdb/23555
246         PR gdb/23558
247         * gnulib/aclocal.m4: Regenerate.
248         * gnulib/config.in: Regenerate.
249         * gnulib/configure: Regenerate.
250         * gnulib/import/Makefile.am: Update.
251         * gnulib/import/Makefile.in: Update.
252         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
253         * gnulib/import/_Noreturn.h: ... this.
254         * gnulib/import/alloca.in.h: Update.
255         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
256         * gnulib/import/arg-nonnull.h: ... this.
257         * gnulib/import/assure.h: Update.
258         * gnulib/import/at-func.c: Update.
259         * gnulib/import/basename-lgpl.c: Update.
260         * gnulib/import/extra/snippet/c++defs.h: Rename to...
261         * gnulib/import/c++defs.h: ... this.
262         * gnulib/import/canonicalize-lgpl.c: Update.
263         * gnulib/import/cdefs.h: Update.
264         * gnulib/import/chdir-long.c: Update.
265         * gnulib/import/chdir-long.h: Update.
266         * gnulib/import/cloexec.c: Update.
267         * gnulib/import/cloexec.h: Update.
268         * gnulib/import/close.c: Update.
269         * gnulib/import/closedir.c: Update.
270         * gnulib/import/config.charset: Update.
271         * gnulib/import/dirent-private.h: Update.
272         * gnulib/import/dirent.in.h: Update.
273         * gnulib/import/dirfd.c: Update.
274         * gnulib/import/dirname-lgpl.c: Update.
275         * gnulib/import/dirname.h: Update.
276         * gnulib/import/dosname.h: Update.
277         * gnulib/import/dup-safer-flag.c: Update.
278         * gnulib/import/dup-safer.c: Update.
279         * gnulib/import/dup.c: Update.
280         * gnulib/import/dup2.c: Update.
281         * gnulib/import/errno.in.h: Update.
282         * gnulib/import/error.c: Update.
283         * gnulib/import/error.h: Update.
284         * gnulib/import/exitfail.c: Update.
285         * gnulib/import/exitfail.h: Update.
286         * gnulib/import/extra/update-copyright: Update.
287         * gnulib/import/fchdir.c: Update.
288         * gnulib/import/fcntl.c: Update.
289         * gnulib/import/fcntl.in.h: Update.
290         * gnulib/import/fd-hook.c: Update.
291         * gnulib/import/fd-hook.h: Update.
292         * gnulib/import/fd-safer-flag.c: Update.
293         * gnulib/import/fd-safer.c: Update.
294         * gnulib/import/fdopendir.c: Update.
295         * gnulib/import/filename.h: Update.
296         * gnulib/import/filenamecat-lgpl.c: Update.
297         * gnulib/import/filenamecat.h: Update.
298         * gnulib/import/flexmember.h: Update.
299         * gnulib/import/float+.h: Update.
300         * gnulib/import/float.c: Update.
301         * gnulib/import/float.in.h: Update.
302         * gnulib/import/fnmatch.c: Update.
303         * gnulib/import/fnmatch.in.h: Update.
304         * gnulib/import/fnmatch_loop.c: Update.
305         * gnulib/import/fpucw.h: Update.
306         * gnulib/import/frexp.c: Update.
307         * gnulib/import/frexpl.c: Update.
308         * gnulib/import/fstat.c: Update.
309         * gnulib/import/fstatat.c: Update.
310         * gnulib/import/getcwd-lgpl.c: Update.
311         * gnulib/import/getcwd.c: Update.
312         * gnulib/import/getdtablesize.c: Update.
313         * gnulib/import/getlogin_r.c: Update.
314         * gnulib/import/getprogname.c: Update.
315         * gnulib/import/getprogname.h: Update.
316         * gnulib/import/gettext.h: Update.
317         * gnulib/import/gettimeofday.c: Update.
318         * gnulib/import/glob-libc.h: Update.
319         * gnulib/import/glob.c: Update.
320         * gnulib/import/glob.in.h: Update.
321         * gnulib/import/glob_internal.h: Update.
322         * gnulib/import/glob_pattern_p.c: Update.
323         * gnulib/import/globfree.c: Update.
324         * gnulib/import/hard-locale.c: Update.
325         * gnulib/import/hard-locale.h: Update.
326         * gnulib/import/intprops.h: Update.
327         * gnulib/import/inttypes.in.h: Update.
328         * gnulib/import/isnan.c: Update.
329         * gnulib/import/isnand-nolibm.h: Update.
330         * gnulib/import/isnand.c: Update.
331         * gnulib/import/isnanl-nolibm.h: Update.
332         * gnulib/import/isnanl.c: Update.
333         * gnulib/import/itold.c: Update.
334         * gnulib/import/libc-config.h: Update.
335         * gnulib/import/limits.in.h: Update.
336         * gnulib/import/localcharset.c: Update.
337         * gnulib/import/localcharset.h: Update.
338         * gnulib/import/localtime-buffer.c: Update.
339         * gnulib/import/localtime-buffer.h: Update.
340         * gnulib/import/lstat.c: Update.
341         * gnulib/import/m4/00gnulib.m4: Update.
342         * gnulib/import/m4/__inline.m4: Update.
343         * gnulib/import/m4/absolute-header.m4: Update.
344         * gnulib/import/m4/alloca.m4: Update.
345         * gnulib/import/m4/builtin-expect.m4: Update.
346         * gnulib/import/m4/canonicalize.m4: Update.
347         * gnulib/import/m4/chdir-long.m4: Update.
348         * gnulib/import/m4/close.m4: Update.
349         * gnulib/import/m4/closedir.m4: Update.
350         * gnulib/import/m4/configmake.m4: Update.
351         * gnulib/import/m4/d-ino.m4: Update.
352         * gnulib/import/m4/d-type.m4: Update.
353         * gnulib/import/m4/dirent_h.m4: Update.
354         * gnulib/import/m4/dirfd.m4: Update.
355         * gnulib/import/m4/dirname.m4: Update.
356         * gnulib/import/m4/double-slash-root.m4: Update.
357         * gnulib/import/m4/dup.m4: Update.
358         * gnulib/import/m4/dup2.m4: Update.
359         * gnulib/import/m4/eealloc.m4: Update.
360         * gnulib/import/m4/environ.m4: Update.
361         * gnulib/import/m4/errno_h.m4: Update.
362         * gnulib/import/m4/error.m4: Update.
363         * gnulib/import/m4/exponentd.m4: Update.
364         * gnulib/import/m4/exponentl.m4: Update.
365         * gnulib/import/m4/extensions.m4: Update.
366         * gnulib/import/m4/extern-inline.m4: Update.
367         * gnulib/import/m4/fchdir.m4: Update.
368         * gnulib/import/m4/fcntl-o.m4: Update.
369         * gnulib/import/m4/fcntl.m4: Update.
370         * gnulib/import/m4/fcntl_h.m4: Update.
371         * gnulib/import/m4/fdopendir.m4: Update.
372         * gnulib/import/m4/filenamecat.m4: Update.
373         * gnulib/import/m4/flexmember.m4: Update.
374         * gnulib/import/m4/float_h.m4: Update.
375         * gnulib/import/m4/fnmatch.m4: Update.
376         * gnulib/import/m4/fnmatch_h.m4: Update.
377         * gnulib/import/m4/fpieee.m4: Update.
378         * gnulib/import/m4/frexp.m4: Update.
379         * gnulib/import/m4/frexpl.m4: Update.
380         * gnulib/import/m4/fstat.m4: Update.
381         * gnulib/import/m4/fstatat.m4: Update.
382         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
383         * gnulib/import/m4/getcwd-path-max.m4: Update.
384         * gnulib/import/m4/getcwd.m4: Update.
385         * gnulib/import/m4/getdtablesize.m4: Update.
386         * gnulib/import/m4/getlogin.m4: Update.
387         * gnulib/import/m4/getlogin_r.m4: Update.
388         * gnulib/import/m4/getpagesize.m4: Update.
389         * gnulib/import/m4/getprogname.m4: Update.
390         * gnulib/import/m4/gettimeofday.m4: Update.
391         * gnulib/import/m4/glibc21.m4: Update.
392         * gnulib/import/m4/glob.m4: Update.
393         * gnulib/import/m4/glob_h.m4: Update.
394         * gnulib/import/m4/gnulib-cache.m4: Update.
395         * gnulib/import/m4/gnulib-common.m4: Update.
396         * gnulib/import/m4/gnulib-comp.m4: Update.
397         * gnulib/import/m4/gnulib-tool.m4: Update.
398         * gnulib/import/m4/hard-locale.m4: Update.
399         * gnulib/import/m4/include_next.m4: Update.
400         * gnulib/import/m4/inttypes-pri.m4: Update.
401         * gnulib/import/m4/inttypes.m4: Update.
402         * gnulib/import/m4/isnand.m4: Update.
403         * gnulib/import/m4/isnanl.m4: Update.
404         * gnulib/import/m4/largefile.m4: Update.
405         * gnulib/import/m4/limits-h.m4: Update.
406         * gnulib/import/m4/localcharset.m4: Update.
407         * gnulib/import/m4/locale-fr.m4: Update.
408         * gnulib/import/m4/locale-ja.m4: Update.
409         * gnulib/import/m4/locale-zh.m4: Update.
410         * gnulib/import/m4/localtime-buffer.m4: Update.
411         * gnulib/import/m4/longlong.m4: Update.
412         * gnulib/import/m4/lstat.m4: Update.
413         * gnulib/import/m4/malloc.m4: Update.
414         * gnulib/import/m4/malloca.m4: Update.
415         * gnulib/import/m4/math_h.m4: Update.
416         * gnulib/import/m4/mbrtowc.m4: Update.
417         * gnulib/import/m4/mbsinit.m4: Update.
418         * gnulib/import/m4/mbsrtowcs.m4: Update.
419         * gnulib/import/m4/mbstate_t.m4: Update.
420         * gnulib/import/m4/memchr.m4: Update.
421         * gnulib/import/m4/memmem.m4: Update.
422         * gnulib/import/m4/mempcpy.m4: Update.
423         * gnulib/import/m4/memrchr.m4: Update.
424         * gnulib/import/m4/mkdir.m4: Update.
425         * gnulib/import/m4/mkstemp.m4: Update.
426         * gnulib/import/m4/mmap-anon.m4: Update.
427         * gnulib/import/m4/mode_t.m4: Update.
428         * gnulib/import/m4/msvc-inval.m4: Update.
429         * gnulib/import/m4/msvc-nothrow.m4: Update.
430         * gnulib/import/m4/multiarch.m4: Update.
431         * gnulib/import/m4/nocrash.m4: Update.
432         * gnulib/import/m4/off_t.m4: Update.
433         * gnulib/import/m4/onceonly.m4: Update.
434         * gnulib/import/m4/open-cloexec.m4: Update.
435         * gnulib/import/m4/open.m4: Update.
436         * gnulib/import/m4/openat.m4: Update.
437         * gnulib/import/m4/opendir.m4: Update.
438         * gnulib/import/m4/pathmax.m4: Update.
439         * gnulib/import/m4/rawmemchr.m4: Update.
440         * gnulib/import/m4/readdir.m4: Update.
441         * gnulib/import/m4/readlink.m4: Update.
442         * gnulib/import/m4/realloc.m4: Update.
443         * gnulib/import/m4/rename.m4: Update.
444         * gnulib/import/m4/rewinddir.m4: Update.
445         * gnulib/import/m4/rmdir.m4: Update.
446         * gnulib/import/m4/save-cwd.m4: Update.
447         * gnulib/import/m4/secure_getenv.m4: Update.
448         * gnulib/import/m4/setenv.m4: Update.
449         * gnulib/import/m4/signal_h.m4: Update.
450         * gnulib/import/m4/ssize_t.m4: Update.
451         * gnulib/import/m4/stat-time.m4: Update.
452         * gnulib/import/m4/stat.m4: Update.
453         * gnulib/import/m4/std-gnu11.m4: Update.
454         * gnulib/import/m4/stdbool.m4: Update.
455         * gnulib/import/m4/stddef_h.m4: Update.
456         * gnulib/import/m4/stdint.m4: Update.
457         * gnulib/import/m4/stdio_h.m4: Update.
458         * gnulib/import/m4/stdlib_h.m4: Update.
459         * gnulib/import/m4/strchrnul.m4: Update.
460         * gnulib/import/m4/strdup.m4: Update.
461         * gnulib/import/m4/strerror.m4: Update.
462         * gnulib/import/m4/string_h.m4: Update.
463         * gnulib/import/m4/strstr.m4: Update.
464         * gnulib/import/m4/strtok_r.m4: Update.
465         * gnulib/import/m4/sys_socket_h.m4: Update.
466         * gnulib/import/m4/sys_stat_h.m4: Update.
467         * gnulib/import/m4/sys_time_h.m4: Update.
468         * gnulib/import/m4/sys_types_h.m4: Update.
469         * gnulib/import/m4/tempname.m4: Update.
470         * gnulib/import/m4/time_h.m4: Update.
471         * gnulib/import/m4/unistd-safer.m4: Update.
472         * gnulib/import/m4/unistd_h.m4: Update.
473         * gnulib/import/m4/warn-on-use.m4: Update.
474         * gnulib/import/m4/wchar_h.m4: Update.
475         * gnulib/import/m4/wchar_t.m4: Update.
476         * gnulib/import/m4/wctype_h.m4: Update.
477         * gnulib/import/m4/wint_t.m4: Update.
478         * gnulib/import/malloc.c: Update.
479         * gnulib/import/malloc/scratch_buffer.h: Update.
480         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
481         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
482         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
483         * gnulib/import/malloca.c: Update.
484         * gnulib/import/malloca.h: Update.
485         * gnulib/import/malloca.valgrind: Update.
486         * gnulib/import/math.in.h: Update.
487         * gnulib/import/mbrtowc.c: Update.
488         * gnulib/import/mbsinit.c: Update.
489         * gnulib/import/mbsrtowcs-impl.h: Update.
490         * gnulib/import/mbsrtowcs-state.c: Update.
491         * gnulib/import/mbsrtowcs.c: Update.
492         * gnulib/import/memchr.c: Update.
493         * gnulib/import/memmem.c: Update.
494         * gnulib/import/mempcpy.c: Update.
495         * gnulib/import/memrchr.c: Update.
496         * gnulib/import/mkdir.c: Update.
497         * gnulib/import/mkstemp.c: Update.
498         * gnulib/import/msvc-inval.c: Update.
499         * gnulib/import/msvc-inval.h: Update.
500         * gnulib/import/msvc-nothrow.c: Update.
501         * gnulib/import/msvc-nothrow.h: Update.
502         * gnulib/import/open.c: Update.
503         * gnulib/import/openat-die.c: Update.
504         * gnulib/import/openat-priv.h: Update.
505         * gnulib/import/openat-proc.c: Update.
506         * gnulib/import/openat.c: Update.
507         * gnulib/import/openat.h: Update.
508         * gnulib/import/opendir.c: Update.
509         * gnulib/import/pathmax.h: Update.
510         * gnulib/import/pipe-safer.c: Update.
511         * gnulib/import/rawmemchr.c: Update.
512         * gnulib/import/readdir.c: Update.
513         * gnulib/import/readlink.c: Update.
514         * gnulib/import/realloc.c: Update.
515         * gnulib/import/ref-add.sin: Update.
516         * gnulib/import/ref-del.sin: Update.
517         * gnulib/import/rename.c: Update.
518         * gnulib/import/rewinddir.c: Update.
519         * gnulib/import/rmdir.c: Update.
520         * gnulib/import/same-inode.h: Update.
521         * gnulib/import/save-cwd.c: Update.
522         * gnulib/import/save-cwd.h: Update.
523         * gnulib/import/scratch_buffer.h: Update.
524         * gnulib/import/secure_getenv.c: Update.
525         * gnulib/import/setenv.c: Update.
526         * gnulib/import/signal.in.h: Update.
527         * gnulib/import/stat-time.c: Update.
528         * gnulib/import/stat-time.h: Update.
529         * gnulib/import/stat-w32.c: Update.
530         * gnulib/import/stat-w32.h: Update.
531         * gnulib/import/stat.c: Update.
532         * gnulib/import/stdbool.in.h: Update.
533         * gnulib/import/stddef.in.h: Update.
534         * gnulib/import/stdint.in.h: Update.
535         * gnulib/import/stdio.in.h: Update.
536         * gnulib/import/stdlib.in.h: Update.
537         * gnulib/import/str-two-way.h: Update.
538         * gnulib/import/strchrnul.c: Update.
539         * gnulib/import/strdup.c: Update.
540         * gnulib/import/streq.h: Update.
541         * gnulib/import/strerror-override.c: Update.
542         * gnulib/import/strerror-override.h: Update.
543         * gnulib/import/strerror.c: Update.
544         * gnulib/import/string.in.h: Update.
545         * gnulib/import/stripslash.c: Update.
546         * gnulib/import/strnlen1.c: Update.
547         * gnulib/import/strnlen1.h: Update.
548         * gnulib/import/strstr.c: Update.
549         * gnulib/import/strtok_r.c: Update.
550         * gnulib/import/sys_stat.in.h: Update.
551         * gnulib/import/sys_time.in.h: Update.
552         * gnulib/import/sys_types.in.h: Update.
553         * gnulib/import/tempname.c: Update.
554         * gnulib/import/tempname.h: Update.
555         * gnulib/import/time.in.h: Update.
556         * gnulib/import/unistd--.h: Update.
557         * gnulib/import/unistd-safer.h: Update.
558         * gnulib/import/unistd.in.h: Update.
559         * gnulib/import/unsetenv.c: Update.
560         * gnulib/import/verify.h: Update.
561         * gnulib/import/extra/snippet/warn-on-use.h: Update.
562         * gnulib/import/wchar.in.h: Update.
563         * gnulib/import/wctype.in.h: Update.
564         * gnulib/import/xalloc-oversized.h: Update.
565         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
566         "53e2c179f26a890fa6685af4b6c1397ee370433b".
567
568 2018-08-16  Gary Benson <gbenson@redhat.com>
569
570         PR gdb/13000:
571         * gdb/main.c (captured_main_1): Exit with nonzero status
572         in batch mode if the last command to be executed failed.
573         * NEWS: Mention the above.
574
575 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
576
577         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
578         end of warning message.
579
580 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
581
582         PR gdb/22943:
583         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
584         (aarch64_extract_return_value): Use
585         aapcs_is_vfp_call_or_return_candidate.
586         (aarch64_return_in_memory): Likewise.
587         (aarch64_store_return_value): Likewise.
588
589 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
590
591         * aarch64-tdep.c
592         (aapcs_is_vfp_call_or_return_candidate): Make static
593         (pass_in_v_or_stack): Remove function.
594         (pass_in_v_vfp_candidate): New function.
595         (aarch64_push_dummy_call): Check for float register candidates.
596
597 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
598
599         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
600         (aapcs_is_vfp_call_or_return_candidate_1): New function.
601         (aapcs_is_vfp_call_or_return_candidate): Likewise.
602
603 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
604
605         PR build/23399
606         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
607         (struct ipa_sym_addresses): Rename to...
608         (struct ipa_sym_addresses_common): ... this.
609         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
610
611 2018-08-28  Tom Tromey  <tom@tromey.com>
612
613         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
614         (token_fifo): Now a std::vector.
615         (yylex, c_parse): Update.
616         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
617         (token_fifo): Now a std::vector.
618         (yylex, d_parse): Update.
619         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
620         (token_fifo): Now a std::vector.
621         (yylex, go_parse): Update.
622
623 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
624
625         * parser-defs.h (struct type_stack) <elements>: Change type to
626         std::vector<union type_stack_elt>.
627         <depth, size>: Remove.
628         * parse.c (parse_exp_in_context_1): Adjust.
629         (type_stack_reserve): Remove.
630         (check_type_stack_depth): Remove.
631         (insert_into_type_stack): Adjust to std::vector.
632         (insert_type): Likewise.
633         (push_type): Likewise.
634         (push_type_int): Likewise.
635         (insert_type_address_space): Likewise.
636         (pop_type): Likewise.
637         (pop_type_int): Likewise.
638         (pop_typelist): Likewise.
639         (pop_type_stack): Likewise.
640         (append_type_stack): Likewise.
641         (push_type_stack): Likewise.
642         (get_type_stack): Likewise.
643         (type_stack_cleanup): Likewise.
644         (push_typelist): Likewise.
645         (follow_types): Likewise.
646         (_initialize_parse): Likewise.
647
648 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
649
650         * NEWS: Mention csky target.
651
652 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
653             Hafiz Abid Qadeer  <abidh@codesourcery.com>
654             Don Breazeal  <donb@codesourcery.com>
655
656         * csky-linux-tdep.c: New file.
657         * csky-tdep.c: Likewise.
658         * csky-tdep.h: Likewise.
659         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
660         csky-tdep.o.
661         (HFILES_NO_SRCDIR): Add csky-tdep.h.
662         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
663         * configure.tgt: Add csky support.
664
665 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
666
667         * python/py-framefilter.c (py_print_frame): Print frame architecture
668         when printing on an MI output.
669
670 2018-08-27  Tom Tromey  <tom@tromey.com>
671
672         PR build/23087:
673         * configure: Rebuild.
674         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
675
676 2018-08-27  Tom Tromey  <tom@tromey.com>
677
678         * aarch64-linux-tdep.c
679         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
680         casts to int.
681
682 2018-08-27  Tom Tromey  <tom@tromey.com>
683
684         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
685         unsigned.
686         (ppc64_standard_linkage1, ppc64_standard_linkage2)
687         (ppc64_standard_linkage3, ppc64_standard_linkage4)
688         (ppc64_standard_linkage5, ppc64_standard_linkage6)
689         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
690         unsigned.
691
692 2018-08-27  Tom Tromey  <tom@tromey.com>
693
694         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
695         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
696
697 2018-08-27  Tom Tromey  <tom@tromey.com>
698
699         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
700         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
701         ULONGEST_MAX.
702         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
703         ULONGEST_MAX.
704         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
705         ULONGEST_MAX.
706         * sparc-linux-tdep.c (sparc32_linux_sigframe)
707         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
708         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
709         ULONGEST_MAX.
710         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
711         (ppc64_linux_sigaction_tramp_frame)
712         (ppc32_linux_sighandler_tramp_frame)
713         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
714         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
715         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
716         * mn10300-linux-tdep.c (am33_linux_sigframe)
717         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
718         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
719         * mips-linux-tdep.c (mips_linux_o32_sigframe)
720         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
721         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
722         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
723         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
724         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
725         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
726         * microblaze-linux-tdep.c
727         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
728         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
729         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
730         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
731         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
732         * common/common-types.h (ULONGEST_MAX): New define.
733         (CORE_ADDR_MAX): Fix formatting.
734         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
735         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
736         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
737         (arm_linux_rt_sigreturn_tramp_frame)
738         (arm_eabi_linux_sigreturn_tramp_frame)
739         (arm_eabi_linux_rt_sigreturn_tramp_frame)
740         (thumb2_eabi_linux_sigreturn_tramp_frame)
741         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
742         (arm_linux_restart_syscall_tramp_frame)
743         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
744         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
745         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
746         ULONGEST_MAX.
747         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
748
749 2018-08-27  Tom Tromey  <tom@tromey.com>
750
751         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
752         CORE_ADDR_MAX.
753         * mips-tdep.c (mips_deal_with_atomic_sequence)
754         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
755         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
756         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
757         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
758         CORE_ADDR_MAX.
759         * aarch64-tdep.c (aarch64_software_single_step): Use
760         CORE_ADDR_MAX.
761
762 2018-08-27  Tom Tromey  <tom@tromey.com>
763
764         * linespec.c (complete_linespec_component): Add cast to "char".
765         * completer.c (completion_tracker::build_completion_result): Add
766         cast to "char".
767
768 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
769
770         * solist.h (struct solist, struct target_so_ops): Fix
771         indentation.
772
773 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
774
775         * ada-tasks.c (ada_task_info_s): Remove typedef.
776         (DEF_VEC_O(ada_task_info_s)): Remove.
777         (struct ada_tasks_inferior_data): Initialize fields.
778         <task_list>: Make an std::vector.
779         (get_ada_tasks_inferior_data): Allocate with new.
780         (ada_get_task_number): Adjust.
781         (get_task_number_from_id): Likewise.
782         (valid_task_id): Likewise.
783         (ada_get_task_info_from_ptid): Likewise.
784         (iterate_over_live_ada_tasks): Likewise.
785         (add_ada_task): Likewise.
786         (read_known_tasks): Likewise.
787         (ada_build_task_list): Likewise.
788         (print_ada_task_info): Likewise.
789         (info_task): Likewise.
790         (task_command_1): Likewise.
791
792 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
793
794         * ada-lang.c (add_angle_brackets): Return std::string.
795
796 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
797
798         * python/py-threadevent.c (py_get_event_thread): Initialize
799         pythread.
800
801 2018-08-24  Pedro Alves  <palves@redhat.com>
802
803         * python/py-bpevent.c (create_breakpoint_event_object): Use
804         copy-initialization.
805         * python/py-continueevent.c (emit_continue_event): Use
806         copy-initialization.
807         * python/py-exitedevent.c (create_exited_event_object): Return a
808         gdbpy_ref<>.
809         (emit_exited_event): Use copy-initialization.
810         * python/py-inferior.c (python_new_inferior)
811         (python_inferior_deleted, add_thread_object): Use
812         copy-initialization.
813         * python/py-infevents.c (create_inferior_call_event_object)
814         (create_register_changed_event_object)
815         (create_memory_changed_event_object): Return a gdbpy_ref<>.
816         (emit_inferior_call_event, emit_memory_changed_event)
817         (emit_register_changed_event): Use copy-initialization.
818         * python/py-newobjfileevent.c (create_new_objfile_event_object):
819         Return a gdbpy_ref<>.
820         (emit_new_objfile_event): Use copy-initialization.
821         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
822         (emit_clear_objfiles_event): Use copy-initialization.
823         * python/py-signalevent.c (create_signal_event_object): Use
824         copy-initialization.
825         * python/py-threadevent.c (create_thread_event_object): Use
826         copy-initialization.
827
828 2018-08-24  Pedro Alves  <palves@redhat.com>
829             Simon Marchi  <simon.marchi@ericsson.com>
830
831         PR gdb/23379
832         * python/py-continueevent.c: Include "gdbthread.h".
833         (create_continue_event_object): Add intro comment.  Add 'ptid'
834         parameter.  Use it to find thread to pass to
835         create_thread_event_object.
836         (emit_continue_event): Pass PTID down to
837         create_continue_event_object.
838         * python/py-event.h (py_get_event_thread): Declare.
839         (create_thread_event_object): Remove default from 'thread'
840         parameter.
841         * python/py-stopevent.c (create_stop_event_object): Use
842         py_get_event_thread.
843         * python/py-threadevent.c (get_event_thread): Rename to ...
844         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
845         and use it to find the thread.
846         (create_thread_event_object): Assert that THREAD isn't null.
847         Don't find the event thread here.
848
849 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
850
851         * block.h (blockrange, blockranges): New struct declarations.
852         (struct block): Add new field named `ranges'.
853         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
854         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
855         macros for accessing ranges in struct block.
856         (make_blockranges): New declaration.
857         block.c (make_blockranges): New function.
858         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
859         for block.
860         * symtab.h (find_pc_partial_function): Add new parameter `block'.
861         * blockframe.c (cache_pc_function_block): New static global.
862         (clear_pc_function_cache): Clear cache_pc_function_block.
863         (find_pc_partial_function): Move comment to symtab.h.  Add
864         support for non-contiguous blocks.
865         * cli/cli-cmds.c (block.h): Include.
866         (print_disassembly): Handle printing of non-contiguous blocks.
867         (disassemble_current_function): Likewise.
868         (disassemble_command): Likewise.
869
870         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
871         BLOCK_START.
872         * blockframe.c (get_pc_function_start): Likewise.
873         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
874         (gcc_symbol_address): Likewise.
875         * compile/compile-object-run.c (compile_object_run): Likewise.
876         * compile/compile.c (get_expr_block_and_pc): Likewise.
877         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
878         (func_addr_to_tail_call_list): Likewise.
879         * findvar.c (default_read_var_value): Likewise.
880         * inline-frame.c (inline_frame_this_id): Likewise.
881         (skip-inline_frames): Likewise.
882         * infcmd.c (until_next_command): Likewise.
883         * linespec.c (convert_linespec_to_sals): Likewise.
884         * parse.c (parse_exp_in_context_1): Likewise.
885         * printcmd.c (build_address_symbolic): likewise.
886         (info_address_command): Likewise.
887         symtab.c (find_function_start_sal): Likewise.
888         (skip_prologue_sal): Likewise.
889         (find_function_alias_target): Likewise.
890         (find_gnu_ifunc): Likewise.
891         * stack.c (find_frame_funname): Likewise.
892         * symtab.c (fixup_symbol_section): Likewise.
893         (find_function_start_sal): Likewise.
894         (skip_prologue_sal): Likewsie.
895         (find_function_alias_target): Likewise.
896         (find_gnu_ifunc): Likewise.
897         * tracepoint.c (info_scope_command): Likewise.
898         * value.c (value_fn_field): Likewise.
899
900         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
901         in place of find_pc_partial_function.
902         * blockframe.c (find_function_entry_range_from_pc): New function.
903         * symtab.h (find_function_entry_range_from_pc): Declare and document.
904         * objfiles.c (objfile_relocate1): Relocate start and end addresses
905         for each range in a block.
906
907
908 2018-08-23  Xavier Roirand  <roirand@adacore.com>
909
910         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
911         incrementation.
912
913 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
914
915         * solib-svr4.c (read_program_headers_from_bfd): Return
916         gdb::optional<gdb::byte_vector>.
917         (svr4_exec_displacement): Adjust.
918
919 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
920
921         * solib-svr4.c (read_program_header): Return
922         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
923         (find_program_interpreter): Return
924         gdb::optional<gdb::byte_vector>.
925         (scan_dyntag_auxv): Adjust.
926         (enable_break): Adjust.
927         (svr4_exec_displacement): Adjust.
928
929 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
930
931         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
932         * inf-child.c (inf_child_target::terminal_save_inferior): New.
933
934 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
935
936         * guile/scm-string.c (gdbscm_scm_from_printf): Use
937         string_vprintf.
938         * guile/scm-utils.c (gdbscm_printf): Likewise.
939         * serial.c (serial_printf): Likewise.
940         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
941
942 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
943
944         * stack.c (print_frame): Print frame architecture when printing on
945         an MI output.
946         * NEWS: Mention new "arch" attribute in frame output.
947
948 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
949
950         * arch/aarch64.h (aarch64_regnum): Update comment.
951
952 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
953
954         * NEWS: Add SVE to 8.2 section.
955
956 2018-08-21  Pedro Alves  <palves@redhat.com>
957
958         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
959         out from gdbscm_parse_function_args.
960         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
961         gdbscm_parse_function_args_1.
962
963 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
964
965         PR gdb/17816
966         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
967         operator.
968
969 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
970
971         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
972
973 2018-08-19  Michael Spang  <spang@google.com>
974
975         PR gdb/11786
976         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
977         for PT_TLS segments.
978
979 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
980
981         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
982         dwarf_variable_value.
983         * dwarf2-frame.c (class dwarf_expr_executor):
984         Add override for dwarf_variable_value.
985         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
986         (class symbol_needs_eval_context): Likewise.
987         (indirect_synthetic_pointer): Add forward declaration.
988         (sect_variable_value): New function.
989         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
990         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
991         for DW_OP_GNU_variable_value.
992
993 2018-08-16  Tom Tromey  <tom@tromey.com>
994
995         * top.c (read_command_file): Update.
996         (command_line_input): Remove "repeat" argument.
997         * ada-lang.c (get_selections): Update.
998         * linespec.c (decode_line_2): Update.
999         * defs.h (command_line_input): Remove argument.
1000         * cli/cli-script.c (read_next_line): Update.
1001         * python/py-gdb-readline.c: Update.
1002
1003 2018-08-17  Tom Tromey  <tom@tromey.com>
1004
1005         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1006         command_line_input.
1007
1008 2018-08-15  Tom Tromey  <tom@tromey.com>
1009
1010         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1011
1012 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1013
1014         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1015         If used, use find_pc_partial_function to find address range
1016         to disassemble.
1017         * mi/mi-main.c (mi_cmd_list_features): Report
1018         "data-disassemble-a-option" feature.
1019         * NEWS: Mention new -data-disassemble option -a.
1020
1021 2018-08-13  Tom Tromey  <tom@tromey.com>
1022
1023         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1024
1025 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1026
1027         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1028         (aarch64_linux_collect_sve_regset): Likewise.
1029         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1030         * regcache.h (regcache_map_entry_size): New function.
1031
1032 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1033
1034         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1035         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1036         (SVE_HEADER_VL_LENGTH): Likewise.
1037         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1038         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1039         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1040         (SVE_HEADER_SIZE_OFFSET): Likewise.
1041         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1042         (SVE_HEADER_VL_OFFSET): Likewise.
1043         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1044         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1045         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1046         (SVE_HEADER_SIZE): Likewise.
1047         (aarch64_linux_core_read_vq): Add function.
1048         (aarch64_linux_core_read_description): Check for SVE section.
1049
1050 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1051
1052         * aarch64-fbsd-tdep.c
1053         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1054         collect_size.
1055         * aarch64-linux-tdep.c
1056         (aarch64_linux_iterate_over_regset_sections): Likewise.
1057         * alpha-linux-tdep.c
1058         (alpha_linux_iterate_over_regset_sections):
1059         * alpha-nbsd-tdep.c
1060         (alphanbsd_iterate_over_regset_sections): Likewise.
1061         * amd64-fbsd-tdep.c
1062         (amd64fbsd_iterate_over_regset_sections): Likewise.
1063         * amd64-linux-tdep.c
1064         (amd64_linux_iterate_over_regset_sections): Likewise.
1065         * arm-bsd-tdep.c
1066         (armbsd_iterate_over_regset_sections): Likewise.
1067         * arm-fbsd-tdep.c
1068         (arm_fbsd_iterate_over_regset_sections): Likewise.
1069         * arm-linux-tdep.c
1070         (arm_linux_iterate_over_regset_sections): Likewise.
1071         * corelow.c (get_core_registers_cb): Likewise.
1072         (core_target::fetch_registers): Likewise.
1073         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1074         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1075         * gdbarch.h (void): Regenerate.
1076         * gdbarch.sh: Add supply_size and collect_size.
1077         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1078         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1079         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1080         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1081         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1082         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1083         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1084         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1085         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1086         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1087         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1088         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1089         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1090         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1091         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1092         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1093         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1094         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1095         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1096         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1097         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1098         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1099         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1100         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1101         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1102         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1103         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1104         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1105         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1106         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1107
1108 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1109
1110         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1111         with string_printf.
1112
1113 2018-08-10  Keith Seitz  <keiths@redhat.com>
1114
1115         * compile/compile-c-support.c (add_code_header, add_code_footer):
1116         Move into policy class.
1117         (c_push_user_expression, pop_user_expression_nop)
1118         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1119         (compile_program): New host class.
1120         (c_compile_program): New typedef.
1121         (c_compute_porgram): Use c_compile_program.
1122
1123 2018-08-10  Keith Seitz  <keiths@redhat.com>
1124
1125         * compile/compile-internal.h (compile_instance::~compile_instance):
1126         Remove calls to htab_delete.
1127         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1128         * compile.c (compile_instance::compile_instance): Initialize
1129         htab unique pointers.
1130         (compile_instance::get_cached_type, compile_instance::insert_type)
1131         (compile_instance::error_symbol_once): Update for unique_ptr.
1132
1133 2018-08-10  Keith Seitz  <keiths@redhat.com>
1134
1135         * compile/compile-c-symbols.c (struct symbol_error)
1136         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1137         (compile_instance::insert_symbol_error)
1138         (compile_instance::error_symbol_once): Move to ...
1139         * compile/compile.c: ... here.
1140
1141 2018-08-10  Keith Seitz  <keiths@redhat.com>
1142
1143         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1144         instead of `new_compile_instance'.
1145         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1146         Update description.
1147         If the symbol error map is not initialized, create it.
1148         (generate_c_for_for_one_symbol): Do not check/initialize
1149         the symbol error map.
1150         * compile/compile-c-types.c (compile_c_instance): Make a class.
1151         Update all callers.
1152         (compile_instance::compile_instance): Initialize the type cache.
1153         (get_cached_type): New function.
1154         (insert_type): Update description.
1155         (compile_c_instance::m_default_cflags): Define.
1156         (convert_type): Update description.  Use get_cached_type.
1157         (delete_instance): Moved to destructor.
1158         (new_compile_instance): Moved to constructor.
1159         * compile/compile-c.h (compile_c_instance): Make class inheriting
1160         from compile_instance.
1161         <base>: Remove field.
1162         <type_map, symbol_err_map>: Move to base class.
1163         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1164         * compile/compile-internal.h (compile_instance): Make class.
1165         <type_map_t, symbol_err_map_t>: Define.
1166         <fe>: Rename to `m_gcc_fe'.
1167         <scope, block, gcc_target_options>: Add `m_' prefix.
1168         <m_type_map, m_symbol_err_map>: New fields, moved from
1169         compile_c_instance.
1170         <destroy>: Remove.
1171         (convert_type, new_compile_instance): Remove.
1172         * compile/compile.c (cleanup_compile_instance): Remove.
1173         (compile_to_object): Use unique_ptr to eliminate cleanups.
1174         (compile_instance::set_print_callback, compile_instance::version)
1175         (compile_instance::set_verbose)
1176         (compile_instance::set_driver_filename)
1177         (compile_instance::set_triplet_regexp)
1178         (compile_instance::set_arguments)
1179         (compile_instance::set_source_file)
1180         (compile_instance::compile): Define.
1181
1182 2018-08-10  Keith Seitz  <keiths@redhat.com>
1183
1184         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1185         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1186         gcc-c-fe.def to define C plugin.
1187         (delete_instance): Delete `c_plugin'.
1188         (new_compile_instance): Initialize `c_plugin'.
1189         * compile/compile-c.h: Include gcc_c_plugin.h.
1190         (struct compile_c_instance) <c_plugin>: New member.
1191         * gcc-c-plugin.h: New file.
1192         Update all callers with API change.
1193
1194 2018-08-10  Keith Seitz  <keiths@redhat.com>
1195
1196         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1197         (HFILES_NO_SRCDIR): ... to here.
1198         Add compile-internal.h and compile-c.h.
1199         * compile/compile-c-support.c: Include compile-c.h.
1200         * compile/compile-c-symbols.c: Include compile-c.h.
1201         (generate_c_for_variable_locations): Update comment.
1202         * compile/compile-c-types.c: Include compile-c.h.
1203         * compile/compile-c.h: New file -- moved C language declarations
1204         from other files here.
1205         * compile/compile-internal.h: Do not include hashtab.h or
1206         common/enum-flags.h.
1207         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1208         (gcc_convert_symbol, gcc_symbol_address)
1209         (generate_c_for_variable_locations, c_get_mode_for_size)
1210         (c_get_range_decl_name): Definitions moved to compile-c.h.
1211         * compile/compile-loc2c.c: Include compile-c.h.
1212
1213 2018-08-10  Keith Seitz  <keiths@redhat.com>
1214
1215         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1216         (c_symbol_substitution_name): ... this.
1217         Update all callers.
1218
1219 2018-08-10  Keith Seitz  <keiths@redhat.com>
1220
1221         * compile/compile-c-support.c (c_compute_program): Use
1222         unique_xmalloc_ptr to eliminate cleanup.
1223         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1224         Return a unique_xmalloc_ptr and eliminate cleanup.
1225         * compile/compile-internal.h (generate_c_for_variable_locations):
1226         Return unique_xmalloc_ptr and update description.
1227
1228 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1229
1230         * corelow.c (core_target::get_core_register_section): Rename
1231         min_size to section_min_size.
1232
1233 2018-08-09  Jim Wilson  <jimw@sifive.com>
1234
1235         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1236         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1237         * NEWS: Mention new GNU/Linux RISC-V target.
1238         * configure.host: Add riscv*-*-linux*.
1239         * configure.nat: Add riscv*.
1240         * configure.tgt: Add riscv*-*-linux*.
1241         * riscv-linux-nat.c: New file.
1242         * riscv-linux-tdep.c: New file.
1243
1244 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1245
1246         * infrun.c (resume): Make static, add forward declaration.
1247         (proceed): Update header comment.
1248         * infrun.h (resume): Delete declaration.
1249
1250 2018-08-09  Tom Tromey  <tom@tromey.com>
1251
1252         * riscv-tdep.h: Minor formatting fixes.
1253
1254 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1255
1256         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1257         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1258         (test_mkdir_recursive): Likewise.
1259         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1260
1261 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1262
1263         * valarith.c (value_subscripted_rvalue): If an array is not in
1264         memory, and we don't know the upper bound, then we can't know that
1265         the requested element exists or not.
1266
1267 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1268
1269         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1270         (target_options_to_string): Add comment.
1271
1272 2018-08-08  Tom Tromey  <tom@tromey.com>
1273
1274         * unittests/scoped_mmap-selftests.c: Check result of "write".
1275
1276 2018-08-08  Jim Wilson  <jimw@sifive.com>
1277
1278         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1279         (decode_register_index_short): New.
1280         (decode_j_type_insn, decode_cj_type_insn): New.
1281         (decode_b_type_insn, decode_cb_type_insn): New.
1282         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1283         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1284         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1285         is_c_sw_insn instead of is_sw_insn.
1286         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1287         (riscv_software_single_step): New.
1288         * riscv-tdep.h (riscv_software_single_step): Declare.
1289
1290         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1291         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1292
1293 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1294
1295         PR gdb/18050:
1296         * target.c (dispose_inferior): Don't dispose of inferiors that are
1297         already killed.
1298
1299 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1300
1301         * remote.c (remote_target::download_tracepoint): Change char* to
1302         const char*.
1303
1304 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1305
1306         * target.h (target_options_to_string): Return an std::string.
1307         * target.c (str_comma_list_concat_elem): Return void, use
1308         std::string.
1309         (do_option): Likewise.
1310         (target_options_to_string): Return an std::string.
1311         * linux-nat.c (linux_nat_target::wait): Adjust.
1312         * target-debug.h (target_debug_print_options): Adjust.
1313
1314 2018-08-07  Tom Tromey  <tom@tromey.com>
1315
1316         * Makefile.in (CPPFLAGS): New variable.
1317         (INTERNAL_CPPFLAGS): Use it.
1318
1319 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1320
1321         * NEWS: Mention the index cache.
1322
1323 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1324
1325         * common/pathstuff.h (get_standard_cache_dir): New.
1326         * common/pathstuff.c (get_standard_cache_dir): New.
1327         * build-id.h (build_id_to_string): New.
1328         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1329         DEBUG_STR_SUFFIX): Move to here.
1330         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1331         DEBUG_STR_SUFFIX): Move from there.
1332         (write_psymtabs_to_index): Make non-static, add basename
1333         parameter.  Write to temporary files, rename when done.
1334         (save_gdb_index_command): Adjust call to
1335         write_psymtabs_to_index.
1336         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1337         field.
1338         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1339         (get_gdb_index_contents_from_cache): New.
1340         (get_gdb_index_contents_from_cache_dwz): New.
1341         (dwarf2_initialize_objfile): Read index from cache.
1342         (dwarf2_build_psymtabs): Save to index.
1343         * dwarf-index-cache.h: New file.
1344         * dwarf-index-cache.c: New file.
1345         * dwarf-index-write.h: New file.
1346
1347 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1348
1349         * gnulib/aclocal.m4: Re-generate.
1350         * gnulib/config.in: Re-generate.
1351         * gnulib/configure: Re-generate.
1352         * gnulib/import/Makefile.am: Re-generate.
1353         * gnulib/import/Makefile.in: Re-generate.
1354         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1355         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1356         * gnulib/import/m4/mkdir.m4: New file.
1357         * gnulib/import/mkdir.c: New file.
1358         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1359         module.
1360
1361 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1362
1363         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1364         * common/scoped_mmap.c: New file.
1365         * common/scoped_mmap.h (destroy): New method.
1366         (~scoped_mmap, reset): Use destroy.
1367         (scoped_mmap): New move constructor.
1368         (mmap_file): New declaration.
1369         * unittests/scoped_mmap-selftests.c (test_normal,
1370         test_invalid_filename, run_tests): New functions.
1371         (_initialize_scoped_mmap_selftests): Register selftest.
1372
1373 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1374
1375         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1376         (read_gdb_index_from_buffer): ... this.  Remove section
1377         parameter, add buffer parameter.
1378         (get_gdb_index_contents_ftype,
1379         get_gdb_index_contents_dwz_ftype): New typedefs.
1380         (dwarf2_read_gdb_index): Add callback parameters to get the
1381         index contents.
1382         (get_gdb_index_contents_from_section): New.
1383         (dwarf2_initialize_objfile): Update call to
1384         dwarf2_read_gdb_index.
1385
1386 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1387
1388         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1389         (gdb_open_cloexec): Likewise.
1390         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1391         (commandline_from_pid): Likewise.
1392         (linux_xfer_osdata_threads): Likewise.
1393         (linux_xfer_osdata_fds): Likewise.
1394         * ada-lang.c (is_package_name): Likewise.
1395         * auxv.c (procfs_xfer_auxv): Likewise.
1396         * breakpoint.c (print_one_breakpoint_location): Use
1397         uiout::field_fmt.
1398         (print_one_catch_solib): Use string_printf.
1399         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1400         (add_pe_forwarded_sym): Likewise.
1401         * dwarf2read.c (create_type_unit_group): Likewise.
1402         (build_error_marker_type): Likewise.
1403         * infcall.c (get_function_name): Likewise.
1404         * valprint.c (print_converted_chars_to_obstack): Likewise.
1405         * xtensa-tdep.c (xtensa_register_type): Likewise.
1406
1407 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1408
1409         * remote.c (remote_target::download_tracepoint): Fix format
1410         string errors.
1411
1412 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1413
1414         * tracefile.c: Include common/byte-vector.h.
1415         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1416         with trace_regblock_size if needed.  Update uses of buf.
1417
1418 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1419
1420         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1421         std::vector<unsigned char>.
1422         * tracepoint.c (collection_list::collection_list): Remove
1423         m_regs_mask initializer from initializer list.  Resize
1424         m_regs_mask using the largest remote register number.
1425         (collection_list::add_remote_register): Remove size check on
1426         m_regs_mask.  Use at to access element.
1427         (collection_list::stringify): Change type of temp_buf to
1428         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1429         stringify the register mask.  Use pack_hex_byte for the register
1430         mask.
1431
1432 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1433
1434         * tracepoint.h (class collection_list) <add_register>: Remove.
1435         <add_remote_register, add_ax_registers, add_local_register>:
1436         Declare.
1437         <add_memrange>: Add scope parameter.
1438         * tracepoint.c (encode_actions_1): Likewise.
1439         (collection_list::add_register): Rename to ...
1440         (collection_list::add_remote_register): ... this.  Update
1441         comment.
1442         (collection_list::add_ax_registers, add_local_register): New
1443         methods.
1444         (collection_list::add_memrange): Add scope parameter.  Call
1445         add_local_register instead of add_register.
1446         (finalize_tracepoint_aexpr): New function.
1447         (collection_list::collect_symbol): Update calls to add_memrange.
1448         Call add_local_register instead of add_register.  Call
1449         add_ax_registers.  Call finalize_tracepoint_aexpr.
1450         (encode_actions_1): Get remote regnos for $reg action.  Call
1451         add_remote_register, add_ax_registers, and add_local_register.
1452         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1453         (validate_actionline): Call finalize_tracepoint_aexpr.
1454
1455 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1456
1457         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1458         Replace array buf with gdb::char_vector buf, of size
1459         get_remote_packet_size ().  Replace references to buf and
1460         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1461         and xsnprintf with snprintf.  Raise errors if the buffer is too
1462         small.
1463
1464 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1465
1466         * remote.c (remote_target::download_tracepoint): Fix the has_more
1467         predicate in the QTDP action list iteration.
1468
1469 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1470
1471         * remote.c (remote_target::download_tracepoint): Fix indentation
1472         in for block.
1473
1474 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1475
1476         * proc-api.c (_initialize_proc_api): Remove c, unused.
1477         * procfs.c (procfs_init_inferior): Remove signals, unused.
1478         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1479         unused.
1480
1481 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1482             Andrew Burgess  <andrew.burgess@embecosm.com>
1483
1484         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1485         'W_STOPCODE (0)' as this could be ambiguous.
1486
1487 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1488
1489         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1490         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1491         "ai_socktype").
1492
1493 2018-08-02  Tom Tromey  <tom@tromey.com>
1494
1495         PR symtab/16842.
1496         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1497         symbols.
1498         (process_structure_scope): Likewise.
1499
1500 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1501
1502         PR gdb/22629:
1503         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1504         kill inferior.
1505
1506 2018-08-02  Tom Tromey  <tom@tromey.com>
1507
1508         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1509         (darwin_suspend_inferior, darwin_resume_inferior)
1510         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1511         (darwin_check_new_threads): Check result of get_darwin_inferior.
1512
1513 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1514
1515         GDB 8.1.1 released.
1516
1517 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1518
1519         * varobj.c (varobj_get_path_expr_parent): Report an error if
1520         parent is a dynamic varobj.
1521
1522 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1523
1524         * gnulib/aclocal.m4: Re-generate.
1525         * gnulib/config.in: Re-generate.
1526         * gnulib/configure: Re-generate.
1527         * gnulib/import/Makefile.in: Re-generate.
1528         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1529         * gnulib/import/m4/onceonly.m4: Re-generate.
1530
1531 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1532
1533         * target-descriptions.c (struct xml_test_tdesc): New.
1534         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1535         (record_xml_tdesc): Update.
1536         (maintenance_check_xml_descriptions): Update.
1537         * target-descriptions.h (record_xml_tdesc): Update comment.
1538
1539 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1540
1541         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1542         checking array bounds are defined.
1543
1544 2018-07-30  Tom Tromey  <tom@tromey.com>
1545
1546         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1547         irreflexivity violation.
1548
1549 2018-07-30  Tom Tromey  <tom@tromey.com>
1550
1551         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1552         * value.c (unpack_long): Remove lint code.
1553         * valops.c (value_ind): Remove lint code.
1554         * valarith.c (value_x_binop, value_x_unop, value_equal)
1555         (value_pos): Remove lint code.
1556
1557 2018-07-28  Tom de Vries  <tdevries@suse.de>
1558
1559         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1560         with undefined upper bound as <optimized out>.
1561
1562 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1563
1564         * gcore.in: Rename variable "name" to "prefix".  Expand
1565         "usage" text.
1566
1567 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1568
1569         * windows-nat.c (windows_nat_target::create_inferior): Update to
1570         call close() in global namespace.
1571
1572 2018-07-26  Tom Tromey  <tom@tromey.com>
1573
1574         * dwarf-index-write.c (add_address_entry): Don't add objfile
1575         offsets.
1576         * dbxread.c (find_stab_function): Rename from
1577         find_stab_function_addr.  Return a bound_minimal_symbol.
1578         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1579         Don't add objfile offsets.
1580         (end_psymtab): Use raw_text_low, raw_text_high,
1581         MSYMBOL_VALUE_RAW_ADDRESS.
1582         (read_ofile_symtab): Update.
1583         (process_one_symbol): Update.
1584         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1585         offsets.
1586         (dw2_relocate): Remove.
1587         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1588         searching addrmap.
1589         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1590         Update.
1591         (process_psymtab_comp_unit_reader, add_partial_symbol)
1592         (add_partial_subprogram, dwarf2_ranges_read): Update.
1593         (load_partial_dies): Update.
1594         (add_address_entry): Don't add objfile offsets.
1595         (dwarf2_build_include_psymtabs): Update.
1596         (create_addrmap_from_aranges): Don't add objfile offsets.
1597         (dw2_find_pc_sect_compunit_symtab): Update.
1598         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1599         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1600         Update.
1601         (parse_partial_symbols): Don't add objfile offsets.  Use
1602         raw_text_low, raw_text_high.  Update.
1603         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1604         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1605         or call 'relocate' quick function.  Clear psymbol_map.
1606         * psympriv.h (struct partial_symbol) <address>: Add section
1607         offset.
1608         <set_unrelocated_address>: Rename from set_address.
1609         <raw_text_low, raw_text_high>: New methods.
1610         <text_low, text_high>: Add objfile parameter.
1611         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1612         set_unrelocated_address.
1613         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1614         (find_pc_psymbol): Update.
1615         (fixup_psymbol_section, relocate_psymtabs): Remove.
1616         (dump_psymtab, psym_functions): Update.
1617         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1618         parameter.
1619         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1620         (start_psymtab_common): Update.
1621         * symfile-debug.c (debug_qf_relocate): Remove.
1622         (debug_sym_quick_functions): Update.
1623         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1624         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1625         Update.
1626
1627 2018-07-26  Tom Tromey  <tromey@redhat.com>
1628
1629         * dbxread.c (end_psymtab): Use text_high_valid and
1630         text_low_valid.
1631         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1632         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1633         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1634         Update comment.
1635         <text_low_valid, text_high_valid>: New fields.
1636         <set_text_low, set_text_high>: Update.
1637         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1638
1639 2018-07-26  Tom Tromey  <tom@tromey.com>
1640
1641         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1642         Update.
1643         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1644         textlow and texthigh fields.
1645         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1646         Update.
1647         * mdebugread.c (parse_lines, parse_partial_symbols)
1648         (psymtab_to_symtab_1): Update.
1649         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1650         Rename fields.  Update comment.  Now private.
1651         <text_low, text_high, set_text_low, set_text_high>: New methods.
1652         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1653         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1654         (start_psymtab_common, maintenance_info_psymtabs)
1655         (maintenance_check_psymtabs): Update.
1656         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1657         texthigh fields.
1658         (scan_xcoff_symtab): Update.
1659
1660 2018-07-26  Tom Tromey  <tromey@redhat.com>
1661
1662         * psympriv.h (struct partial_symbol) <unrelocated_address,
1663         address, set_address>: New methods.
1664         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1665         (fixup_psymbol_section, relocate_psymtabs): Update.
1666         (print_partial_symbols): Add 'objfile' parameter.  Update.
1667         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1668         Update.
1669
1670 2018-07-26  Tom Tromey  <tom@tromey.com>
1671
1672         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1673         (debug_names::write_psymbols): Update.
1674         * psympriv.h (struct partial_symbol): Derive from
1675         general_symbol_info.
1676         <obj_section>: New method.
1677         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1678         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1679         (find_pc_sect_psymbol, fixup_psymbol_section)
1680         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1681         (print_partial_symbols, recursively_search_psymtabs)
1682         (compare_psymbols, psymbol_hash, psymbol_compare)
1683         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1684         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1685
1686 2018-07-26  Tom Tromey  <tromey@redhat.com>
1687
1688         * dbxread.c (end_psymtab): Remove dead code.
1689
1690 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1691
1692         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1693         DWARF unwinders are disabled.
1694         * dwarf2-frame.c: Add dwarf2read.h include.
1695         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1696         disabled.
1697         (dwarf2_frame_unwinders_enabled_p): Define.
1698         (show_dwarf_unwinders_enabled_p): New function.
1699         (_initialize_dwarf2_frame): Register switch to control DWARF
1700         unwinder use.
1701         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1702         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1703         (show_dwarf_cmdlist): Remove static keyword.
1704         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1705         (show_dwarf_cmdlist): Declare.
1706         * NEWS: Document new feature.
1707
1708 2018-07-26  Tom de Vries  <tdevries@suse.de>
1709
1710         PR breakpoints/23366
1711         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1712
1713 2018-07-26  Tom de Vries  <tdevries@suse.de>
1714
1715         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1716         DW_AT_count can't be translated to a dynamic prop.
1717
1718 2018-07-25  Tom de Vries  <tdevries@suse.de>
1719
1720         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1721         try/catch.
1722
1723 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1724
1725         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1726
1727 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1728
1729         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1730
1731 2018-07-24  Keith Seitz  <keiths@redhat.comt
1732
1733         PR symtab/23010
1734         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1735         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1736         instead of add_symbol_to_list.
1737         (read_file_scope): Call prepare_one_comp_unit before reading
1738         any other DIEs.
1739
1740 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1741
1742         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1743
1744 2018-07-24  Tom Tromey  <tom@tromey.com>
1745
1746         * utils.c (malloc, realloc, free): Don't declare.
1747         * configure, config.in: Rebuild.
1748         * configure.ac: Don't check for declarations of free, malloc, or
1749         realloc.
1750
1751 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1752
1753         * aarch64-linux-nat.c
1754         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1755         variable.
1756         * arm-linux-nat.c (fetch_regs): Likewise.
1757         (store_regs): Likewise.
1758         (fetch_vfp_regs): Likewise.
1759         (store_vfp_regs): Likewise.
1760         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1761         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1762         (arm_linux_nat_target::insert_watchpoint): Likewise.
1763         (arm_linux_nat_target::remove_watchpoint): Likewise.
1764         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1765         Likewise.
1766         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1767         Likewise.
1768         * ppc-linux-nat.c (fetch_register): Likewise.
1769         (fetch_all_gp_regs): Likewise.
1770         (fetch_ppc_registers): Likewise.
1771         (store_all_gp_regs): Likewise.
1772         (store_ppc_registers): Likewise.
1773         (hwdebug_insert_point): Likewise.
1774         (can_use_watchpoint_cond_accel): Likewise.
1775         * remote-sim.c (gdb_os_write_stdout): Likewise.
1776
1777 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1778             Tom Tromey  <tom@tromey.com>
1779
1780         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1781         test for it.
1782         * configure: Rebuild.
1783
1784 2018-07-22  Tom Tromey  <tom@tromey.com>
1785
1786         * regformats/regdat.sh: Define xmltarget_${name} inside
1787         #ifndef IN_PROCESS_AGENT.
1788
1789 2018-07-22  Tom Tromey  <tom@tromey.com>
1790
1791         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1792
1793 2018-07-22  Tom Tromey  <tom@tromey.com>
1794
1795         * symfile.c (reread_symbols): Notify iter, not objfile.
1796
1797 2018-07-22  Tom Tromey  <tom@tromey.com>
1798
1799         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1800         Use arch_ops.
1801         (ravenscar_thread_target::prepare_to_store): Likewise.
1802
1803 2018-07-22  Tom Tromey  <tom@tromey.com>
1804
1805         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1806         unused variable.  Call value_fetch_lazy when needed.
1807         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1808         Remove unused variable.  Call value_fetch_lazy when needed.
1809
1810 2018-07-22  Tom Tromey  <tom@tromey.com>
1811
1812         * m32c-tdep.c (mark_dma): Return void.
1813         (make_regs): Remove unused declarations.
1814
1815 2018-07-22  Tom Tromey  <tom@tromey.com>
1816
1817         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1818         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1819         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1820         bkscm_get_valid_block_smob_arg_unsafe for effect.
1821
1822 2018-07-22  Tom Tromey  <tom@tromey.com>
1823
1824         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1825         value_type.
1826
1827 2018-07-22  Tom Tromey  <tom@tromey.com>
1828
1829         * windows-nat.c (saved_context): Conditionally define.
1830         * remote.c (remote_target::remote_btrace_maybe_reopen):
1831         Conditionally declare "warned".
1832         * inflow.c (sigquit_ours): Conditionally define.
1833         (new_tty): Move "tty" declaration inside #if.
1834         * guile/guile.c (guile_datadir): Conditionally define.
1835         * charset.c (set_be_le_names): Move some declarations inside #if.
1836         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1837         #if.
1838         (parse_xml_btrace_conf): Likewise.
1839
1840 2018-07-22  Tom Tromey  <tom@tromey.com>
1841
1842         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1843
1844 2018-07-22  Tom Tromey  <tom@tromey.com>
1845
1846         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1847         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1848         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1849         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1850         * stack.c (frame_apply_level_command): Remove unused variable.
1851         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1852         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1853         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1854         unused variable.
1855         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1856         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1857         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1858         variable.
1859         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1860         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1861         variable.
1862         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1863         Remove unused variable.
1864         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1865         variable.
1866         * common/tdesc.c (print_xml_feature::visit): Remove unused
1867         variable.
1868         * compile/compile-object-load.c (store_regs): Remove unused
1869         variables.
1870         * complaints.c (clear_complaints): Remove unused variable.
1871         * corelow.c (core_target_open): Remove unused variable.
1872         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1873         variable.
1874         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1875         variable.
1876         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1877         variable.
1878         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1879         variable.
1880         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1881         variable.
1882         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1883         variable.
1884         * ia64-tdep.c (examine_prologue): Remove unused variable.
1885         * infcall.c (run_inferior_call): Remove unused variable.
1886         * inferior.c (exit_inferior): Remove unused variable.
1887         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1888         * linespec.c (decode_line_2): Remove unused variable.
1889         * linux-nat.c (super_close): Remove.
1890         * linux-tdep.c (linux_info_proc): Remove unused variable.
1891         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1892         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1893         Remove unused variable.
1894         * parse.c (find_minsym_type_and_address): Remove unused variable.
1895         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1896         variable.
1897         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1898         variable.
1899         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1900         variables.
1901         * record-btrace.c (record_btrace_target::store_registers): Remove
1902         unused variable.
1903         (cmd_show_record_btrace_cpu): Remove unused variable.
1904         * riscv-tdep.c (riscv_register_reggroup_p)
1905         (riscv_push_dummy_call, riscv_return_value): Remove unused
1906         variable.
1907         * rust-exp.y (literal): Remove unused variable.
1908         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1909         unused variable.
1910         <STRUCTOP_ANONYMOUS>: Likewise.
1911         * s390-linux-tdep.c (s390_linux_init_abi_31)
1912         (s390_linux_init_abi_64): Remove unused variable.
1913         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1914         (file_select_thread, net_windows_open, _initialize_ser_windows):
1915         Remove unused variables.
1916         * symtab.c (find_pc_sect_line): Remove unused variable.
1917         * target-memory.c (compute_garbled_blocks): Remove unused
1918         variable.
1919         (target_write_memory_blocks): Remove unused variable.
1920         * target.c (target_stack::unpush): Remove unused variables.
1921         * tracepoint.c (start_tracing, all_tracepoint_actions)
1922         (merge_uploaded_trace_state_variables)
1923         (print_one_static_tracepoint_marker): Remove unused variable.
1924         * unittests/basic_string_view/element_access/char/1.cc (test01):
1925         Remove unused variable.
1926         * windows-nat.c (windows_continue, windows_add_all_dlls)
1927         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1928         Remove unused variables.
1929
1930 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1931
1932         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1933         attr_profile in HAVE_ELF.
1934         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1935         HAVE_ELF.
1936
1937 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1938
1939         * frame.c (frame_register_unwind): Change parameter name.
1940         (frame_unwind_register): Likewise.
1941         (frame_unwind_register_value): Likewise.
1942         (frame_unwind_register_signed): Likewise.
1943         (frame_unwind_register_unsigned): Likewise.
1944         * frame.h (frame_register_unwind): Likewise.
1945         (frame_unwind_register): Likewise.
1946         (frame_unwind_register_value): Likewise.
1947         (frame_unwind_register_signed): Likewise.
1948         (frame_unwind_register_unsigned): Likewise.
1949         (frame_unwind_arch): Likewise.
1950
1951 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1952
1953         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1954         ISA maintenance.
1955
1956 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1957
1958         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1959         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1960         hand.
1961
1962 2018-07-20  Keith Seitz  <keiths@redhat.com>
1963
1964         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1965         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1966         m_compunit_symtab, m_language>: Add "m_" prefix.
1967         Update all uses.
1968         * buildsym.c: Update all uses.
1969
1970 2018-07-20  Tom Tromey  <tom@tromey.com>
1971
1972         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1973         * buildsym.h (record_line_ftype): Remove typedef.
1974
1975 2018-07-20  Tom Tromey  <tom@tromey.com>
1976
1977         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1978         (end_expandable_symtab): Likewise.
1979         (end_symtab_get_static_block): Likewise.
1980         (end_symtab_from_static_block): Likewise.
1981         * buildsym-legacy.c (augment_type_symtab): Remove.
1982         (end_expandable_symtab): Remove.
1983         (end_symtab_get_static_block): Remove.
1984         (end_symtab_from_static_block): Remove.
1985
1986 2018-07-20  Tom Tromey  <tom@tromey.com>
1987
1988         * dwarf2read.c: Include buildsym.h.
1989         (struct dwarf2_cu) <builder>: New method.
1990         (fixup_go_packaging): Update.
1991         (process_full_comp_unit, process_full_type_unit): Update.  Don't
1992         use scoped_free_pendings.
1993         (using_directives): Add "cu" parameter, remove "language".
1994         (read_import_statement, setup_type_unit_groups, )
1995         (read_func_scope, read_lexical_block_scope)
1996         (dwarf2_record_block_ranges, read_namespace): Update.
1997         (lnp_state_machine::lnp_state_machine): Add cu parameter.
1998         (lnp_state_machine::handle_end_sequence): Update.
1999         (class lnp_state_machine) <m_cu>: New member.
2000         <m_record_line_callback>: Remove.
2001         <m_currently_recording_lines>: New member.
2002         (lnp_state_machine::handle_set_file): Update.
2003         (noop_record_line): Remove.
2004         (dwarf_record_line_p): Add cu parameter.
2005         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2006         (lnp_state_machine::record_line)
2007         (lnp_state_machine::lnp_state_machine)
2008         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2009         (dwarf_decode_lines): Update.
2010         (dwarf2_start_subfile): Add cu parameter.
2011         (dwarf2_start_symtab, new_symbol): Update.
2012         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2013         Remove dwarf2_per_objfile parameter.
2014         (dwarf_decode_macros): Update.
2015
2016 2018-07-20  Tom Tromey  <tom@tromey.com>
2017
2018         * stabsread.c (define_symbol): Update.
2019         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2020         * dwarf2read.c (new_symbol): Update.
2021         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2022         * cp-namespace.c: Include buildsym.h.
2023         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2024         * buildsym-legacy.c (get_buildsym_compunit): New function.
2025
2026 2018-07-20  Tom Tromey  <tom@tromey.com>
2027
2028         * xcoffread.c: Include buildsym-legacy.h.
2029         * windows-nat.c: Include buildsym-legacy.h.
2030         * stabsread.c: Include buildsym-legacy.h.
2031         * mdebugread.c: Include buildsym-legacy.h.
2032         * buildsym-legacy.h: New file.
2033         * buildsym-legacy.c: New file, from buildsym.c.
2034         * go32-nat.c: Include buildsym-legacy.h.
2035         * dwarf2read.c: Include buildsym-legacy.h.
2036         * dbxread.c: Include buildsym-legacy.h.
2037         * cp-namespace.c: Include buildsym-legacy.h.
2038         * coffread.c: Include buildsym-legacy.h.
2039         * buildsym.h: Move some contents to buildsym-legacy.h.
2040         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2041         buildsym-legacy.c.
2042         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2043
2044 2018-07-20  Tom Tromey  <tom@tromey.com>
2045
2046         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2047         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2048         (buildsym_compunit::buildsym_compunit)
2049         (buildsym_compunit::~buildsym_compunit)
2050         (buildsym_compunit::get_macro_table): Define.
2051
2052 2018-07-20  Tom Tromey  <tom@tromey.com>
2053
2054         * buildsym.c (reset_symtab_globals): Remove.
2055         (buildsym_compunit::end_symtab_from_static_block): Update.
2056         (buildsym_compunit::augment_type_symtab): Update.
2057         (end_symtab_from_static_block): Call free_buildsym_compunit.
2058         (augment_type_symtab, end_symtab, end_expandable_symtab):
2059         Likewise.
2060
2061 2018-07-20  Tom Tromey  <tom@tromey.com>
2062
2063         * arch-utils.c: Do not include buildsym.h.
2064         * mipsread.c: Do not include buildsym.h.
2065         * machoread.c: Do not include buildsym.h.
2066         * elfread.c: Do not include buildsym.h.
2067
2068 2018-07-20  Tom Tromey  <tom@tromey.com>
2069
2070         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2071         initialization.
2072         (buildsym_compunit): Add new constructor.
2073         (struct buildsym_compunit) <get_last_source_file, finish_block,
2074         record_block_range, start_subfile, patch_subfile_names,
2075         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2076         set_last_source_start_addr, get_last_source_start_addr,
2077         get_local_using_directives, set_local_using_directives,
2078         get_global_using_directives, outermost_context_p,
2079         get_current_context_stack, get_context_stack_depth,
2080         get_current_subfile, get_local_symbols, get_file_symbols,
2081         get_global_symbols, record_debugformat, record_producer,
2082         push_context, pop_context, end_symtab_get_static_block,
2083         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2084         New public methods.
2085         <record_pending_block, finish_block_internal, make_blockvector,
2086         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2087         private methods.
2088         Update all users.
2089
2090 2018-05-22  Tom Tromey  <tom@tromey.com>
2091
2092         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2093         parameter.
2094         (finish_block_internal): Update.
2095
2096 2018-07-20  Tom Tromey  <tom@tromey.com>
2097
2098         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2099         parameter.
2100         (finish_block_internal): Update.
2101
2102 2018-07-20  Tom Tromey  <tom@tromey.com>
2103
2104         * buildsym.h (EXTERN): Don't define or undef.
2105         * buildsym.c (EXTERN): Don't define.
2106
2107 2018-07-20  Tom Tromey  <tom@tromey.com>
2108
2109         * buildsym.c: Remove TODO comment.
2110
2111 2018-07-20  Tom Tromey  <tom@tromey.com>
2112
2113         * coffread.c (coff_symtab_read): Update.
2114         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2115         (xcoff_new_init): Update.
2116         * mipsread.c (mipscoff_new_init): Update.
2117         * mdebugread.c (mdebug_build_psymtabs): Update.
2118         * elfread.c (elf_new_init): Update.
2119         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2120         Update.
2121         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2122         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2123         (stabsect_build_psymtabs): Update.
2124         * buildsym.h (buildsym_init): Don't declare.
2125         * buildsym.c: Update comment.
2126         (prepare_for_building): Remove.
2127         (start_symtab, restart_symtab): Update.
2128         (reset_symtab_globals): Update comment.
2129         (buildsym_init): Remove.
2130
2131 2018-07-20  Tom Tromey  <tom@tromey.com>
2132
2133         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2134         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2135         (read_enum_type, common_block_start, common_block_end)
2136         (cleanup_undefined_types_1, finish_global_stabs): Update.
2137         * mdebugread.c (psymtab_to_symtab_1): Update.
2138         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2139         (read_lexical_block_scope, new_symbol): Update.
2140         * dbxread.c (process_one_symbol): Update.
2141         * coffread.c (coff_symtab_read, process_coff_symbol)
2142         (coff_read_enum_type): Update.
2143         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2144         declare.
2145         (get_local_symbols, get_file_symbols, get_global_symbols): New
2146         functions.
2147         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2148         m_global_symbols.
2149         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2150         (~scoped_free_pendings): Update.
2151         (finish_block, prepare_for_building, reset_symtab_globals)
2152         (end_symtab_get_static_block, end_symtab_with_blockvector)
2153         (augment_type_symtab, push_context): Update.
2154         (get_local_symbols, get_file_symbols, get_global_symbols): New
2155         functions.
2156         (buildsym_init): Update.
2157
2158 2018-07-20  Tom Tromey  <tom@tromey.com>
2159
2160         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2161         (process_full_type_unit): Likewise.
2162         (dwarf2_start_symtab): Set list_in_scope.
2163
2164 2018-07-20  Tom Tromey  <tom@tromey.com>
2165
2166         * dwarf2read.c (process_psymtab_comp_unit_reader)
2167         (build_type_psymtabs_reader): Do not set list_in_scope.
2168
2169 2018-07-20  Tom Tromey  <tom@tromey.com>
2170
2171         * buildsym.c (free_pendings): Remove.
2172         (add_symbol_to_list, scoped_free_pendings)
2173         (finish_block_internal, buildsym_init): Update.
2174
2175 2018-07-20  Tom Tromey  <tom@tromey.com>
2176
2177         * xcoffread.c (read_xcoff_symtab): Update.
2178         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2179         Update.
2180         * dbxread.c (process_one_symbol): Update.
2181         * coffread.c (coff_symtab_read): Update.
2182         * buildsym.h (finish_block): Update.
2183         * buildsym.c (finish_block): Remove "listhead" argument.
2184         (end_symtab_get_static_block): Update.
2185
2186 2018-07-20  Tom Tromey  <tom@tromey.com>
2187
2188         * buildsym.h (class scoped_free_pendings): Remove constructor.
2189         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2190         method.
2191         <m_pending_block_obstack, m_pending_blocks>: New members.
2192         (pending_block_obstack, pending_blocks): Remove.
2193         (scoped_free_pendings::scoped_free_pendings): Default.
2194         (~scoped_free_pendings): Update.
2195         (free_pending_blocks): Remove.
2196         (finish_block_internal, record_pending_block, make_blockvector)
2197         (end_symtab_get_static_block, augment_type_symtab, push_context)
2198         (buildsym_init): Update.
2199
2200 2018-07-20  Tom Tromey  <tom@tromey.com>
2201
2202         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2203         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2204         members.
2205         (pending_addrmap, pending_addrmap_obstack)
2206         (pending_addrmap_interesting): Remove.
2207         (scoped_free_pendings, record_block_range, make_blockvector)
2208         (prepare_for_building, reset_symtab_globals, buildsym_init):
2209         Update.
2210
2211 2018-07-20  Tom Tromey  <tom@tromey.com>
2212
2213         * xcoffread.c (process_linenos): Update.
2214         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2215         * mdebugread.c (psymtab_to_symtab_1): Update.
2216         * dwarf2read.c (setup_type_unit_groups)
2217         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2218         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2219         * dbxread.c (process_one_symbol): Update.
2220         * coffread.c (coff_symtab_read, enter_linenos)
2221         (process_coff_symbol): Update.
2222         * buildsym.h (current_subfile): Don't declare.
2223         (get_current_subfile): Declare.
2224         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2225         member.
2226         (start_subfile, free_buildsym_compunit, push_subfile)
2227         (prepare_for_building, start_symtab): Update.
2228         (get_current_subfile): New function.
2229
2230 2018-07-20  Tom Tromey  <tom@tromey.com>
2231
2232         * coffread.c (coff_symtab_read): Update.
2233         * xcoffread.c (read_xcoff_symtab): Update.
2234         * dwarf2read.c (new_symbol): Update.
2235         (read_func_scope, read_lexical_block_scope): Update.
2236         * dbxread.c (process_one_symbol): Update.
2237         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2238         (outermost_context_p): Remove macro.
2239         (outermost_context_p, get_current_context_stack)
2240         (get_context_stack_depth): Declare.
2241         (pop_context): Return struct context_stack.
2242         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2243         member.
2244         (context_stack_size): Remove.
2245         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2246         (prepare_for_building, end_symtab_get_static_block)
2247         (augment_type_symtab, push_context): Update.
2248         (pop_context): Return struct context_stack.
2249         (outermost_context_p, get_current_context_stack)
2250         (get_context_stack_depth): New functions.
2251         (buildsym_init): Update.
2252
2253 2018-07-20  Tom Tromey  <tom@tromey.com>
2254
2255         * rust-exp.y: Now a pure parser.  Update all rules.
2256         (%union): Move earlier.
2257         (current_parser, work_obstack): Remove globals.
2258         (rust_parser, ~rust_parser): Update.
2259         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2260         lex_character, lex_number, lex_string, lex_identifier,
2261         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2262         convert_name, convert_params_to_expression,
2263         convert_ast_to_expression, ast_basic_type, ast_operation,
2264         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2265         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2266         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2267         ast_array_type, ast_slice_type, ast_reference_type,
2268         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2269         (rust_parse): Update.
2270         (rustyyerror, rustyylex): Add parser parameter.
2271         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2272         (rust_lex_stringish_test, rust_lex_test_sequence)
2273         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2274         (rust_lex_test_push_back, rust_lex_tests): Update.
2275
2276 2018-07-19  Pedro Alves  <palves@redhat.com>
2277
2278         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2279         gdb::unique_xmalloc_ptr.
2280         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2281         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2282         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2283         copy-initialization.
2284         * guile/scm-pretty-print.c (ppscm_print_children): Use
2285         gdb::unique_xmalloc_ptr instead of cleanups.
2286         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2287         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2288         gdb::unique_xmalloc_ptr.
2289         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2290         Adjust to use gdb::unique_xmalloc_ptr.
2291         * guile/scm-utils.c (extract_arg): Adjust.
2292         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2293         gdb::unique_xmalloc_ptr instead of a cleanup.
2294
2295 2018-07-19  Tom Tromey  <tom@tromey.com>
2296
2297         * utils.c (do_value_free_to_mark)
2298         (make_cleanup_value_free_to_mark): Remove.
2299         * utils.h (make_cleanup_value_free_to_mark): Remove.
2300
2301 2018-07-19  Pedro Alves  <palves@redhat.com>
2302
2303         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2304         forwarding reference.
2305
2306 2018-07-18  Pedro Alves  <palves@redhat.com>
2307
2308         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2309         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2310         cleanup.
2311
2312 2018-07-18  Pedro Alves  <palves@redhat.com>
2313
2314         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2315         exceptions.
2316         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2317         (gdbscm_wrap): New.
2318         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2319         directly instead of a cleanup.
2320         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2321         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2322         (vlscm_binop_gdbthrow): New, factored out from ...
2323         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2324         (vlscm_rich_compare): Use gdbscm_wrap.
2325         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2326         instead of a cleanup.
2327         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2328         cleanup.
2329         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2330         Use xfree directly instead of a cleanup.
2331         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2332         Adjust to use gdbscm_wrap and scoped_value_mark.
2333         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2334         (gdbscm_value_address, gdbscm_value_dereference)
2335         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2336         scoped_value_mark.
2337         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2338         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2339         scoped_value_mark.
2340         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2341         gdbscm_wrap and scoped_value_mark.
2342         (gdbscm_value_to_string): Use xfree directly instead of a
2343         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2344         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2345         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2346         scoped_value_mark.
2347         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2348         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2349         scoped_value_mark.
2350         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2351         gdbscm_wrap.
2352
2353 2018-07-18  Tom de Vries  <tdevries@suse.de>
2354
2355         * findvar.c (default_read_var_value): Also resolve dynamic type for
2356         LOC_OPTIMIZED_OUT vars.
2357
2358 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2359
2360         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2361         decoding.
2362
2363 2018-07-17  Tom Tromey  <tom@tromey.com>
2364
2365         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2366         (compute_enum_list, pascm_set_param_value_x)
2367         (gdbscm_parameter_value): Update.
2368         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2369         (gdbscm_scm_to_host_string): Update.
2370         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2371         Update.
2372         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2373         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2374         * guile/scm-string.c (gdbscm_scm_to_string): Return
2375         unique_xmalloc_ptr.
2376         (gdbscm_scm_to_host_string): Likewise.
2377
2378 2018-07-17  Tom Tromey  <tom@tromey.com>
2379
2380         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2381         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2382         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2383         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2384         unique_xmalloc_ptr.
2385
2386 2018-07-17  Tom Tromey  <tom@tromey.com>
2387
2388         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2389         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2390         Update.
2391         * guile/scm-cmd.c (cmdscm_function): Update.
2392         * guile/scm-pretty-print.c
2393         (ppscm_print_exception_unless_memory_error): Update.
2394         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2395         Return unique_xmalloc_ptr.
2396
2397 2018-07-17  Tom Tromey  <tom@tromey.com>
2398
2399         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2400         Use string_printf.
2401
2402 2018-07-17  Jim Wilson  <jimw@sifive.com>
2403
2404         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2405         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2406         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2407         unecessary braces after EF_RISCV_RVC test.  Delete call to
2408         set_gdbarch_decr_pc_after_break.
2409
2410         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2411         RISCV_LAST_FP_REGNUM + 1.
2412         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2413
2414 2018-07-17  Tom Tromey  <tom@tromey.com>
2415
2416         * configure.ac: Remove --disable-gdbcli.
2417         * configure: Rebuild.
2418         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2419         (SUBDIR_CLI_CFLAGS): Remove.
2420         (SFILES): Use SUBDIR_CLI_SRCS.
2421         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2422
2423 2018-07-17  Tom Tromey  <tom@tromey.com>
2424
2425         PR gdb/18624:
2426         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2427
2428 2018-07-16  Jim Wilson  <jimw@sifive.com>
2429
2430         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2431
2432 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2433
2434         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2435         variable.
2436         (libunwind_frame_sniffer): Likewise.
2437         (libunwind_frame_prev_register): Likewise.
2438         (libunwind_sigtramp_frame_sniffer): Likewise.
2439         * ia64-tdep.c (ia64_access_reg): Likewise.
2440         (ia64_access_rse_reg): Likewise.
2441         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2442         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2443
2444 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2445
2446         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2447
2448 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2449
2450         * remote-sim.c (gdbsim_target::close,
2451         gdbsim_target::mourn_inferior): Remove unused variables.
2452
2453 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2454
2455         * ia64-tdep.c (ktab_buf): New global.
2456         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2457         (get_kernel_table): Adjust.
2458
2459 2018-07-16  Tom Tromey  <tom@tromey.com>
2460
2461         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2462         * dwarf2read.c (using_directives, new_symbol): Use
2463         outermost_context_p.
2464         * dbxread.c (process_one_symbol): Use outermost_context_p.
2465         * coffread.c (coff_symtab_read): Use outermost_context_p.
2466
2467 2018-07-16  Tom Tromey  <tom@tromey.com>
2468
2469         * dwarf2read.c (using_directives, read_func_scope)
2470         (read_lexical_block_scope): Update.
2471         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2472         * buildsym.h (local_using_directives, global_using_directives):
2473         Don't declare.
2474         (get_local_using_directives, set_local_using_directives)
2475         (get_global_using_directives): Declare.
2476         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2477         m_global_using_directives>: New members.
2478         (finish_block_internal, prepare_for_building)
2479         (reset_symtab_globals, end_symtab_get_static_block)
2480         (push_context): Update.
2481         (get_local_using_directives, set_local_using_directives)
2482         (get_global_using_directives): New functions.
2483         (buildsym_init): Update.
2484
2485 2018-07-16  Tom Tromey  <tom@tromey.com>
2486
2487         * xcoffread.c (xcoff_initial_scan): Don't call
2488         free_pending_blocks.
2489         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2490         * buildsym.h (class scoped_free_pendings): Add constructor.
2491         (free_pending_blocks): Don't declare.
2492         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2493         (free_pending_blocks): Now static.
2494
2495 2018-07-16  Tom Tromey  <tom@tromey.com>
2496
2497         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2498         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2499         member.
2500         (struct subfile_stack): Remove.
2501         (subfile_stack): Remove.
2502         (push_subfile, pop_subfile, buildsym_init): Update.
2503
2504 2018-07-16  Tom Tromey  <tom@tromey.com>
2505
2506         * buildsym.c (push_subfile): Use gdb_assert.
2507         (pop_subfile): Use gdb_assert.
2508
2509 2018-07-16  Tom Tromey  <tom@tromey.com>
2510
2511         * buildsym.h (merge_symbol_lists): Remove.
2512         * buildsym.c (merge_symbol_lists): Remove.
2513
2514 2018-07-16  Tom Tromey  <tom@tromey.com>
2515
2516         * stabsread.c (scan_file_globals): Update comment.
2517         * stabsread.h (scan_file_globals): Move from buildsym.h.
2518         * buildsym.h (scan_file_globals): Move to stabsread.h.
2519
2520 2018-07-16  Tom Tromey  <tom@tromey.com>
2521
2522         * xcoffread.c (xcoff_new_init): Update.
2523         * mipsread.c (mipscoff_new_init): Update.
2524         * mdebugread.c (mdebug_build_psymtabs): Update.
2525         * elfread.c (elf_new_init): Update.
2526         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2527         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2528         * buildsym.h (buildsym_new_init): Don't declare.
2529         * buildsym.c (buildsym_new_init): Remove.
2530
2531 2018-07-16  Tom Tromey  <tom@tromey.com>
2532
2533         * stabsread.h (within_function): Move from buildsym.h.
2534         * stabsread.c (start_stabs): Clear within_function.
2535         * coffread.c (coff_start_symtab): Clear within_function.
2536         * buildsym.h (within_function): Move to stabsread.h.
2537         * buildsym.c (prepare_for_building): Update.
2538
2539 2018-07-16  Tom Tromey  <tom@tromey.com>
2540
2541         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2542         * dwarf2read.c (dwarf2_start_symtab): Don't set
2543         processing_gcc_compilation.
2544         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2545
2546 2018-07-16  Tom Tromey  <tom@tromey.com>
2547
2548         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2549         (next_symbol_text_func): Move from buildsym.h.
2550         * stabsread.c (hashname): Move from buildsym.c.
2551         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2552         (next_symbol_text_func, hashname): Move to stabsread.h.
2553         * buildsym.c: Don't include bcache.h
2554         (hashname): Move to stasbread.c.
2555
2556 2018-07-16  Tom Tromey  <tom@tromey.com>
2557
2558         * buildsym.h (context_stack_size): Don't declare.
2559         * buildsym.c (context_stack_size): New global.
2560
2561 2018-07-16  Tom Tromey  <tom@tromey.com>
2562
2563         * dbxread.c (processing_acc_compilation): New global.
2564         * buildsym.h (processing_acc_compilation): Don't declare.
2565
2566 2018-07-16  Tom Tromey  <tom@tromey.com>
2567
2568         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2569         * dbxread.c (read_ofile_symtab): Update.
2570         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2571         * buildsym.h (last_source_start_addr): Remove.
2572         (set_last_source_start_addr, get_last_source_start_addr):
2573         Declare.
2574         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2575         parameter.
2576         (struct buildsym_compunit) <m_last_source_start_addr>: New
2577         member.
2578         (prepare_for_building): Remove start_addr parameter.
2579         (start_symtab, restart_symtab, end_symtab_get_static_block)
2580         (end_symtab_with_blockvector): Update.
2581         (set_last_source_start_addr, get_last_source_start_addr): New
2582         functions.
2583
2584 2018-07-16  Tom Tromey  <tom@tromey.com>
2585
2586         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2587         member.
2588         (have_line_numbers): Remove.
2589         (record_line, prepare_for_building, end_symtab_get_static_block)
2590         (augment_type_symtab): Update.
2591
2592 2018-07-16  Tom Tromey  <tom@tromey.com>
2593
2594         * buildsym.c (~buildsym_compunit): Free the macro table.
2595         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2596         methods.
2597         <m_pending_macros>: New member.
2598         (pending_macros): Remove.
2599         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2600         (reset_symtab_globals, end_symtab_get_static_block)
2601         (end_symtab_with_blockvector, augment_type_symtab)
2602         (buildsym_init): Update.
2603
2604 2018-07-16  Tom Tromey  <tom@tromey.com>
2605
2606         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2607         parameter.
2608         (buildsym_compunit::set_last_source_file): New method.
2609         <m_last_source_file>: New member.
2610         (prepare_for_building): Remove "name" parameter.
2611         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2612         (last_source_file): Remove.
2613         (set_last_source_file, get_last_source_file): Update.
2614
2615 2018-07-16  Tom Tromey  <tom@tromey.com>
2616
2617         * buildsym.c (prepare_for_building): Add assert.
2618
2619 2018-07-16  Tom Tromey  <tom@tromey.com>
2620
2621         * buildsym.c (~buildsym_compunit): Update.
2622         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2623         (start_subfile, patch_subfile_names)
2624         (end_symtab_with_blockvector): Update.
2625
2626 2018-07-16  Tom Tromey  <tom@tromey.com>
2627
2628         * buildsym.c (struct buildsym_compunit): Add constructor,
2629         destructor, initializers.
2630         (start_buildsym_compunit): Remove.
2631         (free_buildsym_compunit): Use "delete".
2632         (start_symtab, restart_symtab): Use "new".
2633
2634 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2635
2636         * symfile.c (set_objfile_default_section_offset): Remove struct
2637         keyword.
2638
2639 2018-07-14  Stafford Horne  <shorne@gmail.com>
2640
2641         * (Responsible Maintainers): Add myself as or1k maintainer.
2642
2643 2018-07-13  Tom Tromey  <tom@tromey.com>
2644
2645         * symfile.c (set_objfile_default_section_offset): Use extra braces
2646         around initializer.
2647
2648 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2649
2650         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2651         non-branching basr.
2652
2653 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2654
2655         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2656         unittests/cli-utils-selftests.c
2657         * unittests/cli-utils-selftests.c: New file.
2658
2659 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2660
2661         * NEWS: Mention new commands. Mention change to 'thread apply'.
2662
2663 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2664
2665         * thread.c (thr_try_catch_cmd): New function.
2666         (thread_apply_all_command): Handle qcs flags.
2667         (thread_apply_command): Handle qcs flags.
2668         (taas_command): New function.
2669         (tfaas_command): New function.
2670         (_initialize_thread): Update to setup the new commands 'taas
2671         and 'tfaas'. Change doc string for 'thread apply'.
2672
2673 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2674
2675         * stack.c: (trailing_outermost_frame): New function, mostly
2676         extracted from backtrace_command_1.
2677         (leading_innermost_frame): New function.
2678         (backtrace_command_1): Update to call trailing_outermost_frame.
2679         (frame_apply_command_count): New function.
2680         (frame_apply_level_command): New function.
2681         (frame_apply_all_command): New function.
2682         (frame_apply_command): New function.
2683         (faas_command): New function.
2684         (frame_cmd_list): New variable.
2685         (_initialize_stack): Update to setup the new commands 'frame apply'
2686         and 'faas'.
2687
2688 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2689
2690         * cli-utils.c (number_or_range_parser::get_number): Only handle
2691         numbers or convenience var as numbers.
2692         (parse_flags): New function.
2693         (parse_flags_qcs): New function.
2694         (number_or_range_parser::finished): Ensure parsing end is detected
2695         before end of string.
2696         * cli-utils.h (parse_flags): New function.
2697         (parse_flags_qcs): New function.
2698         (number_or_range_parser): Remove m_finished bool.
2699         (number_or_range_parser::skip_range): Set m_in_range to false.
2700
2701 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2702
2703         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2704         on Windows.
2705
2706 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2707             Jan Kratochvil  <jan.kratochvil@redhat.com>
2708             Paul Fertser  <fercerpav@gmail.com>
2709             Tsutomu Seki  <sekiriki@gmail.com>
2710             Pedro Alves  <palves@redhat.com>
2711
2712         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2713         'unittests/parse-connection-spec-selftests.c'.
2714         (COMMON_SFILES): Add 'common/netstuff.c'.
2715         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2716         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2717         * common/netstuff.c: New file.
2718         * common/netstuff.h: New file.
2719         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2720         (wait_for_connect): Update comment.  New parameter
2721         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2722         Use 'sock' directly instead of 'scb->fd'.
2723         (try_connect): New function, with code from 'net_open'.
2724         (net_open): Rewrite main loop to deal with multiple
2725         sockets/addresses.  Handle IPv6-style hostnames; implement
2726         support for IPv6 connections.
2727         * unittests/parse-connection-spec-selftests.c: New file.
2728
2729 2018-07-11  Pedro Alves  <palves@redhat.com>
2730
2731         PR gdb/23377
2732         * remote.c (remote_target::remote_detach_pid): Call
2733         set_current_process.
2734
2735 2018-07-11  Pedro Alves  <palves@redhat.com>
2736
2737         * h8300-tdep.c (h8300_gdbarch_init): Remove
2738         set_gdbarch_ecoff_reg_to_regnum calls.
2739
2740 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2741
2742         PR c++/23373
2743         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2744         offsets/sizes for static members of a class/struct.
2745
2746 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2747
2748         * target-descriptions.c (tdesc_register_bitsize): Rename.
2749         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2750         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2751         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2752
2753 2018-07-10  Tom Tromey  <tom@tromey.com>
2754
2755         * breakpoint.c (moribund_locations): Now static and a
2756         std::vector.
2757         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2758         (build_bpstat_chain, update_global_location_list)
2759         (breakpoint_retire_moribund): Update.
2760         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2761         VEC.
2762
2763 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2764
2765         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2766         (riscv_register_reggroup_p): Use new function, remove unneeded
2767         parenthesis.
2768         (riscv_push_dummy_call): Extend assert to compare against xlen or
2769         flen based on register type.
2770
2771 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2772
2773         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2774
2775 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2776
2777         * remote.c (show_hardware_watchpoint_limit): New function.
2778         (show_hardware_watchpoint_length_limit): New function.
2779         (show_hardware_breakpoint_limit): New function.
2780         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2781         where appropriate, update help text.
2782
2783 2018-07-09  Tom Tromey  <tom@tromey.com>
2784
2785         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2786         (CLIBS): Don't mention NAT_CLIBS.
2787
2788 2018-07-09  Tom Tromey  <tom@tromey.com>
2789
2790         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2791         (LIBGDB_OBS, clean mostlyclean): Update.
2792         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2793
2794 2018-07-09  Tom Tromey  <tom@tromey.com>
2795
2796         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2797         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2798         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2799
2800 2018-07-09  Tom Tromey  <tom@tromey.com>
2801
2802         * Makefile.in (ALLDEPFILES): Remove exec.c.
2803         (COMMON_OBS): Remove exec.o.
2804         (COMMON_SFILES): Add exec.c.
2805
2806 2018-07-09  Tom Tromey  <tom@tromey.com>
2807
2808         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2809
2810 2018-07-09  Tom Tromey  <tom@tromey.com>
2811
2812         * Makefile.in (clean mostlyclean): Remove stamp-version.
2813         (version.c): Depend on stamp-version.
2814         (stamp-version): New rule, from version.c rule.
2815
2816 2018-07-09  Tom Tromey  <tom@tromey.com>
2817
2818         * Makefile.in (init.c): Depend on stamp-init.
2819         (stamp-init): New rule, from init.c rule.
2820         (clean mostlyclean): Remove stamp-init.
2821
2822 2018-07-09  Tom Tromey  <tom@tromey.com>
2823
2824         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2825         SUBDIR_GCC_COMPILE_SRCS.
2826
2827 2018-07-09  Tom Tromey  <tom@tromey.com>
2828
2829         * Makefile.in (init.c): Remove some unused sed rules.
2830
2831 2018-07-09  Tom Tromey  <tom@tromey.com>
2832
2833         * Makefile.in (TSOBS): Remove.
2834         (INIT_FILES): Update.
2835         (LIBGDB_OBS): Update.
2836         (COMMON_SFILES): Add inflow.c.
2837         (SFILES): Remove inflow.c.
2838
2839 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2840
2841         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2842
2843 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2844
2845         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2846         get_saveloc_name, is_signal_frame_name, step_name,
2847         init_remote_name, create_addr_space_name,
2848         destroy_addr_space_name, search_unwind_table_name,
2849         find_dyn_list_name): Constify.
2850
2851 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2852
2853         * darwin-nat.c (darwin_pthread_kill): New function.
2854         (darwin_resume_thread): Use darwin_pthread_kill.
2855
2856 2018-07-05  Tom de Vries  <tdevries@suse.de>
2857
2858         * macroexp.c (macro_buffer) <operator=>: New member function.
2859
2860 2018-07-04  Tom Tromey  <tom@tromey.com>
2861
2862         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2863
2864 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2865
2866         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2867         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2868         * maint.c: Likewise.
2869         * top.c: Likewise.
2870
2871 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2872
2873         * NEWS: Create a new section for the next release branch.
2874         Rename the section of the current branch, now that it has
2875         been cut.
2876
2877 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2878
2879         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2880         * version.in: Bump version to 8.2.50.DATE-git.
2881
2882 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2883             Pedro Alves  <palves@redhat.com>
2884
2885         * linux-nat.c (linux_init_ptrace): Rename to ...
2886         (linux_init_ptrace_procfs): ... this.  Call
2887         linux_proc_init_warnings.
2888         (linux_nat_target::post_attach)
2889         (linux_nat_target::post_startup_inferior): Adjust.
2890         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2891         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2892
2893 2018-07-04  Tom de Vries  <tdevries@suse.de>
2894
2895         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2896         check ...
2897         (read_comp_unit_head): ... here.
2898
2899 2018-07-03  Tom Tromey  <tom@tromey.com>
2900
2901         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2902         (stop_tracing, tstatus_command)
2903         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2904         (print_one_static_tracepoint_marker): Update.
2905         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2906         std::vector.
2907         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2908         VEC.
2909         (all_tracepoints, static_tracepoints_here): Return std::vector.
2910
2911 2018-07-03  Tom Tromey  <tom@tromey.com>
2912
2913         * common/ptid.c (ptid_equal): Remove.
2914         * common/ptid.h (ptid_equal): Don't declare.
2915         * ada-tasks.c: Update.
2916         * breakpoint.c: Update.
2917         * common/agent.c: Update.
2918         * corelow.c: Update.
2919         * darwin-nat-info.c: Update.
2920         * darwin-nat.c: Update.
2921         * dcache.c: Update.
2922         * dtrace-probe.c: Update.
2923         * dummy-frame.c: Update.
2924         * fbsd-nat.c: Update.
2925         * frame.c: Update.
2926         * gdbthread.h: Update.
2927         * gnu-nat.c: Update.
2928         * go32-nat.c: Update.
2929         * inf-loop.c: Update.
2930         * inf-ptrace.c: Update.
2931         * infcall.c: Update.
2932         * infcmd.c: Update.
2933         * inflow.c: Update.
2934         * infrun.c: Update.
2935         * linux-fork.c: Update.
2936         * linux-nat.c: Update.
2937         * linux-thread-db.c: Update.
2938         * mi/mi-cmd-var.c: Update.
2939         * mi/mi-interp.c: Update.
2940         * mi/mi-main.c: Update.
2941         * nto-procfs.c: Update.
2942         * ppc-linux-tdep.c: Update.
2943         * procfs.c: Update.
2944         * python/py-inferior.c: Update.
2945         * python/py-record-btrace.c: Update.
2946         * python/py-record.c: Update.
2947         * ravenscar-thread.c: Update.
2948         * regcache.c: Update.
2949         * remote-sim.c: Update.
2950         * remote.c: Update.
2951         * sol-thread.c: Update.
2952         * solib.c: Update.
2953         * target.c: Update.
2954         * tui/tui-stack.c: Update.
2955         * varobj.c: Update.
2956         * windows-nat.c: Update.
2957         * windows-tdep.c: Update.
2958
2959 2018-07-03  Tom Tromey  <tom@tromey.com>
2960
2961         * common/ptid.c (ptid_match): Remove.
2962         * common/ptid.h (ptid_match): Don't declare.
2963         * fbsd-nat.c: Update.
2964         * infcmd.c: Update.
2965         * infrun.c: Update.
2966         * linux-nat.c: Update.
2967         * record-btrace.c: Update.
2968         * regcache.c: Update.
2969         * remote.c: Update.
2970
2971 2018-07-03  Tom Tromey  <tom@tromey.com>
2972
2973         * common/ptid.c (ptid_tid_p): Remove.
2974         * common/ptid.h (ptid_tid_p): Don't declare.
2975         * sol-thread.c: Update.
2976
2977 2018-07-03  Tom Tromey  <tom@tromey.com>
2978
2979         * common/ptid.c (ptid_lwp_p): Remove.
2980         * common/ptid.h (ptid_lwp_p): Don't declare.
2981         * fbsd-nat.c: Update.
2982         * linux-nat.c: Update.
2983         * nat/linux-procfs.c: Update.
2984         * nat/x86-linux-dregs.c: Update.
2985         * sol-thread.c: Update.
2986
2987 2018-07-03  Tom Tromey  <tom@tromey.com>
2988
2989         * common/ptid.c (ptid_is_pid): Remove.
2990         * common/ptid.h (ptid_is_pid): Don't declare.
2991         * infrun.c: Update.
2992         * linux-nat.c: Update.
2993         * mi/mi-interp.c: Update.
2994         * remote.c: Update.
2995         * thread.c: Update.
2996
2997 2018-07-03  Tom Tromey  <tom@tromey.com>
2998
2999         * common/ptid.c (ptid_get_tid): Remove.
3000         * common/ptid.h (ptid_get_tid): Don't declare.
3001         * ada-tasks.c: Update.
3002         * aix-thread.c: Update.
3003         * bsd-uthread.c: Update.
3004         * darwin-nat.c: Update.
3005         * fbsd-nat.c: Update.
3006         * i386-darwin-nat.c: Update.
3007         * infrun.c: Update.
3008         * linux-tdep.c: Update.
3009         * nto-procfs.c: Update.
3010         * ppc-ravenscar-thread.c: Update.
3011         * python/py-infthread.c: Update.
3012         * ravenscar-thread.c: Update.
3013         * sol-thread.c: Update.
3014         * sparc-ravenscar-thread.c: Update.
3015         * windows-nat.c: Update.
3016
3017 2018-07-03  Tom Tromey  <tom@tromey.com>
3018
3019         * common/ptid.c (ptid_get_lwp): Remove.
3020         * common/ptid.h (ptid_get_lwp): Don't declare.
3021         * aarch64-linux-nat.c: Update.
3022         * ada-tasks.c: Update.
3023         * aix-thread.c: Update.
3024         * amd64-linux-nat.c: Update.
3025         * arm-linux-nat.c: Update.
3026         * corelow.c: Update.
3027         * fbsd-nat.c: Update.
3028         * fbsd-tdep.c: Update.
3029         * gnu-nat.c: Update.
3030         * i386-cygwin-tdep.c: Update.
3031         * i386-gnu-nat.c: Update.
3032         * i386-linux-nat.c: Update.
3033         * ia64-linux-nat.c: Update.
3034         * inf-ptrace.c: Update.
3035         * infrun.c: Update.
3036         * linux-fork.c: Update.
3037         * linux-nat.c: Update.
3038         * linux-tdep.c: Update.
3039         * linux-thread-db.c: Update.
3040         * mips-linux-nat.c: Update.
3041         * nat/aarch64-linux-hw-point.c: Update.
3042         * nat/aarch64-linux.c: Update.
3043         * nat/linux-btrace.c: Update.
3044         * nat/linux-osdata.c: Update.
3045         * nat/linux-procfs.c: Update.
3046         * nat/x86-linux-dregs.c: Update.
3047         * obsd-nat.c: Update.
3048         * ppc-fbsd-nat.c: Update.
3049         * ppc-linux-nat.c: Update.
3050         * procfs.c: Update.
3051         * python/py-infthread.c: Update.
3052         * ravenscar-thread.c: Update.
3053         * remote.c: Update.
3054         * s390-linux-nat.c: Update.
3055         * sol-thread.c: Update.
3056         * sol2-tdep.c: Update.
3057         * spu-linux-nat.c: Update.
3058         * x86-linux-nat.c: Update.
3059         * xtensa-linux-nat.c: Update.
3060
3061 2018-07-03  Tom Tromey  <tom@tromey.com>
3062
3063         * common/ptid.c (ptid_get_pid): Remove.
3064         * common/ptid.h (ptid_get_pid): Don't declare.
3065         * aarch64-linux-nat.c: Update.
3066         * ada-lang.c: Update.
3067         * aix-thread.c: Update.
3068         * alpha-bsd-nat.c: Update.
3069         * amd64-fbsd-nat.c: Update.
3070         * amd64-linux-nat.c: Update.
3071         * arm-linux-nat.c: Update.
3072         * arm-nbsd-nat.c: Update.
3073         * auxv.c: Update.
3074         * break-catch-syscall.c: Update.
3075         * breakpoint.c: Update.
3076         * bsd-uthread.c: Update.
3077         * corelow.c: Update.
3078         * ctf.c: Update.
3079         * darwin-nat.c: Update.
3080         * fbsd-nat.c: Update.
3081         * fbsd-tdep.c: Update.
3082         * gcore.c: Update.
3083         * gnu-nat.c: Update.
3084         * hppa-nbsd-nat.c: Update.
3085         * hppa-obsd-nat.c: Update.
3086         * i386-fbsd-nat.c: Update.
3087         * ia64-linux-nat.c: Update.
3088         * inf-ptrace.c: Update.
3089         * infcmd.c: Update.
3090         * inferior.c: Update.
3091         * inferior.h: Update.
3092         * inflow.c: Update.
3093         * infrun.c: Update.
3094         * linux-fork.c: Update.
3095         * linux-nat.c: Update.
3096         * linux-tdep.c: Update.
3097         * linux-thread-db.c: Update.
3098         * m68k-bsd-nat.c: Update.
3099         * mi/mi-interp.c: Update.
3100         * mi/mi-main.c: Update.
3101         * mips-linux-nat.c: Update.
3102         * mips-nbsd-nat.c: Update.
3103         * mips64-obsd-nat.c: Update.
3104         * nat/aarch64-linux-hw-point.c: Update.
3105         * nat/aarch64-linux.c: Update.
3106         * nat/linux-btrace.c: Update.
3107         * nat/linux-osdata.c: Update.
3108         * nat/linux-procfs.c: Update.
3109         * nat/x86-linux-dregs.c: Update.
3110         * nto-procfs.c: Update.
3111         * obsd-nat.c: Update.
3112         * ppc-linux-nat.c: Update.
3113         * ppc-nbsd-nat.c: Update.
3114         * ppc-obsd-nat.c: Update.
3115         * proc-service.c: Update.
3116         * procfs.c: Update.
3117         * python/py-inferior.c: Update.
3118         * python/py-infthread.c: Update.
3119         * ravenscar-thread.c: Update.
3120         * record.c: Update.
3121         * remote-sim.c: Update.
3122         * remote.c: Update.
3123         * rs6000-nat.c: Update.
3124         * s390-linux-nat.c: Update.
3125         * sh-nbsd-nat.c: Update.
3126         * sol-thread.c: Update.
3127         * sparc-nat.c: Update.
3128         * sparc64-tdep.c: Update.
3129         * spu-linux-nat.c: Update.
3130         * spu-tdep.c: Update.
3131         * target-debug.h: Update.
3132         * target.c: Update.
3133         * thread.c: Update.
3134         * tid-parse.c: Update.
3135         * tracefile-tfile.c: Update.
3136         * vax-bsd-nat.c: Update.
3137         * windows-nat.c: Update.
3138         * x86-linux-nat.c: Update.
3139         * x86-nat.c: Update.
3140
3141 2018-07-03  Tom Tromey  <tom@tromey.com>
3142
3143         * common/ptid.c (pid_to_ptid): Remove.
3144         * common/ptid.h (pid_to_ptid): Don't declare.
3145         * aix-thread.c: Update.
3146         * arm-linux-nat.c: Update.
3147         * common/ptid.c: Update.
3148         * common/ptid.h: Update.
3149         * corelow.c: Update.
3150         * ctf.c: Update.
3151         * darwin-nat.c: Update.
3152         * fbsd-nat.c: Update.
3153         * fork-child.c: Update.
3154         * gnu-nat.c: Update.
3155         * go32-nat.c: Update.
3156         * inf-ptrace.c: Update.
3157         * infcmd.c: Update.
3158         * inferior.c: Update.
3159         * infrun.c: Update.
3160         * linux-fork.c: Update.
3161         * linux-nat.c: Update.
3162         * nat/aarch64-linux-hw-point.c: Update.
3163         * nat/fork-inferior.c: Update.
3164         * nat/x86-linux-dregs.c: Update.
3165         * nto-procfs.c: Update.
3166         * obsd-nat.c: Update.
3167         * procfs.c: Update.
3168         * progspace.c: Update.
3169         * remote.c: Update.
3170         * rs6000-nat.c: Update.
3171         * s390-linux-nat.c: Update.
3172         * sol-thread.c: Update.
3173         * spu-linux-nat.c: Update.
3174         * target.c: Update.
3175         * top.c: Update.
3176         * tracefile-tfile.c: Update.
3177         * windows-nat.c: Update.
3178
3179 2018-07-03  Tom Tromey  <tom@tromey.com>
3180
3181         * common/ptid.h (ptid_build): Don't declare.
3182         * common/ptid.c (ptid_build): Remove.
3183         * aix-thread.c: Update.
3184         * bsd-kvm.c: Update.
3185         * bsd-uthread.c: Update.
3186         * common/agent.c: Update.
3187         * common/ptid.c: Update.
3188         * common/ptid.h: Update.
3189         * corelow.c: Update.
3190         * darwin-nat.c: Update.
3191         * fbsd-nat.c: Update.
3192         * gnu-nat.c: Update.
3193         * linux-fork.c: Update.
3194         * linux-nat.c: Update.
3195         * linux-thread-db.c: Update.
3196         * nat/linux-osdata.c: Update.
3197         * nat/linux-procfs.c: Update.
3198         * nto-procfs.c: Update.
3199         * obsd-nat.c: Update.
3200         * proc-service.c: Update.
3201         * procfs.c: Update.
3202         * ravenscar-thread.c: Update.
3203         * remote-sim.c: Update.
3204         * remote.c: Update.
3205         * sol-thread.c: Update.
3206         * target.c: Update.
3207         * windows-nat.c: Update.
3208
3209 2018-07-03  Tom Tromey  <tom@tromey.com>
3210
3211         * infrun.c (follow_exec): Use exit_inferior_silent.
3212         * inferior.c (exit_inferior_num_silent): Remove.
3213         * inferior.h (exit_inferior_num_silent): Don't declare.
3214
3215 2018-07-03  Tom Tromey  <tom@tromey.com>
3216
3217         PR cli/23340:
3218         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3219         inferior_ptid on error.
3220
3221 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3222             Simon Marchi  <simon.marchi@polymtl.ca>
3223
3224         PR tdep/8282
3225         * disasm.h (gdb_disassembler): Add
3226         `m_disassembler_options_holder'. member
3227         * disasm.c (get_all_disassembler_options): New function.
3228         (gdb_disassembler::gdb_disassembler): Use it.
3229         (gdb_buffered_insn_length_init_dis): Likewise.
3230         (gdb_buffered_insn_length): Adjust accordingly.
3231         (set_disassembler_options): Handle options with arguments.
3232         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3233         line if showing options with descriptions.
3234         (disassembler_options_completer): Adapt to using the
3235         `disasm_options_and_args_t' structure.
3236         * mips-tdep.c (mips_disassembler_options): New variable.
3237         (mips_disassembler_options_o32): Likewise.
3238         (mips_disassembler_options_n32): Likewise.
3239         (mips_disassembler_options_n64): Likewise.
3240         (gdb_print_insn_mips): Don't set `disassembler_options'.
3241         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3242         functions.
3243         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3244         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3245         `gdbarch_disassembler_options_implicit' and
3246         `gdbarch_valid_disassembler_options'.
3247         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3248         `disasm_options_and_args_t' structure.
3249         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3250         method.
3251         (valid_disassembler_options): Switch from `disasm_options_t' to
3252         the `disasm_options_and_args_t' structure.
3253         * NEWS: Document `set disassembler-options' support for the MIPS
3254         target.
3255         * gdbarch.h: Regenerate.
3256         * gdbarch.c: Regenerate.
3257
3258 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3259
3260         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3261
3262 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3263
3264         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3265         parameter in call to amd64_target_description.
3266         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3267         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3268         (amd64fbsd_init_abi): Likewise.
3269         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3270         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3271         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3272         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3273
3274 2018-06-29  Pedro Alves  <palves@redhat.com>
3275
3276         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3277         "segments" parameter.
3278         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3279         (_initialize_amd64_tdep): Update call to
3280         amd64_create_target_description.
3281         (amd64_target_description): Add "segments" parameter.  Adjust
3282         the implementation to use it.
3283         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3284         call to amd64_create_target_description.
3285         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3286         * gdb/arch/amd64.h (amd64_create_target_description): Add
3287         "segments" register.
3288         * gdb/arch/amd64.c (amd64_create_target_description): Add
3289         "segments" parameter.  Call create_feature_i386_64bit_segments
3290         only if SEGMENTS is true.
3291         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3292         call to amd64_create_target_description.
3293
3294 2018-06-29  Pedro Alves  <palves@redhat.com>
3295
3296         * thread.c (thread_target_id_str): New, factored out from ...
3297         (print_thread_info_1): ... here.  Use it to compute the max
3298         "Target Id" column width.
3299
3300 2018-06-29  Pedro Alves  <palves@redhat.com>
3301
3302         * remote.c (remote_target::extra_thread_info): Delete
3303         'display_buf' and 'n' locals.  from the cache, regardless of
3304         packet mechanims is in use.  Use cache for qThreadExtra and qP
3305         methods too.
3306
3307 2018-06-29  Pedro Alves  <palves@redhat.com>
3308
3309         * blockframe.c (find_pc_sect_containing_function): New function.
3310         * breakpoint.c (print_breakpoint_location): Don't call
3311         find_pc_sect_function.
3312         * linespec.c (create_sals_line_offset): Record the location's
3313         symbol in the sal.
3314         * linespec.c (convert_address_location_to_sals): Fill in sal's
3315         symbol with find_pc_sect_containing_function.
3316         * symtab.c (find_function_start_sal): Rename to ...
3317         (find_function_start_sal_1): ... this.
3318         (find_function_start_sal): Reimplement as wrapper around
3319         find_function_start_sal_1, and use
3320         find_pc_sect_containing_function to fill in the sal's symbol.
3321         (find_function_start_sal(symbol*, bool)): Adjust.
3322         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3323         comments.
3324         (find_pc_sect_containing_function): Declare.
3325
3326 2018-06-29  Pedro Alves  <palves@redhat.com>
3327
3328         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3329         true if the the location has no symbol.
3330
3331 2018-06-28  Tom Tromey  <tom@tromey.com>
3332
3333         * NEWS: Mention --enable-codesign.
3334         * silent-rules.mk (ECHO_SIGN): New variable.
3335         * configure.ac: Add --enable-codesign.
3336         * configure: Rebuild.
3337         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3338         (gdb$(EXEEXT)): Optionally invoke codesign.
3339
3340 2018-06-28  Pedro Alves  <palves@redhat.com>
3341
3342         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3343         comments.
3344         (switch_to_thread_no_regs): Adjust comment.
3345         * infcmd.c (stop_pc): Delete.
3346         (post_create_inferior, info_program_command): Replace references
3347         to stop_pc with references to thread_info->suspend.stop_pc.
3348         * inferior.h (stop_pc): Delete declaration.
3349         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3350         (handle_inferior_event_1, handle_signal_stop)
3351         (process_event_stop_test, keep_going_stepped_thread)
3352         (handle_step_into_function, handle_step_into_function_backward)
3353         (print_stop_location): Replace references to stop_pc with
3354         references to thread_info->suspend.stop_pc.
3355         (struct infcall_suspend_state) <stop_pc>: Delete field.
3356         (save_infcall_suspend_state, restore_infcall_suspend_state):
3357         Remove references to inf_stat->stop_pc.
3358         * linux-fork.c (fork_load_infrun_state): Likewise.
3359         * record-btrace.c (record_btrace_set_replay): Likewise.
3360         * record-full.c (record_full_goto_entry): Likewise.
3361         * remote.c (print_one_stopped_thread): Likewise.
3362         * target.c (target_resume): Extend comment.
3363         * thread.c (set_executing_thread): New.
3364         (set_executing): Use it.
3365         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3366         Remove references to stop_pc.
3367
3368 2018-06-28  Pedro Alves  <palves@redhat.com>
3369
3370         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3371         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3372
3373 2018-06-28  Tom Tromey  <tom@tromey.com>
3374
3375         * coffread.c (coff_symfile_finish): Update.
3376         * xcoffread.c (xcoff_symfile_finish): Update.
3377         * elfread.c (elf_symfile_finish): Update.
3378         * symfile.h (dwarf2_free_objfile): Don't declare.
3379         * dwarf2read.c (_initialize_dwarf2_read): Use
3380         register_objfile_data_with_cleanup.
3381         (dwarf2_free_objfile): Now static.  Change signature.
3382
3383 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3384
3385         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3386         option "-o" to add-symbol-file-load to add an offset to each
3387         section's load address.
3388         * symfile.c (set_objfile_default_section_offset): New function.
3389
3390 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3391
3392         * symfile.c (add_symbol_file_command): Make sure that sections
3393         with the same name are sorted in the same order.
3394
3395 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3396
3397         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3398         require the second argument.  If omitted, load sections at the
3399         addresses specified in the file.
3400
3401 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3402
3403         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3404         (_initialize_symfile): Add option "-o" to symbol-file to add an
3405         offset to each section of the symbol file.
3406
3407 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3408
3409         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3410
3411 2018-06-27  Tom Tromey  <tom@tromey.com>
3412
3413         * stack.c (_initialize_stack): Update "func" help text.
3414
3415 2018-06-27  Tom Tromey  <tom@tromey.com>
3416
3417         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3418         std::vector.
3419         (unwind_infopy_str, pyuw_create_unwind_info)
3420         (unwind_infopy_add_saved_register, pyuw_sniffer)
3421         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3422         Update.
3423         (struct saved_reg): Add constructor.
3424         <value>: Now a gdbpy_ref<>.
3425
3426 2018-06-27  Tom Tromey  <tom@tromey.com>
3427
3428         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3429
3430 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3431
3432         * gdb-gdb.py.in: Format using autopep8.
3433
3434 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3435
3436         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3437         (type_lookup_function): Recognize CORE_ADDR values.
3438
3439 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3440
3441         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3442         print tag_name.
3443
3444 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3445
3446         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3447         <__lt__>: Add.
3448
3449 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3450
3451         * gdb-gdb.py: Move to...
3452         * gdb-gdb.py.in: ... here.
3453         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3454         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3455         dependencies.
3456         (distclean): Remove gdb-gdb.py when cleaning.
3457         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3458         * configure: Re-generate.
3459
3460 2018-06-27  Pedro Alves  <palves@redhat.com>
3461
3462         * proc-service.c (get_ps_regcache): New.
3463         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3464         (ps_lsetfpregs): Use it.
3465
3466 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3467
3468         PR gdb/21695
3469         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3470         (dwarf_decode_lines_1): Adjust.
3471
3472 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3473
3474         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3475         override.
3476         <info_proc>: Likewise.
3477
3478 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3479
3480         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3481         to windows_fetch_one_register, and only handle the case of
3482         fetching one register.  Move the code that reloads the context
3483         and iterates over all registers if R is negative to...
3484         (windows_nat_target::fetch_registers): ... here.
3485         (do_windows_store_inferior_registers): Rename to
3486         windows_store_one_register, and only handle the case of storing
3487         one register.  Move the code that handles the case where r is
3488         negative to...
3489         (windows_nat_target::store_registers) ... here.
3490
3491 2018-06-26  Tom Tromey  <tom@tromey.com>
3492
3493         PR rust/22574:
3494         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3495         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3496         Update.
3497         (rust_internal_print_type): Add podata parameter.
3498         (rust_print_type): Update.
3499
3500 2018-06-26  Tom Tromey  <tom@tromey.com>
3501
3502         * typeprint.h (struct print_offset_data) <update, finish,
3503         maybe_print_hole>: New methods.
3504         <indentation>: New constant.
3505         * typeprint.c (print_offset_data::indentation): Define.
3506         (print_offset_data::maybe_print_hole, print_offset_data::update)
3507         (print_offset_data::finish): Move from c-typeprint.c and rename.
3508         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3509         (print_spaces_filtered_with_print_options): Update.
3510         (c_print_type_union_field_offset, maybe_print_hole)
3511         (c_print_type_struct_field_offset): Move to typeprint.c and
3512         rename.
3513         (c_type_print_base_struct_union): Update.
3514
3515 2018-06-25  Pedro Alves  <palves@redhat.com>
3516
3517         * gdbthread.h (thread_info_ref, delete_thread)
3518         (delete_thread_silent, first_thread_of_inferior)
3519         (any_thread_of_inferior, switch_to_thread)
3520         (enable_thread_stack_temporaries)
3521         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3522         (get_last_thread_stack_temporary)
3523         (value_in_thread_stack_temporaries, can_access_registers_thread):
3524         Spell out "struct thread_info" instead of just "thread_info".
3525         * inferior.h (notice_new_inferior): Likewise.
3526
3527 2018-06-25  Pedro Alves  <palves@redhat.com>
3528
3529         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3530         pass thread_info pointer to delete_thread.
3531         (windows_nat_target::detach): Pass inferior pointer to
3532         detach_inferior.
3533         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3534         delete_thread.
3535         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3536         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3537         and pass a thread_info pointer to delete_thread.
3538         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3539         pass thread_info pointer to delete_thread.
3540         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3541         delete_thread_silent call.
3542         * procfs.c (procfs_target::detach): Pass inferior pointer to
3543         detach_inferior.
3544         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3545         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3546         delete_thread_silent call.
3547         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3548         pass thread_info pointer to delete_thread.
3549         (windows_nat_target::detach): Pass inferior pointer to
3550         delete_inferior.
3551
3552 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3553
3554         * regcache.c (readable_regcache::read_part): Fix asserts.
3555         (reg_buffer::raw_collect_part): New function.
3556         (regcache::write_part): Fix asserts.
3557         (reg_buffer::raw_supply_part): New function.
3558         (regcache::transfer_regset_register): New helper function.
3559         (regcache::transfer_regset): Call new functions.
3560         (regcache_supply_regset): Use gdb_byte*.
3561         (regcache::supply_regset): Likewise.
3562         (regcache_collect_regset): Likewise.
3563         (regcache::collect_regset): Likewise.
3564         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3565         (reg_buffer::raw_supply_part): Likewise.
3566         (regcache::transfer_regset_register): Likewise.
3567         (regcache::transfer_regset): Use gdb_byte*.
3568
3569 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3570
3571         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3572
3573 2018-06-21  Pedro Alves  <palves@redhat.com>
3574
3575         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3576         instead of a ptid_t.  All callers adjusted.
3577         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3578         adjusted.
3579         (print_ada_task_info, display_current_task_id, task_command_1):
3580         Adjust.
3581         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3582         inferior_thread.
3583         (breakpoint_kind): Adjust.
3584         (remove_breakpoints_pid): Rename to ...
3585         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3586         pointer.  All callers adjusted.
3587         (bpstat_clear_actions): Use inferior_thread.
3588         (get_bpstat_thread): New.
3589         (bpstat_do_actions): Use it.
3590         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3591         to take a thread_info pointer.  All callers adjusted.
3592         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3593         (breakpoint_re_set_thread): Use inferior_thread.
3594         * breakpoint.h (struct inferior): Forward declare.
3595         (bpstat_stop_status): Update.
3596         (remove_breakpoints_pid): Delete.
3597         (remove_breakpoints_inf): New.
3598         * bsd-uthread.c (bsd_uthread_target::wait)
3599         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3600         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3601         (maint_btrace_packet_history_cmd)
3602         (maint_btrace_clear_packet_history_cmd): Adjust.
3603         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3604         inferior_thread.
3605         * cli/cli-interp.c: Include "inferior.h".
3606         * common/refcounted-object.h (struct
3607         refcounted_object_ref_policy): New.
3608         * compile/compile-object-load.c: Include gdbthread.h.
3609         (store_regs): Use inferior_thread.
3610         * corelow.c (core_target::close): Use current_inferior.
3611         (core_target_open): Adjust to use first_thread_of_inferior and use
3612         the current inferior.
3613         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3614         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3615         <thread>: ... this new field.  All references adjusted.
3616         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3617         Take a thread_info pointer instead of a ptid_t.
3618         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3619         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3620         thread_info pointer instead of a ptid_t.
3621         * elfread.c: Include "inferior.h".
3622         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3623         Use inferior_thread.
3624         * eval.c (evaluate_subexp): Likewise.
3625         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3626         inferior_thread.
3627         * gdb_proc_service.h (struct thread_info): Forward declare.
3628         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3629         <thread>: ... this new field.  All references adjusted.
3630         * gdbarch.h, gdbarch.c: Regenerate.
3631         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3632         'thread' parameter.  All implementations and callers adjusted.
3633         * gdbthread.h (thread_info) <set_running>: New method.
3634         (delete_thread, delete_thread_silent): Take a thread_info pointer
3635         instead of a ptid.
3636         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3637         (first_thread_of_process): Delete, replaced by ...
3638         (first_thread_of_inferior): ... this new function.  All callers
3639         adjusted.
3640         (any_live_thread_of_process): Delete, replaced by ...
3641         (any_live_thread_of_inferior): ... this new function.  All callers
3642         adjusted.
3643         (switch_to_thread, switch_to_no_thread): Declare.
3644         (is_executing): Delete.
3645         (enable_thread_stack_temporaries): Update comment.
3646         <enable_thread_stack_temporaries>: Take a thread_info pointer
3647         instead of a ptid_t.  Incref the thread.
3648         <~enable_thread_stack_temporaries>: Decref the thread.
3649         <m_ptid>: Delete
3650         <m_thr>: New.
3651         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3652         (get_last_thread_stack_temporary)
3653         (value_in_thread_stack_temporaries, can_access_registers_thread):
3654         Take a thread_info pointer instead of a ptid_t.  All callers
3655         adjusted.
3656         * infcall.c (get_call_return_value): Use inferior_thread.
3657         (run_inferior_call): Work with thread pointers instead of ptid_t.
3658         (call_function_by_hand_dummy): Work with thread pointers instead
3659         of ptid_t.  Use thread_info_ref.
3660         * infcmd.c (proceed_thread_callback): Access thread's state
3661         directly.
3662         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3663         access thread's state directly.
3664         (continue_command): Use inferior_thread.
3665         (info_program_command): Use find_thread_ptid and access thread
3666         state directly.
3667         (proceed_after_attach_callback): Use thread state directly.
3668         (notice_new_inferior): Take a thread_info pointer instead of a
3669         ptid_t.  All callers adjusted.
3670         (exit_inferior): Take an inferior pointer instead of a pid.  All
3671         callers adjusted.
3672         (exit_inferior_silent): New.
3673         (detach_inferior): Delete.
3674         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3675         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3676         (detach_inferior_command, kill_inferior_command): Use
3677         find_inferior_id instead of valid_gdb_inferior_id and
3678         gdb_inferior_id_to_pid.
3679         (inferior_command): Use inferior and thread pointers.
3680         * inferior.h (struct thread_info): Forward declare.
3681         (notice_new_inferior): Take a thread_info pointer instead of a
3682         ptid_t.  All callers adjusted.
3683         (detach_inferior): Delete declaration.
3684         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3685         instead of a pid.  All callers adjusted.
3686         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3687         (valid_gdb_inferior_id): Delete.
3688         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3689         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3690         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3691         ...
3692         <inf>: ... this new field.
3693         <step_ptid>: Delete, replaced by ...
3694         <step_thread>: ... this new field.
3695         (get_displaced_stepping_state): Take an inferior pointer instead
3696         of a pid.  All callers adjusted.
3697         (displaced_step_in_progress_any_inferior): Adjust.
3698         (displaced_step_in_progress_thread): Take a thread pointer instead
3699         of a ptid_t.  All callers adjusted.
3700         (displaced_step_in_progress, add_displaced_stepping_state): Take
3701         an inferior pointer instead of a pid.  All callers adjusted.
3702         (get_displaced_step_closure_by_addr): Adjust.
3703         (remove_displaced_stepping_state): Take an inferior pointer
3704         instead of a pid.  All callers adjusted.
3705         (displaced_step_prepare_throw, displaced_step_prepare)
3706         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3707         All callers adjusted.
3708         (start_step_over): Adjust.
3709         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3710         displaced step queue.
3711         (do_target_resume): Adjust.
3712         (fetch_inferior_event): Use inferior_thread.
3713         (context_switch, get_inferior_stop_soon): Take an
3714         execution_control_state pointer instead of a ptid_t.  All callers
3715         adjusted.
3716         (switch_to_thread_cleanup): Delete.
3717         (stop_all_threads): Use scoped_restore_current_thread.
3718         * inline-frame.c: Include "gdbthread.h".
3719         (inline_state) <inline_state>: Take a thread pointer instead of a
3720         ptid_t.  All callers adjusted.
3721         <ptid>: Delete, replaced by ...
3722         <thread>: ... this new field.
3723         (find_inline_frame_state): Take a thread pointer instead of a
3724         ptid_t.  All callers adjusted.
3725         (skip_inline_frames, step_into_inline_frame)
3726         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3727         pointer instead of a ptid_t.  All callers adjusted.
3728         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3729         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3730         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3731         pointers directly.
3732         * linux-nat.c (get_detach_signal): Likewise.
3733         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3734         (thread_db_notice_clone): Adjust.
3735         (thread_db_find_new_threads_silently)
3736         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3737         a thread pointer instead of a ptid_t.  All callers adjusted.
3738         * mi/mi-cmd-var.c: Include "inferior.h".
3739         (mi_cmd_var_update_iter): Update to use thread pointers.
3740         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3741         inferior directly.
3742         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3743         out to ...
3744         (mi_output_running): ... this new function.
3745         (mi_on_resume_1): Adjust to use it.
3746         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3747         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3748         directly.
3749         (interrupt_thread_callback): : Adjust to use thread and inferior
3750         pointers.
3751         * proc-service.c: Include "gdbthread.h".
3752         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3753         * progspace-and-thread.c: Include "inferior.h".
3754         * progspace.c: Include "inferior.h".
3755         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3756         hold a reference to an inferior_object.
3757         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3758         inferior_thread.
3759         * python/py-inferior.c (struct inferior_object): Give the type a
3760         tag name instead of a typedef.
3761         (python_on_normal_stop): No need to check if the current thread is
3762         listed.
3763         (inferior_to_inferior_object): Change return type to
3764         inferior_object.  All callers adjusted.
3765         (find_thread_object): Delete, bits factored out to ...
3766         (thread_to_thread_object): ... this new function.
3767         * python/py-infthread.c (create_thread_object): Use
3768         inferior_to_inferior_object.
3769         (thpy_is_stopped): Use thread pointer directly.
3770         (gdbpy_selected_thread): Use inferior_thread.
3771         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3772         field, replaced with ...
3773         <thread>: ... this new field.  All users adjusted.
3774         (btpy_insn_or_gap_new): Drop const.
3775         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3776         callers adjusted.
3777         * python/py-record.c: Include "gdbthread.h".
3778         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3779         a ptid_t.  All callers adjusted.
3780         (gdbpy_current_recording): Use inferior_thread.
3781         * python/py-record.h (recpy_record_object) <ptid>: Delete
3782         field, replaced with ...
3783         <thread>: ... this new field.  All users adjusted.
3784         (recpy_element_object) <ptid>: Delete
3785         field, replaced with ...
3786         <thread>: ... this new field.  All users adjusted.
3787         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3788         a ptid_t.  All callers adjusted.
3789         * python/py-threadevent.c: Include "gdbthread.h".
3790         (get_event_thread): Use thread_to_thread_object.
3791         * python/python-internal.h (struct inferior_object): Forward
3792         declare.
3793         (find_thread_object, find_inferior_object): Delete declarations.
3794         (thread_to_thread_object, inferior_to_inferior_object): New
3795         declarations.
3796         * record-btrace.c: Include "inferior.h".
3797         (require_btrace_thread): Use inferior_thread.
3798         (record_btrace_frame_sniffer)
3799         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3800         (get_thread_current_frame): Use scoped_restore_current_thread and
3801         switch_to_thread.
3802         (get_thread_current_frame): Use thread pointer directly.
3803         (record_btrace_replay_at_breakpoint): Use thread's inferior
3804         pointer directly.
3805         * record-full.c: Include "inferior.h".
3806         * regcache.c: Include "gdbthread.h".
3807         (get_thread_arch_regcache): Use the inferior's address space
3808         directly.
3809         (get_thread_regcache, registers_changed_thread): New.
3810         * regcache.h (get_thread_regcache(thread_info *thread)): New
3811         overload.
3812         (registers_changed_thread): New.
3813         (remote_target) <remote_detach_1>: Swap order of parameters.
3814         (remote_add_thread): <remote_add_thread>: Return the new thread.
3815         (get_remote_thread_info(ptid_t)): New overload.
3816         (remote_target::remote_notice_new_inferior): Use thread pointers
3817         directly.
3818         (remote_target::process_initial_stop_replies): Use
3819         thread_info::set_running.
3820         (remote_target::remote_detach_1, remote_target::detach)
3821         (extended_remote_target::detach): Adjust.
3822         * stack.c (frame_show_address): Use inferior_thread.
3823         * target-debug.h (target_debug_print_thread_info_pp): New.
3824         * target-delegates.c: Regenerate.
3825         * target.c (default_thread_address_space): Delete.
3826         (memory_xfer_partial_1): Use current_inferior.
3827         (target_detach): Use current_inferior.
3828         (target_thread_address_space): Delete.
3829         (generic_mourn_inferior): Use current_inferior.
3830         * target.h (struct target_ops) <thread_address_space>: Delete.
3831         (target_thread_address_space): Delete.
3832         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3833         pointers directly.
3834         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3835         thread pointer instead of a ptid_t.  Adjust all callers.
3836         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3837         (first_thread_of_process): Delete, replaced by ...
3838         (first_thread_of_inferior): ... this new function.  All callers
3839         adjusted.
3840         (any_thread_of_process): Rename to ...
3841         (any_thread_of_inferior): ... this, and take an inferior pointer.
3842         (any_live_thread_of_process): Rename to ...
3843         (any_live_thread_of_inferior): ... this, and take an inferior
3844         pointer.
3845         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3846         (value_in_thread_stack_temporaries)
3847         (get_last_thread_stack_temporary): Take a thread pointer instead
3848         of a ptid_t.  Adjust all callers.
3849         (thread_info::set_running): New.
3850         (validate_registers_access): Use inferior_thread.
3851         (can_access_registers_ptid): Rename to ...
3852         (can_access_registers_thread): ... this, and take a thread
3853         pointer.
3854         (print_thread_info_1): Adjust to compare thread pointers instead
3855         of ptids.
3856         (switch_to_no_thread, switch_to_thread): Make extern.
3857         (scoped_restore_current_thread::~scoped_restore_current_thread):
3858         Use m_thread pointer directly.
3859         (scoped_restore_current_thread::scoped_restore_current_thread):
3860         Use inferior_thread.
3861         (thread_command): Use thread pointer directly.
3862         (thread_num_make_value_helper): Use inferior_thread.
3863         * top.c (execute_command): Use inferior_thread.
3864         * tui/tui-interp.c: Include "inferior.h".
3865         * varobj.c (varobj_create): Use inferior_thread.
3866         (value_of_root_1): Use find_thread_global_id instead of
3867         global_thread_id_to_ptid.
3868
3869 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3870
3871         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3872         possible.
3873         (regcache::write_part): Likewise.
3874         (readable_regcache::cooked_read_part): Update comment.
3875         (readable_regcache::cooked_write_part): Likewise.
3876         * regcache.h: (readable_regcache::read_part): Likewise.
3877         (regcache::write_part): Likewise.
3878
3879 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3880             Dirk Schubert  <dirk.schubert@arm.com>
3881
3882         * aarch64-linux-nat.c (post_attach): New.
3883         (aarch64_linux_nat_target::post_attach): Override post_attach to
3884         record the number of hardware debug registers.
3885
3886 2018-06-20  Tom Tromey  <tom@tromey.com>
3887
3888         * python/py-param.c (add_setshow_generic): Make parameters const.
3889         (parmpy_init): Update.
3890
3891 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3892
3893         * regcache.h (regcache_cooked_read_ftype): Rename to...
3894         (register_read_ftype): ...this, change type to function_view.
3895         (class reg_buffer) <save>: Remove src parameter.
3896         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3897         parameter non-const in first overload.  Remove src parameter in
3898         second overload.
3899         * regcache.c (do_cooked_read): Remove.
3900         (readonly_detached_regcache::readonly_detached_regcache): Make
3901         parameter non-const, adjust call to other constructor.
3902         (reg_buffer::save): Remove src parameter.
3903         * frame.c (do_frame_register_read): Remove.
3904         (frame_save_as_regcache): Use lambda function.
3905         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3906         parameter to ppu2spu_data *.
3907         (ppu2spu_sniffer): Use lambda function.
3908
3909 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3910
3911         * record-full.c (record_full_target::insert_breakpoint): Remove
3912         "struct" keyword, add const.
3913
3914 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3915
3916         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3917         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3918         * configure.ac: Remove AC_PREREQ, add missing quoting.
3919         * gnulib/configure.ac: Modernize usage of
3920         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3921         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3922         (AUTOMAKE_VERSION): Bump to 1.15.1.
3923         * configure: Re-generate.
3924         * config.in: Re-generate.
3925         * aclocal.m4: Re-generate.
3926         * gnulib/aclocal.m4: Re-generate.
3927         * gnulib/config.in: Re-generate.
3928         * gnulib/configure: Re-generate.
3929         * gnulib/import/Makefile.in: Re-generate.
3930
3931 2018-06-19  Pedro Alves  <palves@redhat.com>
3932
3933         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3934         (lookup_minimal_symbol_by_pc_section): ... here with
3935         gdb_assert_not_reached added.
3936
3937 2018-06-19  Pedro Alves  <palves@redhat.com>
3938
3939         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3940         parameter with a block parameter.  Compare location's block symbol
3941         with the frame's block instead of addresses.
3942         (skip_inline_frames): Pass the current block instead of the
3943         frame's address.  Break out as soon as we determine the frame
3944         should not be skipped.
3945
3946 2018-06-18  Tom Tromey  <tom@tromey.com>
3947
3948         * solib-aix.c (solib_aix_get_section_offsets): Return
3949         unique_xmalloc_ptr.
3950         (solib_aix_solib_create_inferior_hook): Update.
3951
3952 2018-06-18  Tom Tromey  <tom@tromey.com>
3953
3954         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3955
3956 2018-06-18  Tom Tromey  <tom@tromey.com>
3957
3958         * solib-frv.c (frv_relocate_main_executable): Use
3959         unique_xmalloc_ptr.
3960         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3961         unique_xmalloc_ptr.
3962
3963 2018-06-18  Tom Tromey  <tom@tromey.com>
3964
3965         * objfiles.h (inhibit_section_map_updates): Update.
3966         (resume_section_map_updates, resume_section_map_updates_cleanup):
3967         Remove.
3968         * solib-svr4.c (svr4_handle_solib_event): Update.
3969         * objfiles.c (inhibit_section_map_updates): Return
3970         scoped_restore_tmpl<int>.
3971         (resume_section_map_updates, resume_section_map_updates_cleanup):
3972         Remove.
3973
3974 2018-06-18  Tom Tromey  <tom@tromey.com>
3975
3976         * valprint.h (read_string): Update.
3977         * valprint.c (read_string): Change type of "buffer".
3978         (val_print_string): Update.
3979         * python/py-value.c (valpy_string): Update.
3980         * language.h (struct language_defn) <la_get_string>: Change
3981         type of "buffer".
3982         (default_get_string, c_get_string): Update.
3983         * language.c (default_get_string): Change type of "buffer".
3984         * guile/scm-value.c (gdbscm_value_to_string): Update.
3985         * c-lang.c (c_get_string): Change type of "buffer".
3986
3987 2018-06-18  Tom Tromey  <tom@tromey.com>
3988
3989         * ser-mingw.c (struct pipe_state_destroyer): New.
3990         (pipe_state_up): New typedef.
3991         (cleanup_pipe_state): Remove.
3992         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
3993
3994 2018-06-18  Tom Tromey  <tom@tromey.com>
3995
3996         * rust-lang.h (rust_yyerror): Don't declare.
3997         * rust-lang.c (rust_language_defn): Update.
3998         * rust-exp.y (yyerror): Now static.
3999         * parse.c (parse_exp_in_context_1): Update.
4000         * p-lang.h (p_yyerror): Don't declare.
4001         * p-lang.c (p_language_defn): Update.
4002         * p-exp.y (yyerror): Now static.
4003         * opencl-lang.c (opencl_language_defn): Update.
4004         * objc-lang.c (objc_language_defn): Update.
4005         * m2-lang.h (m2_yyerror): Don't declare.
4006         * m2-lang.c (m2_language_defn): Update.
4007         * m2-exp.y (yyerror): Now static.
4008         * language.h (struct language_defn) <la_error>: Remove.
4009         * language.c (unk_lang_error): Remove.
4010         (unknown_language_defn, auto_language_defn): Remove.
4011         * go-lang.h (go_yyerror): Don't declare.
4012         * go-lang.c (go_language_defn): Update.
4013         * go-exp.y (yyerror): Now static.
4014         * f-lang.h (f_yyerror): Don't declare.
4015         * f-lang.c (f_language_defn): Update.
4016         * f-exp.y (yyerror): Now static.
4017         * d-lang.h (d_yyerror): Don't declare.
4018         * d-lang.c (d_language_defn): Update.
4019         * d-exp.y (yyerror): Now static.
4020         * c-lang.h (c_yyerror): Don't declare.
4021         * c-lang.c (c_language_defn, cplus_language_defn)
4022         (asm_language_defn, minimal_language_defn): Update.
4023         * c-exp.y (yyerror): Now static.
4024         * ada-lang.h (ada_yyerror): Don't declare.
4025         * ada-lang.c (ada_language_defn): Update.
4026         * ada-exp.y (yyerror): Now static.
4027
4028 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4029
4030         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4031         (store_sveregs_to_thread): Likewise.
4032         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4033         (aarch64_linux_store_inferior_registers): Likewise.
4034         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4035         function.
4036         (aarch64_sve_regs_copy_to_regcache): Likewise.
4037         (aarch64_sve_regs_copy_from_regcache): Likewise.
4038         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4039         declaration.
4040         (aarch64_sve_regs_copy_to_regcache): Likewise.
4041         (aarch64_sve_regs_copy_from_regcache): Likewise.
4042         (sve_context): Structure from Linux headers.
4043         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4044         (SVE_SIG_ZREG_SIZE): Likewise.
4045         (SVE_SIG_PREG_SIZE): Likewise.
4046         (SVE_SIG_FFR_SIZE): Likewise.
4047         (SVE_SIG_REGS_OFFSET): Likewise.
4048         (SVE_SIG_ZREGS_OFFSET): Likewise.
4049         (SVE_SIG_ZREG_OFFSET): Likewise.
4050         (SVE_SIG_ZREGS_SIZE): Likewise.
4051         (SVE_SIG_PREGS_OFFSET): Likewise.
4052         (SVE_SIG_PREG_OFFSET): Likewise.
4053         (SVE_SIG_PREGS_SIZE): Likewise.
4054         (SVE_SIG_FFR_OFFSET): Likewise.
4055         (SVE_SIG_REGS_SIZE): Likewise.
4056         (SVE_SIG_CONTEXT_SIZE): Likewise.
4057         (SVE_PT_REGS_MASK): Likewise.
4058         (SVE_PT_REGS_FPSIMD): Likewise.
4059         (SVE_PT_REGS_SVE): Likewise.
4060         (SVE_PT_VL_INHERIT): Likewise.
4061         (SVE_PT_VL_ONEXEC): Likewise.
4062         (SVE_PT_REGS_OFFSET): Likewise.
4063         (SVE_PT_FPSIMD_OFFSET): Likewise.
4064         (SVE_PT_FPSIMD_SIZE): Likewise.
4065         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4066         (SVE_PT_SVE_PREG_SIZE): Likewise.
4067         (SVE_PT_SVE_FFR_SIZE): Likewise.
4068         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4069         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4070         (__SVE_SIG_TO_PT): Likewise.
4071         (SVE_PT_SVE_OFFSET): Likewise.
4072         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4073         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4074         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4075         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4076         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4077         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4078         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4079         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4080         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4081         (SVE_PT_SVE_SIZE): Likewise.
4082         (SVE_PT_SIZE): Likewise.
4083         (HAS_SVE_STATE): New define.
4084
4085 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4086
4087         * nat/aarch64-sve-linux-sigcontext.h: New file.
4088         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4089         new files.
4090         (SVE_VQ_MIN): Likewise.
4091         (SVE_VQ_MAX): Likewise.
4092         (SVE_VL_MIN): Likewise.
4093         (SVE_VL_MAX): Likewise.
4094         (SVE_NUM_ZREGS): Likewise.
4095         (SVE_NUM_PREGS): Likewise.
4096         (sve_vl_valid): Likewise.
4097         (struct user_sve_header): Likewise.
4098
4099 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4100             Richard Bunt <Richard.Bunt@arm.com>
4101
4102         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4103         was requested by GDB.
4104
4105 2018-06-15  Tom de Vries  <tdevries@suse.de>
4106
4107         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4108
4109 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4110
4111         * gnulib/update-gnulib.sh: Print expected versions of
4112         autoconf/aclocal.
4113
4114 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4115
4116         * arch-utils.c (default_type_align): Use type_length_units.
4117         * gdbtypes.c (type_align): Use type_length_units.
4118
4119 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4120
4121         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4122         of 'define' command.
4123
4124 2018-06-14  Tom de Vries  <tdevries@suse.de>
4125
4126         PR cli/22573
4127         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4128         get_no_prettyformat_print_options.
4129
4130 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4131
4132         * sparc-nat.h: Include target.h.
4133         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4134         <fetch_registers>: Remove this argument in function call.
4135         <store_registers>: Remove this argument in function call, remove
4136         extra semicolon.
4137         <low_forget_process>: Call sparc64_forget_process instead of
4138         sparc_forget_process.
4139
4140 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4141
4142         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4143         (procfs_target::make_corefile_notes): Adjust to new
4144         target_read_alloc return type.
4145
4146 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4147             Stephen Roberts  <stephen.roberts@arm.com>
4148
4149         PR gdb/22882
4150         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4151         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4152         Move should_notify_stop local into more inner scope.
4153
4154 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4155             Stephen Roberts  <stephen.roberts@arm.com>
4156
4157         PR gdb/22882
4158         * infrun.c (resume_1): Add call to mark_async_event_handler.
4159
4160 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4161
4162         * infrun.c (do_target_wait): Change old version of $pc printed.
4163
4164 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4165
4166         * dwarf2read.c (read_index_from_section): Rename to...
4167         (read_gdb_index_from_section): ... this, update all callers.
4168         (dwarf2_read_index): Rename to...
4169         (dwarf2_read_gdb_index): ... this, update all callers.
4170
4171 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4172
4173         * gdb/hppa-linux-nat.c
4174         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4175         hppa_linux_nat_target::fetch_registers.
4176
4177 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4178
4179         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4180         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4181         (AARCH64_DWARF_SVE_FFR): Likewise.
4182         (AARCH64_DWARF_SVE_P0): Likewise.
4183         (AARCH64_DWARF_SVE_Z0): Likewise.
4184
4185 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4186
4187         * common/common-regcache.h (raw_compare): New function.
4188         * regcache.c (regcache::raw_compare): Likewise.
4189         * regcache.h (regcache::raw_compare): New declaration.
4190
4191 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4192
4193         * common/common-regcache.h (reg_buffer_common): New structure.
4194         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4195         (reg_buffer::raw_supply): Likewise.
4196         (reg_buffer::raw_supply_integer): Likewise.
4197         (reg_buffer::raw_supply_zeroed): Likewise.
4198         (reg_buffer::raw_collect): Likewise.
4199         (reg_buffer::raw_collect_integer): Likewise.
4200         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4201         (reg_buffer::raw_supply): Likewise.
4202         (reg_buffer::raw_supply_integer): Likewise.
4203         (reg_buffer::raw_supply_zeroed): Likewise.
4204         (reg_buffer::raw_collect): Likewise.
4205         (reg_buffer::raw_collect_integer): Likewise.
4206
4207 2018-06-10  Tom Tromey  <tom@tromey.com>
4208
4209         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4210         (class remote_state) <stop_reply_queue>: Now std::vector.
4211         (remote_state::~remote_state)
4212         (remote_target::stop_reply_queue_length): Update.
4213         (struct queue_iter_param, remove_child_of_pending_fork)
4214         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4215         (check_pending_event_prevents_wildcard_vcont_callback)
4216         (remove_stop_reply_for_inferior)
4217         (remove_stop_reply_of_remote_state)
4218         (remote_notif_remove_once_on_match)
4219         (stop_reply_match_ptid_and_ws)
4220         (remote_kill_child_of_pending_fork): Remove.
4221         (remote_target::remove_new_fork_children)
4222         (remote_target::check_pending_events_prevent_wildcard_vcont)
4223         (remote_target::discard_pending_stop_replies)
4224         (remote_target::discard_pending_stop_replies_in_queue)
4225         (remote_target::remote_notif_remove_queued_reply)
4226         (remote_target::queued_stop_reply)
4227         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4228         (remote_target::wait, remote_target::kill_new_fork_children)
4229         (remote_target::async): Update.
4230
4231 2018-06-10  Tom Tromey  <tom@tromey.com>
4232
4233         * record-full.c (record_full_arch_list_cleanups): Remove.
4234         (record_full_message): Use try/catch.
4235         (record_full_wait_cleanups): Remove.
4236         (record_full_wait_1): Use try/catch.
4237         (record_full_restore): Likewise.
4238
4239 2018-06-10  Tom Tromey  <tom@tromey.com>
4240
4241         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4242         declare VEC.  Add constructor.
4243         <in_target_beneath>: Now bool.
4244         (record_full_breakpoints): Now a std::vector, static.
4245         (record_full_sync_record_breakpoints)
4246         (record_full_init_record_breakpoints)
4247         (record_full_target::insert_breakpoint)
4248         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4249
4250 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4251
4252         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4253         * serial.c (serial_interface_lookup): Remove struct keyword.
4254
4255 2018-06-10  Tom Tromey  <tom@tromey.com>
4256
4257         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4258         method.
4259         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4260         a method.
4261         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4262         method.
4263         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4264         "beneath" as a method.
4265         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4266         Use "beneath" as a method.
4267
4268 2018-06-10  Tom Tromey  <tom@tromey.com>
4269
4270         * tracefile.c (struct trace_file_writer_deleter): New.
4271         <operator()>: Rename from trace_file_writer_xfree.
4272         (trace_file_writer_up): New typedef.
4273         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4274
4275 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4276
4277         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4278         <m_registers, m_register_status>: Change type to
4279         std::unique_ptr.
4280         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4281         XCNEWVEC.
4282
4283 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4284
4285         * common/common-regcache.h (enum register_status): Add
4286         underlying type "signed char".
4287         * regcache.h (reg_buffer) <m_register_status>: Change type to
4288         register_status *.
4289         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4290         register_status instead of signed char.
4291         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4292         (reg_buffer::get_register_status): Remove cast.
4293         (readable_regcache::raw_read): Remove cast.
4294         (readable_regcache::cooked_read): Remove cast.
4295
4296 2018-06-09  Tom Tromey  <tom@tromey.com>
4297
4298         * source.c (reverse_search_command, forward_search_command): Use
4299         scoped_fd.
4300
4301 2018-06-09  Tom Tromey  <tom@tromey.com>
4302
4303         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4304         (serial_ops_list): Now static, std::vector.
4305         (serial_interface_lookup, serial_add_interface): Update.
4306
4307 2018-06-09  Tom Tromey  <tom@tromey.com>
4308
4309         * dwarf2read.c (process_cu_includes): Update.
4310         (process_full_comp_unit): Update.
4311         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4312         std::vector.
4313
4314 2018-06-08  Paul Koning  <paul_koning@dell.com>
4315
4316         PR gdb/23252
4317
4318         * python/python.c (do_start_initialization):
4319         Avoid call to internal Python API.
4320         (init__gdb_module): New function.
4321
4322 2018-06-08  Gary Benson <gbenson@redhat.com>
4323
4324         * linux-thread-db.c (valprint.h): New include.
4325         (struct check_thread_db_info): New structure.
4326         (check_thread_db_on_load, tdb_testinfo): New static globals.
4327         (check_thread_db, check_thread_db_callback): New functions.
4328         (try_thread_db_load_1): Run integrity checks if requested.
4329         (maintenance_check_libthread_db): New function.
4330         (_initialize_thread_db): Register "maint check libthread-db"
4331         and "maint set/show check-libthread-db".
4332         * NEWS: Mention the above new commands.
4333
4334 2018-06-08  Tom Tromey  <tom@tromey.com>
4335
4336         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4337         now a method.
4338
4339 2018-06-08  Tom Tromey  <tom@tromey.com>
4340
4341         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4342
4343 2018-06-08  Tom Tromey  <tom@tromey.com>
4344
4345         * common/btrace-common.h (struct btrace_data): Add constructor,
4346         destructor, move assignment operator.
4347         <empty, clear, fini>: New methods.
4348         <format>: Initialize.
4349         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4350         (btrace_data_empty): Don't declare.
4351         * common/btrace-common.c (btrace_data_init): Remove.
4352         (btrace_data::fini): Rename from btrace_data_fini.
4353         (btrace_data::empty): Rename from btrace_data_empty.
4354         (btrace_data::clear): Rename from btrace_data_clear.  Return
4355         bool.
4356         * btrace.h (make_cleanup_btrace_data): Don't declare.
4357         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4358         (parse_xml_btrace): Update.
4359         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4360         (maint_btrace_clear_packet_history_cmd): Update.
4361
4362 2018-06-07  Pedro Alves  <palves@redhat.com>
4363
4364         * target.h (target_ops) <beneath>: Now a method.  All references
4365         updated.
4366         (class target_stack): New.
4367         * target.c (g_target_stack): New.
4368         (g_current_top_target): Delete.
4369         (current_top_target): Get the top target out of g_target_stack.
4370         (target_stack::push, target_stack::unpush): New.
4371         (push_target, unpush_target): Reimplement.
4372         (target_is_pushed): Reimplement in terms of g_target_stack.
4373         (target_ops::beneath, target_stack::find_beneath): New.
4374
4375 2018-06-07  Pedro Alves  <palves@redhat.com>
4376
4377         * target.h (find_target_beneath): Delete declaration.
4378         * target.c (find_target_beneath): Delete definition.
4379         * aix-thread.c: All callers of find_target_beneath adjusted to
4380         call target_ops::beneath instead.
4381         * bsd-uthread.c: Likewise.
4382         * linux-thread-db.c: Likewise.
4383         * ravenscar-thread.c: Likewise.
4384         * sol-thread.c: Likewise.
4385         * spu-multiarch.c: Likewise.
4386
4387 2018-06-07  Pedro Alves  <palves@redhat.com>
4388
4389         * target.h (target_ops) <beneath>: Now a method.  All references
4390         updated.
4391         (target_ops) <m_beneath>: New.
4392         * target.c (target_ops::beneath): New.
4393         * corelow.c: Adjust all references to target_ops::beneath.
4394         * linux-thread-db.c: Likewise.
4395         * make-target-delegates: Likewise.
4396         * record-btrace.c: Likewise.
4397         * record-full.c: Likewise.
4398         * remote.c: Likewise.
4399         * target.c: Likewise.
4400         * target-delegates.c: Regenerate.
4401
4402 2018-06-07  Pedro Alves  <palves@redhat.com>
4403
4404         * target.h (target_stack): Delete.
4405         (current_top_target): Declare function.
4406         * target.c (target_stack): Delete.
4407         (g_current_top_target): New.
4408         (current_top_target): New function.
4409         * auxv.c: Use current_top_target instead of target_stack
4410         throughout.
4411         * avr-tdep.c: Likewise.
4412         * breakpoint.c: Likewise.
4413         * corefile.c: Likewise.
4414         * elfread.c: Likewise.
4415         * eval.c: Likewise.
4416         * exceptions.c: Likewise.
4417         * frame.c: Likewise.
4418         * gdbarch-selftests.c: Likewise.
4419         * gnu-v3-abi.c: Likewise.
4420         * ia64-tdep.c: Likewise.
4421         * ia64-vms-tdep.c: Likewise.
4422         * infcall.c: Likewise.
4423         * infcmd.c: Likewise.
4424         * infrun.c: Likewise.
4425         * linespec.c: Likewise.
4426         * linux-tdep.c: Likewise.
4427         * minsyms.c: Likewise.
4428         * ppc-linux-nat.c: Likewise.
4429         * ppc-linux-tdep.c: Likewise.
4430         * procfs.c: Likewise.
4431         * regcache.c: Likewise.
4432         * remote.c: Likewise.
4433         * rs6000-tdep.c: Likewise.
4434         * s390-linux-nat.c: Likewise.
4435         * s390-tdep.c: Likewise.
4436         * solib-aix.c: Likewise.
4437         * solib-darwin.c: Likewise.
4438         * solib-dsbt.c: Likewise.
4439         * solib-spu.c: Likewise.
4440         * solib-svr4.c: Likewise.
4441         * solib-target.c: Likewise.
4442         * sparc-tdep.c: Likewise.
4443         * sparc64-tdep.c: Likewise.
4444         * spu-tdep.c: Likewise.
4445         * symfile.c: Likewise.
4446         * symtab.c: Likewise.
4447         * target-descriptions.c: Likewise.
4448         * target-memory.c: Likewise.
4449         * target.c: Likewise.
4450         * target.h: Likewise.
4451         * tracefile-tfile.c: Likewise.
4452         * tracepoint.c: Likewise.
4453         * valops.c: Likewise.
4454         * valprint.c: Likewise.
4455         * value.c: Likewise.
4456         * windows-tdep.c: Likewise.
4457         * mi/mi-main.c: Likewise.
4458
4459 2018-06-07  Tom Tromey  <tom@tromey.com>
4460
4461         * valprint.h (build_address_symbolic): Declare.
4462         * printcmd.c (print_address_symbolic): Update.
4463         (build_address_symbolic): Change "name" and "filename" to
4464         std::string.
4465         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4466         Update.
4467         * defs.h (build_address_symbolic): Remove declaration.
4468
4469 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4470
4471         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4472         (aarch64_vnv_type): Add function.
4473         (aarch64_pseudo_register_name): Add V regs for SVE.
4474         (aarch64_pseudo_register_type): Likewise.
4475         (aarch64_pseudo_register_reggroup_p): Likewise.
4476         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4477         (aarch64_pseudo_read_value): Add V regs for SVE.
4478         (aarch64_pseudo_write_2): Use V0 offset for SVE
4479         (aarch64_pseudo_write): Add V regs for SVE.
4480         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4481
4482 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4483
4484         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4485         (sve_vl_from_vq): Likewise.
4486
4487 2018-06-05  Tom Tromey  <tom@tromey.com>
4488
4489         * cli/cli-cmds.c (show_version): Update.
4490         * top.c (print_gdb_version): Add "interactive" parameter.
4491         Update.
4492         * main.c (captured_main_1): Update.
4493         * top.h (print_gdb_version): Add "interactive" parameter and a
4494         comment.
4495
4496 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4497
4498         * common/enum-flags.h: Add trailing semicolon to example in
4499         comment.
4500
4501 2018-06-05  Tom Tromey  <tom@tromey.com>
4502
4503         PR cli/12326:
4504         * NEWS: Add entry about pager.
4505         * utils.c (pagination_disabled_for_command): New global.
4506         (prompt_for_continue): Allow "c" response to prompt.
4507         (reinitialize_more_filter): Clear
4508         pagination_disabled_for_command.
4509         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4510
4511 2018-06-04  Tom Tromey  <tom@tromey.com>
4512
4513         * ada-lang.h (ada_lookup_symbol_list): Update.
4514         * ada-lang.c (resolve_subexp): Update.
4515         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4516         parameter.
4517         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4518         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4519         results parameter to std::vector.
4520         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4521         Update.
4522         * ada-exp.y (block_lookup): Update.
4523         (select_possible_type_sym): Change type of syms.  Remove nsyms
4524         parameter.
4525         (write_var_or_type, write_name_assoc): Update.
4526
4527 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4528
4529         * windows-nat.c (windows_nat_target::xfer_partial): Return
4530         TARGET_XFER_E_IO if we need to delegate to the target beneath
4531         but BENEATH is NULL.
4532
4533 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4534
4535         * Makefile.in (config.status): Add configure.nat as a
4536         dependency.
4537
4538 2018-06-04  Tom Tromey  <tom@tromey.com>
4539
4540         * cp-name-parser.y (cpname_state): Add method declarations.
4541         (HANDLE_QUAL): Update.
4542         (cpname_state::d_grab, cpname_state::fill_comp)
4543         (cpname_state::make_operator, cpname_state::make_dtor)
4544         (cpname_state::make_builtin_type, cpname_state::make_name)
4545         (cpname_state::d_qualify, cpname_state::d_int_type)
4546         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4547         (%union): Move earlier.
4548
4549 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4550
4551         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4552
4553 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4554
4555         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4556         (aarch64_pseudo_write_1): Likewise.
4557         (aarch64_pseudo_read_value): Use helper.
4558         (aarch64_pseudo_write): Likewise.
4559
4560 2018-06-04  Pedro Alves  <palves@redhat.com>
4561
4562         * darwin-nat.c (darwin_ops): Delete.
4563         (darwin_attach_pid): Use get_native_target.
4564
4565 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4566
4567         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4568         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4569
4570 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4571
4572         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4573         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4574         (aarch64_gdbarch_init): Check for SVE.
4575         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4576
4577 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4578
4579         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4580         * aarch64-tdep.h (aarch64_read_description): Likewise.
4581         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4582         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4583         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4584         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4585         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4586
4587 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4588
4589         * value.c (value_fetch_lazy_bitfield): New.
4590         (value_fetch_lazy_memory): New.
4591         (value_fetch_lazy_register): New.
4592         (value_fetch_lazy): Factor out to smaller functions.
4593
4594 2018-06-01  Tom Tromey  <tom@tromey.com>
4595
4596         * cp-name-parser.y (backslashable, represented): Now const.
4597
4598 2018-06-01  Tom Tromey  <tom@tromey.com>
4599
4600         * cp-name-parser.y: Include parser-defs.h.
4601         (parser_fprintf): Remove declaration.
4602
4603 2018-06-01  Tom Tromey  <tom@tromey.com>
4604
4605         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4606         %parse-param.
4607         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4608         (global_result): Remove globals.
4609         (struct cpname_state): New.
4610         (yyparse): Don't declare.
4611         (yylex, yyerror): Move declarations after %union.
4612         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4613         (make_name): Add state parameter.
4614         Update all callers.
4615         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4616         parameter.
4617         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4618         Update.
4619         (yylex): Add lvalp, state parameters.
4620         (yyerror): Add state parameter.
4621         (cp_demangled_name_to_comp): Update.
4622
4623 2018-06-01  Tom Tromey  <tom@tromey.com>
4624
4625         * cp-name-parser.y (parser_fprintf): Declare.
4626         (GDB_YY_REMAP_PREFIX): Define.
4627         Include yy-remap.h.  Don't redefine yy* identifiers.
4628
4629 2018-06-01  Tom Tromey  <tom@tromey.com>
4630
4631         * python/py-type.c (typy_legacy_template_argument): Update.
4632         * cp-support.h (cp_demangled_name_to_comp): Update.
4633         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4634         parameter to be a "std::string *".
4635         (main): Update.
4636
4637 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4638
4639         * ada-lex.l: Include "diagnostics.h" instead of
4640         "common/diagnostics.h".
4641         * unittests/environ-selftests.c: Likewise.
4642         * common/diagnostics.h: Moved to ../include.
4643
4644 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4645
4646         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4647         to language_mode_manual while calling breakpoint_re_set_one.
4648
4649 2018-06-01  Tom Tromey  <tom@tromey.com>
4650
4651         * valops.c (value_cast_structs, destructor_name_p): Update.
4652         * symtab.c (gdb_mangle_name): Update.
4653         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4654         Update.
4655         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4656         (pascal_object_print_value_fields, pascal_object_print_value):
4657         Update.
4658         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4659         * linespec.c (find_methods): Update.
4660         * gdbtypes.h (type_name_no_tag): Remove.
4661         (type_name_or_error): Rename from type_name_no_tag_or_error.
4662         * gdbtypes.c (type_name_no_tag): Remove.
4663         (type_name_or_error): Rename from type_name_no_tag_or_error.
4664         (lookup_struct_elt_type, check_typedef): Update.
4665         * expprint.c (print_subexp_standard): Update.
4666         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4667         * d-namespace.c (d_lookup_nested_symbol): Update.
4668         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4669         (cp_print_class_member): Update.
4670         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4671         * completer.c (add_struct_fields): Update.
4672         * c-typeprint.c (cp_type_print_derivation_info)
4673         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4674         Update.
4675         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4676         (ada_prefer_type, ada_is_exception_sym): Update.
4677
4678 2018-06-01  Tom Tromey  <tom@tromey.com>
4679
4680         * valops.c (enum_constant_from_type, value_namespace_elt)
4681         (value_maybe_namespace_elt): Update.
4682         * valarith.c (find_size_for_pointer_math): Update.
4683         * target-descriptions.c (make_gdb_type): Update.
4684         * symmisc.c (print_symbol): Update.
4685         * stabsread.c (define_symbol, read_type)
4686         (complain_about_struct_wipeout, add_undefined_type)
4687         (cleanup_undefined_types_1): Update.
4688         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4689         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4690         (rust_internal_print_type, rust_composite_type)
4691         (rust_evaluate_funcall, rust_evaluate_subexp)
4692         (rust_inclusive_range_type_p): Update.
4693         * python/py-type.c (typy_get_tag): Update.
4694         * p-typeprint.c (pascal_type_print_base): Update.
4695         * mdebugread.c (parse_symbol, parse_type): Update.
4696         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4697         Update.
4698         * guile/scm-type.c (gdbscm_type_tag): Update.
4699         * go-lang.c (sixg_string_p): Update.
4700         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4701         Update.
4702         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4703         (TYPE_TAG_NAME): Remove.
4704         * gdbtypes.c (type_name_no_tag): Simplify.
4705         (check_typedef, check_types_equal, recursive_dump_type)
4706         (copy_type_recursive, arch_composite_type): Update.
4707         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4708         in summary mode when needed.
4709         * eval.c (evaluate_funcall): Update.
4710         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4711         (process_structure_scope, read_enumeration_type)
4712         (read_namespace_type, read_module_type, determine_prefix): Update.
4713         * cp-support.c (inspect_type): Update.
4714         * coffread.c (process_coff_symbol, decode_base_type): Update.
4715         * c-varobj.c (c_is_path_expr_parent): Update.
4716         * c-typeprint.c (c_type_print_base_struct_union): Update.
4717         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4718         summary when using C language.
4719         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4720         (gen_maybe_namespace_elt): Update.
4721         * ada-lang.c (ada_type_name): Simplify.
4722         (empty_record, ada_template_to_fixed_record_type_1)
4723         (template_to_static_fixed_type)
4724         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4725
4726 2018-06-01  Tom Tromey  <tom@tromey.com>
4727
4728         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4729         c_print_type.
4730         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4731         (c_print_type): Update.
4732         (c_print_type): New overload.
4733         (c_type_print_varspec_prefix, c_type_print_args)
4734         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4735         (c_type_print_base_struct_union, c_type_print_base_1)
4736         (cp_type_print_method_args): Add "language" parameter.
4737         (c_type_print_base): Update.
4738         * c-lang.h (c_print_type): Add new overload.
4739
4740 2018-06-01  Tom Tromey  <tom@tromey.com>
4741
4742         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4743         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4744
4745 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4746
4747         * aarch64-tdep.c (aarch64_sve_register_names): New const
4748         var.
4749         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4750         (AARCH64_SVE_Z_REGS_NUM): New define.
4751         (AARCH64_SVE_P_REGS_NUM): Likewise.
4752         (AARCH64_SVE_NUM_REGS): Likewise.
4753
4754 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4755
4756         * nat/linux-ptrace.h [__alpha__]
4757         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4758         definitions.
4759
4760 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4761
4762         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4763         the endianness selected.
4764         * NEWS: Document `set endian auto' mode operation update.
4765
4766 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4767
4768         * Makefile.in: Add new header.
4769         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4770         (sve_vl_from_vg): Likewise.
4771         (sve_vq_from_vl): Likewise.
4772         (sve_vl_from_vq): Likewise.
4773         (sve_vq_from_vg): Likewise.
4774         (sve_vg_from_vq): Likewise.
4775         * configure.nat: Add new c file.
4776         * nat/aarch64-sve-linux-ptrace.c: New file.
4777         * nat/aarch64-sve-linux-ptrace.h: New file.
4778
4779 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4780
4781         * aarch64-linux-nat.c (aarch64_linux_read_description):
4782         Add parmeter zero.
4783         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4784         Likewise.
4785         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4786         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4787         (aarch64_gdbarch_init): Add parmeter zero.
4788         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4789         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4790         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4791         parmeter.
4792         * doc/gdb.texinfo: Describe SVE feature
4793         * features/aarch64-sve.c: New file.
4794
4795 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4796
4797         PR gdb/23210
4798         * gdbarch.sh (significant_addr_bit): Default to zero when
4799         not set by target architecture.
4800         * gdbarch.c: Re-generated.
4801         * utils.c (address_significant): Update.
4802
4803 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4804
4805         * stack.c (func_command): Remove trailing newline in call to error.
4806
4807 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4808
4809         * regcache.h (regcache_raw_collect): Remove, update callers to
4810         use regcache::raw_collect.
4811         * regcache.c (regcache_raw_collect): Remove.
4812
4813 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4814
4815         * regcache.h (regcache_raw_supply): Remove, update callers to
4816         use detached_regcache::raw_supply.
4817         * regcache.c (regcache_raw_supply): Remove.
4818
4819 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4820
4821         * regcache.h (regcache_cooked_write_part): Remove, update
4822         callers to use regcache::cooked_write_part.
4823         * regcache.c (regcache_cooked_write_part): Remove.
4824
4825 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4826
4827         * regcache.h (regcache_cooked_read_part): Remove, update callers
4828         to use readable_regcache::cooked_read_part.
4829         * regcache.c (regcache_cooked_read_part): Remove.
4830
4831 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4832
4833         * regcache.h (regcache_cooked_read_value): Remove, update
4834         callers to use readable_regcache::cooked_read_value.
4835         * regcache.c (regcache_cooked_read_value): Remove.
4836
4837 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4838
4839         * regcache.h (regcache_cooked_write): Remove, update callers to
4840         use regcache::cooked_write.
4841         * regcache.c (regcache_cooked_write): Remove.
4842
4843 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4844
4845         * regcache.h (regcache_invalidate): Remove, update callers to
4846         use detached_regcache::invalidate instead.
4847         * regcache.c (regcache_invalidate): Remove.
4848
4849 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4850
4851         * regcache.h (regcache_raw_write_part): Remove, update callers
4852         to use regcache::raw_write_part instead.
4853         * regcache.c (regcache_raw_write_part): Remove.
4854
4855 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4856
4857         * regcache.h (regcache_raw_read_part): Remove, update callers to
4858         use readable_regcache::raw_read_part instead.
4859         * regcache.c (regcache_raw_read_part): Remove.
4860
4861 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4862
4863         * regcache.h (regcache_cooked_read): Remove, update callers to
4864         use readable_regcache::cooked_read instead.
4865         * regcache.c (regcache_cooked_read): Remove.
4866
4867 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4868
4869         * regcache.h (regcache_raw_write): Remove, update callers to use
4870         regcache::raw_write instead.
4871         * regcache.c (regcache_raw_write): Remove.
4872
4873 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4874
4875         * regcache.h (regcache_raw_read): Remove, update callers to use
4876         readable_regcache::raw_read instead.
4877         * regcache.c (regcache_raw_read): Remove.
4878
4879 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4880
4881         * regcache.h (regcache_raw_update): Remove, update callers to
4882         use readable_regcache::raw_update instead.
4883         * regcache.c (regcache_raw_update): Remove.
4884
4885 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4886
4887         * regcache.h (regcache_register_status): Remove, update callers
4888         to use reg_buffer::get_register_status directly instead.
4889         * regcache.c (regcache_register_status): Remove.
4890
4891 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4892
4893         * regcache.h (regcache_get_ptid): Remove, update all callers to
4894         call regcache::ptid instead.
4895         * regcache.c (regcache_get_ptid): Remove.
4896
4897 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4898
4899         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4900
4901 2018-05-30  Pedro Alves  <palves@redhat.com>
4902
4903         * common/common-exceptions.h (exception_rethrow): Use
4904         ATTRIBUTE_NORETURN.
4905
4906 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4907
4908         * breakpoint.c (print_solib_event, check_status_catch_solib):
4909         Remove struct keyword in range-based for loops.
4910         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4911         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4912         Likewise.
4913         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4914         Likewise.
4915         * symfile.c (addr_info_make_relative): Likewise.
4916         * thread.c (value_in_thread_stack_temporaries): Likewise.
4917
4918 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4919
4920         PR gdb/16841
4921         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4922         aggregate type to get its real type before accessing it.
4923
4924 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4925
4926         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4927         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4928         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4929         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4930         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4931         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4932         * printcmd.c (info_address_command): Likewise.
4933
4934 2018-05-29  Tom Tromey  <tom@tromey.com>
4935
4936         * windows-nat.c (handle_exception): Update fall-through comment.
4937
4938 2018-05-29  Tom Tromey  <tom@tromey.com>
4939
4940         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4941         (struct program_space) <added_solibs>: Now a std::vector.
4942         * breakpoint.c (print_solib_event): Update.
4943         (check_status_catch_solib): Update.
4944         * progspace.c (clear_program_space_solib_cache): Update.
4945         * solib.c (update_solib_list): Update.
4946
4947 2018-05-29  Tom Tromey  <tom@tromey.com>
4948
4949         * python/py-type.c (typy_richcompare): Update.
4950         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4951         * gdbtypes.h (types_deeply_equal): Return bool.
4952         (types_equal): Likewise.
4953         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4954         declare VEC.
4955         (check_types_equal): Change worklist to std::vector.  Return
4956         bool.
4957         (struct type_equality_entry): Add constructor.
4958         (compare_maybe_null_strings): Return bool.
4959         (check_types_worklist): Return bool.  Change worklist to
4960         std::vector.
4961         (types_deeply_equal): Use std::vector.
4962         (types_equal): Return bool.
4963         (compare_maybe_null_strings): Simplify.
4964
4965 2018-05-29  Tom Tromey  <tom@tromey.com>
4966
4967         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4968
4969 2018-05-29  Tom Tromey  <tom@tromey.com>
4970
4971         * objc-lang.h: Don't include cp-support.h.
4972         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4973         declare VEC.
4974
4975 2018-05-27  Tom Tromey  <tom@tromey.com>
4976
4977         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4978
4979 2018-05-25  Tom Tromey  <tom@tromey.com>
4980
4981         * value.c (value::location): Initialize.
4982
4983 2018-05-25  Tom Tromey  <tom@tromey.com>
4984
4985         * dbxread.c (init_bincl_list): Remove.
4986         (bincl_list): Now a std::vector.
4987         (bincls_allocated, next_bincl): Remove.
4988         (free_bincl_list, do_free_bincl_list_cleanup)
4989         (make_cleanup_free_bincl_list): Remove.
4990         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4991         unique_xmalloc_ptr.
4992         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4993         (struct header_file_location): Add constructor.
4994         (add_bincl_to_list): Remove.
4995
4996 2018-05-25  Tom Tromey  <tom@tromey.com>
4997
4998         * tui/tui.c (tui_enable): Update.
4999         * mi/mi-interp.c (mi_interp::init): Update.
5000         * interps.h (class interp) <name>: New method.
5001         <m_name>: Rename from name.
5002         (~scoped_restore_interp): Update.
5003         * interps.c (interp::interp): Update.
5004         (interp_add, interp_set, interp_lookup_existing)
5005         (current_interp_named_p): Update.
5006
5007 2018-05-25  Tom Tromey  <tom@tromey.com>
5008
5009         * interps.c (interp_name): Remove.
5010         * mi/mi-interp.c (mi_interp::init): Update.
5011         * interps.h (interp_name): Remove.
5012         (~scoped_restore_interp): Update.
5013         * tui/tui.c (tui_enable): Update.
5014
5015 2018-05-25  Tom Tromey  <tom@tromey.com>
5016
5017         * utils.c (fputs_maybe_filtered): Update.
5018         * linespec.c (decode_line_full): Update.
5019         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5020         (mi_print_breakpoint_for_event, mi_solib_loaded)
5021         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5022         (mi_user_selected_context_changed): Update.
5023         * mi/mi-main.c (mi_execute_command): Update.
5024         * cli/cli-script.c (execute_control_command): Update.
5025         * python/python.c (execute_gdb_command): Update.
5026         * solib.c (info_sharedlibrary_command): Update.
5027         * interps.c (interp_ui_out): Remove.
5028         * interps.h (interp_ui_out): Remove.
5029
5030 2018-05-25  Tom Tromey  <tom@tromey.com>
5031
5032         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5033         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5034         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5035
5036 2018-05-25  Tom Tromey  <tom@tromey.com>
5037
5038         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5039         * interps.c (interp_exec): Use scoped_restore.
5040
5041 2018-05-25  Tom Tromey  <tom@tromey.com>
5042
5043         * remote.c (remote_target::remote_file_get): Use
5044         gdb::byte_vector.
5045         (remote_target::remote_file_put): Likewise.
5046
5047 2018-05-25  Tom Tromey  <tom@tromey.com>
5048
5049         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5050         a std::string.
5051         (get_pe_section_index, add_pe_exported_sym): Update.
5052         (read_pe_exported_syms): Use gdb::def_vector.
5053
5054 2018-05-25  Tom Tromey  <tom@tromey.com>
5055
5056         * frame.c (remove_prev_frame): Remove.
5057         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5058
5059 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5060
5061         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5062         Remove prototypes.
5063         * mips-linux-nat.c (supply_fpregset): Always call
5064         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5065         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5066         `mips_fill_fpregset'.
5067         * mips-linux-tdep.c (mips_supply_fpregset)
5068         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5069         (mips_fill_fpregset_wrapper): Remove functions.
5070         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5071         (mips_linux_fpregset): Remove variable.
5072         (mips_linux_iterate_over_regset_sections): Use
5073         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5074         (mips_linux_o32_sigframe_init): Remove comment.
5075
5076 2018-05-25  Pedro Alves  <palves@redhat.com>
5077
5078         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5079         (struct readahead_cache, struct packet_reg, struct
5080         remote_arch_state, class remote_state): Move higher up in the
5081         file.
5082         (remote_target::m_remote_state): Now an object instead of a pointer.
5083         (remote_target::get_remote_state): Adjust.
5084
5085 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5086
5087         * stack.c (select_and_print_frame): Delete.
5088         (struct function_bounds): Move struct within function.
5089         (func_command): Most content moved into new function
5090         find_frame_for_function, use new function, print result, add
5091         function comment.
5092         (find_frame_for_function): New function, now returns a result.
5093
5094 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5095
5096         * stack.c (iterate_over_block_arg_vars): Fix comment.
5097         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5098
5099 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5100
5101         PR gdb/23203
5102         * frame.c
5103         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5104         Define.
5105         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5106         Define.
5107         * frame.h (class scoped_restore_selected_frame): New class.
5108         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5109         of any exception, use scoped_restore_selected_frame to restore the
5110         frame instead.
5111
5112 2018-05-24  Pedro Alves  <palves@redhat.com>
5113
5114         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5115         override.
5116
5117 2018-05-23  Tom Tromey  <tom@tromey.com>
5118
5119         * complaints.c (struct complaints): Remove.
5120         (symfile_complaint_book): Remove.
5121         (series): New global.
5122         (complaint_internal): Update.
5123         (clear_complaints): Update.
5124
5125 2018-05-23  Tom Tromey  <tom@tromey.com>
5126
5127         * complaints.c (counters): New global.
5128         (struct complain): Remove.
5129         (struct complaints) <root>: Remove.
5130         (complaint_sentinel): Remove.
5131         (symfile_complaint_book): Update.
5132         (find_complaint) Remove.
5133         (complaint_internal, clear_complaints): Update.
5134
5135 2018-05-23  Tom Tromey  <tom@tromey.com>
5136
5137         * complaints.c (struct complain) <file, line>: Remove.
5138         (find_complaint): Remove file, line parameters.
5139         (complaint_internal): Update.
5140
5141 2018-05-23  Tom Tromey  <tom@tromey.com>
5142
5143         * complaints.c (vcomplaint): Remove.
5144         (complaint_internal) Merge in contents of vcomplaint.
5145
5146 2018-05-23  Tom Tromey  <tom@tromey.com>
5147
5148         * complaints.c (struct complaints) <explanation>: Remove.
5149         (symfile_explanations): Remove.
5150         (symfile_complaint_book): Update.
5151         (vcomplaint): Update.
5152         (struct explanation): Remove.
5153
5154 2018-05-23  Tom Tromey  <tom@tromey.com>
5155
5156         * complaints.c (symfile_complaints): Remove.
5157         (complaint_internal): Remove "complaints" parameter.
5158         (clear_complaints, vcomplaint): Remove "c" parameter.
5159         (get_complaints): Remove.
5160         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5161         (dwarf2_debug_line_missing_file_complaint)
5162         (dwarf2_debug_line_missing_end_sequence_complaint)
5163         (dwarf2_complex_location_expr_complaint)
5164         (dwarf2_const_value_length_mismatch_complaint)
5165         (dwarf2_section_buffer_overflow_complaint)
5166         (dwarf2_macro_malformed_definition_complaint)
5167         (dwarf2_invalid_attrib_class_complaint)
5168         (create_addrmap_from_index, dw2_symtab_iter_next)
5169         (dw2_expand_marked_cus)
5170         (dw2_debug_names_iterator::find_vec_in_debug_names)
5171         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5172         (create_debug_type_hash_table, init_cutu_and_read_dies)
5173         (partial_die_parent_scope, add_partial_enumeration)
5174         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5175         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5176         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5177         (create_cus_hash_table, create_dwp_hash_table)
5178         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5179         (dwarf2_rnglists_process, dwarf2_ranges_process)
5180         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5181         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5182         (handle_struct_member_die, process_structure_scope)
5183         (read_array_type, read_common_block, read_module_type)
5184         (read_tag_pointer_type, read_typedef, read_base_type)
5185         (read_subrange_type, load_partial_dies, partial_die_info::read)
5186         (partial_die_info::read, partial_die_info::read)
5187         (partial_die_info::read, read_checked_initial_length_and_offset)
5188         (dwarf2_string_attr, read_formatted_entries)
5189         (dwarf_decode_line_header)
5190         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5191         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5192         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5193         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5194         (get_signatured_type, get_DW_AT_signature_type)
5195         (decode_locdesc, file_file_name, consume_improper_spaces)
5196         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5197         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5198         (dwarf2_symbol_mark_computed, set_die_type)
5199         (read_attribute_value): Update.
5200         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5201         Update.
5202         * dbxread.c (unknown_symtype_complaint)
5203         (lbrac_mismatch_complaint, repeated_header_complaint)
5204         (set_namestring, function_outside_compilation_unit_complaint)
5205         (read_dbx_symtab, process_one_symbol): Update.
5206         * gdbtypes.c (stub_noname_complaint): Update.
5207         * windows-nat.c (handle_unload_dll): Update.
5208         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5209         (decode_base_type): Update.
5210         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5211         (eb_complaint, record_include_begin, record_include_end)
5212         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5213         (process_xcoff_symbol, read_symbol)
5214         (function_outside_compilation_unit_complaint)
5215         (scan_xcoff_symtab): Update.
5216         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5217         * buildsym.c (finish_block_internal, make_blockvector)
5218         (end_symtab_get_static_block, augment_type_symtab): Update.
5219         * dtrace-probe.c (dtrace_process_dof)
5220         (dtrace_static_probe_ops::get_probes): Update.
5221         * complaints.h (struct complaint): Don't declare.
5222         (symfile_complaints): Remove.
5223         (complaint_internal): Remove "complaints" parameter.
5224         (complaint): Likewise.
5225         (clear_complaints): Likewise.
5226         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5227         (reread_symbols): Update.
5228         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5229         (dwarf2_frame_cache, decode_frame_entry): Update.
5230         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5231         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5232         (info_selectors_command): Update.
5233         * macrotab.c (macro_include, check_for_redefinition)
5234         (macro_undef): Update.
5235         * objfiles.c (filter_overlapping_sections): Update.
5236         * stabsread.c (invalid_cpp_abbrev_complaint)
5237         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5238         (define_symbol, error_type, read_type, rs6000_builtin_type)
5239         (stabs_method_name_from_physname, read_member_functions)
5240         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5241         (attach_fields_to_type, complain_about_struct_wipeout)
5242         (read_range_type, read_args, common_block_start)
5243         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5244         Update.
5245         * mdebugread.c (index_complaint, unknown_ext_complaint)
5246         (basic_type_complaint, bad_tag_guess_complaint)
5247         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5248         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5249         (parse_procedure, parse_lines)
5250         (function_outside_compilation_unit_complaint)
5251         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5252         (bad_tag_guess_complaint, reg_value_complaint): Update.
5253         * cp-support.c (demangled_name_complaint): Update.
5254         * macroscope.c (sal_macro_scope): Update.
5255         * dwarf-index-write.c (class debug_names): Update.
5256
5257 2018-05-23  Tom Tromey  <tom@tromey.com>
5258
5259         * complaints.c (clear_complaints): Remove "noisy" parameter.
5260         * complaints.h (clear_complaints): Update.
5261         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5262         (reread_symbols): Update.
5263
5264 2018-05-23  Tom Tromey  <tom@tromey.com>
5265
5266         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5267         SUBSEQUENT_MESSAGE.
5268         (vcomplaint, clear_complaints): Update.
5269         (symfile_explanations): Remove some messages.
5270
5271 2018-05-23  Tom Tromey  <tom@tromey.com>
5272
5273         * complaints.c (internal_complaint): Remove.
5274         * complaints.h (internal_complaint): Remove.
5275
5276 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5277
5278         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5279
5280 2018-05-22  Pedro Alves  <palves@redhat.com>
5281
5282         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5283         (remote_fileio_badfd, remote_fileio_return_errno)
5284         (remote_fileio_return_success, remote_fileio_func_open)
5285         (remote_fileio_func_open, remote_fileio_func_close)
5286         (remote_fileio_func_read, remote_fileio_func_write)
5287         (remote_fileio_func_lseek, remote_fileio_func_rename)
5288         (remote_fileio_func_unlink, remote_fileio_func_stat)
5289         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5290         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5291         remote_target parameter.
5292         (remote_fio_func_map) <func>: Add remote_target parameter.
5293         (do_remote_fileio_request, remote_fileio_request):
5294         * remote-fileio.h (remote_fileio_request):
5295         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5296         remote_target parameter.
5297         (remote_notif_process, handle_notification): Adjust to pass down
5298         the remote.
5299         (remote_notif_state_allocate): Add remote_target parameter.  Save
5300         it.
5301         * remote-notif.h (struct remote_target): Forward declare.
5302         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5303         remote_target parameter.
5304         (struct remote_notif_state) <remote>: New field.
5305         (remote_notif_ack, remote_notif_parse): Add remote_target
5306         parameter.
5307         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5308         remote_target parameter.
5309         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5310         (threads_listing_context, rmt_thread_action, protocol_feature)
5311         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5312         (packet_result, struct threads_listing_context, remote_state):
5313         Move definitions and declarations higher up.
5314         (remote_target) <~remote_target>: Declare.
5315         (remote_download_command_source, remote_file_put, remote_file_get)
5316         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5317         (remote_hostio_pread_vFile, remote_hostio_send_command)
5318         (remote_hostio_set_filesystem, remote_hostio_open)
5319         (remote_hostio_close, remote_hostio_unlink, remote_state)
5320         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5321         (get_memory_write_packet_size, get_memory_read_packet_size)
5322         (append_pending_thread_resumptions, remote_detach_1)
5323         (append_resumption, remote_resume_with_vcont)
5324         (add_current_inferior_and_thread, wait_ns, wait_as)
5325         (process_stop_reply, remote_notice_new_inferior)
5326         (process_initial_stop_replies, remote_add_thread)
5327         (btrace_sync_conf, remote_btrace_maybe_reopen)
5328         (remove_new_fork_children, kill_new_fork_children)
5329         (discard_pending_stop_replies, stop_reply_queue_length)
5330         (check_pending_events_prevent_wildcard_vcont)
5331         (discard_pending_stop_replies_in_queue, stop_reply)
5332         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5333         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5334         (remote_interrupt_as, remote_interrupt_ns)
5335         (remote_get_noisy_reply, remote_query_attached)
5336         (remote_add_inferior, remote_current_thread, get_current_thread)
5337         (set_thread, set_general_thread, set_continue_thread)
5338         (set_general_process, write_ptid)
5339         (remote_unpack_thread_info_response, remote_get_threadinfo)
5340         (parse_threadlist_response, remote_get_threadlist)
5341         (remote_threadlist_iterator, remote_get_threads_with_ql)
5342         (remote_get_threads_with_qxfer)
5343         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5344         (get_offsets, remote_check_symbols, remote_supported_packet)
5345         (remote_query_supported, remote_packet_size)
5346         (remote_serial_quit_handler, remote_detach_pid)
5347         (remote_vcont_probe, remote_resume_with_hc)
5348         (send_interrupt_sequence, interrupt_query)
5349         (remote_notif_get_pending_events, fetch_register_using_p)
5350         (send_g_packet, process_g_packet, fetch_registers_using_g)
5351         (store_register_using_P, store_registers_using_G)
5352         (set_remote_traceframe, check_binary_download)
5353         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5354         (remote_xfer_live_readonly_partial, remote_read_bytes)
5355         (remote_send_printf, remote_flash_write, readchar)
5356         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5357         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5358         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5359         (extended_remote_disable_randomization, extended_remote_run)
5360         (send_environment_packet, extended_remote_environment_support)
5361         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5362         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5363         (packet_command): Now methods of ...
5364         (remote_target): ... this class.
5365         (m_remote_state) <remote_target>: New field.
5366         (struct remote_state) <stop_reply_queue,
5367         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5368         fields.
5369         (remote_state::remote_state): Allocate stop_reply_queue.
5370         (remote_state): Delete global.
5371         (get_remote_state_raw): Delete.
5372         (remote_target::get_remote_state): Allocate m_remote_state on
5373         demand.
5374         (get_current_remote_target): New.
5375         (remote_ops, extended_remote_ops): Delete.
5376         (wait_forever_enabled_p, remote_async_inferior_event_token):
5377         Delete, moved to struct remote_state.
5378         (remote_target::close): Delete self.  Destruction bits split to
5379         ...
5380         (remote_target::~remote_target): ... this.
5381         (show_memory_packet_size): Adjust to use
5382         get_current_remote_target.
5383         (struct protocol_feature) <func>: Add remote_target parameter.
5384         All callers adjusted.
5385         (curr_quit_handler_target): New.
5386         (remote_serial_quit_handler): Reimplement.
5387         (remote_target::open_1): Adjust to use get_current_remote_target.
5388         Heap-allocate remote_target/extended_remote_target instances.
5389         (vcont_builder::vcont_builder): Add remote_target parameter, and
5390         save it in m_remote.  All callers adjusted.
5391         (vcont_builder::m_remote): New field.
5392         (vcont_builder::restart, vcont_builder::flush)
5393         (vcont_builder::push_action): Use it.
5394         (remote_target::commit_resume): Use it.
5395         (struct queue_iter_param) <remote>: New field.
5396         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5397         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5398         (check_pending_event_prevents_wildcard_vcont_callback)
5399         (remote_target::check_pending_events_prevent_wildcard_vcont)
5400         (remote_target::discard_pending_stop_replies)
5401         (remote_target::discard_pending_stop_replies_in_queue)
5402         (remote_target::remote_notif_remove_queued_reply): Fill in
5403         'remote' field.
5404         (remote_notif_get_pending_events): New.
5405         (remote_target::readchar, remote_target::remote_serial_write):
5406         Save/restore curr_quit_handler_target.
5407         (putpkt): New.
5408         (kill_new_fork_children): Fill in 'remote' field.
5409         (packet_command): Use get_current_remote_target, defer to
5410         remote_target method of same name.
5411         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5412         parameter, and save it in m_remote.  All callers adjusted.
5413         (scoped_remote_fd::release): Use m_remote.
5414         (scoped_remote_fd::m_remote): New field.
5415         (remote_file_put, remote_file_get, remote_file_delete): Use
5416         get_current_remote_target, defer to remote_target method of same
5417         name.
5418         (remote_btrace_reset): Add remote_state paremeter.  Update all
5419         callers.
5420         (remote_async_inferior_event_handler). Pass down 'data'.
5421         (remote_new_objfile): Use get_current_remote_target.
5422         (remote_target::vcont_r_supported): New.
5423         (set_range_stepping): Use get_current_remote_target and
5424         remote_target::vcont_r_supported.
5425         (_initialize_remote): Don't allocate 'remote_state' and
5426         'stop_reply_queue' globals.
5427         * remote.h (struct remote_target): Forward declare.
5428         (getpkt, putpkt, remote_notif_get_pending_events): Add
5429         'remote_target' parameter.
5430
5431 2018-05-22  Pedro Alves  <palves@redhat.com>
5432
5433         * remote.c (vcont_builder): Now a class.  Make all data members
5434         private.
5435         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5436         Declare methods.
5437         (vcont_builder_restart): Rename to ...
5438         (vcont_builder::restart): ... this.
5439         (vcont_builder_flush): Rename to ...
5440         (vcont_builder::flush): ... this.
5441         (vcont_builder_push_action): Rename to ...
5442         (vcont_builder::push_action): ... this.
5443         (remote_target::commit_resume): Adjust.
5444
5445 2018-05-22  Pedro Alves  <palves@redhat.com>
5446
5447         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5448         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5449         (get_fixed_memory_packet_size): New.
5450         (get_memory_packet_size): Use it.
5451         (set_memory_packet_size): Don't override the config size with
5452         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5453         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5454         Don't refer to get_memory_packet_size if not connected to a remote
5455         target.  Show "(default)" if configured size is 0.
5456
5457 2018-05-22  Pedro Alves  <palves@redhat.com>
5458
5459         * remote.c (remote_target::mourn_inferior): Move
5460         discard_pending_stop_replies call here from ...
5461         (_initialize_remote): ... here.
5462
5463 2018-05-22  Pedro Alves  <palves@redhat.com>
5464
5465         * remote.c (compare_section_command): Remove set_general_process
5466         call.
5467
5468 2018-05-22  Pedro Alves  <palves@redhat.com>
5469
5470         * remote.c (struct packet_reg, struct remote_arch_state):
5471         Move higher up in the file.
5472         (remote_state) <m_arch_states>: Store remote_arch_state values
5473         instead of remote_arch_state pointers.
5474         (remote_state::get_remote_arch_state): Adjust.
5475
5476 2018-05-22  Pedro Alves  <palves@redhat.com>
5477
5478         * remote.c: Include <unordered_map>.
5479         (remote_state): Now a class.
5480         (remote_state) <get_remote_arch_state>: Declare method.
5481         <get_remote_arch_state>: New field.
5482         (remote_arch_state) <remote_arch_state>: Declare ctor.
5483         <regs>: Now a unique_ptr.
5484         (remote_gdbarch_data_handle): Delete.
5485         (get_remote_arch_state): Delete.
5486         (remote_state::get_remote_arch_state): New.
5487         (get_remote_state): Adjust to call remote_state's
5488         get_remote_arch_state method.
5489         (init_remote_state): Delete, bits factored out to ...
5490         (remote_arch_state::remote_arch_state): ... this new method.
5491         (get_remote_packet_size, get_memory_packet_size)
5492         (process_g_packet, remote_target::fetch_registers)
5493         (remote_target::prepare_to_store, store_registers_using_G)
5494         (remote_target::store_registers, remote_target::get_trace_status):
5495         Adjust to call remote_state's method.
5496         (_initialize_remote): Remove reference to
5497         remote_gdbarch_data_handle.
5498
5499 2018-05-22  Pedro Alves  <palves@redhat.com>
5500
5501         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5502         pread>: New method declarations.
5503         (remote_target::open_1): Adjust.
5504         (readahead_cache_invalidate): Rename to ...
5505         (readahead_cache::invalidate): ... this, and adjust to be a class
5506         method.
5507         (readahead_cache_invalidate_fd): Rename to ...
5508         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5509         class method.
5510         (remote_hostio_pwrite): Adjust.
5511         (remote_hostio_pread_from_cache): Rename to ...
5512         (readahead_cache::pread): ... this, and adjust to be a class
5513         method.
5514         (remote_hostio_close): Adjust.
5515
5516 2018-05-22  Pedro Alves  <palves@redhat.com>
5517
5518         * remote.c (remote_hostio_close_cleanup): Delete.
5519         (class scoped_remote_fd): New.
5520         (remote_file_put, remote_file_get): Use it.
5521
5522 2018-05-22  Pedro Alves  <palves@redhat.com>
5523
5524         (struct vCont_action_support): Use bool and initialize all fields.
5525         (struct readahead_cache): Initialize all fields.
5526         (remote_state): Use bool and initialize all fields.
5527         (remote_state::remote_state, remote_state::~remote_state): New.
5528         (new_remote_state): Delete.
5529         (_initialize_remote): Use new to allocate remote_state.
5530
5531 2018-05-22  Pedro Alves  <palves@redhat.com>
5532             張俊芝  <zjz@zjz.name>
5533
5534         PR gdb/22973
5535         * c-exp.y: Include "c-support.h".
5536         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5537         of tolower.  Use c_ident_is_alpha to scan names.
5538         * c-lang.c: Include "c-support.h".
5539         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5540         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5541         * c-support.h: New file, with bits factored out from ...
5542         * cp-name-parser.y: ... this file.
5543         Include "c-support.h".
5544         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5545         c-support.h and renamed.
5546         (symbol_end, yylex): Adjust.
5547
5548 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5549
5550         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5551         parameter type to CORE_ADDR.
5552         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5553         parameter type in declaration to CORE_ADDR.
5554         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5555         target_auxv_search to get AT_HWCAP and use the result to get the
5556         target description.
5557         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5558         to CORE_ADDR. Remove the cast of the return value to unsigned
5559         long. Fix error predicate of target_auxv_search.
5560         (ppc_linux_nat_target::read_description): Change the type of the
5561         hwcap variable to CORE_ADDR.
5562
5563 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5564
5565         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5566         if the size of fpscr is larger than 32 bits.
5567
5568 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5569
5570         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5571         (ppc32_linux_vsxregmap): New global.
5572         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5573         regcache_supply_regset, and regcache_collect_regset.
5574         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5575         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5576         (fetch_vsx_register, store_vsx_register): Remove.
5577         (fetch_vsx_registers): Add regno parameter. Get regset using
5578         ppc_linux_vsxregset. Use regset to supply registers.
5579         (store_vsx_registers): Add regno parameter. Get regset using
5580         ppc_linux_vsxregset. Use regset to collect registers.
5581         (fetch_register): Call fetch_vsx_registers instead of
5582         fetch_vsx_register.
5583         (store_register): Call store_vsx_registers instead of
5584         store_vsx_register.
5585         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5586         new regno parameter.
5587         (store_ppc_registers): Call store_vsx_registers with -1 for the
5588         new regno parameter.
5589         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5590         (ppc_collect_vsxregset): Remove.
5591
5592 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5593
5594         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5595         offset fields.
5596         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5597         for vector register offset fields.
5598         (ppc64_fbsd_reg_offsets): Likewise.
5599         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5600         to vector register offset fields.
5601         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5602         to vector register offset fields.
5603         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5604         vector register offset fields.
5605         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5606         initializers for vector register offset fields.
5607         (rs6000_aix64_reg_offsets): Likewise.
5608         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5609         (ppc_supply_vrregset): Remove.
5610         (ppc_collect_vrregset): Remove.
5611         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5612         (ppc_linux_vrregset) : New function.
5613         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5614         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5615         (ppc32_linux_vrregset): Remove.
5616         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5617         and use result instead of ppc32_linux_vrregset.
5618         (ppc32_linux_reg_offsets): Remove initializers for vector register
5619         offset fields.
5620         (ppc64_linux_reg_offsets): Likewise.
5621         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5622         * ppc-linux-nat.c: Include regset.h.
5623         (gdb_vrregset_t): Adjust comment to account for little-endian
5624         mode.
5625         (supply_vrregset, fill_vrregset): Remove.
5626         (fetch_altivec_register, store_altivec_register): Remove.
5627         (fetch_altivec_registers): Add regno parameter. Get regset using
5628         ppc_linux_vrregset. Use regset to supply registers.
5629         (store_altivec_registers): Add regno parameter. Get regset using
5630         ppc_linux_vrregset. Use regset to collect registers.
5631         (fetch_register): Call fetch_altivec_registers instead of
5632         fetch_altivec_register.
5633         (store_register): Call store_altivec_registers instead of
5634         store_altivec_register.
5635         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5636         the new regno parameter.
5637         (store_ppc_registers): Call store_altivec_registers with -1 for
5638         the new regno parameter.
5639
5640 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5641
5642         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5643         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5644         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5645         (gdb_vrregset_t): Change array type size to
5646         PPC_LINUX_SIZEOF_VRREGSET.
5647         (gdb_vsxregset_t): Change array type size to
5648         PPC_LINUX_SIZEOF_VSXREGSET.
5649         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5650         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5651         PPC_LINUX_SIZEOF_VSXREGSET.
5652
5653 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5654
5655         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5656         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5657         nat/ppc-linux.c.
5658         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5659         ppc_linux_target_wordsize with tid.
5660         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5661         wordsize with tid.
5662         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5663         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5664         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5665         tid parameter. Remove static specifier.
5666         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5667         (ppc_linux_target_wordsize): New declaration.
5668
5669 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5670
5671         * arch/ppc-linux-common.c: New file.
5672         * arch/ppc-linux-common.h: New file.
5673         * arch/ppc-linux-tdesc.h: New file.
5674         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5675         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5676         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5677         arch/ppc-linux-tdesc.h.
5678         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5679         arch/ppc-linux-tdesc.h.
5680         (ppc_linux_nat_target::read_description): Remove target
5681         description matching code. Fill a ppc_linux_features struct and
5682         call ppc_linux_match_description with it. Move comment about ISA
5683         2.05 to ppc-linux-common.c.
5684         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5685         arch/ppc-linux-tdesc.h.
5686         (ppc_linux_core_read_description): Remove target description
5687         matching code. Fill a ppc_linux_features struct and call
5688         ppc_linux_match_description with it.
5689         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5690         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5691         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5692         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5693         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5694         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5695         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5696         (tdesc_powerpc_e500l): Remove.
5697
5698 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5699
5700         * ada-lang.c (catch_assert_command): Pass empty string instead
5701         of NULL for excep_string argument.
5702
5703 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5704
5705         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5706         the width of the requested register exceeds the width of the
5707         `ptrace' data type.
5708
5709 2018-05-21  Tom Tromey  <tom@tromey.com>
5710
5711         * printcmd.c (output_command): Remove.
5712         (output_command_const): Rename to output_command.
5713         * valprint.h (output_command): Rename from output_command_const.
5714         * tracepoint.c (trace_dump_actions): Call output_command.
5715
5716 2018-05-21  Tom Tromey  <tom@tromey.com>
5717
5718         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5719         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5720         * ada-lang.h (create_ada_exception_catchpoint): Update.
5721         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5722         std::string.
5723         (create_excep_cond_exprs, ~ada_catchpoint)
5724         (should_stop_exception, print_one_exception)
5725         (print_mention_exception, print_recreate_exception): Update.
5726         (ada_get_next_arg): Remove.
5727         (catch_ada_exception_command_split): Use std::string.  Change type
5728         of "excep_string", "cond_string".
5729         (catch_ada_exception_command): Update.
5730         (create_ada_exception_catchpoint): Change type of excep_string.
5731         (ada_exception_sal): Remove excep_string parameter.
5732         (~ada_catchpoint): Remove.
5733
5734 2018-05-21  Tom Tromey  <tom@tromey.com>
5735
5736         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5737         cleanup.
5738
5739 2018-05-21  Tom Tromey  <tom@tromey.com>
5740
5741         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5742         Return unique_xmalloc_ptr.
5743         (print_it_exception): Update.
5744
5745 2018-05-21  Tom Tromey  <tom@tromey.com>
5746
5747         * tracepoint.c (trace_dump_actions): Use std::string.
5748
5749 2018-05-21  Tom Tromey  <tom@tromey.com>
5750
5751         * symfile.c (reread_symbols): Use std::string for original_name.
5752
5753 2018-05-21  Tom Tromey  <tom@tromey.com>
5754
5755         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5756         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5757         constructor.
5758
5759 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5760
5761         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5762         instance to...
5763         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5764         * objfiles.c (get_objfile_bfd_data): Allocate
5765         objfile_per_bfd_storage with obstack_new when allocating on
5766         obstack.
5767
5768 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5769
5770         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5771         OBSTACK_ZALLOC.
5772         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5773         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5774         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5775         (add_pending): Likewise.
5776         (parse_symbol): Likewise.
5777         (parse_partial_symbols): Likewise.
5778         (psymtab_to_symtab_1): Likewise.
5779         (new_psymtab): Likewise.
5780         (elfmdebug_build_psymtabs): Likewise.
5781         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5782         * objfiles.c (get_objfile_bfd_data): Likewise.
5783         (objfile_register_static_link): Likewise.
5784         * psymtab.c (allocate_psymtab): Likewise.
5785         * stabsread.c (read_member_functions): Likewise.
5786         * xcoffread.c (xcoff_end_psymtab): Likewise.
5787
5788 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5789
5790         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5791         compiler supports std::is_trivially_constructible.
5792         * common/poison.h: Include obstack.h.
5793         (IsMallocable): Define to is_trivially_constructible if the
5794         compiler supports it, define to true_type otherwise.
5795         (xobnew): New.
5796         (XOBNEW): Redefine.
5797         (xobnewvec): New.
5798         (XOBNEWVEC): Redefine.
5799         * gdb_obstack.h (obstack_zalloc): New.
5800         (OBSTACK_ZALLOC): Redefine.
5801         (obstack_calloc): New.
5802         (OBSTACK_CALLOC): Redefine.
5803         (obstack_new): New.
5804         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5805         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5806         gdbarch.c.
5807         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5808         obstack_calloc/obstack_zalloc.
5809         (gdbarch_obstack_zalloc): Remove.
5810         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5811
5812 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5813
5814         * stack.c (backtrace_command_1): Remove useless variable int i.
5815
5816 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5817
5818         * stack.c (print_frame_info): Fix comment.
5819
5820 2018-05-18  Tom Tromey  <tom@tromey.com>
5821
5822         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5823         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5824         (~dwarf2_per_objfile): Update
5825         (dwarf2_get_dwz_file): Use new.
5826         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5827         unique_ptr.
5828
5829 2018-05-18  Tom Tromey  <tom@tromey.com>
5830
5831         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5832         unique_ptr.
5833         * dwarf2read.c (struct dwp_file): Add constructor and
5834         initializers.
5835         (open_and_init_dwp_file): Return a unique_ptr.
5836         (dwarf2_per_objfile, create_dwp_hash_table)
5837         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5838         (lookup_dwo_unit_in_dwp): Update.
5839         (open_and_init_dwp_file, get_dwp_file): Update.
5840
5841 2018-05-18  Tom Tromey  <tom@tromey.com>
5842
5843         * dwarf2read.c (dwarf2_per_objfile): Update.
5844         (struct mapped_index): Add initializers.
5845         (dwarf2_read_index): Use new.
5846         (dw2_symtab_iter_init): Update.
5847         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5848         unique_ptr.
5849
5850 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5851
5852         * dwarf2read.c (mapped_index) <total_size>: Remove.
5853
5854 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5855
5856         * unittests/format_pieces-selftests.c (test_format_specifier):
5857         Add ARI comments.
5858
5859 2018-05-18  Tom Tromey  <tom@tromey.com>
5860
5861         * c-typeprint.c (maybe_print_hole): New function.
5862         (c_print_type_struct_field_offset): Update.
5863         (c_type_print_base_struct_union): Call maybe_print_hole.
5864
5865 2018-05-17  Keith Seitz  <keiths@redhat.com>
5866
5867         * breakpoint.c (build_bpstat_chain): New function, moved from
5868         bpstat_stop_status.
5869         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5870         If no stop chain is passed, call build_bpstat_chain to build it.
5871         * breakpoint.h (build_bpstat_chain): Declare.
5872         (bpstat_stop_status): Move documentation here from breakpoint.c.
5873         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5874         build the stop chain and pass it to skip_inline_frames.
5875         Pass this stop chain to bpstat_stop_status.
5876         * inline-frame.c: Include breakpoint.h.
5877         (stopped_by_user_bp_inline_frame): New function.
5878         (skip_inline_frames): Add parameter `stop_chain'.
5879         Move documention to inline-frame.h.
5880         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5881         whether the frame should be elided.
5882         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5883         Add moved documentation and update for new parameter.
5884
5885 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5886
5887         PR cli/14975
5888         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5889         unittests/format_pieces-selftests.c.
5890         * common/format.h (format_piece) <operator==>: New.
5891         (format_pieces) <operator[]>: Remove.
5892         * common/format.c (format_pieces::format_pieces): Handle \e.
5893         * unittests/format_pieces-selftests.c: New.
5894
5895 2018-05-17  Tom Tromey  <tom@tromey.com>
5896
5897         PR symtab/23010:
5898         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5899         (dw2_instantiate_symtab): Add skip_partial parameter.
5900         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5901         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5902         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5903         (dw2_expand_symtabs_matching_one)
5904         (dw2_find_pc_sect_compunit_symtab)
5905         (dw2_debug_names_lookup_symbol)
5906         (dw2_debug_names_expand_symtabs_for_function): Update.
5907         (init_cutu_and_read_dies): Add skip_partial parameter.
5908         (process_psymtab_comp_unit, build_type_psymtabs_1)
5909         (process_skeletonless_type_unit, load_partial_comp_unit)
5910         (psymtab_to_symtab_1): Update.
5911         (load_full_comp_unit): Add skip_partial parameter.
5912         (process_imported_unit_die, dwarf2_read_addr_index)
5913         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5914         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5915         (read_signatured_type): Update.
5916
5917 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5918
5919         * value.c (release_value): Remove unused variable.
5920         (record_latest_value): Likewise.
5921         (access_value_history): Likewise.
5922         (preserve_values): Likewise.
5923
5924 2018-05-17  Tom Tromey  <tom@tromey.com>
5925
5926         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5927         Initialize.
5928
5929 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5930
5931         PR gdb/22286
5932         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5933         Also handle registers whose width is not a multiple of
5934         PTRACE_TYPE_RET.
5935         (linux_nat_trad_target::store_register): Likewise.
5936
5937 2018-05-16  Tom Tromey  <tom@tromey.com>
5938
5939         * gdbcore.h (core_bfd): Redefine.
5940         * corelow.c (core_target::close): Update.
5941         (core_target_open): Update.
5942         * progspace.h (struct program_space) <cbfd>: Now a
5943         gdb_bfd_ref_ptr.
5944
5945 2018-05-16  Tom Tromey  <tom@tromey.com>
5946
5947         PR cli/19551:
5948         * symfile-add-flags.h (enum symfile_add_flags)
5949         <SYMFILE_NOT_FILENAME>: New constant.
5950         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5951         objfile name from BFD.
5952         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5953         * minidebug.c (find_separate_debug_file_in_section): Put
5954         ".gnu_debugdata" into BFD's file name.
5955
5956 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5957
5958         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5959         Remove.
5960
5961 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5962
5963         PR binutils/21446
5964         * aarch64-tdep.c (aarch64_analyze_prologue,
5965         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5966         Indicate not interested in errors.
5967
5968 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5969
5970         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5971         Supply the MIPS_ZERO_REGNUM register.
5972
5973 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5974
5975         * mips-tdep.c (mask_address_var): Make variable static.
5976
5977 2018-05-14  Tom Tromey  <tom@tromey.com>
5978
5979         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5980
5981 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
5982
5983         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5984         FXSAVE_ADDR for the mxcsr register.
5985
5986 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
5987
5988         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5989
5990 2018-05-11  Pedro Alves  <palves@redhat.com>
5991
5992         * corelow.c (core_target) <core_target>: No longer inline.
5993         Initialize m_core_gdbarch, m_core_vec and build the section table
5994         here.
5995         <~core_target>: New.
5996         <core_gdbarch, get_core_register_section>: New methods.
5997         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5998         factored out from ...
5999         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6000         (core_ops): Delete.
6001         (sniff_core_bfd): Add gdbarch parameter.
6002         (core_close): Delete, merged into ...
6003         (core_target::close): ... here.  Delete self.
6004         (core_close_cleanup): Delete.
6005         (core_target_open): Allocate a core_target on the heap.  Use a
6006         unique_ptr instead of a cleanup.  Bits moved into the core_target
6007         ctor.  Adjust to use core_target methods instead of globals.
6008         (get_core_register_section): Rename to ...
6009         (core_target::get_core_register_section): ... this and adjust.
6010         (struct get_core_registers_cb_data): New.
6011         (get_core_registers_cb): Use it.  Use bool.
6012         (core_target::fetch_registers, core_target::files_info)
6013         (core_target::xfer_partial, core_target::read_description)
6014         (core_target::pid_to, core_target::thread_name): Adjust to
6015         reference class fields instead of globals.
6016         * target.h (struct target_ops_deleter, target_ops_up): New.
6017
6018 2018-05-11  Pedro Alves  <palves@redhat.com>
6019
6020         * corefile.c (core_file_command): Move to corelow.c.
6021         * corelow.c (the_core_target): Delete.
6022         (core_file_command): Moved from corefile.c.  Check exec_bfd
6023         instead of the_core_target.  Use target_detach instead of calling
6024         into the_core_target directly.
6025         (maybe_say_no_core_file_now): New.
6026         (core_target::detach): Use it.
6027         (_initialize_corelow): Remove references to the_core_target.
6028         * gdbcore.h (the_core_target): Delete.
6029
6030 2018-05-11  Tom Tromey  <tromey@redhat.com>
6031             Pedro Alves  <palves@redhat.com>
6032
6033         * corefile.c (core_bfd): Remove.
6034         * gdbcore.h (core_bfd): Now a macro.
6035         * progspace.h (struct program_space) <cbfd>: New field.
6036
6037 2018-05-11  Tom Tromey  <tom@tromey.com>
6038
6039         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6040         gdb::def_vector.
6041
6042 2018-05-10  Tom Tromey  <tom@tromey.com>
6043
6044         * configure: Rebuild.
6045         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6046
6047 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6048
6049         PR server/23158:
6050         * regformats/regdat.sh: Adjust script, following the addition
6051         of the new expedite_regs parameter to init_target_desc.
6052
6053 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6054     
6055         PR gdb/23127
6056         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6057         set_gdbarch_significant_addr_bit.
6058         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6059         set_gdbarch_significant_addr_bit.
6060         * utils.c (address_significant): Update to sign extend addr.
6061
6062 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6063
6064         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6065         (xtensa_linux_init_abi): Limit tdep->num_regs by
6066         tdep->num_nopriv_regs.
6067         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6068         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6069         not initialized.
6070
6071 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6072
6073         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6074
6075 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6076
6077         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6078         (I387_MXCSR_INIT_VAL): New constant.
6079         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6080         buffer if it was supplied by the inferior.
6081         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6082         (i387_xsave_get_clear_bv): New function.
6083         (i387_supply_xsave): Only read x87 control registers from the
6084         xsave buffer if the feature is enabled, and the state will have
6085         been written, otherwise, provide a suitable default.
6086         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6087         including x87 control registers.  Update control registers if they
6088         have changed from the default value, and mark features as enabled
6089         as required.
6090         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6091
6092 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6093
6094         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6095
6096 2018-05-07  Tom Tromey  <tom@tromey.com>
6097
6098         * configure: Rebuild.
6099         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6100
6101 2018-05-07  Tom Tromey  <tom@tromey.com>
6102
6103         PR tdep/20362:
6104         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6105         bit.  Use correct value for VDIV.
6106
6107 2018-05-04  Tom Tromey  <tom@tromey.com>
6108
6109         * configure: Rebuild.
6110         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6111
6112 2018-05-04  Tom Tromey  <tom@tromey.com>
6113
6114         * linux-record.c (record_linux_system_call) <case
6115         RECORD_SYS_RECVFROM>: Add "break".
6116
6117 2018-05-04  Tom Tromey  <tom@tromey.com>
6118
6119         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6120         Add missing "break".
6121         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6122         Add missing "break".
6123
6124 2018-05-04  Tom Tromey  <tom@tromey.com>
6125
6126         * rs6000-tdep.c (ppc_process_record_op4)
6127         (ppc_process_record_op63): Add fall-through comment.
6128
6129 2018-05-04  Tom Tromey  <tom@tromey.com>
6130
6131         * i386-tdep.c (i386_process_record): Add fall-through comment.
6132
6133 2018-05-04  Tom Tromey  <tom@tromey.com>
6134
6135         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6136         comment.
6137
6138 2018-05-04  Tom Tromey  <tom@tromey.com>
6139
6140         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6141         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6142         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6143         comment.
6144         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6145         comment.
6146         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6147         comment.
6148
6149 2018-05-04  Tom Tromey  <tom@tromey.com>
6150
6151         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6152
6153 2018-05-04  Tom Tromey  <tom@tromey.com>
6154
6155         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6156         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6157         * symfile.c (section_is_mapped): Fix fall-through comment.
6158         * stabsread.c (define_symbol, read_member_functions): Fix
6159         fall-through comment.
6160         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6161         comment.
6162         * remote.c (remote_wait_as): Fix fall-through comment.
6163         * p-exp.y (yylex): Fix fall-through comment.
6164         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6165         comment.
6166         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6167         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6168         * jv-exp.y (yylex): Fix fall-through comment.
6169         * go-exp.y (lex_one_token): Fix fall-through comment.
6170         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6171         fall-through comment.
6172         * f-exp.y (yylex): Fix fall-through comment.
6173         * dwarf2read.c (process_die): Fix fall-through comments.
6174         * dbxread.c (process_one_symbol): Fix fall-through comment.
6175         * d-exp.y (lex_one_token): Fix fall-through comment.
6176         * cp-name-parser.y (yylex): Fix fall-through comment.
6177         * coffread.c (coff_symtab_read): Fix fall-through comment.
6178         * c-exp.y (lex_one_token): Fix fall-through comment.
6179         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6180         comment.
6181         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6182         comment.
6183
6184 2018-05-04  Tom Tromey  <tom@tromey.com>
6185
6186         PR python/22730:
6187         * NEWS: Mention gdb.execute change.
6188         * gdbcmd.h (execute_control_command): Don't declare.
6189         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6190         execute_control_commands, execute_control_commands_to_string.
6191         * cli/cli-script.h (execute_control_commands)
6192         (execute_control_commands_to_string): Declare.
6193         (execute_control_command): Add from_tty parameter.
6194         * cli/cli-script.c (execute_control_commands)
6195         (execute_control_commands_to_string): New functions.
6196         (execute_user_command): Use execute_control_commands.
6197         (execute_control_command_1): Add "from_tty" parameter.  Update.
6198         (execute_control_command): Likewise.
6199
6200 2018-05-04  Tom Tromey  <tom@tromey.com>
6201
6202         PR python/22731:
6203         * NEWS: Mention that breakpoint commands are writable.
6204         * python/py-breakpoint.c (bppy_set_commands): New function.
6205         (breakpoint_object_getset) <"commands">: Use it.
6206
6207 2018-05-04  Tom Tromey  <tom@tromey.com>
6208
6209         * tracepoint.c (actions_command): Update.
6210         * mi/mi-cmd-break.c (mi_command_line_array)
6211         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6212         (mi_read_next_line): Remove.
6213         (mi_cmd_break_commands): Update.
6214         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6215         function_view.
6216         * cli/cli-script.c (get_command_line): Update.
6217         (process_next_line): Use function_view.  Constify.
6218         (recurse_read_control_structure, read_command_lines)
6219         (read_command_lines_1): Change argument types to function_view.
6220         (do_define_command, document_command): Update.
6221         * breakpoint.h (check_tracepoint_command): Don't declare.
6222         * breakpoint.c (check_tracepoint_command): Remove.
6223         (commands_command_1, create_tracepoint_from_upload): Update.
6224
6225 2018-05-04  Tom Tromey  <tom@tromey.com>
6226
6227         PR gdb/11750:
6228         * cli/cli-script.h (enum command_control_type) <define_control>:
6229         New constant.
6230         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6231         (build_command_line, execute_control_command_1)
6232         (process_next_line): Likewise.
6233         (do_define_command): New function, extracted from define_command.
6234         (define_command): Use it.
6235
6236 2018-05-04  Tom Tromey  <tom@tromey.com>
6237
6238         * tracepoint.c (actions_command): Update.
6239         * cli/cli-script.h (read_command_lines): Update.
6240         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6241         (MAX_TMPBUF): Remove define.
6242         (define_command): Use string_printf.
6243         (document_command): Likewise.
6244         * breakpoint.c (commands_command_1): Update.
6245
6246 2018-05-04  Tom Tromey  <tom@tromey.com>
6247
6248         * top.c (execute_command): Update.
6249         * cli/cli-script.h (print_command_lines): Now varargs.
6250         * cli/cli-script.c (print_command_lines): Now varargs.
6251         (execute_control_command_1) <case while_control, case if_control>:
6252         Update.
6253
6254 2018-05-04  Tom Tromey  <tom@tromey.com>
6255
6256         * tracepoint.c (all_tracepoint_actions): Rename from
6257         all_tracepoint_actions_and_cleanup.  Change return type.
6258         (actions_command, encode_actions_1, encode_actions)
6259         (trace_dump_actions, tdump_command): Update.
6260         * remote.c (remote_download_command_source): Update.
6261         * python/python.c (gdbpy_eval_from_control_command)
6262         (python_command, python_interactive_command): Update.
6263         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6264         * guile/guile.c (guile_command)
6265         (gdbscm_eval_from_control_command, guile_command): Update.
6266         * compile/compile.c (compile_code_command)
6267         (compile_print_command, compile_to_object): Update.
6268         * cli/cli-script.h (struct command_lines_deleter): New.
6269         (counted_command_line): New typedef.
6270         (struct command_line): Add constructor, destructor.
6271         <body_list>: Remove.
6272         <body_list_0, body_list_1>: New members.
6273         (command_line_up): Remove typedef.
6274         (read_command_lines, read_command_lines_1, get_command_line):
6275         Update.
6276         (copy_command_lines): Don't declare.
6277         * cli/cli-script.c (build_command_line): Use "new".
6278         (get_command_line): Return counted_command_line.
6279         (print_command_lines, execute_user_command)
6280         (execute_control_command_1, while_command, if_command): Update.
6281         (realloc_body_list): Remove.
6282         (process_next_line, recurse_read_control_structure): Update.
6283         (read_command_lines, read_command_lines_1): Return counted_command_line.
6284         (free_command_lines): Use "delete".
6285         (copy_command_lines): Remove.
6286         (define_command, document_command, show_user_1): Update.
6287         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6288         a counted_command_line.
6289         * breakpoint.h (counted_command_line): Remove typedef.
6290         (breakpoint_set_commands): Update.
6291         * breakpoint.c (check_no_tracepoint_commands)
6292         (validate_commands_for_breakpoint): Update.
6293         (breakpoint_set_commands): Change commands to be a
6294         counted_command_line.
6295         (commands_command_1, update_dprintf_command_list)
6296         (create_tracepoint_from_upload): Update.
6297
6298 2018-05-04  Tom Tromey  <tom@tromey.com>
6299
6300         * cli/cli-decode.h (cmd_list_element): New constructor.
6301         (~cmd_list_element): New destructor.
6302         (struct cmd_list_element): Add initializers.
6303         * cli/cli-decode.c (do_add_cmd): Use "new".
6304         (delete_cmd): Use "delete".
6305
6306 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6307             Pedro Alves <palves@redhat.com>
6308
6309         PR breakpoints/19806 and support for PR external/20207.
6310         * NEWS: Mention Aarch64 watchpoint improvements.
6311         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6312         watchpoints and PR external/20207 watchpoints.
6313         * nat/aarch64-linux-hw-point.c
6314         (kernel_supports_any_contiguous_range): New.
6315         (aarch64_watchpoint_offset): New.
6316         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6317         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6318         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6319         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6320         next_addr_orig_p.  Support PR external/20207 watchpoints.
6321         (aarch64_downgrade_regs): New.
6322         (aarch64_dr_state_insert_one_point): New parameters offset and
6323         addr_orig.
6324         (aarch64_dr_state_remove_one_point): Likewise.
6325         (aarch64_handle_breakpoint): Update caller.
6326         (aarch64_handle_aligned_watchpoint): Likewise.
6327         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6328         aligned_offset.
6329         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6330         aarch64_downgrade_regs.
6331         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6332         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6333         (DR_CONTROL_MASK): ... this.
6334         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6335         (unsigned int aarch64_watchpoint_offset): New prototype.
6336         (aarch64_linux_set_debug_regs): Remove const from state.
6337         * utils.c (align_up, align_down): Move to ...
6338         * common/common-utils.c (align_up, align_down): ... here.
6339         * utils.h (align_up, align_down): Move to ...
6340         * common/common-utils.h (align_up, align_down): ... here.
6341
6342 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6343
6344         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6345         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6346         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6347         Re-implement to match the ABI as summarized in GCC's
6348         gcc/config/sparc/sparc.c.  All callers updated.
6349         (sparc32_store_arguments): Remove assertion.
6350
6351 2018-05-04  Tom Tromey  <tom@tromey.com>
6352
6353         * printcmd.c: Don't include tui.h.
6354         (decode_format): Use skip_spaces.
6355
6356 2018-05-04  Tom Tromey  <tom@tromey.com>
6357
6358         PR gdb/22619:
6359         * printcmd.c (last_count): New global.
6360         (x_command): Use saved count when repeating.
6361
6362 2018-05-04  Tom Tromey  <tom@tromey.com>
6363
6364         * nto-procfs.c (do_closedir_cleanup): Remove.
6365         (procfs_pidlist): Use gdb_dir_up.
6366         * procfs.c (do_closedir_cleanup): Remove.
6367         (proc_update_threads): Use gdb_dir_up.
6368         * common/filestuff.h (struct gdb_dir_deleter): New.
6369         (gdb_dir_up): New typedef.
6370
6371 2018-05-04  Tom Tromey  <tom@tromey.com>
6372
6373         * ada-lang.c (print_mention_exception): Use std::string.
6374
6375 2018-05-04  Tom Tromey  <tom@tromey.com>
6376
6377         * ada-lang.c (create_excep_cond_exprs): Update.
6378         (ada_exception_catchpoint_cond_string): Use std::string.
6379
6380 2018-05-04  Tom Tromey  <tom@tromey.com>
6381
6382         * ada-lang.c (xget_renaming_scope): Return std::string.
6383         (old_renaming_is_invisible): Update.
6384
6385 2018-05-04  Tom Tromey  <tom@tromey.com>
6386
6387         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6388         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6389
6390 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6391
6392         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6393
6394 2018-05-04  Tom Tromey  <tom@tromey.com>
6395
6396         * remote.c (remote_query_supported_append): Change type.
6397         (remote_check_symbols): Update.
6398
6399 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6400
6401         PR gdb/11420
6402         * configure.ac: Prepend libpython.
6403         * python/python-config.py: Likewise.
6404         * configure: Regenerate.
6405
6406 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6407
6408         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6409
6410 2018-05-03  Pedro Alves  <palves@redhat.com>
6411
6412         * s390-linux-nat.c
6413         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6414         override.  Write 'true' instead of '1'.
6415         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6416         declaration.
6417
6418 2018-05-02  Pedro Alves  <palves@redhat.com>
6419
6420         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6421         add_inf_child_target.
6422         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6423         add_inf_child_target.
6424         * aix-thread.c (aix_thread_target_info): New.
6425         (aix_thread_target) <shortname, longname, doc>: Delete.
6426         <info>: New.
6427         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6428         add_inf_child_target.
6429         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6430         add_inf_child_target.
6431         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6432         add_inf_child_target.
6433         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6434         add_inf_child_target.
6435         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6436         add_inf_child_target.
6437         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6438         add_inf_child_target.
6439         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6440         add_inf_child_target.
6441         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6442         add_inf_child_target.
6443         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6444         add_inf_child_target.
6445         * bfd-target.c (target_bfd_target_info): New.
6446         (target_bfd) <shortname, longname, doc>: Delete.
6447         <info>: New.
6448         * bsd-kvm.c (bsd_kvm_target_info): New.
6449         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6450         <info>: New.
6451         (bsd_kvm_target::open): Rename to ...
6452         (bsd_kvm_target_open): ... this.  Adjust.
6453         * bsd-uthread.c (bsd_uthread_target_info): New.
6454         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6455         <info>: New.
6456         * corefile.c (core_file_command): Adjust.
6457         * corelow.c (core_target_info): New.
6458         (core_target) <shortname, longname, doc>: Delete.
6459         <info>: New.
6460         (core_target::open): Rename to ...
6461         (core_target_open): ... this.  Adjust.
6462         * ctf.c (ctf_target_info): New.
6463         (ctf_target) <shortname, longname, doc>: Delete.
6464         <info>: New.
6465         (ctf_target::open): Rename to ...
6466         (ctf_target_open): ... this.
6467         (_initialize_ctf): Adjust.
6468         * exec.c (exec_target_info): New.
6469         (exec_target) <shortname, longname, doc>: Delete.
6470         <info>: New.
6471         (exec_target::open): Rename to ...
6472         (exec_target_open): ... this.
6473         * gdbcore.h (core_target_open): Declare.
6474         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6475         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6476         add_inf_child_target.
6477         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6478         add_inf_child_target.
6479         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6480         add_inf_child_target.
6481         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6482         add_inf_child_target.
6483         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6484         add_inf_child_target.
6485         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6486         add_inf_child_target.
6487         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6488         add_inf_child_target.
6489         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6490         add_inf_child_target.
6491         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6492         add_inf_child_target.
6493         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6494         add_inf_child_target.
6495         * inf-child.c (inf_child_target_info): New.
6496         (inf_child_target::info): New.
6497         (inf_child_open_target): Remove 'target' parameter.  Use
6498         get_native_target instead.
6499         (inf_child_target::open): Delete.
6500         (add_inf_child_target): New.
6501         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6502         Delete.
6503         <info>: New.
6504         (add_inf_child_target): Declare.
6505         (inf_child_open_target): Declare.
6506         * linux-thread-db.c (thread_db_target_info): New.
6507         (thread_db_target) <shortname, longname, doc>: Delete.
6508         <info>: New.
6509         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6510         add_inf_child_target.
6511         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6512         add_inf_child_target.
6513         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6514         add_inf_child_target.
6515         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6516         add_inf_child_target.
6517         * make-target-delegates (print_class): Adjust.
6518         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6519         add_inf_child_target.
6520         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6521         add_inf_child_target.
6522         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6523         add_inf_child_target.
6524         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6525         add_inf_child_target.
6526         * nto-procfs.c (nto_native_target_info): New.
6527         (nto_procfs_target_native) <shortname, longname, doc>:
6528         Delete.
6529         <info>: New.
6530         (nto_procfs_target_info): New.
6531         (nto_procfs_target_procfs) <shortname, longname, doc>:
6532         Delete.
6533         <info>: New.
6534         (init_procfs_targets): Adjust.
6535         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6536         add_inf_child_target.
6537         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6538         add_inf_child_target.
6539         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6540         add_inf_child_target.
6541         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6542         add_inf_child_target.
6543         * ravenscar-thread.c (ravenscar_target_info): New.
6544         (ravenscar_thread_target) <shortname, longname, doc>:
6545         Delete.
6546         <info>: New.
6547         * record-btrace.c (record_btrace_target_info):
6548         (record_btrace_target) <shortname, longname, doc>: Delete.
6549         <info>: New.
6550         (record_btrace_target::open): Rename to ...
6551         (record_btrace_target_open): ... this.  Adjust.
6552         * record-full.c (record_longname, record_doc): New.
6553         (record_full_base_target) <shortname, longname, doc>: Delete.
6554         <info>: New.
6555         (record_full_target_info): New.
6556         (record_full_target): <shortname>: Delete.
6557         <info>: New.
6558         (record_full_core_open_1, record_full_open_1): Update comments.
6559         (record_full_base_target::open): Rename to ...
6560         (record_full_open): ... this.
6561         (cmd_record_full_restore): Update.
6562         (_initialize_record_full): Update.
6563         * remote-sim.c (remote_sim_target_info): New.
6564         (gdbsim_target) <shortname, longname, doc>: Delete.
6565         <info>: New.
6566         (gdbsim_target::open): Rename to ...
6567         (gdbsim_target_open): ... this.
6568         (_initialize_remote_sim): Adjust.
6569         * remote.c (remote_doc): New.
6570         (remote_target_info): New.
6571         (remote_target) <shortname, longname, doc>: Delete.
6572         <info>: New.
6573         (extended_remote_target_info): New.
6574         (extended_remote_target) <shortname, longname, doc>: Delete.
6575         <info>: New.
6576         (remote_target::open_1): Make static.  Adjust.
6577         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6578         * s390-linux-nat.c (_initialize_s390_nat): Use
6579         add_inf_child_target.
6580         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6581         add_inf_child_target.
6582         * sol-thread.c (thread_db_target_info): New.
6583         (sol_thread_target) <shortname, longname, doc>: Delete.
6584         <info>: New.
6585         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6586         add_inf_child_target.
6587         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6588         add_inf_child_target.
6589         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6590         add_inf_child_target.
6591         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6592         add_inf_child_target.
6593         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6594         add_inf_child_target.
6595         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6596         add_inf_child_target.
6597         * spu-linux-nat.c (_initialize_spu_nat): Use
6598         add_inf_child_target.
6599         * spu-multiarch.c (spu_multiarch_target_info): New.
6600         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6601         <info>: New.
6602         * target-delegates.c: Regenerate.
6603         * target.c: Include <unordered_map>.
6604         (target_ops_p): Delete.
6605         (DEF_VEC_P(target_ops_p)): Delete.
6606         (target_factories): New.
6607         (test_target_info): New.
6608         (test_target_ops::info): New.
6609         (open_target): Adjust to use target_factories.
6610         (add_target_with_completer): Rename to ...
6611         (add_target): ... this.  Change prototype.  Register target_info
6612         and open callback in target_factories.  Register target_info in
6613         command context instead of target_ops.
6614         (add_target): Delete old implementation.
6615         (add_deprecated_target_alias): Change prototype.  Adjust.
6616         (the_native_target): New.
6617         (set_native_target, get_native_target): New.
6618         (find_default_run_target): Use the_native_target.
6619         (find_attach_target, find_run_target): Simplify.
6620         (target_ops::open): Delete.
6621         (dummy_target_info): New.
6622         (dummy_target::shortname, dummy_target::longname)
6623         (dummy_target::doc): Delete.
6624         (dummy_target::info): New.
6625         (debug_target::shortname, debug_target::longname)
6626         (debug_target::doc): Delete.
6627         (debug_target::info): New.
6628         * target.h (struct target_info): New.
6629         (target_ops::~target_ops): Add comment.
6630         (target_ops::info): New.
6631         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6632         longer virtual.  Implement in terms of target_info.
6633         (set_native_target, get_native_target): Declare.
6634         (target_open_ftype): New.
6635         (add_target, add_target_with_completer)
6636         (add_deprecated_target_alias): Change prototype.
6637         (test_target) <shortname, longname, doc>: Delete.
6638         <info>: New.
6639         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6640         add_inf_child_target.
6641         * tracefile-tfile.c (tfile_target_info): New.
6642         (tfile_target) <shortname, longname, doc>: Delete.
6643         <info>: New.
6644         (tfile_target::open): Rename to ...
6645         (tfile_target_open): ... this.
6646         (_initialize_tracefile_tfile): Adjust.
6647         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6648         add_inf_child_target.
6649         * windows-nat.c (_initialize_windows_nat): Use
6650         add_inf_child_target.
6651         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6652         add_inf_child_target.
6653
6654 2018-05-02  Pedro Alves  <palves@redhat.com>
6655
6656         * linux-nat.h (linux_nat_target) <low_new_thread,
6657         low_delete_thread, low_new_fork, low_forget_process,
6658         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6659         New virtual methods.
6660         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6661         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6662         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6663         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6664         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6665         Delete.
6666         * linux-fork.c (delete_fork): Adjust to call low method.
6667         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6668         (linux_nat_new_fork, linux_nat_forget_process_hook)
6669         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6670         (linux_nat_status_is_event):
6671         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6672         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6673         to call low method.
6674         (sigtrap_is_event): Rename to ...
6675         (linux_nat_target::low_status_is_event): ... this.
6676         (linux_nat_set_status_is_event): Delete.
6677         (save_stop_reason, linux_nat_wait_1)
6678         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6679         low methods.
6680         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6681         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6682         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6683         (linux_nat_set_prepare_to_resume): Delete.
6684         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6685         low virtual methods.
6686         * amd64-linux-nat.c: Likewise.
6687         * arm-linux-nat.c: Likewise.
6688         * i386-linux-nat.c: Likewise.
6689         * ia64-linux-nat.c: Likewise.
6690         * mips-linux-nat.c: Likewise.
6691         * ppc-linux-nat.c: Likewise.
6692         * s390-linux-nat.c: Likewise.
6693         * sparc64-linux-nat.c: Likewise.
6694         * x86-linux-nat.c: Likewise.
6695         * x86-linux-nat.h: Include "nat/x86-linux.h".
6696         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6697         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6698         Override methods.
6699
6700 2018-05-02  Pedro Alves  <palves@redhat.com>
6701
6702         * target.h (target_ops)
6703         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6704         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6705         stopped_by_watchpoint, have_continuable_watchpoint,
6706         stopped_data_address, watchpoint_addr_within_range,
6707         can_accel_watchpoint_condition, can_run, thread_alive,
6708         has_all_memory, has_memory, has_stack, has_registers,
6709         has_execution, can_async_p, is_async_p, supports_non_stop,
6710         always_non_stop_p, can_execute_reverse, supports_multi_process,
6711         supports_enable_disable_tracepoint,
6712         supports_disable_randomization, supports_string_tracing,
6713         supports_evaluation_of_breakpoint_conditions,
6714         can_run_breakpoint_commands, filesystem_is_local,
6715         can_download_tracepoint, get_trace_state_variable_value,
6716         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6717         record_is_replaying, record_will_replay,
6718         augmented_libraries_svr4_read>: Adjust to return bool.
6719         * aarch64-linux-nat.c: All implementations adjusted.
6720         * aix-thread.c: All implementations adjusted.
6721         * arm-linux-nat.c: All implementations adjusted.
6722         * breakpoint.c: All implementations adjusted.
6723         * bsd-kvm.c: All implementations adjusted.
6724         * bsd-uthread.c: All implementations adjusted.
6725         * corelow.c: All implementations adjusted.
6726         * ctf.c: All implementations adjusted.
6727         * darwin-nat.c: All implementations adjusted.
6728         * darwin-nat.h: All implementations adjusted.
6729         * exec.c: All implementations adjusted.
6730         * fbsd-nat.c: All implementations adjusted.
6731         * fbsd-nat.h: All implementations adjusted.
6732         * gnu-nat.c: All implementations adjusted.
6733         * gnu-nat.h: All implementations adjusted.
6734         * go32-nat.c: All implementations adjusted.
6735         * ia64-linux-nat.c: All implementations adjusted.
6736         * inf-child.c: All implementations adjusted.
6737         * inf-child.h: All implementations adjusted.
6738         * inf-ptrace.c: All implementations adjusted.
6739         * inf-ptrace.h: All implementations adjusted.
6740         * linux-nat.c: All implementations adjusted.
6741         * linux-nat.h: All implementations adjusted.
6742         * mips-linux-nat.c: All implementations adjusted.
6743         * nto-procfs.c: All implementations adjusted.
6744         * ppc-linux-nat.c: All implementations adjusted.
6745         * procfs.c: All implementations adjusted.
6746         * ravenscar-thread.c: All implementations adjusted.
6747         * record-btrace.c: All implementations adjusted.
6748         * record-full.c: All implementations adjusted.
6749         * remote-sim.c: All implementations adjusted.
6750         * remote.c: All implementations adjusted.
6751         * s390-linux-nat.c: All implementations adjusted.
6752         * sol-thread.c: All implementations adjusted.
6753         * spu-multiarch.c: All implementations adjusted.
6754         * target-delegates.c: All implementations adjusted.
6755         * target.c: All implementations adjusted.
6756         * target.h: All implementations adjusted.
6757         * tracefile-tfile.c: All implementations adjusted.
6758         * tracefile.c: All implementations adjusted.
6759         * tracefile.h: All implementations adjusted.
6760         * windows-nat.c: All implementations adjusted.
6761         * x86-linux-nat.h: All implementations adjusted.
6762         * x86-nat.h: All implementations adjusted.
6763
6764 2018-05-02  Pedro Alves  <palves@redhat.com>
6765
6766         * make-target-delegates (scan_target_h): Don't trim lines here.
6767         Replace sequences of tabs and/or whitespace with a single
6768         whitespace.
6769         (top level, parsing methods): Trim each line before processing it
6770         here.
6771
6772 2018-05-02  Pedro Alves  <palves@redhat.com>
6773             John Baldwin  <jhb@freebsd.org>
6774
6775         * target.h (enum strata) <debug_stratum>: New.
6776         (struct target_ops) <all delegation methods>: Replace by C++
6777         virtual methods, and drop "to_" prefix.  All references updated
6778         throughout.
6779         <to_shortname, to_longname, to_doc, to_data,
6780         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6781         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6782         virtual methods.  All references updated throughout.
6783         <can_attach, supports_terminal_ours, can_create_inferior,
6784         get_thread_control_capabilities, attach_no_wait>: New
6785         virtual methods.
6786         <insert_breakpoint, remove_breakpoint>: Now
6787         TARGET_DEFAULT_NORETURN methods.
6788         <info_proc>: Now returns bool.
6789         <to_magic>: Delete.
6790         (OPS_MAGIC): Delete.
6791         (current_target): Delete.  All references replaced by references
6792         to ...
6793         (target_stack): ... this.  New.
6794         (target_shortname, target_longname): Adjust.
6795         (target_can_run): Now a function declaration.
6796         (default_child_has_all_memory, default_child_has_memory)
6797         (default_child_has_stack, default_child_has_registers)
6798         (default_child_has_execution): Remove target_ops parameter.
6799         (complete_target_initialization): Delete.
6800         (memory_breakpoint_target): New template class.
6801         (test_target_ops): Refactor as a C++ class with virtual methods.
6802         * make-target-delegates (NAME_PART): Tighten.
6803         (POINTER_PART, CP_SYMBOL): New.
6804         (SIMPLE_RETURN_PART): Reimplement.
6805         (VEC_RETURN_PART): Expect less.
6806         (RETURN_PART, VIRTUAL_PART): New.
6807         (METHOD): Adjust to C++ virtual methods.
6808         (scan_target_h): Remove reference to C99.
6809         (dname): Output "target_ops::" prefix.
6810         (write_function_header): Adjust to output a C++ class method.
6811         (write_declaration): New.
6812         (write_delegator): Adjust to output a C++ class method.
6813         (tdname): Output "dummy_target::" prefix.
6814         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6815         method.
6816         (tdefault_names, debug_names): Delete.
6817         (return_types, tdefaults, styles, argtypes_array): New.
6818         (top level): All methods are delegators.
6819         (print_class): New.
6820         (top level): Print dummy_target and debug_target classes.
6821         * target-delegates.c: Regenerate.
6822         * target-debug.h (target_debug_print_enum_info_proc_what)
6823         (target_debug_print_thread_control_capabilities)
6824         (target_debug_print_thread_info_p): New.
6825         * target.c (dummy_target): Delete.
6826         (the_dummy_target, the_debug_target): New.
6827         (target_stack): Now extern.
6828         (set_targetdebug): Push/unpush debug target.
6829         (default_child_has_all_memory, default_child_has_memory)
6830         (default_child_has_stack, default_child_has_registers)
6831         (default_child_has_execution): Remove target_ops parameter.
6832         (complete_target_initialization): Delete.
6833         (add_target_with_completer): No longer call
6834         complete_target_initialization.
6835         (target_supports_terminal_ours): Use regular delegation.
6836         (update_current_target): Delete.
6837         (push_target): No longer check magic number.  Don't call
6838         update_current_target.
6839         (unpush_target): Don't call update_current_target.
6840         (target_is_pushed): No longer check magic number.
6841         (target_require_runnable): Skip for all stratums over
6842         process_stratum.
6843         (target_ops::info_proc): New.
6844         (target_info_proc): Use find_target_at and
6845         find_default_run_target.
6846         (target_supports_disable_randomization): Use regular delegation.
6847         (target_get_osdata): Use find_target_at.
6848         (target_ops::open, target_ops::close, target_ops::can_attach)
6849         (target_ops::attach, target_ops::can_create_inferior)
6850         (target_ops::create_inferior, target_ops::can_run)
6851         (target_can_run): New.
6852         (default_fileio_target): Use regular delegation.
6853         (target_ops::fileio_open, target_ops::fileio_pwrite)
6854         (target_ops::fileio_pread, target_ops::fileio_fstat)
6855         (target_ops::fileio_close, target_ops::fileio_unlink)
6856         (target_ops::fileio_readlink): New.
6857         (target_fileio_open_1, target_fileio_unlink)
6858         (target_fileio_readlink): Always call the target method.  Handle
6859         FILEIO_ENOSYS.
6860         (return_zero, return_zero_has_execution): Delete.
6861         (init_dummy_target): Delete.
6862         (dummy_target::dummy_target, dummy_target::shortname)
6863         (dummy_target::longname, dummy_target::doc)
6864         (debug_target::debug_target, debug_target::shortname)
6865         (debug_target::longname, debug_target::doc): New.
6866         (target_supports_delete_record): Use regular delegation.
6867         (setup_target_debug): Delete.
6868         (maintenance_print_target_stack): Skip debug_stratum.
6869         (initialize_targets): Instantiate the_dummy_target and
6870         the_debug_target.
6871         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6872         use target_stack.
6873         (target_auxv_search, fprint_target_auxv): Adjust.
6874         (info_auxv_command): Adjust to use target_stack.
6875         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6876         * exceptions.c (print_flush): Handle a NULL target_stack.
6877         * regcache.c (target_ops_no_register): Refactor as class with
6878         virtual methods.
6879
6880         * exec.c (exec_target): New class.
6881         (exec_ops): Now an exec_target.
6882         (exec_open, exec_close_1, exec_get_section_table)
6883         (exec_xfer_partial, exec_files_info, exec_has_memory)
6884         (exec_make_note_section): Refactor as exec_target methods.
6885         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6886         Delete.
6887         (exec_target::find_memory_regions): New.
6888         (_initialize_exec): Don't call init_exec_ops.
6889         * gdbcore.h (exec_file_clear): Delete.
6890
6891         * corefile.c (core_target): Delete.
6892         (core_file_command): Adjust.
6893         * corelow.c (core_target): New class.
6894         (the_core_target): New.
6895         (core_close): Remove target_ops parameter.
6896         (core_close_cleanup): Adjust.
6897         (core_target::close): New.
6898         (core_open, core_detach, get_core_registers, core_files_info)
6899         (core_xfer_partial, core_thread_alive, core_read_description)
6900         (core_pid_to_str, core_thread_name, core_has_memory)
6901         (core_has_stack, core_has_registers, core_info_proc): Rework as
6902         core_target methods.
6903         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6904         (_initialize_corelow): Initialize the_core_target.
6905         * gdbcore.h (core_target): Delete.
6906         (the_core_target): New.
6907
6908         * ctf.c: (ctf_target): New class.
6909         (ctf_ops): Now a ctf_target.
6910         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6911         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6912         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6913         methods.
6914         (init_ctf_ops): Delete.
6915         (_initialize_ctf): Don't call it.
6916         * tracefile-tfile.c (tfile_target): New class.
6917         (tfile_ops): Now a tfile_target.
6918         (tfile_open, tfile_close, tfile_files_info)
6919         (tfile_get_tracepoint_status, tfile_trace_find)
6920         (tfile_fetch_registers, tfile_xfer_partial)
6921         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6922         Refactor as tfile_target methods.
6923         (tfile_xfer_partial_features): Remove target_ops parameter.
6924         (init_tfile_ops): Delete.
6925         (_initialize_tracefile_tfile): Don't call it.
6926         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6927         (tracefile_has_stack, tracefile_has_registers)
6928         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6929         tracefile_target methods.
6930         (init_tracefile_ops): Delete.
6931         (tracefile_target::tracefile_target): New.
6932         * tracefile.h: Include "target.h".
6933         (tracefile_target): New class.
6934         (init_tracefile_ops): Delete.
6935
6936         * spu-multiarch.c (spu_multiarch_target): New class.
6937         (spu_ops): Now a spu_multiarch_target.
6938         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6939         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6940         (spu_search_memory, spu_mourn_inferior): Refactor as
6941         spu_multiarch_target methods.
6942         (init_spu_ops): Delete.
6943         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6944         complete_target_initialization.
6945
6946         * ravenscar-thread.c (ravenscar_thread_target): New class.
6947         (ravenscar_ops): Now a ravenscar_thread_target.
6948         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6949         (ravenscar_thread_alive, ravenscar_pid_to_str)
6950         (ravenscar_fetch_registers, ravenscar_store_registers)
6951         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6952         (ravenscar_stopped_by_hw_breakpoint)
6953         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6954         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6955         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6956         methods.
6957         (init_ravenscar_thread_ops): Delete.
6958         (_initialize_ravenscar): Remove references to
6959         init_ravenscar_thread_ops and complete_target_initialization.
6960
6961         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6962         (bsd_uthread_target): New class.
6963         (bsd_uthread_ops): Now a bsd_uthread_target.
6964         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6965         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6966         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6967         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6968         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6969         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6970         (bsd_uthread_target): Delete function.
6971         (_initialize_bsd_uthread): Remove reference to
6972         complete_target_initialization.
6973
6974         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6975         (target_bfd): ... this new class.
6976         (target_bfd_xfer_partial, target_bfd_get_section_table)
6977         (target_bfd_close): Refactor as target_bfd methods.
6978         (target_bfd::~target_bfd): New.
6979         (target_bfd_reopen): Adjust.
6980         (target_bfd::close): New.
6981
6982         * record-btrace.c (record_btrace_target): New class.
6983         (record_btrace_ops): Now a record_btrace_target.
6984         (record_btrace_open, record_btrace_stop_recording)
6985         (record_btrace_disconnect, record_btrace_close)
6986         (record_btrace_async, record_btrace_info)
6987         (record_btrace_insn_history, record_btrace_insn_history_range)
6988         (record_btrace_insn_history_from, record_btrace_call_history)
6989         (record_btrace_call_history_range)
6990         (record_btrace_call_history_from, record_btrace_record_method)
6991         (record_btrace_is_replaying, record_btrace_will_replay)
6992         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6993         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6994         (record_btrace_store_registers, record_btrace_prepare_to_store)
6995         (record_btrace_to_get_unwinder)
6996         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6997         (record_btrace_commit_resume, record_btrace_wait)
6998         (record_btrace_stop, record_btrace_can_execute_reverse)
6999         (record_btrace_stopped_by_sw_breakpoint)
7000         (record_btrace_supports_stopped_by_sw_breakpoint)
7001         (record_btrace_stopped_by_hw_breakpoint)
7002         (record_btrace_supports_stopped_by_hw_breakpoint)
7003         (record_btrace_update_thread_list, record_btrace_thread_alive)
7004         (record_btrace_goto_begin, record_btrace_goto_end)
7005         (record_btrace_goto, record_btrace_stop_replaying_all)
7006         (record_btrace_execution_direction)
7007         (record_btrace_prepare_to_generate_core)
7008         (record_btrace_done_generating_core): Refactor as
7009         record_btrace_target methods.
7010         (init_record_btrace_ops): Delete.
7011         (_initialize_record_btrace): Remove reference to
7012         init_record_btrace_ops.
7013         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7014         the execution_direction global.
7015         (record_full_base_target, record_full_target)
7016         (record_full_core_target): New classes.
7017         (record_full_ops): Now a record_full_target.
7018         (record_full_core_ops): Now a record_full_core_target.
7019         (record_full_target::detach, record_full_target::disconnect)
7020         (record_full_core_target::disconnect)
7021         (record_full_target::mourn_inferior, record_full_target::kill):
7022         New.
7023         (record_full_open, record_full_close, record_full_async): Refactor
7024         as methods of the record_full_base_target class.
7025         (record_full_resume, record_full_commit_resume): Refactor
7026         as methods of the record_full_target class.
7027         (record_full_wait, record_full_stopped_by_watchpoint)
7028         (record_full_stopped_data_address)
7029         (record_full_stopped_by_sw_breakpoint)
7030         (record_full_supports_stopped_by_sw_breakpoint)
7031         (record_full_stopped_by_hw_breakpoint)
7032         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7033         methods of the record_full_base_target class.
7034         (record_full_store_registers, record_full_xfer_partial)
7035         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7036         Refactor as methods of the record_full_target class.
7037         (record_full_can_execute_reverse, record_full_get_bookmark)
7038         (record_full_goto_bookmark, record_full_execution_direction)
7039         (record_full_record_method, record_full_info, record_full_delete)
7040         (record_full_is_replaying, record_full_will_replay)
7041         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7042         (record_full_stop_replaying): Refactor as methods of the
7043         record_full_base_target class.
7044         (record_full_core_resume, record_full_core_kill)
7045         (record_full_core_fetch_registers)
7046         (record_full_core_prepare_to_store)
7047         (record_full_core_store_registers, record_full_core_xfer_partial)
7048         (record_full_core_insert_breakpoint)
7049         (record_full_core_remove_breakpoint)
7050         (record_full_core_has_execution): Refactor
7051         as methods of the record_full_core_target class.
7052         (record_full_base_target::supports_delete_record): New.
7053         (init_record_full_ops): Delete.
7054         (init_record_full_core_ops): Delete.
7055         (record_full_save): Refactor as method of the
7056         record_full_base_target class.
7057         (_initialize_record_full): Remove references to
7058         init_record_full_ops and init_record_full_core_ops.
7059
7060         * remote.c (remote_target, extended_remote_target): New classes.
7061         (remote_ops): Now a remote_target.
7062         (extended_remote_ops): Now an extended_remote_target.
7063         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7064         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7065         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7066         (remote_pass_signals, remote_set_syscall_catchpoint)
7067         (remote_program_signals, )
7068         (remote_thread_always_alive): Remove target_ops parameter.
7069         (remote_thread_alive, remote_thread_name)
7070         (remote_update_thread_list, remote_threads_extra_info)
7071         (remote_static_tracepoint_marker_at)
7072         (remote_static_tracepoint_markers_by_strid)
7073         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7074         (remote_open): Refactor as methods of remote_target.
7075         (extended_remote_open, extended_remote_detach)
7076         (extended_remote_attach, extended_remote_post_attach):
7077         (extended_remote_supports_disable_randomization)
7078         (extended_remote_create_inferior): : Refactor as method of
7079         extended_remote_target.
7080         (remote_set_permissions, remote_open_1, remote_detach)
7081         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7082         (remote_resume, remote_commit_resume, remote_stop)
7083         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7084         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7085         (remote_prepare_to_store, remote_store_registers)
7086         (remote_flash_erase, remote_flash_done, remote_files_info)
7087         (remote_kill, remote_mourn, remote_insert_breakpoint)
7088         (remote_remove_breakpoint, remote_insert_watchpoint)
7089         (remote_watchpoint_addr_within_range)
7090         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7091         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7092         (remote_supports_stopped_by_sw_breakpoint)
7093         (remote_stopped_by_hw_breakpoint)
7094         (remote_supports_stopped_by_hw_breakpoint)
7095         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7096         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7097         (remote_verify_memory): Refactor as methods of remote_target.
7098         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7099         parameter.
7100         (remote_xfer_partial, remote_get_memory_xfer_limit)
7101         (remote_search_memory, remote_rcmd, remote_memory_map)
7102         (remote_pid_to_str, remote_get_thread_local_address)
7103         (remote_get_tib_address, remote_read_description): Refactor as
7104         methods of remote_target.
7105         (remote_target::fileio_open, remote_target::fileio_pwrite)
7106         (remote_target::fileio_pread, remote_target::fileio_close): New.
7107         (remote_hostio_readlink, remote_hostio_fstat)
7108         (remote_filesystem_is_local, remote_can_execute_reverse)
7109         (remote_supports_non_stop, remote_supports_disable_randomization)
7110         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7111         (remote_supports_enable_disable_tracepoint)
7112         (remote_supports_string_tracing)
7113         (remote_can_run_breakpoint_commands, remote_trace_init)
7114         (remote_download_tracepoint, remote_can_download_tracepoint)
7115         (remote_download_trace_state_variable, remote_enable_tracepoint)
7116         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7117         (remote_trace_start, remote_get_trace_status)
7118         (remote_get_tracepoint_status, remote_trace_stop)
7119         (remote_trace_find, remote_get_trace_state_variable_value)
7120         (remote_save_trace_data, remote_get_raw_trace_data)
7121         (remote_set_disconnected_tracing, remote_core_of_thread)
7122         (remote_set_circular_trace_buffer, remote_traceframe_info)
7123         (remote_get_min_fast_tracepoint_insn_len)
7124         (remote_set_trace_buffer_size, remote_set_trace_notes)
7125         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7126         (remote_disable_btrace, remote_teardown_btrace)
7127         (remote_read_btrace, remote_btrace_conf)
7128         (remote_augmented_libraries_svr4_read, remote_load)
7129         (remote_pid_to_exec_file, remote_can_do_single_step)
7130         (remote_execution_direction, remote_thread_handle_to_thread_info):
7131         Refactor as methods of remote_target.
7132         (init_remote_ops, init_extended_remote_ops): Delete.
7133         (remote_can_async_p, remote_is_async_p, remote_async)
7134         (remote_thread_events, remote_upload_tracepoints)
7135         (remote_upload_trace_state_variables): Refactor as methods of
7136         remote_target.
7137         (_initialize_remote): Remove references to init_remote_ops and
7138         init_extended_remote_ops.
7139
7140         * remote-sim.c (gdbsim_target): New class.
7141         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7142         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7143         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7144         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7145         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7146         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7147         Refactor as methods of gdbsim_target.
7148         (gdbsim_ops): Now a gdbsim_target.
7149         (init_gdbsim_ops): Delete.
7150         (gdbsim_cntrl_c): Adjust.
7151         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7152
7153         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7154         (the_amd64_linux_nat_target): New.
7155         (amd64_linux_fetch_inferior_registers)
7156         (amd64_linux_store_inferior_registers): Refactor as methods of
7157         amd64_linux_nat_target.
7158         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7159         * i386-linux-nat.c: Don't include "linux-nat.h".
7160         (i386_linux_nat_target): New class.
7161         (the_i386_linux_nat_target): New.
7162         (i386_linux_fetch_inferior_registers)
7163         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7164         as methods of i386_linux_nat_target.
7165         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7166         * inf-child.c (inf_child_ops): Delete.
7167         (inf_child_fetch_inferior_registers)
7168         (inf_child_store_inferior_registers): Delete.
7169         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7170         methods of inf_child_target.
7171         (inf_child_target::supports_terminal_ours)
7172         (inf_child_target::terminal_init)
7173         (inf_child_target::terminal_inferior)
7174         (inf_child_target::terminal_ours_for_output)
7175         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7176         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7177         New.
7178         (inf_child_open, inf_child_disconnect, inf_child_close)
7179         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7180         (inf_child_post_startup_inferior, inf_child_can_run)
7181         (inf_child_pid_to_exec_file): Refactor as methods of
7182         inf_child_target.
7183         (inf_child_follow_fork): Delete.
7184         (inf_child_target::can_create_inferior)
7185         (inf_child_target::can_attach): New.
7186         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7187         (inf_child_target::has_stack, inf_child_target::has_registers)
7188         (inf_child_target::has_execution): New.
7189         (inf_child_fileio_open, inf_child_fileio_pwrite)
7190         (inf_child_fileio_pread, inf_child_fileio_fstat)
7191         (inf_child_fileio_close, inf_child_fileio_unlink)
7192         (inf_child_fileio_readlink, inf_child_use_agent)
7193         (inf_child_can_use_agent): Refactor as methods of
7194         inf_child_target.
7195         (return_zero, inf_child_target): Delete.
7196         (inf_child_target::inf_child_target): New.
7197         * inf-child.h: Include "target.h".
7198         (inf_child_target): Delete function prototype.
7199         (inf_child_target): New class.
7200         (inf_child_open_target, inf_child_mourn_inferior)
7201         (inf_child_maybe_unpush_target): Delete.
7202         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7203         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7204         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7205         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7206         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7207         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7208         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7209         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7210         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7211         methods of inf_ptrace_target.
7212         (inf_ptrace_target): Delete function.
7213         * inf-ptrace.h: Include "inf-child.h".
7214         (inf_ptrace_target): Delete function declaration.
7215         (inf_ptrace_target): New class.
7216         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7217         * linux-nat.c (linux_target): New.
7218         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7219         (linux_nat_target::~linux_nat_target): New.
7220         (linux_child_post_attach, linux_child_post_startup_inferior)
7221         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7222         (linux_child_remove_fork_catchpoint)
7223         (linux_child_insert_vfork_catchpoint)
7224         (linux_child_remove_vfork_catchpoint)
7225         (linux_child_insert_exec_catchpoint)
7226         (linux_child_remove_exec_catchpoint)
7227         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7228         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7229         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7230         (linux_nat_stopped_data_address)
7231         (linux_nat_stopped_by_sw_breakpoint)
7232         (linux_nat_supports_stopped_by_sw_breakpoint)
7233         (linux_nat_stopped_by_hw_breakpoint)
7234         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7235         (linux_nat_kill, linux_nat_mourn_inferior)
7236         (linux_nat_xfer_partial, linux_nat_thread_alive)
7237         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7238         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7239         (linux_child_static_tracepoint_markers_by_strid)
7240         (linux_nat_is_async_p, linux_nat_can_async_p)
7241         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7242         (linux_nat_supports_multi_process)
7243         (linux_nat_supports_disable_randomization, linux_nat_async)
7244         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7245         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7246         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7247         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7248         methods of linux_nat_target.
7249         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7250         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7251         parameter.
7252         (check_stopped_by_watchpoint): Adjust.
7253         (linux_xfer_partial): Delete.
7254         (linux_target_install_ops, linux_target, linux_nat_add_target):
7255         Delete.
7256         (linux_nat_target::linux_nat_target): New.
7257         * linux-nat.h: Include "inf-ptrace.h".
7258         (linux_nat_target): New.
7259         (linux_target, linux_target_install_ops, linux_nat_add_target):
7260         Delete function declarations.
7261         (linux_target): Declare global.
7262         * linux-thread-db.c (thread_db_target): New.
7263         (thread_db_target::thread_db_target): New.
7264         (thread_db_ops): Delete.
7265         (the_thread_db_target): New.
7266         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7267         (thread_db_update_thread_list, thread_db_pid_to_str)
7268         (thread_db_extra_thread_info)
7269         (thread_db_thread_handle_to_thread_info)
7270         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7271         (thread_db_resume): Refactor as methods of thread_db_target.
7272         (init_thread_db_ops): Delete.
7273         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7274         * x86-linux-nat.c: Don't include "linux-nat.h".
7275         (super_post_startup_inferior): Delete.
7276         (x86_linux_nat_target::~x86_linux_nat_target): New.
7277         (x86_linux_child_post_startup_inferior)
7278         (x86_linux_read_description, x86_linux_enable_btrace)
7279         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7280         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7281         methods of x86_linux_nat_target.
7282         (x86_linux_create_target): Delete.  Bits folded ...
7283         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7284         pointer.
7285         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7286         (x86_linux_nat_target): New class.
7287         (x86_linux_create_target): Delete.
7288         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7289         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7290         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7291         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7292         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7293         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7294         make extern.
7295         (x86_use_watchpoints): Delete.
7296         * x86-nat.h: Include "breakpoint.h" and "target.h".
7297         (x86_use_watchpoints): Delete.
7298         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7299         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7300         (x86_insert_watchpoint, x86_remove_watchpoint)
7301         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7302         (x86_stopped_by_hw_breakpoint): New declarations.
7303         (x86_nat_target): New template class.
7304
7305         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7306         (the_ppc_linux_nat_target): New.
7307         (ppc_linux_fetch_inferior_registers)
7308         (ppc_linux_can_use_hw_breakpoint)
7309         (ppc_linux_region_ok_for_hw_watchpoint)
7310         (ppc_linux_ranged_break_num_registers)
7311         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7312         (ppc_linux_insert_mask_watchpoint)
7313         (ppc_linux_remove_mask_watchpoint)
7314         (ppc_linux_can_accel_watchpoint_condition)
7315         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7316         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7317         (ppc_linux_watchpoint_addr_within_range)
7318         (ppc_linux_masked_watch_num_registers)
7319         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7320         (ppc_linux_read_description): Refactor as methods of
7321         ppc_linux_nat_target.
7322         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7323
7324         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7325         (procfs_target): New class.
7326         (the_procfs_target): New.
7327         (procfs_target): Delete function.
7328         (procfs_auxv_parse, procfs_attach, procfs_detach)
7329         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7330         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7331         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7332         (procfs_create_inferior, procfs_update_thread_list)
7333         (procfs_thread_alive, procfs_pid_to_str)
7334         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7335         (procfs_stopped_data_address, procfs_insert_watchpoint)
7336         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7337         (proc_find_memory_regions, procfs_info_proc)
7338         (procfs_make_note_section): Refactor as methods of procfs_target.
7339         (_initialize_procfs): Adjust.
7340         * sol-thread.c (sol_thread_target): New class.
7341         (sol_thread_ops): Now a sol_thread_target.
7342         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7343         (sol_thread_fetch_registers, sol_thread_store_registers)
7344         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7345         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7346         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7347         (init_sol_thread_ops): Delete.
7348         (_initialize_sol_thread): Adjust.  Remove references to
7349         init_sol_thread_ops and complete_target_initialization.
7350
7351         * windows-nat.c (windows_nat_target): New class.
7352         (windows_fetch_inferior_registers)
7353         (windows_store_inferior_registers, windows_resume, windows_wait)
7354         (windows_attach, windows_detach, windows_pid_to_exec_file)
7355         (windows_files_info, windows_create_inferior)
7356         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7357         (windows_close, windows_pid_to_str, windows_xfer_partial)
7358         (windows_get_tib_address, windows_get_ada_task_ptid)
7359         (windows_thread_name, windows_thread_alive): Refactor as
7360         windows_nat_target methods.
7361         (do_initial_windows_stuff): Adjust.
7362         (windows_target): Delete function.
7363         (_initialize_windows_nat): Adjust.
7364
7365         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7366         (darwin_mourn_inferior, darwin_kill_inferior)
7367         (darwin_create_inferior, darwin_attach, darwin_detach)
7368         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7369         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7370         (darwin_supports_multi_process): Refactor as darwin_nat_target
7371         methods.
7372         (darwin_resume_to, darwin_files_info): Delete.
7373         (_initialize_darwin_inferior): Rename to ...
7374         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7375         * darwin-nat.h: Include "inf-child.h".
7376         (darwin_nat_target): New class.
7377         (darwin_complete_target): Delete.
7378         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7379         (darwin_target): New.
7380         (i386_darwin_fetch_inferior_registers)
7381         (i386_darwin_store_inferior_registers): Refactor as methods of
7382         darwin_nat_target.
7383         (darwin_complete_target): Delete, with ...
7384         (_initialize_i386_darwin_nat): ... bits factored out here.
7385
7386         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7387         (the_alpha_linux_nat_target): New.
7388         (alpha_linux_register_u_offset): Refactor as
7389         alpha_linux_nat_target method.
7390         (_initialize_alpha_linux_nat): Adjust.
7391         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7392         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7393         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7394         methods of linux_nat_trad_target.
7395         (linux_trad_target): Delete.
7396         * linux-nat-trad.h (linux_trad_target): Delete function.
7397         (linux_nat_trad_target): New class.
7398         * mips-linux-nat.c (mips_linux_nat_target): New class.
7399         (super_fetch_registers, super_store_registers, super_close):
7400         Delete.
7401         (the_mips_linux_nat_target): New.
7402         (mips64_linux_regsets_fetch_registers)
7403         (mips64_linux_regsets_store_registers)
7404         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7405         (mips_linux_register_u_offset, mips_linux_read_description)
7406         (mips_linux_can_use_hw_breakpoint)
7407         (mips_linux_stopped_by_watchpoint)
7408         (mips_linux_stopped_data_address)
7409         (mips_linux_region_ok_for_hw_watchpoint)
7410         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7411         (mips_linux_close): Refactor as methods of mips_linux_nat.
7412         (_initialize_mips_linux_nat): Adjust to C++ification.
7413
7414         * aix-thread.c (aix_thread_target): New class.
7415         (aix_thread_ops): Now an aix_thread_target.
7416         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7417         (aix_thread_fetch_registers, aix_thread_store_registers)
7418         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7419         (aix_thread_thread_alive, aix_thread_pid_to_str)
7420         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7421         Refactor as methods of aix_thread_target.
7422         (init_aix_thread_ops): Delete.
7423         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7424         and complete_target_initialization.
7425         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7426         (rs6000_nat_target): New class.
7427         (the_rs6000_nat_target): New.
7428         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7429         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7430         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7431         (super_create_inferior): Delete.
7432         (_initialize_rs6000_nat): Adjust to C++ification.
7433
7434         * arm-linux-nat.c (arm_linux_nat_target): New class.
7435         (the_arm_linux_nat_target): New.
7436         (arm_linux_fetch_inferior_registers)
7437         (arm_linux_store_inferior_registers, arm_linux_read_description)
7438         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7439         (arm_linux_remove_hw_breakpoint)
7440         (arm_linux_region_ok_for_hw_watchpoint)
7441         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7442         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7443         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7444         arm_linux_nat_target.
7445         (_initialize_arm_linux_nat): Adjust to C++ification.
7446
7447         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7448         (the_aarch64_linux_nat_target): New.
7449         (aarch64_linux_fetch_inferior_registers)
7450         (aarch64_linux_store_inferior_registers)
7451         (aarch64_linux_child_post_startup_inferior)
7452         (aarch64_linux_read_description)
7453         (aarch64_linux_can_use_hw_breakpoint)
7454         (aarch64_linux_insert_hw_breakpoint)
7455         (aarch64_linux_remove_hw_breakpoint)
7456         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7457         (aarch64_linux_region_ok_for_hw_watchpoint)
7458         (aarch64_linux_stopped_data_address)
7459         (aarch64_linux_stopped_by_watchpoint)
7460         (aarch64_linux_watchpoint_addr_within_range)
7461         (aarch64_linux_can_do_single_step): Refactor as methods of
7462         aarch64_linux_nat_target.
7463         (super_post_startup_inferior): Delete.
7464         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7465
7466         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7467         (the_hppa_linux_nat_target): New.
7468         (hppa_linux_fetch_inferior_registers)
7469         (hppa_linux_store_inferior_registers): Refactor as methods of
7470         hppa_linux_nat_target.
7471         (_initialize_hppa_linux_nat): Adjust to C++ification.
7472
7473         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7474         (the_ia64_linux_nat_target): New.
7475         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7476         (ia64_linux_stopped_data_address)
7477         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7478         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7479         ia64_linux_nat_target methods.
7480         (super_xfer_partial): Delete.
7481         (_initialize_ia64_linux_nat): Adjust to C++ification.
7482
7483         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7484         (the_m32r_linux_nat_target): New.
7485         (m32r_linux_fetch_inferior_registers)
7486         (m32r_linux_store_inferior_registers): Refactor as
7487         m32r_linux_nat_target methods.
7488         (_initialize_m32r_linux_nat): Adjust to C++ification.
7489
7490         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7491         (the_m68k_linux_nat_target): New.
7492         (m68k_linux_fetch_inferior_registers)
7493         (m68k_linux_store_inferior_registers): Refactor as
7494         m68k_linux_nat_target methods.
7495         (_initialize_m68k_linux_nat): Adjust to C++ification.
7496
7497         * s390-linux-nat.c (s390_linux_nat_target): New class.
7498         (the_s390_linux_nat_target): New.
7499         (s390_linux_fetch_inferior_registers)
7500         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7501         (s390_insert_watchpoint, s390_remove_watchpoint)
7502         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7503         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7504         (s390_auxv_parse, s390_read_description): Refactor as methods of
7505         s390_linux_nat_target.
7506         (_initialize_s390_nat): Adjust to C++ification.
7507
7508         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7509         (the_sparc_linux_nat_target): New.
7510         (_initialize_sparc_linux_nat): Adjust to C++ification.
7511         * sparc-nat.c (sparc_fetch_inferior_registers)
7512         (sparc_store_inferior_registers): Remove target_ops parameter.
7513         * sparc-nat.h (sparc_fetch_inferior_registers)
7514         (sparc_store_inferior_registers): Remove target_ops parameter.
7515         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7516         (the_sparc64_linux_nat_target): New.
7517         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7518
7519         * spu-linux-nat.c (spu_linux_nat_target): New class.
7520         (the_spu_linux_nat_target): New.
7521         (spu_child_post_startup_inferior, spu_child_post_attach)
7522         (spu_child_wait, spu_fetch_inferior_registers)
7523         (spu_store_inferior_registers, spu_xfer_partial)
7524         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7525         methods.
7526         (_initialize_spu_nat): Adjust to C++ification.
7527
7528         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7529         (the_tilegx_linux_nat_target): New.
7530         (fetch_inferior_registers, store_inferior_registers):
7531         Refactor as methods.
7532         (_initialize_tile_linux_nat): Adjust to C++ification.
7533
7534         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7535         (the_xtensa_linux_nat_target): New.
7536         (xtensa_linux_fetch_inferior_registers)
7537         (xtensa_linux_store_inferior_registers): Refactor as
7538         xtensa_linux_nat_target methods.
7539         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7540
7541         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7542         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7543         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7544         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7545         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7546         (fbsd_stopped_by_sw_breakpoint)
7547         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7548         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7549         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7550         (fbsd_post_startup_inferior, fbsd_post_attach)
7551         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7552         (fbsd_set_syscall_catchpoint)
7553         (super_xfer_partial, super_resume, super_wait)
7554         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7555         (fbsd_handle_debug_trap): Remove target_ops parameter.
7556         (fbsd_nat_add_target): Delete.
7557         * fbsd-nat.h: Include "inf-ptrace.h".
7558         (fbsd_nat_add_target): Delete.
7559         (USE_SIGTRAP_SIGINFO): Define.
7560         (fbsd_nat_target): New class.
7561
7562         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7563         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7564         (amd64bsd_target): Delete.
7565         * amd64-bsd-nat.h: New file.
7566         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7567         "x86-bsd-nat.h".
7568         (amd64_fbsd_nat_target): New class.
7569         (the_amd64_fbsd_nat_target): New.
7570         (amd64fbsd_read_description): Refactor as method of
7571         amd64_fbsd_nat_target.
7572         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7573         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7574         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7575         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7576         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7577         (i386bsd_target): Delete.
7578         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7579         (i386bsd_fetch_inferior_registers)
7580         (i386bsd_store_inferior_registers): Declare.
7581         (i386_bsd_nat_target): New class.
7582         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7583         (the_i386_fbsd_nat_target): New.
7584         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7585         i386_fbsd_nat_target methods.
7586         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7587         (_initialize_i386fbsd_nat): Adjust to C++ification.
7588         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7589         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7590         (_initialize_x86_bsd_nat): Adjust to C++ification.
7591         * x86-bsd-nat.h: Include "x86-nat.h".
7592         (x86bsd_target): Delete declaration.
7593         (x86bsd_nat_target): New class.
7594
7595         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7596         (the_aarch64_fbsd_nat_target): New.
7597         (aarch64_fbsd_fetch_inferior_registers)
7598         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7599         aarch64_fbsd_nat_target.
7600         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7601         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7602         (the_alpha_bsd_nat_target): New.
7603         (alphabsd_fetch_inferior_registers)
7604         (alphabsd_store_inferior_registers): Refactor as
7605         alpha_bsd_nat_target methods.
7606         (_initialize_alphabsd_nat): Refactor as methods of
7607         alpha_bsd_nat_target.
7608         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7609         (the_amd64_nbsd_nat_target): New.
7610         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7611         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7612         (the_amd64_obsd_nat_target): New.
7613         (_initialize_amd64obsd_nat): Adjust to C++ification.
7614         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7615         (the_arm_fbsd_nat_target): New.
7616         (arm_fbsd_fetch_inferior_registers)
7617         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7618         (_initialize_arm_fbsd_nat): Refactor as methods of
7619         arm_fbsd_nat_target.
7620         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7621         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7622         (the_arm_netbsd_nat_target): New.
7623         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7624         arm_netbsd_nat_target.
7625         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7626         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7627         (the_hppa_nbsd_nat_target): New.
7628         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7629         hppa_nbsd_nat_target methods.
7630         (_initialize_hppanbsd_nat): Adjust to C++ification.
7631         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7632         (the_hppa_obsd_nat_target): New.
7633         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7634         methods of hppa_obsd_nat_target.
7635         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7636         add_target.
7637         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7638         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7639         add_target.
7640         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7641         (_initialize_i386obsd_nat): Use add_target.
7642         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7643         (the_m68k_bsd_nat_target): New.
7644         (m68kbsd_fetch_inferior_registers)
7645         (m68kbsd_store_inferior_registers): Refactor as methods of
7646         m68k_bsd_nat_target.
7647         (_initialize_m68kbsd_nat): Adjust to C++ification.
7648         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7649         (the_mips_fbsd_nat_target): New.
7650         (mips_fbsd_fetch_inferior_registers)
7651         (mips_fbsd_store_inferior_registers): Refactor as methods of
7652         mips_fbsd_nat_target.
7653         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7654         add_target.
7655         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7656         (the_mips_nbsd_nat_target): New.
7657         (mipsnbsd_fetch_inferior_registers)
7658         (mipsnbsd_store_inferior_registers): Refactor as methods of
7659         mips_nbsd_nat_target.
7660         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7661         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7662         (the_mips64_obsd_nat_target): New.
7663         (mips64obsd_fetch_inferior_registers)
7664         (mips64obsd_store_inferior_registers): Refactor as methods of
7665         mips64_obsd_nat_target.
7666         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7667         add_target.
7668         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7669         nbsd_nat_target.
7670         * nbsd-nat.h: Include "inf-ptrace.h".
7671         (nbsd_nat_target): New class.
7672         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7673         (obsd_wait): Refactor as methods of obsd_nat_target.
7674         (obsd_add_target): Delete.
7675         * obsd-nat.h: Include "inf-ptrace.h".
7676         (obsd_nat_target): New class.
7677         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7678         (the_ppc_fbsd_nat_target): New.
7679         (ppcfbsd_fetch_inferior_registers)
7680         (ppcfbsd_store_inferior_registers): Refactor as methods of
7681         ppc_fbsd_nat_target.
7682         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7683         add_target.
7684         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7685         (the_ppc_nbsd_nat_target): New.
7686         (ppcnbsd_fetch_inferior_registers)
7687         (ppcnbsd_store_inferior_registers): Refactor as methods of
7688         ppc_nbsd_nat_target.
7689         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7690         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7691         (the_ppc_obsd_nat_target): New.
7692         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7693         methods of ppc_obsd_nat_target.
7694         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7695         add_target.
7696         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7697         (the_sh_nbsd_nat_target): New.
7698         (shnbsd_fetch_inferior_registers)
7699         (shnbsd_store_inferior_registers): Refactor as methods of
7700         sh_nbsd_nat_target.
7701         (_initialize_shnbsd_nat): Adjust to C++ification.
7702         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7703         (inf_ptrace_xfer_partial): Delete.
7704         (sparc_xfer_partial, sparc_target): Delete.
7705         * sparc-nat.h (sparc_fetch_inferior_registers)
7706         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7707         (sparc_target): Delete function declaration.
7708         (sparc_target): New template class.
7709         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7710         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7711         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7712         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7713         add_target.
7714         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7715         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7716         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7717         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7718         add_target.
7719         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7720         (the_vax_bsd_nat_target): New.
7721         (vaxbsd_fetch_inferior_registers)
7722         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7723         methods.
7724         (_initialize_vaxbsd_nat): Adjust to C++ification.
7725
7726         * bsd-kvm.c (bsd_kvm_target): New class.
7727         (bsd_kvm_ops): Now a bsd_kvm_target.
7728         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7729         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7730         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7731         bsd_kvm_target.
7732         (bsd_kvm_return_one): Delete.
7733         (bsd_kvm_add_target): Adjust to C++ification.
7734
7735         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7736         (nto_procfs_target_procfs): New classes.
7737         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7738         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7739         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7740         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7741         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7742         (procfs_remove_hw_breakpoint, procfs_resume)
7743         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7744         (procfs_kill_inferior, procfs_store_registers)
7745         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7746         as methods of nto_procfs_target.
7747         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7748         (nto_native_ops): Delete.
7749         (procfs_open, procfs_native_open): Delete.
7750         (nto_native_ops): Now an nto_procfs_target_native.
7751         (init_procfs_targets): Adjust to C++ification.
7752         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7753         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7754         Refactor as methods of nto_procfs_target.
7755
7756         * go32-nat.c (go32_nat_target): New class.
7757         (the_go32_nat_target): New.
7758         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7759         (go32_store_registers, go32_xfer_partial, go32_files_info)
7760         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7761         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7762         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7763         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7764         (go32_target): Delete.
7765         (_initialize_go32_nat): Adjust to C++ification.
7766
7767         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7768         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7769         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7770         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7771         gnu_nat_target.
7772         (gnu_target): Delete.
7773         * gnu-nat.h (gnu_target): Delete.
7774         (gnu_nat_target): New class.
7775         * i386-gnu-nat.c (gnu_base_target): New.
7776         (i386_gnu_nat_target): New class.
7777         (the_i386_gnu_nat_target): New.
7778         (_initialize_i386gnu_nat): Adjust to C++ification.
7779
7780 2018-05-02  Pedro Alves  <palves@redhat.com>
7781
7782         * bfd-target.c (target_bfd_xclose): Rename to ...
7783         (target_bfd_close): ... this.
7784         (target_bfd_reopen): Adjust.
7785         * target.c (target_close): Remove references to to_xclose.
7786         * target.h (target_ops::to_xclose): Delete.
7787         (target_ops::to_close): Update comments.
7788
7789 2018-05-02  Pedro Alves  <palves@redhat.com>
7790
7791         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7792         "linux-nat.h".
7793         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7794         * inf-ptrace.c (inf_ptrace_register_u_offset)
7795         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7796         (inf_ptrace_store_register, inf_ptrace_store_registers)
7797         (inf_ptrace_trad_target): Move to ...
7798         * linux-nat-trad.c: ... this new file.
7799         * linux-nat-trad.h: New file.
7800         * linux-nat.c (linux_target_install_ops): Make extern.
7801         (linux_trad_target): Delete.
7802         * linux-nat.h (linux_trad_target): Delete declaration.
7803         (linux_target_install_ops): Declare.
7804         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7805         "linux-nat.h".
7806
7807 2018-05-02  Pedro Alves  <palves@redhat.com>
7808
7809         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7810         procfs_target/add_target here.
7811         * procfs.c (procfs_target): Make static.
7812         (_initialize_procfs): Call add_target here.
7813         * procfs.h (struct target_ops): Remove forward declaration.
7814         (procfs_target): Remove declaration.
7815         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7816
7817 2018-05-02  Pedro Alves  <palves@redhat.com>
7818
7819         * procfs.c (procfs_stopped_by_watchpoint)
7820         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7821         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7822         Forward declare.
7823         (procfs_use_watchpoints): Delete, move contents...
7824         (procfs_target): ... here.
7825         * procfs.h (procfs_use_watchpoints): Delete declaration.
7826         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7827         procfs_use_watchpoints.
7828         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7829         procfs_use_watchpoints.
7830
7831 2018-05-02  Tom Tromey  <tom@tromey.com>
7832
7833         PR python/20084:
7834         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7835         and var_zuinteger_unlimited.
7836         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7837         and PARAM_ZUINTEGER_UNLIMITED.
7838         (set_parameter_value): Handle var_zuinteger and
7839         var_zuinteger_unlimited.
7840         (add_setshow_generic): Likewise.
7841         (parmpy_init): Likewise.
7842
7843 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7844
7845         PR rust/23124
7846         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7847         pointer is not null before dereferencing it.
7848
7849 2018-04-30  Tom Tromey  <tom@tromey.com>
7850
7851         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7852         is_mi_like_p.
7853
7854 2018-04-30  Tom Tromey  <tom@tromey.com>
7855
7856         * breakpoint.c (mention): Remove use of is_mi_like_p.
7857         (print_mention_ranged_breakpoint): Likewise.
7858         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7859         of is_mi_like_p.
7860
7861 2018-04-30  Tom Tromey  <tom@tromey.com>
7862
7863         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7864
7865 2018-04-30  Tom Tromey  <tom@tromey.com>
7866
7867         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7868         (info_spu_event_command): Remove some uses of is_mi_like_p.
7869
7870 2018-04-30  Tom Tromey  <tom@tromey.com>
7871
7872         * python/py-framefilter.c (py_print_single_arg)
7873         (enumerate_locals, py_print_args, py_print_frame): Remove some
7874         uses of is_mi_like_p.
7875
7876 2018-04-30  Tom Tromey  <tom@tromey.com>
7877
7878         * ui-out.c: Update.
7879         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7880         * ui-out.h (ui_out::is_mi_like_p): Now const.
7881         (ui_out::do_is_mi_like_p): Now const.
7882         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7883
7884 2018-04-30  Tom Tromey  <tom@tromey.com>
7885
7886         * varobj.c (varobj_set_visualizer): Use new_reference.
7887         * python/python.c (gdbpy_decode_line): Use new_reference.
7888         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7889         new_reference.
7890
7891 2018-04-30  Tom Tromey  <tom@tromey.com>
7892
7893         * varobj.c (install_new_value): Use new_reference.
7894         * value.h (value_incref): Return void.  Swap intro comment with
7895         value_decref.
7896         * value.c (set_value_parent): Use new_reference.
7897         (value_incref): Return void.  Update intro comment.
7898         (release_value): Use new_reference.
7899         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7900
7901 2018-04-30  Tom Tromey  <tom@tromey.com>
7902
7903         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7904         * gdb_bfd.h (new_bfd_ref): Remove.
7905         (gdb_bfd_open): Update comment.
7906         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7907         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7908         (gdb_bfd_fdopenr): Use new_reference.
7909         * exec.c (exec_file_attach): Use new_reference.
7910
7911 2018-04-30  Tom Tromey  <tom@tromey.com>
7912
7913         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7914         method.
7915
7916 2018-04-30  Tom Tromey  <tom@tromey.com>
7917
7918         * jit.c (jit_read_code_entry): Use type_align.
7919         * i386-tdep.c (i386_gdbarch_init): Don't call
7920         set_gdbarch_long_long_align_bit.
7921         * gdbarch.sh: Remove long_long_align_bit.
7922         * gdbarch.c, gdbarch.h: Rebuild.
7923         * arc-tdep.c (arc_type_align): New function.
7924         (arc_gdbarch_init): Use arc_type_align.  Don't call
7925         set_gdbarch_long_long_align_bit.
7926
7927 2018-04-30  Tom Tromey  <tom@tromey.com>
7928
7929         * rust-lang.c (rust_type_alignment): Remove.
7930         (rust_composite_type): Use type_align.
7931
7932 2018-04-30  Tom Tromey  <tom@tromey.com>
7933
7934         * NEWS: Mention Type.align.
7935         * python/py-type.c (typy_get_alignof): New function.
7936         (type_object_getset): Add "alignof".
7937
7938 2018-04-30  Tom Tromey  <tom@tromey.com>
7939
7940         PR exp/17095:
7941         * NEWS: Update.
7942         * std-operator.def (UNOP_ALIGNOF): New operator.
7943         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7944         New.
7945         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7946         * c-lang.c (c_op_print_tab): Add alignof.
7947         * c-exp.y (ALIGNOF): New token.
7948         (exp): Add "ALIGNOF" production.
7949         (ident_tokens): Add _Alignof and alignof.
7950
7951 2018-04-30  Tom Tromey  <tom@tromey.com>
7952
7953         * i386-tdep.c (i386_type_align): New function.
7954         (i386_gdbarch_init): Update.
7955         * gdbarch.sh (type_align): New method.
7956         * gdbarch.c, gdbarch.h: Rebuild.
7957         * arch-utils.h (default_type_align): Declare.
7958         * arch-utils.c (default_type_align): New function.
7959         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7960         (struct type) <align_log2>: New field.
7961         <instance_flags>: Now a bitfield.
7962         (TYPE_RAW_ALIGN): New macro.
7963         (type_align, type_raw_align, set_type_align): Declare.
7964         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7965         functions.
7966         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7967         (get_alignment, maybe_set_alignment): New functions.
7968         (read_structure_type, read_enumeration_type, read_array_type)
7969         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7970         (read_subrange_type, read_base_type): Set type alignment.
7971
7972 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
7973
7974         * dwarf2read.c (read_index_from_section): Use bool.
7975
7976 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
7977
7978         PR gdb/22950
7979         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7980         with #ifdef.
7981
7982 2018-04-29  John Reiser  <jreiser@BitWagon.com>
7983
7984         PR build/22873
7985         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7986         last step, and do it atomically.
7987
7988 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
7989
7990         * compile/compile-c-types.c (convert_int, convert_float):
7991         Update for C FE v1.
7992
7993 2018-04-27  Tom Tromey  <tom@tromey.com>
7994
7995         PR rust/22545:
7996         * rust-lang.c (rust_inclusive_range_type_p): New function.
7997         (rust_range): Handle inclusive ranges.
7998         (rust_compute_range): Likewise.
7999         * rust-exp.y (struct rust_op) <inclusive>: New field.
8000         (DOTDOTEQ): New constant.
8001         (range_expr): Add "..=" productions.
8002         (operator_tokens): Add "..=" token.
8003         (ast_range): Add "inclusive" parameter.
8004         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8005         ranges.
8006         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8007         bounds values.
8008         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8009         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8010         Update comments.
8011         * expprint.c (print_subexp_standard): Handle new bounds values.
8012         (dump_subexp_body_standard): Likewise.
8013
8014 2018-04-27  Tom Tromey  <tom@tromey.com>
8015
8016         * configure: Rebuild.
8017         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8018         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8019         "OVERRIDE".
8020         (class symbol_needs_eval_context): Likewise.
8021         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8022         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8023         "virtual".
8024         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8025         "override".
8026         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8027         * aarch64-tdep.c (instruction_reader::read): Use "override".
8028         (instruction_reader_test::read): Likewise.
8029         * arm-tdep.c (instruction_reader::read): Use "override".
8030         (instruction_reader_thumb::read): Likewise.
8031
8032 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8033
8034         PR remote/9665
8035         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8036         instead of remote_send.
8037         (remote_send): Remove.
8038
8039 2018-04-26  Pedro Alves  <palves@redhat.com>
8040
8041         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8042         find_function_start_sal instead of find_pc_line.
8043
8044 2018-04-26  Pedro Alves  <palves@redhat.com>
8045
8046         * breakpoint.c (set_breakpoint_location_function): Handle
8047         mst_data_gnu_ifunc.
8048         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8049         * elfread.c (elf_symtab_read): Give data symbols with
8050         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8051         (elf_rel_plt_read): Update comment.
8052         * linespec.c (convert_linespec_to_sals): Handle
8053         mst_data_gnu_ifunc.
8054         (minsym_found): Handle mst_data_gnu_ifunc.
8055         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8056         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8057         * parse.c (find_minsym_type_and_address): Handle
8058         mst_data_gnu_ifunc.
8059         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8060         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8061         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8062         comment.
8063         <mst_data_gnu_ifunc>: New enumerator.
8064
8065 2018-04-26  Pedro Alves  <palves@redhat.com>
8066
8067         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8068         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8069         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8070         Handle it.
8071         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8072         (lookup_minimal_symbol_by_pc): Adjust.
8073         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8074         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8075         * minsyms.h (lookup_msym_prefer): New enum.
8076         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8077         parameter by a lookup_msym_prefer parameter.
8078
8079 2018-04-26  Pedro Alves  <palves@redhat.com>
8080
8081         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8082         ends in "@plt" instead of looking at the symbol's section.
8083
8084 2018-04-26  Pedro Alves  <palves@redhat.com>
8085
8086         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8087         all references.
8088         (find_pc_partial_function_gnu_ifunc): Rename to ...
8089         (find_pc_partial_function): ... this, and remove references to
8090         'is_gnu_ifunc_p'.
8091         (find_pc_partial_function): Delete old implementation.
8092         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8093
8094 2018-04-26  Pedro Alves  <palves@redhat.com>
8095
8096         * linespec.c (struct bound_minimal_symbol_search_key): New.
8097         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8098         skip first line if we found a GNU ifunc minimal symbol by name.
8099         (compare_msymbols): Change parameters to work with a destructured
8100         lhs minsym.
8101         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8102         functions.
8103
8104 2018-04-26  Pedro Alves  <palves@redhat.com>
8105
8106         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8107         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8108         address/name.
8109         (add_location_to_breakpoint): Store the minsym and the objfile in
8110         the breakpoint location.
8111         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8112         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8113         Record the minsym in the sal.
8114         * symtab.h (symtab_and_line) <msymbol>: New field.
8115
8116 2018-04-26  Pedro Alves  <palves@redhat.com>
8117
8118         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8119         unless we actually resolved the ifunc.
8120
8121 2018-04-26  Pedro Alves  <palves@redhat.com>
8122
8123         * c-exp.y (variable production): Prefer ifunc minsyms over
8124         regular function symbols.
8125         * symtab.c (find_gnu_ifunc): New function.
8126         * minsyms.h (lookup_msym_prefer): New enum.
8127         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8128         parameter by a lookup_msym_prefer parameter.
8129         * symtab.h (find_gnu_ifunc): New declaration.
8130
8131 2018-04-26  Pedro Alves  <palves@redhat.com>
8132
8133         * blockframe.c (find_gnu_ifunc_target_type): New function.
8134         (find_function_type): New.
8135         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8136         return a value with a memory address.
8137         (eval_call): For calls to GNU ifunc functions, try to find the
8138         type of the target function from the type that the resolver
8139         returns.
8140         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8141         symbols.
8142         * infcall.c (find_function_return_type): Delete.
8143         (find_function_addr): Add 'function_type' parameter.  For calls to
8144         GNU ifunc functions, try to find the type of the target function
8145         from the type that the resolver returns, and return it via
8146         FUNCTION_TYPE.
8147         (call_function_by_hand_dummy): Adjust to use the function type
8148         returned by find_function_addr.
8149         (find_function_addr): Add 'function_type' parameter and move
8150         description here.
8151         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8152         declarations.
8153
8154 2018-04-26  Pedro Alves  <palves@redhat.com>
8155
8156         * c-exp.y (variable production): Skip finding an alias for ifunc
8157         symbols.
8158
8159 2018-04-26  Pedro Alves  <palves@redhat.com>
8160
8161         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8162
8163 2018-04-25  Pedro Alves  <palves@redhat.com>
8164
8165         * infcmd.c (kill_command): Print the pid as string, not the whole
8166         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8167         message.
8168         * remote.c (remote_detach_1): Print the pid as string, not the
8169         whole thread's ptid.
8170
8171 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8172             Sergio Durigan Junior  <sergiodj@redhat.com>
8173             Pedro Alves  <palves@redhat.com>
8174
8175         * infcmd.c (kill_command): Print message when inferior has
8176         been killed.
8177         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8178         '1'.
8179         (add_inferior): Improve message printed when
8180         'print_inferior_events' is on.
8181         (exit_inferior): Remove message printed when
8182         'print_inferior_events' is on.
8183         (detach_inferior): Improve message printed when
8184         'print_inferior_events' is on.
8185         (initialize_inferiors): Use 'add_inferior_silent' to set
8186         'current_inferior_'.
8187         * inferior.h (print_inferior_events): Declare here as
8188         'extern'.
8189         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8190         '[Detaching...]' messages when 'print_inferior_events' is on.
8191         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8192         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8193         'Detaching after fork from child...', replace it by '... from
8194         parent...'.
8195         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8196         prefix/suffix when printing 'Detaching...' messages.  Print
8197         them when 'print_inferior_events' is on.
8198         * remote.c (remote_detach_1): Print message when detaching
8199         from inferior and '!is_fork_parent'.
8200
8201 2018-04-24  Tom Tromey  <tom@tromey.com>
8202
8203         * cli-out.h: Reindent.
8204
8205 2018-04-24  Tom Tromey  <tom@tromey.com>
8206
8207         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8208         (cli_ui_out::do_field_string): Use fputs_filtered.
8209         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8210
8211 2018-04-23  Tom Tromey  <tom@tromey.com>
8212
8213         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8214         gdb::unique_xmalloc_ptr.
8215
8216 2018-04-23  Tom Tromey  <tom@tromey.com>
8217
8218         * configure: Rebuild.
8219
8220 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8221
8222         PR gdb/23095
8223         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8224         prepare_for_testing.  Set normal_bp to r_debug_state if target
8225         is bsd.
8226
8227 2018-04-21  Pedro Alves  <palves@redhat.com>
8228             Rajendra SY  <rajendra.sy@gmail.com>
8229
8230         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8231         * remote.c (extended_remote_attach): In all-stop mode, mark the
8232         thread as executing.
8233
8234 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8235
8236         * thread.c (thread_apply_all_command): Fix comment.
8237         (thread_command): Fix comment.
8238
8239 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8240
8241         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8242         parameter.
8243         * features/aarch64-core.c (create_feature_aarch64_core):
8244         Regenerate.
8245         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8246         Likewise.
8247         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8248         Likewise.
8249         * features/i386/32bit-avx512.c
8250         (create_feature_i386_32bit_avx512): Likewise.
8251         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8252         Likewise.
8253         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8254         Likewise.
8255         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8256         Likewise.
8257         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8258         Likewise.
8259         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8260         Likewise.
8261         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8262         Likewise.
8263         * features/i386/64bit-avx512.c
8264         (create_feature_i386_64bit_avx512): Likewise.
8265         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8266         Likewise.
8267         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8268         Likewise.
8269         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8270         Likewise.
8271         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8272         Likewise.
8273         * features/i386/64bit-segments.c
8274         (create_feature_i386_64bit_segments): Likewise.
8275         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8276         Likewise.
8277         * features/i386/x32-core.c
8278         (create_feature_i386_x32_core): Likewise.
8279         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8280         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8281         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8282         * target-descriptions.c: In generated code, don't pass xml
8283         filename.
8284
8285 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8286
8287         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8288         (print_xml_feature::visit_post): Likewise.
8289         (print_xml_feature::visit): Likewise.
8290         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8291         (print_xml_feature): Add new class.
8292         * regformats/regdat.sh: Null xmltarget on feature targets.
8293         * target-descriptions.c (struct target_desc): Add xmltarget.
8294         (maintenance_check_tdesc_xml_convert): Add unittest function.
8295         (tdesc_get_features_xml): Add function to get xml.
8296         (maintenance_check_xml_descriptions): Test xml generation.
8297         * xml-tdesc.c (string_read_description_xml): Add function.
8298         * xml-tdesc.h (string_read_description_xml): Add declaration.
8299
8300 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8301
8302         * features/Makefile: Add feature marker to targets with new style
8303         target descriptions.
8304         * regformats/aarch64.dat: Regenerate.
8305         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8306         * regformats/i386/amd64-avx-linux.dat: Likewise.
8307         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8308         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8309         * regformats/i386/amd64-linux.dat: Likewise.
8310         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8311         * regformats/i386/amd64.dat: Likewise.
8312         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8313         * regformats/i386/i386-avx-linux.dat: Likewise.
8314         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8315         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8316         * regformats/i386/i386-linux.dat: Likewise.
8317         * regformats/i386/i386-mmx-linux.dat: Likewise.
8318         * regformats/i386/i386-mpx-linux.dat: Likewise.
8319         * regformats/i386/i386.dat: Likewise.
8320         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8321         * regformats/i386/x32-avx-linux.dat: Likewise.
8322         * regformats/i386/x32-linux.dat: Likewise.
8323         * regformats/tic6x-c62x-linux.dat: Likewise.
8324         * regformats/tic6x-c64x-linux.dat: Likewise.
8325         * regformats/tic6x-c64xp-linux.dat: Likewise.
8326         * regformats/regdat.sh: Parse feature marker.
8327
8328 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8329
8330         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8331         (tdesc_osabi_name): Likewise.
8332         * target-descriptions.c (tdesc_architecture_name): Add new
8333         function.
8334         (tdesc_osabi_name): Likewise.
8335
8336 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8337
8338         * common/tdesc.c (tdesc_predefined_type): Move to here.
8339         (tdesc_named_type): Likewise.
8340         (tdesc_create_vector): Likewise.
8341         (tdesc_create_struct): Likewise.
8342         (tdesc_set_struct_size): Likewise.
8343         (tdesc_create_union): Likewise.
8344         (tdesc_create_flags): Likewise.
8345         (tdesc_create_enum): Likewise.
8346         (tdesc_add_field): Likewise.
8347         (tdesc_add_typed_bitfield): Likewise.
8348         (tdesc_add_bitfield): Likewise.
8349         (tdesc_add_flag): Likewise.
8350         (tdesc_add_enum_value): Likewise.
8351         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8352         (struct tdesc_type_vector): Likewise.
8353         (struct tdesc_type_field): Likewise.
8354         (struct tdesc_type_with_fields): Likewise.
8355         (tdesc_create_enum): Add declaration.
8356         (tdesc_add_typed_bitfield): Likewise.
8357         (tdesc_add_enum_value): Likewise.
8358         * target-descriptions.c (tdesc_type_field): Move from here.
8359         (tdesc_type_builtin): Likewise.
8360         (tdesc_type_vector): Likewise.
8361         (tdesc_type_with_fields): Likewise.
8362         (tdesc_predefined_types): Likewise.
8363         (tdesc_named_type): Likewise.
8364         (tdesc_create_vector): Likewise.
8365         (tdesc_create_struct): Likewise.
8366         (tdesc_set_struct_size): Likewise.
8367         (tdesc_create_union): Likewise.
8368         (tdesc_create_flags): Likewise.
8369         (tdesc_create_enum): Likewise.
8370         (tdesc_add_field): Likewise.
8371         (tdesc_add_typed_bitfield): Likewise.
8372         (tdesc_add_bitfield): Likewise.
8373         (tdesc_add_flag): Likewise.
8374         (tdesc_add_enum_value): Likewise.
8375         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8376         (tdesc_add_typed_bitfield): Likewise.
8377         (tdesc_add_enum_value): Likewise.
8378
8379 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8380
8381         * common/tdesc.c (tdesc_feature::accept): Move to here.
8382         (tdesc_feature::operator==): Likewise.
8383         (tdesc_create_reg): Likewise.
8384         * common/tdesc.h (tdesc_type_kind): Likewise.
8385         (struct tdesc_type): Likewise.
8386         (struct tdesc_feature): Likewise.
8387         * regformats/regdat.sh: Create a feature.
8388         * target-descriptions.c (tdesc_type_kind): Move from here.
8389         (tdesc_type): Likewise.
8390         (tdesc_type_up): Likewise.
8391         (tdesc_feature): Likewise.
8392         (tdesc_create_reg): Likewise.
8393
8394 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8395
8396         * Makefile.in: Add arch/tdesc.c
8397         * common/tdesc.c: New file.
8398         * common/tdesc.h (tdesc_element_visitor): Move to here.
8399         (tdesc_element): Likewise.
8400         (tdesc_reg): Likewise.
8401         (tdesc_reg_up): Likewise.
8402         * regformats/regdef.h (reg): Add offset to constructors.
8403         * target-descriptions.c (tdesc_element_visitor): Move from here.
8404         (tdesc_element): Likewise.
8405         (tdesc_reg): Likewise.
8406         (tdesc_reg_up): Likewise.
8407
8408 2018-04-17  Tom Tromey  <tom@tromey.com>
8409
8410         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8411         discriminant field.
8412
8413 2018-04-17  Tom Tromey  <tom@tromey.com>
8414
8415         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8416
8417 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8418
8419         * symtab.c (print_symbol_info): Skip printing filename and line
8420         number when `last' is NULL.
8421         (symtab_symbol_info): Use empty string instead of NULL for first
8422         invocation of print_symbol_info.
8423         (rbreak_command): Pass NULL to `last' parameter of
8424         print_symbol_info.
8425
8426 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8427
8428         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8429         instead of nullptr.
8430
8431 2018-04-16  Pedro Alves  <palves@redhat.com>
8432
8433         * MAINTAINERS (sh): Remove.
8434         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8435         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8436         (ALLDEPFILES): Remove sh64-tdep.c.
8437         * NEWS: Mentions that support for SH-5/SH64 is removed.
8438         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8439         (sh*-*-openbsd*): Ditto.
8440         (sh64-*-elf*): Remove.
8441         (sh*): Remove.
8442         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8443         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8444         * sh-tdep.c: No longer include "sh64-tdep.h".
8445         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8446         * sh64-tdep.c, sh64-tdep.h: Remove files.
8447
8448 2018-04-16  Pedro Alves  <palves@redhat.com>
8449
8450         * MAINTAINERS: Remove m88k.
8451         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8452         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8453         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8454         * NEWS: Mention that support for m88k was removed.
8455         * configure.host (m88*-*-*): Remove support.
8456         * configure.nat (m88k-*-*): Remove support.
8457         * configure.tgt (m88*-*-openbsd*): Remove.
8458         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8459
8460 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8461
8462         * configure.tgt (x86_tobjs): New variable.
8463         (amd64_tobjs, i386_tobjs): Use it.
8464
8465 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8466
8467         * symtab.c (print_symbol_info): Precede the symbol definition by
8468         the line number when available.
8469         * NEWS: Advertise this enhancement.
8470
8471 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8472
8473         * NEWS (New options): announce set/show record btrace cpu.
8474         * btrace.c: Include record-btrace.h.
8475         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8476         the vendor is unknown.
8477         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8478         Maybe overwrite the btrace configuration's cpu.
8479         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8480         (btrace_fetch): Add cpu parameter.  Update callers.
8481         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8482         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8483         errata workarounds if the vendor is unknown.
8484         * python/py-record-btrace.c: Include record-btrace.h.
8485         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8486         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8487         * record-btrace.c (record_btrace_cpu_state_kind): New.
8488         (record_btrace_cpu): New.
8489         (set_record_btrace_cpu_cmdlist): New.
8490         (record_btrace_get_cpu): New.
8491         (require_btrace_thread, record_btrace_info)
8492         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8493         (cmd_set_record_btrace_cpu_none): New.
8494         (cmd_set_record_btrace_cpu_auto): New.
8495         (cmd_set_record_btrace_cpu): New.
8496         (cmd_show_record_btrace_cpu): New.
8497         (_initialize_record_btrace): Initialize set/show record btrace cpu
8498         commands.
8499         * record-btrace.h (record_btrace_get_cpu): New.
8500
8501 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8502
8503         * record.c (set_record_command): Fix typo in message.
8504
8505 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8506
8507         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8508
8509 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8510
8511         * infrun.c (process_event_stop_test): Call
8512         gdbarch_in_indirect_branch_thunk.
8513         * gdbarch.sh (in_indirect_branch_thunk): New.
8514         * gdbarch.c: Regenerated.
8515         * gdbarch.h: Regenerated.
8516         * x86-tdep.h: New.
8517         * x86-tdep.c: New.
8518         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8519         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8520         (ALLDEPFILES): Add x86-tdep.c.
8521         * arch-utils.h (default_in_indirect_branch_thunk): New.
8522         * arch-utils.c (default_in_indirect_branch_thunk): New.
8523         * i386-tdep: Include x86-tdep.h.
8524         (i386_in_indirect_branch_thunk): New.
8525         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8526         function.
8527         * amd64-tdep: Include x86-tdep.h.
8528         (amd64_in_indirect_branch_thunk): New.
8529         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8530
8531 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8532
8533         PR gdb/23053
8534         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8535         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8536         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8537         regression.
8538
8539 2018-04-12  Tom Tromey  <tom@tromey.com>
8540
8541         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8542         (rust_evaluate_subexp): Likewise.
8543
8544 2018-04-12  Pedro Alves  <palves@redhat.com>
8545
8546         * procfs.c (procfs_detach): Make forward declaration's prototype
8547         match definition's protototype.
8548         (proc_get_LDT_entry): Remove stale do_cleanups call.
8549
8550 2018-04-12  Pedro Alves  <palves@redhat.com>
8551
8552         * target.h (target_ops::to_has_exited): Delete.
8553         (target_has_exited): Delete.
8554         * target-delegates.c: Regenerate.
8555
8556 2018-04-11  Pedro Alves  <palves@redhat.com>
8557
8558         * target.c (fileio_fh_t::t): Add comment.
8559         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8560         (target_fileio_close): Handle a NULL target.
8561         (invalidate_fileio_fh): New.
8562         (target_close): Call it.
8563         * remote.c (remote_hostio_send_command): No longer check whether
8564         remote_desc is open.
8565
8566 2018-04-11  Pedro Alves  <palves@redhat.com>
8567
8568         * target.c (fileio_fh_t): Make it a named struct instead of a
8569         typedef.
8570         (fileio_fh_t::is_closed): New method.
8571         (DEF_VEC_O (fileio_fh_t)): Remove.
8572         (fileio_fhandles): Now a std::vector.
8573         (is_closed_fileio_fh): Delete.
8574         (acquire_fileio_fd): Adjust.  Rename parameters.
8575         (release_fileio_fd): Adjust.
8576         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8577         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8578         (target_fileio_close): Adjust.
8579
8580 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8581
8582         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8583         index.
8584
8585 2018-04-10  Pedro Alves  <palves@redhat.com>
8586
8587         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8588         (scoped_finish_thread_state): New class.
8589         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8590         cleanup.
8591         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8592         (fetch_inferior_event, normal_stop): Likewise.
8593         * thread.c (finish_thread_state_cleanup): Delete.
8594
8595 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8596             Pedro Alves  <palves@redhat.com>
8597
8598         * value.c: Include "selftest.h" and "common/array-view.h".
8599         (struct range) <operator ==>: New.
8600         (test_ranges_contain): New.
8601         (check_ranges_vector): New.
8602         (test_insert_into_bit_range_vector): New.
8603         (_initialize_values): Register selftests.
8604         * common/array-view.h (operator==, operator!=): New.
8605
8606 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8607
8608         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8609         an iterator.
8610         * inline-frame.c: Include <algorithm>.
8611         (struct inline_state): Add constructor.
8612         (inline_state_s): Remove.
8613         (DEF_VEC_O(inline_state_s)): Remove.
8614         (inline_states): Change type to std::vector.
8615         (find_inline_frame_state): Adjust to std::vector.
8616         (allocate_inline_frame_state): Remove.
8617         (clear_inline_frame_state): Adjust to std::vector.
8618         (skip_inline_frames): Adjust to std::vector.
8619
8620 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8621
8622         * tracepoint.h (struct trace_state_variable): Add constructor.
8623         <name>: Change type to std::string.
8624         * tracepoint.c (tsv_s): Remove.
8625         (DEF_VEC_O(tsv_s)): Remove.
8626         (tvariables): Change to std::vector.
8627         (create_trace_state_variable): Adjust to std::vector.
8628         (find_trace_state_variable): Likewise.
8629         (find_trace_state_variable_by_number): Likewise.
8630         (delete_trace_state_variable): Likewise.
8631         (trace_variable_command): Adjust to std::string.
8632         (delete_trace_variable_command): Likewise.
8633         (tvariables_info_1): Adjust to std::vector.
8634         (save_trace_state_variables): Likewise.
8635         (start_tracing): Likewise.
8636         (merge_uploaded_trace_state_variables): Adjust to std::vector
8637         and std::string.
8638         * target.h (struct target_ops)
8639         <to_download_trace_state_variable>: Pass reference to
8640         trace_state_variable.
8641         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8642         * target-delegates.c: Re-generate.
8643         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8644         (mi_tsv_deleted): Likewise.
8645         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8646         * remote.c (remote_download_trace_state_variable): Change
8647         pointer to reference and adjust.
8648         * make-target-delegates (parse_argtypes): Handle references.
8649         (write_function_header): Likewise.
8650         (munge_type): Likewise.
8651
8652 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8653
8654         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8655         string_view-selftests.c.
8656         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8657         testsuite.
8658         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8659         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8660         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8661         * unittests/basic_string_view/element_access/char/1.cc:
8662         Likewise.
8663         * unittests/basic_string_view/element_access/char/empty.cc:
8664         Likewise.
8665         * unittests/basic_string_view/element_access/char/front_back.cc:
8666         Likewise.
8667         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8668         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8669         Likewise.
8670         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8671         Likewise.
8672         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8673         Likewise.
8674         * unittests/basic_string_view/operations/compare/char/1.cc:
8675         Likewise.
8676         * unittests/basic_string_view/operations/compare/char/13650.cc:
8677         Likewise.
8678         * unittests/basic_string_view/operations/copy/char/1.cc:
8679         Likewise.
8680         * unittests/basic_string_view/operations/data/char/1.cc:
8681         Likewise.
8682         * unittests/basic_string_view/operations/find/char/1.cc:
8683         Likewise.
8684         * unittests/basic_string_view/operations/find/char/2.cc:
8685         Likewise.
8686         * unittests/basic_string_view/operations/find/char/3.cc:
8687         Likewise.
8688         * unittests/basic_string_view/operations/find/char/4.cc:
8689         Likewise.
8690         * unittests/basic_string_view/operations/rfind/char/1.cc:
8691         Likewise.
8692         * unittests/basic_string_view/operations/rfind/char/2.cc:
8693         Likewise.
8694         * unittests/basic_string_view/operations/rfind/char/3.cc:
8695         Likewise.
8696         * unittests/basic_string_view/operations/substr/char/1.cc:
8697         Likewise.
8698         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8699         * unittests/string_view-selftests.c: New file.
8700
8701 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8702
8703         * unittests/basic_string_view/capacity/1.cc: New file.
8704         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8705         * unittests/basic_string_view/cons/char/1.cc: New file.
8706         * unittests/basic_string_view/cons/char/2.cc: New file.
8707         * unittests/basic_string_view/cons/char/3.cc: New file.
8708         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8709         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8710         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8711         * unittests/basic_string_view/element_access/char/1.cc: New file.
8712         * unittests/basic_string_view/element_access/char/2.cc: New file.
8713         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8714         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8715         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8716         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8717         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8718         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8719         * unittests/basic_string_view/include.cc: New file.
8720         * unittests/basic_string_view/inserters/char/1.cc: New file.
8721         * unittests/basic_string_view/inserters/char/2.cc: New file.
8722         * unittests/basic_string_view/inserters/char/3.cc: New file.
8723         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8724         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8725         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8726         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8727         * unittests/basic_string_view/literals/types.cc: New file.
8728         * unittests/basic_string_view/literals/values.cc: New file.
8729         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8730         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8731         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8732         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8733         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8734         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8735         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8736         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8737         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8738         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8739         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8740         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8741         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8742         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8743         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8744         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8745         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8746         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8747         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8748         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8749         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8750         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8751         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8752         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8753         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8754         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8755         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8756         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8757         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8758         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8759         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8760         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8761         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8762         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8763         * unittests/basic_string_view/operators/char/2.cc: New file.
8764         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8765         * unittests/basic_string_view/range_access/char/1.cc: New file.
8766         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8767         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8768         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8769         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8770         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8771         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8772         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8773         * unittests/basic_string_view/typedefs.cc: New file.
8774         * unittests/basic_string_view/types/1.cc: New file.
8775
8776 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8777
8778         * common/gdb_string_view.h: Remove libstdc++ implementation
8779         details, adjust to gdb reality.
8780         * common/gdb_string_view.tcc: Likewise.
8781         * cli/cli-script.c (struct string_view): Remove.
8782         (user_args) <m_args>: Change element type to gdb::string_view.
8783         (user_args::insert_args): Adjust.
8784
8785 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8786
8787         * common/gdb_string_view.h: New file.
8788         * common/gdb_string_view.tcc: New file.
8789
8790 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8791
8792         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8793         * configure: Re-generate.
8794
8795 2018-04-09  Pedro Alves  <palves@redhat.com>
8796
8797         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8798         (set_target_gdbarch): Call
8799         gdb::observers::architecture_changed.notify instead of
8800         observer_notify_architecture_changed.
8801
8802 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8803
8804         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8805         (do_restore_current_traceframe_cleanup): Remove.
8806         (restore_current_traceframe_cleanup_dtor): Remove.
8807         (make_cleanup_restore_current_traceframe): Remove.
8808         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8809         New.
8810         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8811         * infrun.c (fetch_inferior_event): Use
8812         scoped_restore_current_traceframe.
8813
8814 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8815
8816         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8817         Remove.
8818         <n_allocated_type_units>: Remove.
8819         <all_type_units>: Change to std::vector.
8820         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8821         to std::vector change.
8822         (dwarf2_per_objfile::get_cutu): Likewise.
8823         (dwarf2_per_objfile::get_tu): Likewise.
8824         (create_signatured_type_table_from_index): Likewise.
8825         (create_signatured_type_table_from_debug_names): Likewise.
8826         (dw2_symtab_iter_next): Likewise.
8827         (dw2_print_stats): Likewise.
8828         (dw2_expand_all_symtabs): Likewise.
8829         (dw2_expand_marked_cus): Likewise.
8830         (dw2_debug_names_iterator::next): Likewise.
8831         (dwarf2_initialize_objfile): Likewise.
8832         (add_signatured_type_cu_to_table): Likewise.
8833         (create_all_type_units): Likewise.
8834         (add_type_unit): Likewise.
8835         (struct tu_abbrev_offset): Add constructor.
8836         (build_type_psymtabs_1): Adjust to std::vector change.
8837         (print_tu_stats): Likewise.
8838         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8839         (write_debug_names): Likewise.
8840
8841 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8842
8843         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8844         Make an std::vector.
8845         <n_comp_units>: Remove.
8846         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8847         to std::vector change.
8848         (dwarf2_per_objfile::get_cutu): Likewise.
8849         (dwarf2_per_objfile::get_cu): Likewise.
8850         (create_cus_from_index): Likewise.
8851         (create_addrmap_from_index): Likewise.
8852         (create_addrmap_from_aranges): Likewise.
8853         (dwarf2_read_index): Likewise.
8854         (dw2_find_last_source_symtab): Likewise.
8855         (dw2_map_symtabs_matching_filename): Likewise.
8856         (dw2_symtab_iter_next): Likewise.
8857         (dw2_print_stats): Likewise.
8858         (dw2_expand_all_symtabs): Likewise.
8859         (dw2_expand_symtabs_with_fullname): Likewise.
8860         (dw2_expand_marked_cus): Likewise.
8861         (dw2_map_symbol_filenames): Likewise.
8862         (create_cus_from_debug_names): Likewise.
8863         (dwarf2_read_debug_names): Likewise.
8864         (dw2_debug_names_iterator::next): Likewise.
8865         (dwarf2_initialize_objfile): Likewise.
8866         (set_partial_user): Likewise.
8867         (dwarf2_build_psymtabs_hard): Likewise.
8868         (read_comp_units_from_section): Remove arguments, adjust to
8869         std::vector change.
8870         (create_all_comp_units): Adjust to std::vector and
8871         read_comp_units_from_section changes.
8872         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8873         change.
8874         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8875         (psyms_seen_size): Likewise.
8876         (write_gdbindex): Likewise.
8877         (write_debug_names): Likewise.
8878
8879 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8880
8881         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8882         with dwarf2_per_objfile.
8883         (create_cus_from_index): Likewise.
8884         (create_signatured_type_table_from_index): Likewise.
8885         (dwarf2_read_index): Likewise.
8886         (dwarf2_initialize_objfile): Likewise.
8887         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8888         per_cu rather than get_dwarf2_per_objfile.
8889
8890 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8891
8892         * dwarf2read.h (struct signatured_type): Forward declare.
8893         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8894         New methods.
8895         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8896         (dw2_get_cutu): ...this.
8897         (dwarf2_per_objfile::get_cu): Rename from...
8898         (dw2_get_cu): ...this.
8899         (dwarf2_per_objfile::get_tu): New.
8900         (create_addrmap_from_index): Adjust.
8901         (create_addrmap_from_aranges): Adjust.
8902         (dw2_find_last_source_symtab): Adjust.
8903         (dw2_map_symtabs_matching_filename): Adjust.
8904         (dw2_symtab_iter_next): Adjust.
8905         (dw2_print_stats): Adjust.
8906         (dw2_expand_all_symtabs): Adjust.
8907         (dw2_expand_symtabs_with_fullname): Adjust.
8908         (dw2_expand_marked_cus): Adjust.
8909         (dw_expand_symtabs_matching_file_matcher): Adjust.
8910         (dw2_map_symbol_filenames): Adjust.
8911         (dw2_debug_names_iterator::next): Adjust.
8912         (dwarf2_initialize_objfile): Adjust.
8913         (set_partial_user): Adjust.
8914         (dwarf2_build_psymtabs_hard): Adjust.
8915
8916 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8917
8918         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8919         Remove unused variables.
8920         (dw2_map_symtabs_matching_filename): Likewise.
8921         (dwarf2_record_block_ranges): Likewise.
8922         (dwarf2_read_addr_index): Likewise.
8923         (follow_die_offset): Likewise.
8924
8925 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8926
8927         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8928         to symbol_file_add_main.
8929
8930 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8931
8932         PR mi/22299
8933         * mi/mi-console.c (do_fputc_async_safe): New.
8934         (mi_console_file::write_async_safe): New.
8935         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8936         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8937         New.
8938         * ui-file.c (ui_file::putstrn): Adjust call to
8939         fputstrn_unfiltered.
8940         * utils.c (printchar): Replace do_fputs and do_fprintf
8941         parameters by do_fputc.
8942         (fputstr_filtered): Adjust call to printchar.
8943         (fputstr_unfiltered): Likewise.
8944         (fputstrn_filtered): Likewise.
8945         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8946         printchar.
8947         * utils.h (do_fputc_ftype): New typedef.
8948         (fputstrn_unfiltered): Add do_fputc parameter.
8949
8950 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8951
8952         * regformats/i386/i386-avx.dat: Remove.
8953
8954 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8955
8956         PR gdb/22979
8957         * amd64-tdep.c (amd64_none_init_abi): New function.
8958         (amd64_x32_none_init_abi): New function.
8959         (_initialize_amd64_tdep): Register handlers for x86-64 and
8960         x64_32 with GDB_OSABI_NONE.
8961         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8962         GDB_OSABI_NONE osabi.
8963
8964 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8965
8966         PR gdb/22980
8967         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8968         GDB_OSABI_NONE.
8969         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8970         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8971
8972 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8973
8974         * common/byte-vector.h (char_vector): New type.
8975         * target.h (target_read_alloc): Return
8976         gdb::optional<byte_vector>.
8977         (target_read_stralloc): Return gdb::optional<char_vector>.
8978         (target_get_osdata): Return gdb::optional<char_vector>.
8979         * target.c (target_read_alloc_1): Templatize.  Replacement
8980         manual memory management with vector.
8981         (target_read_alloc): Change return type, adjust.
8982         (target_read_stralloc): Change return type, adjust.
8983         (target_get_osdata): Change return type, adjust.
8984         * auxv.c (struct auxv_info) <length>: Remove.
8985         <data>: Change type to gdb::optional<byte_vector>.
8986         (auxv_inferior_data_cleanup): Free auxv_info with delete.
8987         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8988         (target_auxv_search): Adjust.
8989         (fprint_target_auxv): Adjust.
8990         * avr-tdep.c (avr_io_reg_read_command): Adjust.
8991         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8992         (linux_make_corefile_notes): Adjust.
8993         * osdata.c (get_osdata): Adjust.
8994         * remote.c (remote_get_threads_with_qxfer): Adjust.
8995         (remote_memory_map): Adjust.
8996         (remote_traceframe_info): Adjust.
8997         (btrace_read_config): Adjust.
8998         (remote_read_btrace): Adjust.
8999         (remote_pid_to_exec_file): Adjust.
9000         * solib-aix.c (solib_aix_get_library_list): Adjust.
9001         * solib-dsbt.c (decode_loadmap): Don't free buf.
9002         (dsbt_get_initial_loadmaps): Adjust.
9003         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9004         * solib-target.c (solib_target_current_sos): Adjust.
9005         * tracepoint.c (sdata_make_value): Adjust.
9006         * xml-support.c (xinclude_start_include): Adjust.
9007         (xml_fetch_content_from_file): Adjust.
9008         * xml-support.h (xml_fetch_another): Change return type.
9009         (xml_fetch_content_from_file): Change return type.
9010         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9011         * xml-tdesc.c (file_read_description_xml): Adjust.
9012         (fetch_available_features_from_target): Change return type.
9013         (target_fetch_description_xml): Adjust.
9014         (target_read_description_xml): Adjust.
9015
9016 2018-04-06  Tom Tromey  <tom@tromey.com>
9017
9018         * value.c (~value): Update.
9019         (struct value) <contents>: Now unique_xmalloc_ptr.
9020         (value_contents_bits_eq, allocate_value_contents)
9021         (value_contents_raw, value_contents_all_raw)
9022         (value_contents_for_printing, value_contents_for_printing_const)
9023         (set_value_enclosing_type): Update.
9024
9025 2018-04-06  Tom Tromey  <tom@tromey.com>
9026
9027         * value.c (range_s): Remove typedef, VEC.
9028         (struct range): Add operator<.
9029         (range_lessthan): Remove.
9030         (ranges_contain): Change type.
9031         (~value): Update.
9032         (struct value) <unavailable, optimized_out>: Now std::vector.
9033         (value_entirely_available)
9034         (value_entirely_covered_by_range_vector)
9035         (value_entirely_unavailable, value_entirely_optimized_out):
9036         Update.
9037         (insert_into_bit_range_vector): Change argument type.
9038         (find_first_range_overlap): Likewise.
9039         (struct ranges_and_idx, value_contents_bits_eq)
9040         (require_not_optimized_out, require_available): Update.
9041         (ranges_copy_adjusted): Change argument types.
9042         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9043
9044 2018-04-06  Tom Tromey  <tom@tromey.com>
9045
9046         * value.c (~value): Update.
9047         (struct value) <parent>: Now a value_ref_ptr.
9048         (value_parent, set_value_parent, value_address, value_copy):
9049         Update.
9050
9051 2018-04-06  Tom Tromey  <tom@tromey.com>
9052
9053         * value.c (struct value): Add constructor, destructor, and member
9054         initializers.
9055         (allocate_value_lazy, value_decref): Update.
9056
9057 2018-04-06  Tom Tromey  <tom@tromey.com>
9058
9059         * value.c (struct value) <released, next>: Remove.
9060         (all_values): Now a std::vector.
9061         (allocate_value_lazy): Update.
9062         (value_next): Remove.
9063         (value_mark, value_free_to_mark, release_value)
9064         (value_release_to_mark): Update.
9065
9066 2018-04-06  Tom Tromey  <tom@tromey.com>
9067
9068         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9069         (free_value_chain): Remove.
9070         * value.c (free_value_chain): Remove.
9071         (value_release_to_mark): Return a std::vector.
9072         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9073         std::vector.
9074         (check_condition): Update.
9075         * eval.c (fetch_subexp_value): Change "val_chain" to a
9076         std::vector.
9077         * breakpoint.c (update_watchpoint): Update.
9078         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9079
9080 2018-04-06  Tom Tromey  <tom@tromey.com>
9081
9082         * value.h (free_all_values): Remove.
9083         * value.c (free_all_values): Remove.
9084
9085 2018-04-06  Tom Tromey  <tom@tromey.com>
9086
9087         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9088         (value_history_chain, value_history_count): Remove.
9089         (value_history): New global.
9090         (record_latest_value, access_value_history, show_values)
9091         (preserve_values): Update.
9092
9093 2018-04-06  Tom Tromey  <tom@tromey.com>
9094
9095         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9096         * varobj.c (varobj_set_display_format, varobj_set_value)
9097         (install_default_visualizer, construct_visualizer)
9098         (install_new_value, ~varobj, varobj_get_value_type)
9099         (my_value_of_variable, varobj_editable_p): Update.
9100         * c-varobj.c (c_describe_child, c_value_of_variable)
9101         (cplus_number_of_children, cplus_describe_child): Update.
9102         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9103         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9104         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9105
9106 2018-04-06  Tom Tromey  <tom@tromey.com>
9107
9108         * printcmd.c (last_examine_address): Change type to
9109         value_ref_ptr.
9110         (do_examine, x_command): Update.
9111
9112 2018-04-06  Tom Tromey  <tom@tromey.com>
9113
9114         * value.c (release_value): Update.
9115         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9116         (struct bpstats) <val>: Now a value_ref_ptr.
9117         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9118         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9119         (~watchpoint, print_it_watchpoint, watch_command_1)
9120         (invalidate_bp_value_on_memory_change): Update.
9121
9122 2018-04-06  Tom Tromey  <tom@tromey.com>
9123
9124         * varobj.c (varobj_clear_saved_item)
9125         (update_dynamic_varobj_children, install_new_value, ~varobj):
9126         Update.
9127         * value.h (value_incref): Move declaration earlier.
9128         (value_decref): Rename from value_free.
9129         (struct value_ref_policy): New.
9130         (value_ref_ptr): New typedef.
9131         (struct value_deleter): Remove.
9132         (gdb_value_up): Remove typedef.
9133         (release_value): Change return type.
9134         (release_value_or_incref): Remove.
9135         * value.c (set_value_parent): Update.
9136         (value_incref): Change return type.
9137         (value_decref): Rename from value_free.
9138         (value_free_to_mark, free_all_values, free_value_chain): Update.
9139         (release_value): Return value_ref_ptr.
9140         (release_value_or_incref): Remove.
9141         (record_latest_value, set_internalvar, clear_internalvar):
9142         Update.
9143         * stack.c (info_frame_command): Don't call value_free.
9144         * python/py-value.c (valpy_dealloc, valpy_new)
9145         (value_to_value_object): Update.
9146         * printcmd.c (do_examine): Update.
9147         * opencl-lang.c (lval_func_free_closure): Update.
9148         * mi/mi-main.c (register_changed_p): Don't call value_free.
9149         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9150         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9151         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9152         value_free.
9153         * guile/scm-value.c (vlscm_free_value_smob)
9154         (vlscm_scm_from_value): Update.
9155         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9156         (frame_unwind_register_unsigned, get_frame_register_bytes)
9157         (put_frame_register_bytes): Don't call value_free.
9158         * findvar.c (address_from_register): Don't call value_free.
9159         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9160         * dwarf2loc.c (entry_data_value_free_closure)
9161         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9162         (dwarf2_evaluate_loc_desc_full): Update.
9163         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9164         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9165         (~watchpoint, watch_command_1)
9166         (invalidate_bp_value_on_memory_change): Update.
9167         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9168
9169 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9170
9171         PR gdb/23022
9172         * warning.m4: Add -Wno-error=deprecated-register.
9173         * configure: Re-generate.
9174
9175 2018-04-05  Tom Tromey  <tom@tromey.com>
9176
9177         * linespec.h: Remove include of "vec.h".
9178
9179 2018-04-05  Tom Tromey  <tom@tromey.com>
9180
9181         * linespec.c (typep): Remove typedef.
9182         (find_methods, find_superclass_methods): Take a std::vector.
9183         (find_method): Use std::vector.
9184
9185 2018-04-05  Tom Tromey  <tom@tromey.com>
9186
9187         * utils.c (compare_strings): Remove.
9188         * utils.h (compare_strings): Remove.
9189         * objc-lang.h (find_imps): Update.
9190         * objc-lang.c (find_methods): Take a std::vector.
9191         (uniquify_strings, find_imps): Likewise.
9192         * linespec.c (find_methods): Take a std::vector.
9193         (decode_objc): Use std::vector.
9194         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9195         a std::vector.
9196         (find_method, find_function_symbols): Use std::vector.
9197
9198 2018-04-05  Tom Tromey  <tom@tromey.com>
9199
9200         * completer.c (completion_tracker::completion_tracker): Remove
9201         cast.
9202         (completion_tracker::discard_completions): Likewise.
9203         * breakpoint.c (ambiguous_names_p): Remove cast.
9204         * ada-lang.c (_initialize_ada_language): Remove cast.
9205         * utils.h (streq): Update.
9206         (streq_hash): Add new declaration.
9207         * utils.c (streq): Return bool.
9208         (streq_hash): New function.
9209
9210 2018-04-05  Tom Tromey  <tom@tromey.com>
9211
9212         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9213         Remove a string copy.
9214
9215 2018-04-05  Tom Tromey  <tom@tromey.com>
9216
9217         * linespec.c (filter_results): Use std::vector.
9218         (decode_line_2, decode_line_full): Update.
9219
9220 2018-04-05  Tom Tromey  <tom@tromey.com>
9221
9222         * linespec.c (canonical_to_fullform): Return std::string.
9223         (filter_results): Update.
9224         (struct decode_line_2_item): Add constructor.
9225         <fullform, displayform>: Now std::string.
9226         (decode_line_2_compare_items): Now a std::sort comparator.
9227         (decode_line_2): Update.
9228
9229 2018-04-05  Tom Tromey  <tom@tromey.com>
9230
9231         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9232         (unexpected_linespec_error): Update.
9233         (linespec_parse_basic, parse_linespec): Update.
9234
9235 2018-04-05  Tom Tromey  <tom@tromey.com>
9236
9237         * linespec.c (linespec_parse_basic): Reindent.
9238
9239 2018-04-05  Tom Tromey  <tom@tromey.com>
9240
9241         * minsyms.h (iterate_over_minimal_symbols): Update.
9242         * minsyms.c (iterate_over_minimal_symbols): Take a
9243         gdb::function_view.
9244         * linespec.c (struct collect_minsyms): Remove.
9245         (compare_msyms): Now a std::sort comparator.
9246         (add_minsym): Add parameters.
9247         (search_minsyms_for_name): Update.  Use std::vector.
9248
9249 2018-04-03  Tom Tromey  <tom@tromey.com>
9250
9251         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9252         gdb::byte_vector.
9253
9254 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9255
9256         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9257
9258 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9259
9260         PR gdb/16959
9261         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9262         printing static type.
9263
9264 2018-04-01  Tom Tromey  <tom@tromey.com>
9265
9266         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9267         (rs6000_xfer_shared_libraries): Update.
9268
9269 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9270
9271         * common/gdb_vecs.h (char_ptr): Remove.
9272         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9273
9274 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9275
9276         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9277         with std::vector.
9278         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9279
9280 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9281
9282         * tracepoint.h (struct uploaded_tp): Initialize fields.
9283         <actions, step_actions, cmd_strings>: Change type to
9284         std::vector<char *>.
9285         * tracepoint.c (get_uploaded_tp): Allocate with new.
9286         (free_uploaded_tps): Free with delete.
9287         (parse_tracepoint_definition): Adjust to std::vector change.
9288         * breakpoint.c (read_uploaded_action): Likewise.
9289         (create_tracepoint_from_upload): Likewise.
9290         * ctf.c (ctf_write_uploaded_tp): Likewise.
9291         (SET_ARRAY_FIELD): Likewise.
9292         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9293
9294 2018-03-30  Tom Tromey  <tom@tromey.com>
9295
9296         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9297         std::unique_ptr.
9298         (svr4_keep_data_in_core): Update.
9299         (svr4_read_so_list): Update.
9300
9301 2018-03-30  Tom Tromey  <tom@tromey.com>
9302
9303         * windows-nat.c (handle_output_debug_string, handle_exception):
9304         Update.
9305         * target.h (target_read_string): Update.
9306         * target.c (target_read_string): Change "string" to
9307         unique_xmalloc_ptr.
9308         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9309         Update.
9310         * solib-frv.c (frv_current_sos): Update.
9311         * solib-dsbt.c (dsbt_current_sos): Update.
9312         * solib-darwin.c (darwin_current_sos): Update.
9313         * linux-thread-db.c (inferior_has_bug): Update.
9314         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9315         Update.  Remove alloca.
9316         * ada-lang.c (ada_main_name): Update.
9317
9318 2018-03-30  Tom Tromey  <tom@tromey.com>
9319
9320         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9321         (struct dwo_file_deleter): New.
9322         (dwo_file_up): New typedef.
9323         (open_and_init_dwo_file): Use dwo_file_up.
9324         (free_dwo_file_cleanup): Remove.
9325
9326 2018-03-30  Tom Tromey  <tom@tromey.com>
9327
9328         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9329         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9330
9331 2018-03-30  Tom Tromey  <tom@tromey.com>
9332
9333         * dwarf2read.c (class free_cached_comp_units): New class.
9334         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9335         (free_cached_comp_units): Remove function.
9336
9337 2018-03-30  Tom Tromey  <tom@tromey.com>
9338
9339         * utils.h (make_cleanup_unpush_target): Remove.
9340         * inf-ptrace.c (struct target_unpusher): New.
9341         (target_unpush_up) New typedef.
9342         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9343         target_unpush_up.
9344         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9345
9346 2018-03-27  Tom Tromey  <tom@tromey.com>
9347
9348         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9349
9350 2018-03-27  Pedro Alves  <palves@redhat.com>
9351             Tom Tromey  <tom@tromey.com>
9352
9353         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9354         destructor.  Now a class.
9355         (gdb_readline_wrapper_cleanup): Remove function.
9356         (gdb_readline_wrapper): Remove cleanups.
9357
9358 2018-03-27  Tom Tromey  <tom@tromey.com>
9359
9360         * typeprint.h (struct type_print_options) <local_typedefs,
9361         global_typedefs>: Remove "struct" keyword.
9362         (class typedef_hash_table): New class.
9363         (recursively_update_typedef_hash, add_template_parameters)
9364         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9365         (find_typedef_in_hash): Don't declare.
9366         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9367         (typedef_hash_table::recursively_update): Rename from
9368         recursively_update_typedef_hash.  Now a member.
9369         (typedef_hash_table::add_template_parameters): Rename from
9370         add_template_parameters.  Now a member.
9371         (typedef_hash_table::typedef_hash_table): Now a constructor;
9372         rename from create_typedef_hash.
9373         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9374         rename from free_typedef_hash.
9375         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9376         (do_free_global_table): Remove.
9377         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9378         from copy_type_recursive.
9379         (create_global_typedef_table): Remove.
9380         (typedef_hash_table::find_global_typedef): Now a member of
9381         typedef_hash_table.
9382         (typedef_hash_table::find_typedef): Rename from
9383         find_typedef_in_hash; now a member.
9384         (whatis_exp): Update.
9385         * extension.h (struct ext_lang_type_printers): Add constructor and
9386         destructor.
9387         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9388         declare.
9389         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9390         Now a constructor; rename from start_ext_lang_type_printers.
9391         (ext_lang_type_printers): Now a destructor; rename from
9392         free_ext_lang_type_printers.
9393         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9394         Update.
9395         (c_type_print_base_struct_union): Update.  Remove cleanups.
9396
9397 2018-03-27  Tom Tromey  <tom@tromey.com>
9398
9399         * dwarf-index-write.c: Include <cmath>.
9400
9401 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9402
9403         * NEWS: Add entry describing new "set|show varsize-limit" command.
9404         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9405         command.
9406         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9407         "set variable".
9408
9409 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9410
9411         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9412         dwarf-index-write.c
9413         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9414         * dwarf-index-common.c: New file.
9415         * dwarf-index-common.h: New file.
9416         * dwarf-index-write.c: New file.
9417         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9418         (struct dwarf2_section_info): Move from here.
9419         (dwarf2_section_info_def): Likewise.
9420         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9421         (offset_type): Likewise.
9422         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9423         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9424         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9425         (byte_swap): Likewise.
9426         (MAYBE_SWAP): Likewise.
9427         (dwarf2_per_cu_ptr): Likewise.
9428         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9429         (struct tu_stats): Likewise.
9430         (struct dwarf2_per_objfile): Likewise.
9431         (struct dwarf2_per_cu_data): Likewise.
9432         (struct signatured_type): Likewise.
9433         (sig_type_ptr): Likewise.
9434         (DEF_VEC_P (sig_type_ptr)): Likewise.
9435         (INDEX4_SUFFIX): Likewise.
9436         (INDEX5_SUFFIX): Likewise.
9437         (DEBUG_STR_SUFFIX): Likewise.
9438         (dwarf2_read_section): Make non-static.
9439         (mapped_index_string_hash): Move from here.
9440         (dwarf5_djb_hash): Likewise.
9441         (file_write): Likewise.
9442         (class data_buf): Likewise.
9443         (struct symtab_index_entry): Likewise.
9444         (struct mapped_symtab): Likewise.
9445         (find_slot): Likewise.
9446         (hash_expand): Likewise.
9447         (add_index_entry): Likewise.
9448         (uniquify_cu_indices): Likewise.
9449         (class c_str_view): Likewise.
9450         (class c_str_view_hasher): Likewise.
9451         (class vector_hasher): Likewise.
9452         (write_hash_table): Likewise.
9453         (psym_index_map): Likewise.
9454         (struct addrmap_index_data): Likewise.
9455         (add_address_entry): Likewise.
9456         (add_address_entry_worker): Likewise.
9457         (write_address_map): Likewise.
9458         (symbol_kind): Likewise.
9459         (write_psymbols): Likewise.
9460         (struct signatured_type_index_data): Likewise.
9461         (write_one_signatured_type): Likewise.
9462         (recursively_count_psymbols): Likewise.
9463         (recursively_write_psymbols): Likewise.
9464         (class debug_names): Likewise.
9465         (check_dwarf64_offsets): Likewise.
9466         (psyms_seen_size): Likewise.
9467         (write_gdbindex): Likewise.
9468         (write_debug_names): Likewise.
9469         (assert_file_size): Likewise.
9470         (write_psymtabs_to_index): Likewise.
9471         (save_gdb_index_command): Likewise.
9472         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9473         command.
9474         * dwarf2read.h: New file.
9475
9476 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9477
9478         PR gdb/22670
9479         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9480         symbol name if the CU's language stores symbol names in linkage
9481         format.
9482         * language.h (struct language_defn)
9483         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9484         all instances of this struct.
9485
9486 2018-03-26  Tom Tromey  <tom@tromey.com>
9487
9488         * stack.c (backtrace_command_1): Remove verbose code.
9489
9490 2018-03-26  Tom Tromey  <tom@tromey.com>
9491
9492         * python/py-framefilter.c (py_print_type): Don't catch
9493         exceptions.  Return void.
9494         (py_print_value): Likewise.
9495         (py_print_single_arg): Likewise.
9496         (enumerate_args): Don't catch exceptions.
9497         (py_print_args): Likewise.
9498         (py_print_frame): Likewise.
9499         (gdbpy_apply_frame_filter): Catch exceptions here.
9500
9501 2018-03-26  Tom Tromey  <tom@tromey.com>
9502
9503         * stack.c (_initialize_stack): Remove trailing newlines from help
9504         text.  Add "Usage" line to "backtrace" help.
9505
9506 2018-03-26  Tom Tromey  <tom@tromey.com>
9507
9508         PR python/16486:
9509         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9510
9511 2018-03-26  Tom Tromey  <tom@tromey.com>
9512
9513         * python/py-framefilter.c (py_print_single_arg): Return
9514         EXT_LANG_BT_ERROR from catch.
9515
9516 2018-03-26  Tom Tromey  <tom@tromey.com>
9517
9518         PR backtrace/15584:
9519         * stack.c (backtrace_command_1): Move some code into no-filters
9520         "if".
9521
9522 2018-03-26  Tom Tromey  <tom@tromey.com>
9523
9524         * python/py-framefilter.c (throw_quit_or_print_exception): New
9525         function.
9526         (gdbpy_apply_frame_filter): Use it.
9527
9528 2018-03-26  Tom Tromey  <tom@tromey.com>
9529
9530         PR cli/17716:
9531         * python/py-framefilter.c (py_print_type, py_print_value)
9532         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9533         RETURN_MASK_ERROR.
9534
9535 2018-03-26  Tom Tromey  <tom@tromey.com>
9536
9537         * python/py-framefilter.c (enumerate_args): Use
9538         gdb::unique_xmalloc_ptr.
9539
9540 2018-03-26  Tom Tromey  <tom@tromey.com>
9541
9542         * python/py-framefilter.c (py_print_frame): Return
9543         EXT_LANG_BT_OK.
9544         (gdbpy_apply_frame_filter): Update comment.
9545         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9546         Remove.
9547         <EXT_LANG_BT_NO_FILTERS>: Change value.
9548
9549 2018-03-26  Tom Tromey  <tom@tromey.com>
9550
9551         PR backtrace/15582:
9552         * stack.c (backtrace_command): Parse "hide" argument.
9553         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9554         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9555         constant.
9556
9557 2018-03-26  Tom Tromey  <tom@tromey.com>
9558
9559         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9560         add "flags".
9561         (backtrace_command): Remove "fulltrace", add "flags".
9562
9563 2018-03-26  Tom Tromey  <tom@tromey.com>
9564
9565         * stack.c (backtrace_command): Rewrite command line parsing.
9566
9567 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9568
9569         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9570
9571 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9572
9573         * filename-seen-cache.h: Add include guard.
9574
9575 2018-03-26  Keith Seitz  <keiths@redhat.com>
9576
9577         * symfile.c (place_section): Remove "struct" from section_addr_info
9578         in comment.
9579         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9580         "struct" keyword from section_addr_info.
9581
9582 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9583
9584         * regformats/regdef.h (reg): Add constructors.
9585
9586 2018-03-25  Pedro Alves  <palves@redhat.com>
9587
9588         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9589         if then/else bodies in var_func_name extraction.
9590
9591 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9592
9593         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9594         lookup_minimal_symbol() to find symbol entry.
9595         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9596
9597 2018-03-23  Keith Seitz  <keiths@redhat.com>
9598
9599         PR c++/22968
9600         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9601         nested type definitions for C++, too.
9602
9603 2018-03-23  Tom Tromey  <tom@tromey.com>
9604
9605         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9606         a typedef.
9607         (macho_register_oso): Remove.
9608         (macho_symtab_read): Take a std::vector.
9609         (oso_el_compare_name): Now a std::sort comparator.
9610         (macho_symfile_read_all_oso): Take a std::vector.
9611         (macho_symfile_read): Use std::vector.  Remove cleanups.
9612
9613 2018-03-22  Tom Tromey  <tom@tromey.com>
9614
9615         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9616         (record_full_goto_bookmark): Use std::string.
9617
9618 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9619
9620         PR tdep/18295
9621         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9622         a single mask.
9623
9624 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9625
9626         * rs6000-tdep.c (store_insn_p): New function.
9627         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9628         and cr_reg to their unshifted values. Use store_insn_p to
9629         match LR saves using either R1 or fdata->alloca_reg. Use
9630         store_insn_p to match CR saves. Set alloca_reg_offset
9631         when alloca_reg and framep are set. Remove lr_reg shift
9632         when assigning to fdata->lr_register.
9633
9634 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9635
9636         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9637         command line args instead of emitting a warning.
9638
9639 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9640
9641         * tracepoint.h (struct static_tracepoint_marker): Initialize
9642         fields, define default constructor, move constructor and move
9643         assignment, disable the rest.
9644         <str_id, extra>: Make std::string.
9645         (release_static_tracepoint_marker): Remove.
9646         (free_current_marker): Remove.
9647         * tracepoint.c (free_current_marker): Remove.
9648         (parse_static_tracepoint_marker_definition): Adjust to
9649         std::string, use new hex2str overload.
9650         (release_static_tracepoint_marker): Remove.
9651         (print_one_static_tracepoint_marker): Get marker by reference
9652         and adjust to std::string.
9653         (info_static_tracepoint_markers_command): Adjust to std::vector
9654         changes
9655         * target.h (static_tracepoint_marker_p): Remove typedef.
9656         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9657         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9658         bool.
9659         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9660         * target-debug.h
9661         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9662         (target_debug_print_std_vector_static_tracepoint_marker): New.
9663         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9664         to...
9665         (target_debug_print_static_tracepoint_marker_p): ... this.
9666         * target-delegates.c: Re-generate.
9667         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9668         Make std::string.
9669         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9670         (decode_static_tracepoint_spec): Adjust to std::vector.
9671         (tracepoint_print_one_detail): Adjust to std::string.
9672         (strace_marker_decode_location): Adjust to std::string.
9673         (update_static_tracepoint): Adjust to std::string, remove call
9674         to release_static_tracepoint_marker.
9675         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9676         Adjust to std::vector.
9677         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9678         (remote_static_tracepoint_markers_by_strid): Adjust to
9679         std::vector.
9680         * common/rsp-low.h (hex2str): New overload with explicit count
9681         of bytes.
9682         * common/rsp-low.c (hex2str): New overload with explicit count
9683         of bytes.
9684         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9685         (_initialize_rsp_low_selftests): Add test_hex2str test.
9686         * unittests/tracepoint-selftests.c
9687         (test_parse_static_tracepoint_marker_definition): Adjust to
9688         std::string.
9689
9690 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9691
9692         * tracepoint.c (parse_static_tracepoint_marker_definition):
9693         Consider case where the definition is followed by more
9694         definitions.
9695         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9696         tracepoint-selftests.c.
9697         * unittests/tracepoint-selftests.c: New.
9698
9699 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9700
9701         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9702         Carvalho.
9703
9704 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9705
9706         * symtab.c (find_pc_sect_line): fixed indentation.
9707
9708 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9709
9710         * symtab.c (find_pc_sect_line): now uses binary search.
9711
9712 2018-03-19  Tom Tromey  <tom@tromey.com>
9713
9714         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9715         "IDENT" production.
9716
9717 2018-03-19  Pedro Alves  <palves@redhat.com>
9718             Tom Tromey  <tom@tromey.com>
9719
9720         * unittests/observable-selftests.c: New file.
9721         * common/observable.h: New file.
9722         * observable.h: New file.
9723         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9724         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9725         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9726         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9727         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9728         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9729         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9730         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9731         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9732         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9733         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9734         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9735         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9736         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9737         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9738         tui/tui-interp.c, valops.c: Update all users.
9739         * tui/tui-hooks.c (tui_bp_created_observer)
9740         (tui_bp_deleted_observer, tui_bp_modified_observer)
9741         (tui_inferior_exit_observer, tui_before_prompt_observer)
9742         (tui_normal_stop_observer, tui_register_changed_observer):
9743         Remove.
9744         (tui_observers_token): New global.
9745         (attach_or_detach, tui_attach_detach_observers): New functions.
9746         (tui_install_hooks, tui_remove_hooks): Use
9747         tui_attach_detach_observers.
9748         * record-btrace.c (record_btrace_thread_observer): Remove.
9749         (record_btrace_thread_observer_token): New global.
9750         * observer.sh: Remove.
9751         * observer.c: Rename to observable.c.
9752         * observable.c (namespace gdb_observers): Define new objects.
9753         (observer_debug): Move into gdb_observers namespace.
9754         (struct observer, struct observer_list, xalloc_observer_list_node)
9755         (xfree_observer_list_node, generic_observer_attach)
9756         (generic_observer_detach, generic_observer_notify): Remove.
9757         (_initialize_observer): Update.
9758         Don't include observer.inc.
9759         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9760         (clean mostlyclean): Likewise.
9761         (observer.h, observer.inc): Remove targets.
9762         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9763         (COMMON_SFILES): Use observable.c, not observer.c.
9764         * .gitignore: Remove observer.h.
9765
9766 2018-03-18  Tom Tromey  <tom@tromey.com>
9767
9768         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9769         gdb::def_vector.
9770         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9771
9772 2018-03-17  Tom Tromey  <tom@tromey.com>
9773
9774         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9775
9776 2018-03-17  Tom Tromey  <tom@tromey.com>
9777
9778         * target.c (class scoped_target_fd): New.
9779         (target_fileio_close_cleanup): Remove.
9780         (target_fileio_read_alloc_1): Use scoped_target_fd.
9781
9782 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9783
9784         * silent-rules.mk: New.
9785         * Makefile.in: Include silent-rules.mk
9786         (srcdir, VPATH, top_srcdir): Move up.
9787         (COMPILE): Add ECHO_CXX.
9788         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9789         (init.c): Add ECHO_INIT_C.
9790         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9791         (version.c): Add ECHO_GEN.
9792         (printcmd.o): Add ECHO_CXX.
9793         (target-float.o): Add ECHO_CXX.
9794         (ada-exp.o): Add ECHO_CXX.
9795         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9796         (insight$(EXEEXT)): Add ECHO_CXXLD.
9797         * gnulib/configure.ac: Add AM_SILENT_RULES.
9798         * gnulib/aclocal.m4: Re-generate.
9799         * gnulib/configure: Re-generate.
9800         * gnulib/import/Makefile.in: Re-generate.
9801
9802 2018-03-16  Tom Tromey  <tom@tromey.com>
9803
9804         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9805         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9806         * utils.c (do_free_section_addr_info)
9807         (make_cleanup_free_section_addr_info): Remove.
9808         * symfile.h (struct other_sections): Add constructor.
9809         (struct section_addr_info): Remove.
9810         (section_addr_info): New typedef.
9811         (struct sym_fns) <sym_offsets>: Change type of parameter.
9812         (build_section_addr_info_from_objfile)
9813         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9814         (default_symfile_offsets, symbol_file_add)
9815         (symbol_file_add_from_bfd)
9816         (build_section_addr_info_from_section_table): Update.
9817         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9818         * symfile.c (alloc_section_addr_info): Remove.
9819         (build_section_addr_info_from_section_table): Change return type.
9820         Update.
9821         (build_section_addr_info_from_bfd)
9822         (build_section_addr_info_from_objfile): Likewise.
9823         (free_section_addr_info): Remove.
9824         (relative_addr_info_to_section_offsets): Change type of "addrs".
9825         (addrs_section_compar): Now a std::sort comparator.
9826         (addrs_section_sort): Change return type.
9827         (addr_info_make_relative): Change type of "addrs".  Update.
9828         (default_symfile_offsets, syms_from_objfile_1)
9829         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9830         (symbol_file_add_separate): Update.
9831         (symbol_file_add): Change type of "addrs".  Update.
9832         (add_symbol_file_command): Update.  Remove cleanups.
9833         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9834         cleanups.
9835         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9836         * solib.c (solib_read_symbols): Update.
9837         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9838         * machoread.c (macho_symfile_offsets): Update.
9839         * jit.c (jit_bfd_try_read_symtab): Update.
9840
9841 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9842
9843         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9844         unittests/utils-selftests.c.
9845         * unittests/utils-selftests.c: New file.
9846
9847 2018-03-14  Tom Tromey  <tom@tromey.com>
9848
9849         PR cli/14977:
9850         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9851         for NULL.
9852
9853 2018-03-14  Tom Tromey  <tom@tromey.com>
9854
9855         PR cli/19918:
9856         * printcmd.c (printf_pointer): Allow "-" in format.
9857
9858 2018-03-14  Tom Tromey  <tom@tromey.com>
9859
9860         * printcmd.c (_initialize_printcmd): Add usage to printf.
9861
9862 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9863
9864         * MAINTAINERS: Update my email address.
9865
9866 2018-03-13  Tom Tromey  <tom@tromey.com>
9867
9868         * machoread.c (macho_check_dsym): Change filenamep to a
9869         std::string*.
9870         (macho_symfile_read): Update.
9871         * symfile.c (load_command): Use std::string.
9872
9873 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9874
9875         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9876         to error message string.
9877         (riscv_register_name): Use xsnprintf instead of sprintf.
9878         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9879         internal_error.
9880         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9881         error.
9882         (riscv_push_dummy_call): Likewise.
9883
9884 2018-03-12  Tom Tromey  <tom@tromey.com>
9885
9886         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9887         Use gdb::byte_vector.
9888         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9889
9890 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9891
9892         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9893         parameter type to readable_regcache.
9894         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9895         the declaration.
9896
9897 2018-03-11  Tom Tromey  <tom@tromey.com>
9898
9899         * dwarf2read.c (struct nextfield): Add initializers.
9900         (struct nextfnfield): Remove.
9901         (struct fnfieldlist): Add initializers.  Remove "length" and
9902         "head", use std::vector.
9903         (struct decl_field_list): Remove.
9904         (struct field_info): Add initializers.
9905         <fields, baseclasses>: Now std::vector.
9906         <nbaseclasses, nfnfields, typedef_field_list_count,
9907         nested_types_list_count>: Remove.
9908         (dwarf2_add_field, dwarf2_add_type_defn)
9909         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9910         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9911         (process_structure_scope): Update.
9912
9913 2018-03-11  Tom Tromey  <tom@tromey.com>
9914
9915         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9916         for use by std::sort.
9917         (build_type_psymtabs_1): Use std::vector.
9918
9919 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9920
9921         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9922         and LIBMPFR in the printed configuration.
9923
9924 2018-03-08  Tom Tromey  <tom@tromey.com>
9925
9926         * source.c (get_filename_and_charpos): Use scoped_fd.
9927         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9928         (procfs_pidlist): Likewise.
9929         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9930         (iterate_over_mappings): Likewise.
9931
9932 2018-03-08  Tom Tromey  <tom@tromey.com>
9933
9934         * infcall.c (struct call_return_meta_info)
9935         <stack_temporaries_enabled>: Remove.
9936         (get_call_return_value, call_function_by_hand_dummy): Update.
9937         * thread.c (disable_thread_stack_temporaries): Remove.
9938         (enable_thread_stack_temporaries): Remove.
9939         (thread_stack_temporaries_enabled_p): Return bool.
9940         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9941         (get_last_thread_stack_temporary): Update.
9942         * eval.c (evaluate_subexp): Update.
9943         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9944         class, not a function.
9945         (value_ptr, value_vec): Remove typedefs.
9946         (class thread_info) <stack_temporaries_enabled>: Now bool.
9947         <stack_temporaries>: Now a std::vector.
9948         (thread_stack_temporaries_enabled_p)
9949         (value_in_thread_stack_temporaries): Return bool.
9950
9951 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9952
9953         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9954         (getpkt_or_notif_sane_1): Likewise.
9955
9956 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9957
9958         * build-id.c (build_id_to_debug_bfd): Use std::string.
9959
9960 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9961
9962         * build-id.c (find_separate_debug_file_by_buildid): Return
9963         std::string.
9964         * build-id.h (find_separate_debug_file_by_buildid): Return
9965         std::string.
9966         * coffread.c (coff_symfile_read): Adjust to std::string.
9967         * elfread.c (elf_symfile_read): Adjust to std::string.
9968         * symfile.c (separate_debug_file_exists): Change parameter to
9969         std::string.
9970         (find_separate_debug_file): Return std::string.
9971         (find_separate_debug_file_by_debuglink): Return std::string.
9972         * symfile.h (find_separate_debug_file_by_debuglink): Return
9973         std::string.
9974
9975 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9976
9977         * common/xml-utils.c (xml_escape_text): Move code to...
9978         (xml_escape_text_append): ... this new function.
9979         * common/xml-utils.h (xml_escape_text_append): New declaration.
9980         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9981         New function.
9982         (_initialize_xml_utils): register test_xml_escape_text_append as
9983         a selftest.
9984
9985 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
9986
9987         * defs.h: Remove MAX_REGISTER_SIZE.
9988         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9989         asserts.
9990         * python/py-unwind.c (pyuw_sniffer): Likewise.
9991
9992 2018-03-07  Tom Tromey  <tom@tromey.com>
9993
9994         * linux-tdep.c (linux_info_proc): Update.
9995         * target.h (struct target_ops) <to_fileio_readlink>: Return
9996         optional<string>.
9997         (target_fileio_readlink): Return optional<string>.
9998         * remote.c (remote_hostio_readlink): Return optional<string>.
9999         * inf-child.c (inf_child_fileio_readlink): Return
10000         optional<string>.
10001         * target.c (target_fileio_readlink): Return optional<string>.
10002
10003 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10004
10005         * regcache.c (cooked_read_test): Add riscv to the list of
10006         architectures that have a save_reggroup.
10007
10008 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10009
10010         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10011         value is not a dynamic class object.
10012
10013 2018-03-06  Tom Tromey  <tom@tromey.com>
10014
10015         * rust-exp.y: Formatting fixes.
10016
10017 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10018
10019         * riscv-tdep.c (riscv_register_name): Remove target description
10020         support.
10021         (riscv_gdbarch_init): Remove target description check.
10022
10023 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10024
10025         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10026         comment.
10027         * riscv-tdep.h: Likewise.
10028
10029 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10030
10031         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10032         (riscv_pseudo_register_write): Delete.
10033         (riscv_gdbarch_init): Remove all use of pseudo registers.
10034
10035 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10036
10037         * record-btrace.c (btrace_print_lines): Replace cleanup
10038         parameter with RAII equivalents.
10039         (btrace_insn_history): Replace cleanup with RAII equivalents.
10040         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10041         make_cleanup_ui_out_tuple_begin_end): Remove.
10042         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10043         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10044         make_cleanup_ui_out_list_begin_end): Remove.
10045
10046 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10047
10048         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10049         parameter types to std::vector.  Use bool.
10050         (record_btrace_wait): Replace VEC(tp_t) with
10051         std::vector<thread_info *>.
10052         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10053
10054 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10055
10056         * record-btrace.c (record_btrace_disable_callback): Remove.
10057         (struct scoped_btrace_disable): New.
10058         (record_btrace_open): Use scoped_btrace_disable.
10059
10060 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10061
10062         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10063         reading values from registers.
10064
10065 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10066
10067         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10068         where appropriate.
10069
10070 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10071
10072         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10073         change parameter type.  Use GDB's print functions, and use
10074         core_addr_to_string where appropriate.
10075         (riscv_push_dummy_call): Use core_addr_to_string where
10076         appropriate, update call to riscv_print_arg_location, and reindent
10077         a few lines.
10078         (riscv_return_value): Update call to riscv_print_arg_location.
10079
10080 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10081             Tim Newsome <tim@sifive.com>
10082             Albert Ou <a0u@eecs.berkeley.edu>
10083             Darius Rad <darius@bluespec.com>
10084
10085         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10086         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10087         (ALLDEPFILES): Add riscv-tdep.c
10088         * configure.tgt: Add riscv support.
10089         * riscv-tdep.c: New file.
10090         * riscv-tdep.h: New file.
10091         * NEWS: Mention new target.
10092         * MAINTAINERS: Add entry for riscv.
10093
10094 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10095
10096         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10097         fields within aggregates.
10098
10099 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10100
10101         * record-btrace.c (btrace_print_lines): Change type of flags to
10102         gdb_disassembly_flags.
10103
10104 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10105
10106         * fbsd-nat.c: Include "inf-ptrace.h".
10107         (USE_SIGTRAP_SIGINFO): Conditionally define.
10108         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10109         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10110         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10111         function.
10112         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10113         Likewise.
10114         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10115         Likewise.
10116         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10117         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10118         "supports_stopped_by_hw_breakpoint" target methods.
10119
10120 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10121
10122         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10123         * fbsd-nat.c (debug_fbsd_nat): New variable.
10124         (show_fbsd_nat_debug): New function.
10125         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10126         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10127
10128 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10129
10130         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10131         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10132         prototype.
10133         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10134         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10135         method.
10136
10137 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10138
10139         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10140         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10141
10142 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10143
10144         * charset.c (struct charset_vector): New.
10145         (charsets): Change type to charset_vector.
10146         (find_charset_names): Adjust.
10147         (add_one): Adjust.
10148         (_initialize_charset): Adjust.
10149
10150 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10151
10152         * progspace.h (struct program_space) <deleted_solibs>: Change
10153         type to std::vector<std::string>.
10154         * progspace.c (clear_program_space_solib_cache): Adjust.
10155         * breakpoint.c (print_solib_event): Adjust.
10156         (check_status_catch_solib): Adjust.
10157         * solib.c (update_solib_list): Adjust.
10158         * ui-out.h (class ui_out) <field_string>: New overload.
10159         * ui-out.c (ui_out::field_string): New overload.
10160
10161 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10162
10163         * progspace.h (struct program_space): Add constructor and
10164         destructor, initialize fields.
10165         (add_program_space): Remove.
10166         * progspace.c (add_program_space): Rename to...
10167         (program_space::program_space): ... this.
10168         (release_program_space): Rename to...
10169         (program_space::~program_space): ... this.
10170         (delete_program_space): Use delete to delete program_space.
10171         (initialize_progspace): Use new to allocate program_space.
10172         * inferior.c (add_inferior_with_spaces): Likewise.
10173         (clone_inferior_command): Likewise.
10174         * infrun.c (follow_fork_inferior): Likewise.
10175         (handle_vfork_child_exec_or_exit): Likewise.
10176
10177 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10178
10179         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10180         (delim_string_to_char_ptr_vec): Return std::vector of
10181         gdb::unique_xmalloc_ptr.
10182         (dirnames_to_char_ptr_vec_append): Take std::vector of
10183         gdb::unique_xmalloc_ptr.
10184         (dirnames_to_char_ptr_vec): Return std::vector of
10185         gdb::unique_xmalloc_ptr.
10186         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10187         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10188         (delim_string_to_char_ptr_vec): Return an std::vector of
10189         gdb::unique_xmalloc_ptr, adjust the code.
10190         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10191         gdb::unique_xmalloc_ptr, adjust the code.
10192         (dirnames_to_char_ptr_vec): Return an std::vector of
10193         gdb::unique_xmalloc_ptr, adjust the code.
10194         * auto-load.c (auto_load_safe_path_vec): Change type to
10195         std::vector of gdb::unique_xmalloc_ptr.
10196         (auto_load_expand_dir_vars): Return an std::vector of
10197         gdb::unique_xmalloc_ptr, adjust the code.
10198         (auto_load_safe_path_vec_update): Adjust.
10199         (filename_is_in_auto_load_safe_path_vec): Adjust.
10200         (auto_load_objfile_script_1): Adjust.
10201         * build-id.c (build_id_to_debug_bfd): Adjust.
10202         * linux-thread-db.c (thread_db_load_search): Adjust.
10203         * source.c (add_path): Adjust.
10204         (openp): Adjust.
10205         * symfile.c (find_separate_debug_file): Adjust.
10206         * utils.c (do_free_char_ptr_vec): Remove.
10207         (make_cleanup_free_char_ptr_vec): Remove.
10208
10209 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10210
10211         PR gdb/22907
10212         * common/pathstuff.c: Conditionally include "<windows.h>".
10213
10214 2018-03-01  Georg Sauthoff  <mail@georg.so>
10215
10216         PR gdb/22888
10217         * gcore.in: Quote variables and switch interpreter to bash.
10218
10219 2018-03-01  Tom Tromey  <tom@tromey.com>
10220
10221         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10222         assertion.  Add assertion for discriminant_index.
10223         (quirk_rust_enum): Use correct base type name in univariant case.
10224
10225 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10226
10227         * record.c (get_call_history_modifiers): Return a
10228         record_print_flags.
10229         (cmd_record_call_history): Adjust.
10230         * record-btrace.c (record_btrace_call_history): Adjust.
10231         (record_btrace_call_history_range): Adjust.
10232         (record_btrace_call_history_from): Adjust.
10233         * target-debug.h (target_debug_print_record_print_flags): New.
10234         * target-delegates.c: Re-generate.
10235         * target.c (target_call_history): Change flags type.
10236         (target_call_history_from): Likewise.
10237         (target_call_history_range): Likewise.
10238         * target.h (struct target_ops) <target_call_history>: Likewise.
10239         (target_call_history_from): Likewise.
10240         (target_call_history_range): Likewise.
10241
10242 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10243             Simon Marchi  <simon.marchi@polymtl.ca>
10244
10245         * common/common-utils.c: Include "sys/stat.h".
10246         (is_regular_file): Move here from "source.c"; change return
10247         type to "bool".
10248         * common/common-utils.h (is_regular_file): New prototype.
10249         * common/pathstuff.c (contains_dir_separator): New function.
10250         * common/pathstuff.h (contains_dir_separator): New prototype.
10251         * source.c: Don't include "sys/stat.h".
10252         (is_regular_file): Move to "common/common-utils.c".
10253
10254 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10255
10256         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10257         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10258         * auto-load.c: Include "common/pathstuff.h".
10259         * common/common-def.h (current_directory): Move here.
10260         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10261         function.
10262         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10263         prototype.
10264         * common/pathstuff.c: New file.
10265         * common/pathstuff.h: New file.
10266         * compile/compile.c: Include "common/pathstuff.h".
10267         * defs.h (current_directory): Move to "common/common-defs.h".
10268         * dwarf2read.c: Include "common/pathstuff.h".
10269         * exec.c: Likewise.
10270         * guile/scm-safe-call.c: Likewise.
10271         * linux-thread-db.c: Likewise.
10272         * main.c: Likewise.
10273         * nto-tdep.c: Likewise.
10274         * objfiles.c: Likewise.
10275         * source.c: Likewise.
10276         * symtab.c: Likewise.
10277         * utils.c: Include "common/pathstuff.h".
10278         (gdb_realpath): Move to "common/pathstuff.c".
10279         (gdb_realpath_keepfile): Likewise.
10280         (gdb_abspath): Likewise.
10281         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10282         (gdb_realpath_keepfile): Likewise.
10283         (gdb_abspath): Likewise.
10284
10285 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10286
10287         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10288         wildcard process pid for super_resume for kernels with a
10289         specific bug.
10290
10291 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10292
10293         * compile/compile.c (get_args): Add additional comments
10294         explaining function.
10295
10296 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10297             Tom Tromey  <tom@tromey.com>
10298
10299         * target.h (memory_write_request_s): Remove typedef.  Don't define
10300         VEC.
10301         (target_write_memory_blocks): Change argument to std::vector.
10302         (struct memory_write_request): Add constructor.
10303         * target-memory.c (compare_block_starting_address): Return bool.
10304         Change argument types.
10305         (claim_memory): Change arguments to use std::vector.
10306         (split_regular_and_flash_blocks, blocks_to_erase)
10307         (compute_garbled_blocks): Likewise.
10308         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10309         (target_write_memory_blocks): Change argument to std::vector.
10310         * symfile.c (struct load_section_data): Add constructor and
10311         destructor.  Use std::vector for "requests".
10312         (struct load_progress_data): Add initializers.
10313         (load_section_callback): Update.  Use "new".
10314         (clear_memory_write_data): Remove.
10315         (generic_load): Update.
10316
10317 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10318
10319         * arch/aarch64.h: Use common/tdesc.h.
10320
10321 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10322
10323         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10324         architecture with a 64-bit ABI.
10325
10326 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10327
10328         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10329         ahead of target description loading.
10330
10331 2018-02-26  Tom Tromey  <tom@tromey.com>
10332
10333         * stack.c (backtrace_command_1): Update.
10334         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10335         of "flags".
10336         * python/py-framefilter.c (py_print_frame)
10337         (gdbpy_apply_frame_filter): Change type of "flags".
10338         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10339         of "flags".
10340         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10341         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10342         * extension.h (enum frame_filter_flag): Rename from
10343         frame_filter_flags.
10344         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10345         (apply_ext_lang_frame_filter): Change type of "flags".
10346         * extension.c (apply_ext_lang_frame_filter): Change type of
10347         "flags".
10348         * extension-priv.h (struct extension_language_ops)
10349         <apply_frame_filter>: Change type of "flags".
10350
10351 2018-02-26  Tom Tromey  <tom@tromey.com>
10352
10353         PR python/16497:
10354         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10355         off-by-one in py_end computation.
10356         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10357         PRINT_MORE_FRAMES.
10358         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10359         constant.
10360
10361 2018-02-26  Tom Tromey  <tom@tromey.com>
10362
10363         * dwarf2read.c (struct variant_field): New.
10364         (struct nextfield) <variant>: New field.
10365         (dwarf2_add_field): Handle DW_TAG_variant_part.
10366         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10367         discriminated union.
10368         (read_structure_type): Handle DW_TAG_variant_part.
10369         (handle_struct_member_die): New function, extracted from
10370         process_structure_scope.  Handle DW_TAG_variant.
10371         (process_structure_scope): Handle discriminated unions.  Call
10372         handle_struct_member_die.
10373
10374 2018-02-26  Tom Tromey  <tom@tromey.com>
10375
10376         * rust-lang.h (rust_last_path_segment): Declare.
10377         * rust-lang.c (rust_last_path_segment): Now public.  Change
10378         contract.
10379         (struct disr_info): Remove.
10380         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10381         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10382         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10383         (rust_enum_p, rust_enum_variant): New function.
10384         (rust_underscore_fields): Remove "offset" parameter.
10385         (rust_print_enum): New function.
10386         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10387         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10388         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10389         enums.
10390         (rust_internal_print_type): New function, from rust_print_type.
10391         Remove enum code.
10392         (rust_print_type): Call rust_internal_print_type.
10393         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10394         Update enum handling.
10395         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10396         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10397         (rust_union_quirks): New functions.
10398         (process_full_comp_unit, process_full_type_unit): Call
10399         rust_union_quirks.
10400         (process_structure_scope): Update rust_unions if necessary.
10401
10402 2018-02-26  Tom Tromey  <tom@tromey.com>
10403
10404         * value.h (value_union_variant): Declare.
10405         * valops.c (value_union_variant): New function.
10406         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10407         (struct discriminant_info): New.
10408         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10409         enumerator.
10410         (struct main_type) <flag_discriminated_union>: New field.
10411
10412 2018-02-26  Tom Tromey  <tom@tromey.com>
10413
10414         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10415         unittests/unpack-selftests.c.
10416         * unittests/unpack-selftests.c: New file.
10417         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10418
10419 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10420
10421         * dwarf2read.c (struct partial_die_info) <read>: New method.
10422         (read_partial_die): Remove the declaration.
10423         (load_partial_dies): Update.
10424         (partial_die_info::partial_die_info):
10425         (read_partial_die): Change it to partial_die_info::read.
10426
10427 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10428
10429         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10430         (fixup_partial_die): Remove declaration.
10431         (scan_partial_symbols): Update.
10432         (partial_die_parent_scope): Likewise.
10433         (partial_die_full_name): Likewise.
10434         (fixup_partial_die): Change it to partial_die_info::fixup.
10435
10436 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10437
10438         * dwarf2read.c (read_partial_die): Update the declaration.
10439         (load_partial_dies): Caller update.
10440         (read_partial_die): Remove one argument abbrev_len.
10441
10442 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10443
10444         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10445         assignment operator.
10446         (load_partial_dies): Use ctor and copy ctor.
10447         (read_partial_die): Update.
10448         (dwarf2_cu::find_partial_die): Use ctor.
10449
10450 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10451
10452         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10453         (find_partial_die_in_comp_unit): Change it to
10454         dwarf2_cu::find_partial_die.
10455         (find_partial_die): Update.
10456
10457 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10458
10459         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10460         is NULL.
10461
10462 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10463
10464         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10465
10466 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10467
10468         * arch/amd64.h: Use common/tdesc.h.
10469         * arch/i386.c: Likewise.
10470         * arch/i386.h: Likewise.
10471         * arch/tic6x.c: Likewise.
10472         * arch/tdesc.h: Move file from here...
10473         * common/tdesc.h: ...to here.
10474         * features/aarch64-core.c: Regenerate.
10475         * features/aarch64-fpu.c: Regenerate.
10476         * features/i386/32bit-avx.c: Regenerate.
10477         * features/i386/32bit-avx512.c: Regenerate.
10478         * features/i386/32bit-core.c: Regenerate.
10479         * features/i386/32bit-linux.c: Regenerate.
10480         * features/i386/32bit-mpx.c: Regenerate.
10481         * features/i386/32bit-pkeys.c: Regenerate.
10482         * features/i386/32bit-sse.c: Regenerate.
10483         * features/i386/64bit-avx.c: Regenerate.
10484         * features/i386/64bit-avx512.c: Regenerate.
10485         * features/i386/64bit-core.c: Regenerate.
10486         * features/i386/64bit-linux.c: Regenerate.
10487         * features/i386/64bit-mpx.c: Regenerate.
10488         * features/i386/64bit-pkeys.c: Regenerate.
10489         * features/i386/64bit-segments.c: Regenerate.
10490         * features/i386/64bit-sse.c: Regenerate.
10491         * features/i386/x32-core.c: Regenerate.
10492         * features/tic6x-c6xp.c: Regenerate.
10493         * features/tic6x-core.c: Regenerate.
10494         * features/tic6x-gp.c: Regenerate.
10495         * target-descriptions.c: Use common/tdesc.h.
10496         * target-descriptions.h: Likewise.
10497
10498 2018-02-24  Tom Tromey  <tom@tromey.com>
10499
10500         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10501         (try_thread_db_load_from_dir, thread_db_load_search): Use
10502         std::string.
10503         (info_auto_load_libthread_db_compare): Return bool.  Change
10504         argument types.
10505         (info_auto_load_libthread_db): Use std::vector, std::string.
10506         Remove cleanups.
10507
10508 2018-02-24  Tom Tromey  <tom@tromey.com>
10509
10510         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10511         std::string.
10512         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10513         std::string*.
10514         * gdbarch.c: Rebuild.
10515         * gdbarch.h: Rebuild.
10516         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10517         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10518         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10519         std::string*.
10520
10521 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10522
10523         * gdbtypes.h (sect_offset): Change type to uint64_t.
10524         (sect_offset_str): New function.
10525         * dwarf2read.c (create_addrmap_from_aranges): Use
10526         sect_offset_str.
10527         (error_check_comp_unit_head): Likewise.
10528         (create_debug_type_hash_table): Likewise.
10529         (read_cutu_die_from_dwo): Likewise.
10530         (init_cutu_and_read_dies): Likewise.
10531         (init_cutu_and_read_dies_no_follow): Likewise.
10532         (process_psymtab_comp_unit_reader): Likewise.
10533         (partial_die_parent_scope): Likewise.
10534         (peek_die_abbrev): Likewise.
10535         (process_queue): Likewise.
10536         (dwarf2_physname): Likewise.
10537         (read_namespace_alias): Likewise.
10538         (read_import_statement): Likewise.
10539         (create_dwo_cu_reader): Likewise.
10540         (create_cus_hash_table): Likewise.
10541         (lookup_dwo_cutu): Likewise.
10542         (inherit_abstract_dies): Likewise.
10543         (read_func_scope): Likewise.
10544         (read_call_site_scope): Likewise.
10545         (dwarf2_add_member_fn): Likewise.
10546         (read_common_block): Likewise.
10547         (read_module_type): Likewise.
10548         (read_typedef): Likewise.
10549         (read_subrange_type): Likewise.
10550         (load_partial_dies): Likewise.
10551         (read_partial_die): Likewise.
10552         (find_partial_die): Likewise.
10553         (read_str_index): Likewise.
10554         (dwarf2_string_attr): Likewise.
10555         (build_error_marker_type): Likewise.
10556         (lookup_die_type): Likewise.
10557         (dump_die_shallow): Likewise.
10558         (follow_die_ref): Likewise.
10559         (dwarf2_fetch_die_loc_sect_off): Likewise.
10560         (dwarf2_fetch_constant_bytes): Likewise.
10561         (follow_die_sig): Likewise.
10562         (get_signatured_type): Likewise.
10563         (get_DW_AT_signature_type): Likewise.
10564         (dwarf2_find_containing_comp_unit): Likewise.
10565         (set_die_type): Likewise.
10566
10567 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10568
10569         * arch/aarch64.c: Include "common-defs.h".
10570         * arch/amd64.c: Likewise.
10571         * arch/i386.c: Likewise.
10572
10573 2018-02-21  Tom Tromey  <tom@tromey.com>
10574
10575         * value.h: (extract_field_op): Update.
10576         * eval.c (extract_field_op): Return a const char *.
10577         * expression.h (parse_expression_for_completion): Update.
10578         * completer.c (complete_expression): Update.
10579         (add_struct_fields): Make fieldname const.
10580         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10581         (mark_completion_tag, parse_exp_in_context_1): Update.
10582         (parse_expression_for_completion): Change "name" to
10583         unique_xmalloc_ptr*.
10584
10585 2018-02-21  Tom Tromey  <tom@tromey.com>
10586
10587         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10588
10589 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10590
10591         * avr-tdep.c (avr_read_pc): Change parameter type to
10592         readable_regcache.
10593         * gdbarch.sh (read_pc): Likewise.
10594         * gdbarch.c: Re-generated.
10595         * gdbarch.h: Re-generated.
10596         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10597         readable_regcache.
10598         * ia64-tdep.c (ia64_read_pc): Likewise.
10599         * mips-tdep.c (mips_read_pc): Likewise.
10600         * spu-tdep.c (spu_read_pc): Likewise.
10601
10602 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10603
10604         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10605         * regcache-dump.c: New file.
10606         * regcache.c: Move register_dump to regcache-dump.c.
10607         (maintenance_print_registers): Likewise.
10608         (maintenance_print_raw_registers): Likewise.
10609         (maintenance_print_cooked_registers): Likewise.
10610         (maintenance_print_register_groups): Likewise.
10611         (maintenance_print_remote_registers): Likewise.
10612         (_initialize_regcache): Likewise.
10613         * regcache.h (register_dump): Moved from regcache.c.
10614
10615 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10616
10617         * regcache.c (regcache::regcache): Update.
10618         (regcache::invalidate): Move it to detached_regcache::invalidate.
10619         (get_thread_arch_aspace_regcache): Update.
10620         (regcache::raw_update): Update.
10621         (regcache::cooked_read): Remove some code.
10622         (regcache::cooked_read_value): Likewise.
10623         (regcache::raw_write): Remove assert on m_readonly_p.
10624         (regcache::raw_supply_integer): Move it to
10625         detached_regcache::raw_supply_integer.
10626         (regcache::raw_supply_zeroed): Likewise.
10627         * regcache.h (detached_regcache) <raw_supply_integer>: New
10628         declaration.
10629         <raw_supply_zeroed, invalidate>: Likewise.
10630         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10631         <invalidate>: Likewise.
10632         <m_readonly_p>: Removed.
10633
10634 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10635
10636         * infcmd.c (get_return_value): Let stop_regs point to
10637         get_current_regcache.
10638         * regcache.c (regcache::regcache): Remove.
10639         (register_dump_reg_buffer): New class.
10640         (regcache_print): Adjust.
10641         * regcache.h (regcache): Remove constructors.
10642
10643 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10644
10645         * regcache.c (class register_dump): New class.
10646         (register_dump_regcache, register_dump_none): New class.
10647         (register_dump_remote, register_dump_groups): New class.
10648         (regcache_print): Update.
10649         * regcache.h (regcache_dump_what): Move it to regcache.c.
10650         (regcache) <dump>: Remove.
10651
10652 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10653
10654         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10655          reg_buffer_rw *.
10656         (jit_unwind_reg_set_impl): Call raw_supply.
10657         (jit_frame_sniffer): Use reg_buffer_rw.
10658         * record-full.c (record_full_core_regbuf): Change its type.
10659         (record_full_core_open_1): Use reg_buffer_rw.
10660         (record_full_close): Likewise.
10661         (record_full_core_fetch_registers): Use regcache->raw_supply.
10662         (record_full_core_store_registers): Likewise.
10663         * regcache.c (regcache::get_register_status): Move it to
10664         reg_buffer.
10665         (regcache_raw_set_cached_value): Remove.
10666         (regcache::raw_set_cached_value): Remove.
10667         (regcache::raw_write): Call raw_supply.
10668         (regcache::raw_supply): Move it to reg_buffer_rw.
10669         * regcache.h (regcache_raw_set_cached_value): Remove.
10670         (reg_buffer_rw): New class.
10671
10672 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10673
10674         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10675         readonly_detached_regcache.
10676         (dummy_frame_prev_register): Use regcache->cooked_read.
10677         * frame.c (frame_save_as_regcache): Change return type.
10678         (frame_pop): Update.
10679         * frame.h (frame_save_as_regcache): Update declaration.
10680         * inferior.h (get_infcall_suspend_state_regcache): Update
10681         declaration.
10682         * infrun.c (infcall_suspend_state) <registers>: use
10683         readonly_detached_regcache.
10684         (save_infcall_suspend_state): Don't use regcache_dup.
10685         (get_infcall_suspend_state_regcache): Change return type.
10686         * linux-fork.c (struct fork_info) <savedregs>: Change to
10687         readonly_detached_regcache.
10688         <pc>: New field.
10689         (fork_save_infrun_state): Don't use regcache_dup.
10690         (info_checkpoints_command): Adjust.
10691         * mi/mi-main.c (register_changed_p): Update declaration.
10692         (mi_cmd_data_list_changed_registers): Use
10693         readonly_detached_regcache.
10694         (register_changed_p): Change parameter type to
10695         readonly_detached_regcache.
10696         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10697         readonly_detached_regcache.
10698         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10699         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10700         New.
10701         (regcache::save): Move it to reg_buffer.
10702         (regcache::restore): Change parameter type.
10703         (regcache_dup): Remove.
10704         * regcache.h (reg_buffer) <save>: New method.
10705         (readonly_detached_regcache): New class.
10706         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10707         readonly_detached_regcache.
10708         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10709
10710 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10711
10712         * frame.c (frame_save_as_regcache): Use regcache method save.
10713         (frame_pop): Use regcache method restore.
10714         * infrun.c (restore_infcall_suspend_state): Likewise.
10715         * linux-fork.c (fork_load_infrun_state): Likewise.
10716         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10717         save.
10718         * regcache.c (regcache_save): Remove.
10719         (regcache::restore): More asserts.
10720         (regcache_cpy): Remove.
10721         * regcache.h (regcache_save): Remove the declaration.
10722         (regcache::restore): Move from private to public.
10723         Remove the friend declaration of regcache_cpy.
10724         (regcache_cpy): Remove declaration.
10725
10726 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10727
10728         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10729         parameter type to 'readable_regcache *'.
10730         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10731         * arm-tdep.c (arm_neon_quad_read): Likewise.
10732         (arm_pseudo_read): Likewise.
10733         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10734         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10735         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10736         * gdbarch.c: Re-generated.
10737         * gdbarch.h: Re-generated.
10738         * gdbarch.sh (pseudo_register_read): Change parameter type to
10739         'readable_regcache *'.
10740         (pseudo_register_read_value): Likewise.
10741         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10742         (h8300_pseudo_register_read): Likewise.
10743         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10744         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10745         (i386_pseudo_register_read_into_value): Likewise.
10746         (i386_pseudo_register_read_value): Likewise.
10747         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10748         declaration.
10749         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10750         * m32c-tdep.c (m32c_raw_read): Likewise.
10751         (m32c_read_flg): Likewise.
10752         (m32c_banked_register): Likewise.
10753         (m32c_banked_read): Likewise.
10754         (m32c_sb_read): Likewise.
10755         (m32c_part_read): Likewise.
10756         (m32c_cat_read): Likewise.
10757         (m32c_r3r2r1r0_read): Likewise.
10758         (m32c_pseudo_register_read): Likewise.
10759         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10760         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10761         (mep_pseudo_cr64_read): Likewise.
10762         (mep_pseudo_register_read): Likewise.
10763         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10764         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10765         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10766         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10767         (regcache::cooked_read): Likewise.
10768         (regcache::cooked_read_value): Likewise.
10769         (regcache_cooked_read_signed):
10770         (regcache::cooked_read): Likewise.
10771         * regcache.h (readable_regcache): New class.
10772         (regcache): Inherit readable_regcache.  Move some methods to
10773         readable_regcache.
10774         * rl78-tdep.c (rl78_pseudo_register_read): Change
10775         parameter type to 'readable_regcache *'.
10776         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10777         (e500_pseudo_register_read): Change parameter type to
10778         'readable_regcache *'.
10779         (dfp_pseudo_register_read): Likewise.
10780         (vsx_pseudo_register_read): Likewise.
10781         (efpr_pseudo_register_read): Likewise.
10782         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10783         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10784         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10785         (sh64_pseudo_register_read): Likewise.
10786         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10787         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10788         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10789         (spu_pseudo_register_read): Likewise.
10790         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10791         (xtensa_pseudo_register_read): Likewise.
10792
10793 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10794
10795         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10796         (regcache::arch): Move it to reg_buffer::arch.
10797         (regcache::register_buffer): Likewise.
10798         (regcache::assert_regnum): Likewise.
10799         (regcache::num_raw_registers): Likewise.
10800         * regcache.h (reg_buffer): New class.
10801         (regcache): Inherit reg_buffer.
10802
10803 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10804
10805         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10806         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10807
10808 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10809
10810         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10811
10812 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10813
10814         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10815         (SFILES): Remove common/*.c files.
10816         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10817         * common/common.host: Add common reference.
10818         * configure.ac: Likewise.
10819         * configure: Regenerate.
10820
10821 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10822
10823         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10824         (block_initialize_namespace): Use new.
10825         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10826         (dwarf2_free_objfile): Use delete.
10827         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10828         (copy_type_recursive): Use new.
10829         * gdb_obstack.h (allocate_on_obstack): New.
10830
10831 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10832
10833         PR gdb/22849
10834         * inferior.c (exit_inferior_1): Reset inf->control.
10835
10836 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10837
10838         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10839         declaration.
10840
10841 2018-02-14  Pedro Alves  <palves@redhat.com>
10842
10843         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10844         frame_cleanup_after_sniffer on exception.
10845
10846 2018-02-14  Tom Tromey  <tom@tromey.com>
10847
10848         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10849         const.
10850         (solib_bfd_open): Make pathname const.
10851         * solib.c (solib_bfd_open): Make pathname const.
10852         * solib-spu.c (spu_bfd_fopen): Make name const.
10853         (spu_bfd_open): Make pathname const.
10854         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10855         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10856
10857 2018-02-14  Tom Tromey  <tom@tromey.com>
10858
10859         * symfile.c (symfile_bfd_open): Update.
10860         * source.h (openp, source_full_path_of, find_and_open_source):
10861         Change argument type to unique_xmalloc_ptr.
10862         * source.c (openp): Take a unique_xmalloc_ptr.
10863         (source_full_path_of, find_and_open_source): Likewise.
10864         (open_source_file, symtab_to_fullname): Update.
10865         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10866         unique_xmalloc_ptr.
10867         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10868         (exec_file_find): Update.
10869         * psymtab.c (psymtab_to_fullname): Update.
10870         * nto-tdep.h (nto_find_and_open_solib): Update.
10871         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10872         unique_xmalloc_ptr.
10873         * exec.c (exec_file_attach): Update.
10874         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10875         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10876
10877 2018-02-14  Tom Tromey  <tom@tromey.com>
10878
10879         * solib.c: Include source.h.
10880         * nto-tdep.c: Include source.h.
10881         * mi/mi-cmd-env.c: Include source.h.
10882         * infcmd.c: Include source.h.
10883         * exec.c: Include source.h.
10884         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10885         (add_path, directory_switch, source_path, init_source_path): Move
10886         declarations...
10887         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10888         (add_path, directory_switch, source_path, init_source_path):
10889         ...here.
10890
10891 2018-02-14  Tom Tromey  <tom@tromey.com>
10892
10893         * solist.h (exec_file_find, solib_find): Return
10894         unique_xmalloc_ptr.
10895         (solib_bfd_fopen): Take a const char *.
10896         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10897         (exec_file_find, solib_find): Likewise.
10898         (solib_bfd_fopen): Do not take ownership of "pathname".
10899         (solib_bfd_open): Use unique_xmalloc_ptr.
10900         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10901         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10902         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10903         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10904
10905 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10906
10907         * ada-lang.c (name_match_type_from_name): Remove reference to
10908         ada_name_for_lookup in function's documentation.
10909         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10910
10911 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10912
10913         * defs.h (enum openp_flags): New enum.
10914         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10915         Move to enum openp_flags.
10916         (openp_flags): New enum flags.
10917         (openp): Change parameter type to openp_flags.
10918         * source.c (openp): Change parameter type to openp_flags.
10919         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10920         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10921
10922 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10923
10924         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10925         per-command.
10926
10927 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10928
10929         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10930         into...
10931         (class dwarf2_queue_guard): ...the destructor of this new class.
10932         (dw2_do_instantiate_symtab): Create instance of the new class
10933         dwarf2_queue_guard, remove cleanup.
10934
10935 2018-02-09  Tom Tromey  <tom@tromey.com>
10936
10937         * source.c (find_source_lines): Don't reference past the end of
10938         the vector.
10939
10940 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10941
10942         * remote.c (remote_btrace_maybe_reopen): Change error message.
10943         * btrace.c (btrace_enable): Likewise.
10944         (parse_xml_btrace): Likewise.
10945         (parse_xml_btrace_conf): Likewise.
10946
10947 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10948
10949         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10950         (linux_enable_pt, linux_enable_bts): Call
10951         diagnose_perf_event_open_fail.
10952
10953 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10954
10955         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10956         Remove parameter and change return type.  Update callers.  Move it.
10957         (linux_enable_bts, linux_enable_pt): Improve error message.
10958         (linux_enable_pt): Remove zero buffer size check.
10959         (linux_enable_btrace): Improve error messages.  Remove NULL return
10960         check.
10961
10962 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10963
10964         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10965         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10966         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10967         (linux_supports_pt, linux_supports_btrace): Remove.
10968         (linux_enable_bts): Call cpu_supports_bts.
10969         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10970         * remote.c (remote_supports_btrace): Remove.
10971         (init_remote_ops): Remove remote_supports_btrace.
10972         * target-delegates.c: Regenerated.
10973         * target.c (target_supports_btrace): Remove.
10974         * target.h (target_ops) <to_supports_btrace>: Remove
10975         (target_supports_btrace): Remove.
10976         * x86-linux-nat.c (x86_linux_create_target): Remove
10977         linux_supports_btrace.
10978
10979 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10980
10981         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10982         btrace failed.
10983         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10984         exception and use message in own exception.
10985
10986 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10987
10988         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10989         (perf_event_pt_event_type): Use gdb_file_up.
10990         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10991         scoped_fd, and scoped_mmap.
10992
10993 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10994
10995         * common/scoped_mmap.h: New.
10996         * unittests/scoped_mmap-selftest.c: New.
10997         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10998         unittests/scoped_mmap-selftest.c.
10999
11000 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11001
11002         * common/scoped_fd.h: New.
11003         * unittests/scoped_fd-selftest.c: New.
11004         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11005         unittests/scoped_fd-selftest.c.
11006
11007 2018-02-09  Tom Tromey  <tom@tromey.com>
11008
11009         * auto-load.c (auto_load_section_scripts): Use
11010         gdb::unique_xmalloc_ptr.
11011
11012 2018-02-09  Tom Tromey  <tom@tromey.com>
11013
11014         * auto-load.c (execute_script_contents): Use std::string.
11015
11016 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11017
11018         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11019         Python function, rather than a new command.
11020
11021 2018-02-08  Tom Tromey  <tom@tromey.com>
11022
11023         * solib.c (solib_find_1): Use std::string.
11024         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11025
11026 2018-02-08  Tom Tromey  <tom@tromey.com>
11027
11028         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11029
11030 2018-02-08  Tom Tromey  <tom@tromey.com>
11031
11032         * source.c (find_source_lines): Use gdb::def_vector.
11033
11034 2018-02-08  Tom Tromey  <tom@tromey.com>
11035
11036         * macrocmd.c (struct temporary_macro_definition): New.
11037         (macro_define_command): Use temporary_macro_definition.  Remove
11038         cleanups.
11039         (free_macro_definition_ptr): Remove.
11040
11041 2018-02-08  Tom Tromey  <tom@tromey.com>
11042
11043         * macroexp.c (maybe_expand): Use std::string.
11044
11045 2018-02-08  Tom Tromey  <tom@tromey.com>
11046
11047         * macroexp.c (struct macro_buffer): Add initializers for some
11048         members.
11049         (init_buffer, init_shared_buffer, free_buffer)
11050         (free_buffer_return_text): Remove.
11051         (macro_buffer): New constructors.
11052         (~macro_buffer): New destructor.
11053         (macro_buffer::set_shared): New method.
11054         (macro_buffer::resize_buffer, macro_buffer::appendc)
11055         (macro_buffer::appendmem): Now methods, not free functions.
11056         (set_token, append_tokens_without_splicing, stringify)
11057         (macro_stringify): Update.
11058         (gather_arguments): Change return type.  Remove argc_p argument,
11059         add args_ptr argument.  Use std::vector.
11060         (substitute_args): Remove argc argument.  Accept std::vector.
11061         (expand): Update.  Use std::vector.
11062         (scan, macro_expand, macro_expand_next): Update.
11063
11064 2018-02-08  Tom Tromey  <tom@tromey.com>
11065
11066         * symtab.c (default_collect_symbol_completion_matches_break_on):
11067         Use unique_xmalloc_ptr.
11068         * macroscope.h: (sal_macro_scope, user_macro_scope)
11069         (default_macro_scope): Return unique_xmalloc_ptr.
11070         * macroscope.c (sal_macro_scope, user_macro_scope)
11071         (default_macro_scope): Return unique_xmalloc_ptr.
11072         * macroexp.h (macro_expand, macro_expand_once): Return
11073         unique_xmalloc_ptr.
11074         * macroexp.c (macro_expand, macro_expand_once): Return
11075         unique_xmalloc_ptr.
11076         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11077         (info_macro_command, info_macros_command): Use
11078         unique_xmalloc_ptr.
11079         * compile/compile-c-support.c (write_macro_definitions): Use
11080         unique_xmalloc_ptr.
11081         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11082
11083 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11084
11085         * value.c (value_static_field): Assign field type instead of
11086         containing type when returning an optimized out value.
11087
11088 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11089
11090         * ft32-tdep.c (ft32_read_pc): Remove.
11091         (ft32_write_pc): Remove.
11092         (ft32_gdbarch_init): Update.
11093         * m32r-tdep.c (m32r_read_pc): Remove.
11094         (m32r_gdbarch_init): Update.
11095         * mep-tdep.c (mep_read_pc): Remove.
11096         (mep_gdbarch_init): Update.
11097         * microblaze-tdep.c (microblaze_write_pc): Remove.
11098         (microblaze_gdbarch_init): Update.
11099         * mn10300-tdep.c (mn10300_read_pc): Remove.
11100         (mn10300_write_pc): Remove.
11101         (mn10300_gdbarch_init): Update.
11102         * moxie-tdep.c (moxie_read_pc): Remove.
11103         (moxie_write_pc): Remove.
11104         (moxie_gdbarch_init): Update.
11105
11106 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11107
11108         * expprint.c (print_subexp_standard): Handle
11109         OP_F77_UNDETERMINED_ARGLIST.
11110         (dump_subexp_body_standard): Likewise.
11111
11112 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11113
11114         * target-descriptions.c (tdesc_element_visitor) Add empty
11115         implementations.
11116         (tdesc_type): Move make_gdb_type from here.
11117         (tdesc_type_builtin): Likewise.
11118         (tdesc_type_vector): Likewise.
11119         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11120         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11121         (make_gdb_type_union): Likewise.
11122         (make_gdb_type_flags): Likewise.
11123         (make_gdb_type_enum): Likewise.
11124         (make_gdb_type): New function.
11125         (tdesc_register_type): Use static make_gdb_type.
11126
11127 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11128
11129         * infcmd.c (default_print_one_register_info): Align natural-format
11130         column values consistently one under another.
11131         (pad_to_column): New function.
11132
11133 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11134
11135         * dwarf2read.c (dwarf2_physname): Move commment.
11136
11137 2018-02-01  Leszek Swirski  <leszeks@google.com>
11138
11139         * varobj.c (varobj_formatted_print_options): Allow recursive
11140         pretty printing if pretty printing is enabled.
11141
11142 2018-02-01  Leszek Swirski  <leszeks@google.com>
11143
11144         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11145         names after a structop as a filename.
11146
11147 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11148
11149         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11150         (arm_record_coproc_data_proc): Likewise.
11151
11152 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11153
11154         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11155
11156 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11157
11158         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11159         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11160
11161 2018-01-31  Pedro Alves  <palves@redhat.com>
11162
11163         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11164         * inflow.c (child_terminal_save_inferior): Wrap reference to
11165         tcgetpgrp in HAVE_TERMIOS_H.
11166         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11167         _WIN32.
11168         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11169         always iterate over all inferiors.
11170         (gdbsim_cntrl_c): Adjust.
11171         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11172
11173 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11174
11175         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11176         index type is objfile-owned if the element type is as well.
11177
11178 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11179
11180         GDB 8.1 released.
11181
11182 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11183
11184         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11185         "features/s390x-linux64.c".
11186         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11187         s390_linux32 and s390x_linux64.
11188         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11189         default tdesc.
11190         * s390-tdep.c: Include "features/s390-linux32.c" and
11191         "features/s390x-linux64.c".
11192         (s390_tdesc_valid): Add check for tdesc_has_registers.
11193         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11194         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11195         tdesc_s390x_linux64.
11196         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11197         tdesc_s390x_linux64 to...
11198         * s390-tdep.h: ...here.
11199
11200 2018-01-30  Pedro Alves  <palves@redhat.com>
11201
11202         PR gdb/13211
11203         * config.in, configure: Regenerate.
11204         * configure.ac: Check for getpgid.
11205         * go32-nat.c (go32_pass_ctrlc): New.
11206         (go32_target): Install it.
11207         * inf-child.c (inf_child_target): Install
11208         child_terminal_save_inferior, child_pass_ctrlc and
11209         child_interrupt.
11210         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11211         (inf_ptrace_target): No longer install it.
11212         * infcmd.c (interrupt_target_1): Adjust.
11213         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11214         (child_interrupt): Declare.
11215         (inferior::terminal_state): New.
11216         * inflow.c (struct terminal_info): Update comments.
11217         (inferior_process_group): Delete.
11218         (terminal_is_ours): Delete.
11219         (gdb_tty_state): New.
11220         (child_terminal_init): Adjust.
11221         (is_gdb_terminal, sharing_input_terminal_1)
11222         (sharing_input_terminal): New functions.
11223         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11224         Set the process's actual process group in the foreground if
11225         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11226         mark terminal as the inferior's if not sharing GDB's terminal.
11227         Don't check attach_flag.
11228         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11229         pass down a target_terminal_state.
11230         (child_terminal_save_inferior): New, factored out from ...
11231         (child_terminal_ours_1): ... this.  Handle
11232         target_terminal_state::is_ours_for_output.
11233         (child_interrupt, child_pass_ctrlc): New.
11234         (inflow_inferior_exit): Clear the inferior's terminal_state.
11235         (copy_terminal_info): Copy the inferior's terminal state.
11236         (_initialize_inflow): Remove reference to terminal_is_ours.
11237         * inflow.h (inferior_process_group): Delete.
11238         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11239         * procfs.c (procfs_target): Don't install procfs_interrupt.
11240         (procfs_interrupt): Delete.
11241         * remote.c (remote_serial_quit_handler): Adjust.
11242         (remote_interrupt): Remove ptid parameter.  Adjust.
11243         * target-delegates.c: Regenerate.
11244         * target.c: Include "terminal.h".
11245         (target_terminal::terminal_state): Rename to ...
11246         (target_terminal::m_terminal_state): ... this.
11247         (target_terminal::init): Adjust.
11248         (target_terminal::inferior): Adjust to per-inferior
11249         terminal_state.
11250         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11251         (target_terminal::ours, target_terminal::ours_for_output): Use
11252         target_terminal_is_ours_kind.
11253         (target_interrupt): Remove ptid parameter.  Adjust.
11254         (default_target_pass_ctrlc): Adjust.
11255         * target.h (target_ops::to_terminal_save_inferior): New field.
11256         (target_ops::to_interrupt): Remove ptid_t parameter.
11257         (target_interrupt): Remove ptid_t parameter.  Update comment.
11258         (target_pass_ctrlc): Update comment.
11259         * target/target.h (target_terminal_state): New scoped enum,
11260         factored out of ...
11261         (target_terminal::terminal_state): ... here.
11262         (target_terminal::inferior): Update comments.
11263         (target_terminal::restore_inferior): New.
11264         (target_terminal::is_inferior, target_terminal::is_ours)
11265         (target_terminal::is_ours_for_output): Adjust.
11266         (target_terminal::scoped_restore_terminal_state): Adjust to
11267         rename, and call restore_inferior() instead of inferior().
11268         (target_terminal::scoped_restore_terminal_state::m_state): Change
11269         type.
11270         (target_terminal::terminal_state): Rename to ...
11271         (target_terminal::m_terminal_state): ... this and change type.
11272
11273 2018-01-30  Pedro Alves  <palves@redhat.com>
11274
11275         * linux-nat.c (wait_for_signal): New function.
11276         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11277         directly.
11278         (async_terminal_is_ours)
11279         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11280         (linux_nat_add_target): Don't override
11281         to_terminal_inferior/to_terminal_ours.
11282
11283 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11284
11285         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11286
11287 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11288
11289         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11290         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11291         dwarf2_per_objfile_free here.
11292         (dwarf2_per_objfile_free): Remove.
11293         (_initialize_dwarf2_read): Don't register
11294         dwarf2_per_objfile_free as a registry cleanup.
11295
11296 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11297
11298         Avoid compilation errors in MinGW native builds
11299
11300         The error is triggered by including python-internal.h, and the
11301         error message is:
11302
11303              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11304                       from build-gnulib/import/math.h:27,
11305                       from d:/usr/Python26/include/pyport.h:235,
11306                       from d:/usr/Python26/include/Python.h:58,
11307                       from python/python-internal.h:94,
11308                       from python/py-arch.c:24:
11309              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11310         using ::hypot;
11311                 ^~~~~
11312
11313         This happens because Python headers define 'hypot' to expand t
11314         '_hypot' in the Windows builds.
11315         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11316         'hypoth'.  This avoids a compilation error.
11317
11318 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11319
11320         * MAINTAINERS (Write After Approval): Fix ordering.
11321
11322 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11323
11324         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11325
11326 2018-01-26  Alan Modra  <amodra@gmail.com>
11327
11328         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11329         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11330         Remove nop.  Make const.  Comment.
11331         (powerpc32_plt_stub_so_2): New.
11332         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11333         Correct count.  Update uses.
11334         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11335         Move common code reading PLT entry word.  Correct
11336         powerpc32_plt_stub PLT address calculation.
11337         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11338         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11339         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11340         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11341         (ppc64_standard_linkage8): Likewise.
11342         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11343         Correct insns description.
11344         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11345
11346 2018-01-24  Pedro Alves  <palves@redhat.com>
11347
11348         GCC PR libstdc++/83906
11349         * gdbtypes.c (operator==(const dynamic_prop &,
11350         const dynamic_prop &)): New.
11351         (operator==(const range_bounds &, const range_bounds &)): New.
11352         (check_types_equal): Use them instead of memcmp.
11353         * gdbtypes.h (operator==(const dynamic_prop &,
11354         const dynamic_prop &)): Declare.
11355         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11356         (operator==(const range_bounds &, const range_bounds &)): Declare.
11357         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11358
11359 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11360
11361         * s390-linux-tdep.c (s390_record_address_mask)
11362         (s390_record_calc_disp_common, s390_record_calc_disp)
11363         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11364         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11365         (s390_process_record): Move to s390-tdep.c.
11366         (s390_linux_init_abi_any): Adjust.
11367         * s390-tdep.c (s390_record_address_mask)
11368         (s390_record_calc_disp_common, s390_record_calc_disp)
11369         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11370         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11371         (s390_process_record): Moved from s390-linux-tdep.c
11372         (s390_gdbarch_init): Adjust.
11373
11374 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11375
11376         * s390-linux-nat.c (s390-tdep.h): New include.
11377         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11378         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11379         (ALLDEPFILES): Add s390-tdep.c.
11380         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11381         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11382         * s390-tdep.h: ...this.  New file.
11383         * s390-linux-tdep.c (s390-tdep.h): New include.
11384         (_initialize_s390_tdep): Rename to...
11385         (_initialize_s390_linux_tdep): ...this and adjust.
11386         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11387         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11388         s390-tdep.h.
11389         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11390         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11391         (s390_is_partial_instruction, s390_software_single_step)
11392         (is_non_branch_ril, s390_displaced_step_copy_insn)
11393         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11394         (s390_prologue_data, s390_addr, s390_store, s390_load)
11395         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11396         (s390_register_call_saved, s390_guess_tracepoint_registers)
11397         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11398         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11399         (s390_pseudo_register_name, s390_pseudo_register_type)
11400         (s390_pseudo_register_read, s390_pseudo_register_write)
11401         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11402         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11403         (s390_addr_bits_remove, s390_address_class_type_flags)
11404         (s390_address_class_type_flags_to_name)
11405         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11406         (s390_function_arg_float, s390_function_arg_vector)
11407         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11408         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11409         (s390_frame_align, s390_register_return_value, s390_return_value)
11410         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11411         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11412         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11413         (s390_trad_frame_prev_register, s390_unwind_cache)
11414         (s390_prologue_frame_unwind_cache)
11415         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11416         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11417         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11418         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11419         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11420         (s390_frame_base_address, s390_local_base_address)
11421         (s390_frame_base, s390_gcc_target_options)
11422         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11423         (s390_validate_reg_range, s390_tdesc_valid)
11424         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11425         * s390-tdep.c: ...this.  New file.
11426
11427 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11428
11429         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11430         (s390_process_record, s390_gdbarch_tdep_alloc)
11431         (s390_linux_init_abi_any): Use/set new hook.
11432
11433 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11434
11435         * s390-linux-tdep.c (osabi.h): New include.
11436         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11437         (s390_linux_init_abi_any): New functions.
11438         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11439
11440 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11441
11442         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11443         tdesc_has_registers check
11444
11445 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11446
11447         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11448         (s390_validate_reg_range): New macro.
11449         (s390_gdbarch_init): Adjust.
11450
11451 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11452
11453         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11454         (s390_gdbarch_tdep_alloc): Adjust.
11455         (s390_gdbarch_init): Adjust.
11456
11457 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11458
11459         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11460         <have_tdb>: Change type to bool.
11461         (s390_gdbarch_tdep_alloc): Adjust.
11462         (s390_gdbarch_init): Adjust.
11463
11464 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11465
11466         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11467         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11468         (s390_gdbarch_tdep_alloc): New function.
11469         (s390_gdbarch_init): Allocate tdep at start and use its fields
11470         instead of separate variables.
11471
11472 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11473
11474         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11475         when looking for cached gdbarch and add comment for remaining.
11476
11477 2018-01-22  Pedro Alves  <palves@redhat.com>
11478             Sergio Durigan Junior  <sergiodj@redhat.com>
11479
11480         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11481         case.
11482
11483 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11484
11485         * MAINTAINERS: Update my company e-mail address.
11486
11487 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11488
11489         * regcache.c (cooked_write_test): New function.
11490         (_initialize_regcache): Register the test.
11491
11492 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11493
11494         * ia64-tdep.c (ia64_pseudo_register_read): Call
11495         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11496         * m32c-tdep.c (m32c_cat_read): Likewise.
11497         (m32c_r3r2r1r0_read): Likewise.
11498         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11499         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11500
11501 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11502
11503         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11504         method raw_read instead of regcache_raw_read.
11505         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11506         * arm-tdep.c (arm_neon_quad_read): Likewise.
11507         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11508         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11509         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11510         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11511         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11512         (i386_pseudo_register_read_into_value): Likewise.
11513         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11514         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11515         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11516         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11517         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11518         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11519         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11520         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11521         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11522
11523 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11524
11525         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11526         * configure.tgt: Remove target mt.
11527         * mt-tdep.c: Remove.
11528         * regcache.c (cooked_read_test): Remove the check for mt.
11529
11530 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11531
11532         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11533         instead of gdbarch_pseudo_register_read_value.
11534
11535 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11536
11537         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11538         language is Ada.
11539
11540 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11541
11542         * linespec.c (create_sals_line_offset): Remove code that preserved
11543         the symtab_and_line's line number.
11544
11545 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11546
11547         * varobj.c (varobj_create): Don't set valid_block when creating a
11548         floating varobj.
11549
11550 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11551
11552         * varobj.c (varobj_create): Remove out of date comment.
11553
11554 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11555
11556         PR mi/20395
11557         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11558         updating innermost block.
11559         * parse.c (innermost_block_tracker::update): Take extra type
11560         parameter, and check types match before updating innermost block.
11561         (write_dollar_variable): Update innermost block for registers.
11562         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11563         (innermost_block_tracker::innermost_block_tracker): Initialise
11564         m_types member.
11565         (innermost_block_tracker::reset): Take type parameter.
11566         (innermost_block_tracker::update): Take type parameter, and pass
11567         type through as needed.
11568         (innermost_block_tracker::m_types): New member.
11569         * varobj.c (varobj_create): Pass type when reseting innermost
11570         block.
11571
11572 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11573
11574         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11575         * ada-lang.c (resolve_subexp): Likewise.
11576         * breakpoint.c (set_breakpoint_condition) Likewise.
11577         (watch_command_1) Likewise.
11578         * c-exp.y (variable): Likewise.
11579         * d-exp.y (PrimaryExpression): Likewise.
11580         * f-exp.y (variable): Likewise.
11581         * go-exp.y (variable): Likewise.
11582         * m2-exp.y (variable): Likewise.
11583         * objfiles.c (objfile::~objfile): Likewise.
11584         * p-exp.y (variable): Likewise.
11585         * parse.c (innermost_block): Change type.
11586         * parser-defs.h (class innermost_block_tracker): New.
11587         (innermost_block): Change to innermost_block_tracker.
11588         * printcmd.c (display_command): Switch to innermost_block API.
11589         (do_one_display): Likewise.
11590         * rust-exp.y (do_one_display): Likewise.
11591         * symfile.c (clear_symtab_users): Likewise.
11592         * varobj.c (varobj_create): Switch to innermost_block API, replace
11593         use of innermost_block with block stored on varobj object.
11594
11595 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11596
11597         * expression.h (innermost_block): Remove declaration.
11598         * varobj.c: Add 'parser-defs.h' include.
11599
11600 2018-01-19  Tom Tromey  <tom@tromey.com>
11601
11602         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11603         symbols in the static and global blocks.
11604
11605 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11606
11607         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11608         gdb_ptrace.h, and move including gdb_wait.h ...
11609         * nat/linux-ptrace.h: ... to here.
11610
11611 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11612
11613         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11614         inf_ptrace_detach_success.
11615         (inf_ptrace_detach_success): Add inferior parameter, use it
11616         instead of inferior_ptid, pass it to detach_inferior.
11617         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11618         parameter.
11619         * inferior.c (detach_inferior): Add overload that takes an
11620         inferior object.
11621         * inferior.h (detach_inferior): Likewise.
11622         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11623         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11624         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11625
11626 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11627
11628         * target.h (struct target_ops) <to_detach>: Add inferior
11629         parameter.
11630         (target_detach): Likewise.
11631         * target.c (dispose_inferior): Pass inferior down.
11632         (target_detach): Pass inferior down.  Assert that it is equal to
11633         the current inferior.
11634         * aix-thread.c (aix_thread_detach): Pass inferior down.
11635         * corefile.c (core_file_command): Pass current_inferior() down.
11636         * corelow.c (core_detach): Add inferior parameter.
11637         * darwin-nat.c (darwin_detach): Likewise.
11638         * gnu-nat.c (gnu_detach): Likewise.
11639         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11640         * infcmd.c (detach_command): Pass current_inferior() down to
11641         target_detach.
11642         * infrun.c (follow_fork_inferior): Pass parent_inf to
11643         target_detach.
11644         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11645         target_detach.
11646         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11647         * linux-thread-db.c (thread_db_detach): Likewise.
11648         * nto-procfs.c (procfs_detach): Likewise.
11649         * procfs.c (procfs_detach): Likewise.
11650         * record.c (record_detach): Likewise.
11651         * record.h (struct inferior): Forward-declare.
11652         (record_detach): Add inferior parameter.
11653         * remote-sim.c (gdbsim_detach): Likewise.
11654         * remote.c (remote_detach_1): Likewise.
11655         (remote_detach): Likewise.
11656         (extended_remote_detach): Likewise.
11657         * sol-thread.c (sol_thread_detach): Likewise.
11658         * target-debug.h (target_debug_print_inferior_p): New macro.
11659         * target-delegates.c: Re-generate.
11660         * top.c (kill_or_detach): Pass inferior down to target_detach.
11661         * windows-nat.c (windows_detach): Add inferior parameter.
11662
11663 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11664
11665         * target.h (struct target_ops) <to_detach>: Remove args
11666         parameter.
11667         (target_detach): Likewise.
11668         * target.c (dispose_inferior): Adjust.
11669         (target_detach): Remove args parameter, adjust.
11670         * aix-thread.c (aix_thread_detach): Adjust.
11671         * corefile.c (core_file_command): Adjust.
11672         * corelow.c (core_detach): Adjust.
11673         * darwin-nat.c (darwin_detach): Adjust.
11674         * gnu-nat.c (gnu_detach): Adjust.
11675         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11676         * infcmd.c (detach_command): Adjust
11677         * infrun.c (follow_fork_inferior): Adjust.
11678         (handle_vfork_child_exec_or_exit): Adjust.
11679         * linux-fork.c (linux_fork_detach): Remove args parameter.
11680         * linux-fork.h (linux_fork_detach): Likewise.
11681         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11682         * linux-thread-db.c (thread_db_detach): Likewise.
11683         * nto-procfs.c (procfs_detach): Likewise.
11684         * procfs.c (procfs_detach): Likewise.
11685         (do_detach): Remove signo parameter.
11686         * record.c (record_detach): Remove args parameter.
11687         * record.h (record_detach): Likewise.
11688         * remote-sim.c (gdbsim_detach): Likewise.
11689         * remote.c (remote_detach_1): Likewise.
11690         (remote_detach): Likewise.
11691         (extended_remote_detach): Likewise.
11692         * sol-thread.c (sol_thread_detach): Likewise.
11693         * target-delegates.c: Re-generate.
11694         * top.c (struct qt_args) <args>: Remove field.
11695         (kill_or_detach): Don't pass args.
11696         (quit_force): Don't set args.
11697         * windows-nat.c (windows_detach): Remove args parameter.
11698
11699 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11700
11701         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11702         (arm_linux_init_abi): Install it.
11703
11704 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11705
11706         * osabi.c (gdb_osabi_names): Extend the regexp for
11707         arm-linux-gnueabihf.
11708
11709 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11710
11711         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11712         m_abbrevs.
11713         (abbrev_table::add_abbrev): Update.
11714         (abbrev_table::lookup_abbrev): Update.
11715
11716 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11717
11718         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11719
11720 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11721
11722         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11723         to "std::string".
11724
11725 2018-01-17  Tom Tromey  <tom@tromey.com>
11726
11727         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11728
11729 2018-01-17  Tom Tromey  <tom@tromey.com>
11730
11731         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11732         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11733         (create_array_type_with_stride): Update.
11734         * dwarf2read.c (set_die_type): Update.
11735
11736 2018-01-17  Tom Tromey  <tom@tromey.com>
11737
11738         * dwarf2read.c (delayed_method_info): Remove typedef.
11739         (dwarf2_cu::method_info): Now a std::vector.
11740         (add_to_method_list): Update.
11741         (free_delayed_list): Remove.
11742         (compute_delayed_physnames): Update.
11743         (process_full_comp_unit, process_full_type_unit): Clear the method
11744         list.  Remove cleanups.
11745         (psymtab_include_file_name): Add name_holder parameter.  Use
11746         unique_xmalloc_ptr.
11747         (dwarf_decode_lines): Update.
11748
11749 2018-01-17  Tom Tromey  <tom@tromey.com>
11750             Simon Marchi  <simon.marchi@ericsson.com>
11751
11752         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11753         (dwarf2_per_objfile::free_cached_comp_units)
11754         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11755         (init_cutu_and_read_dies_no_follow): Update.
11756         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11757         (dwarf2_cu::~dwarf2_cu): New.
11758         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11759         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11760
11761 2018-01-17  Tom Tromey  <tom@tromey.com>
11762             Simon Marchi  <simon.marchi@ericsson.com>
11763
11764         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11765         (struct die_reader_specs) <abbrev_table>: New member.
11766         (struct abbrev_table): Add constructor.
11767         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11768         <abbrev_obstack>: Now an auto_obstack.
11769         (abbrev_table_up): New typedef.
11770         (init_cu_die_reader): Add abbrev_table parameter.
11771         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11772         Add result_dwo_abbrev_table.
11773         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11774         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11775         Update.
11776         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11777         parameter.
11778         (skip_children): Update.
11779         (abbrev_table::alloc_abbrev): Rename from
11780         abbrev_table_alloc_abbrev.
11781         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11782         (abbrev_table::lookup_abbrev): Rename from
11783         abbrev_table_lookup_abbrev.
11784         (abbrev_table_read_table): Return abbrev_table_up.
11785         (abbrev_table_free, abbrev_table_free_cleanup)
11786         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11787         (load_partial_dies): Update.
11788
11789 2018-01-17  Tom Tromey  <tom@tromey.com>
11790
11791         * dwarf2read.c (dwarf2_compute_name): Update comment.
11792         (read_func_scope, read_variable): Update.
11793         (new_symbol): Remove.
11794         (new_symbol_full): Rename to new_symbol.
11795
11796 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11797
11798         PR gdb/16577
11799         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11800         a warning instead of throwing an error, set section size to 0 and return
11801         NULL.
11802         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11803
11804 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11805
11806         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11807         std::string.
11808         (linux_ptrace_attach_fail_reason_string): Likewise.
11809         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11810         Likewise.
11811         (linux_ptrace_attach_fail_reason_string): Likewise.
11812         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11813
11814 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11815
11816         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11817
11818 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11819
11820         PR gdb/21559
11821         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11822         checking for fs_base/gs_base fields in struct user_regs_struct.
11823         * configure: Regenerate.
11824
11825 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11826
11827         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11828         function.
11829         (aarch64_linux_init_abi): Install it to gdbarch hook
11830         gcc_target_options.
11831
11832 2018-01-15  Pedro Alves  <palves@redhat.com>
11833
11834         * common/signals-state-save-restore.c
11835         (save_original_signals_state): Fix typos.
11836
11837 2017-01-12  Tom Tromey  <tom@tromey.com>
11838             Sergio Durigan Junior  <sergiodj@redhat.com>
11839
11840         * Makefile.in (install-only): Install gdb-add-index.
11841
11842 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11843
11844         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11845
11846 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11847
11848         * infrun.c (keep_going_pass_signal): Clear step-over info when
11849         insert_breakpoints fails.
11850
11851 2018-01-11  Pedro Alves  <palves@redhat.com>
11852
11853         PR gdb/22583
11854         * infrun.c (resume): Rename to ...
11855         (resume_1): ... this.
11856         (resume): Reimplement as wrapper around resume_1.
11857
11858 2018-01-11  Pedro Alves  <palves@redhat.com>
11859
11860         PR remote/22597
11861         * remote.c (remote_parse_stop_reply): Default to the last-set
11862         general thread instead of to 'magic_null_ptid'.
11863
11864 2018-01-10  Pedro Alves  <palves@redhat.com>
11865
11866         * language.h (language_get_symbol_name_matcher): Rename ...
11867         (get_symbol_name_matcher): ... this.
11868         * language.c (language_get_symbol_name_matcher): Ditto.
11869         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11870         callers adjusted.
11871
11872 2018-01-10  Pedro Alves  <palves@redhat.com>
11873
11874         PR gdb/22670
11875         * dwarf2read.c
11876         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11877         Adjust to use language_get_symbol_name_matcher instead of
11878         language_defn::la_get_symbol_name_matcher.
11879         * language.c (language_get_symbol_name_matcher): If in Ada mode
11880         and the lookup name is a verbatim match, return Ada's matcher.
11881         * language.h (language_get_symbol_name_matcher): Adjust comment.
11882         (ada_lookup_name_info::verbatim_p):: New method.
11883
11884 2018-01-10  Pedro Alves  <palves@redhat.com>
11885
11886         PR gdb/22670
11887         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11888         minsym's language is language_auto or language_cplus, pass down
11889         language_ada instead.
11890         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11891
11892 2018-01-10  Pedro Alves  <palves@redhat.com>
11893
11894         PR gdb/22670
11895         * minsyms.c (linkage_name_str): New function.
11896         (iterate_over_minimal_symbols): Use it.
11897
11898 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11899
11900         * NEWS: Document that 'info proc' now works on FreeBSD.
11901
11902 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11903
11904         * configure.ac: Check for kinfo_getfile in libutil.
11905         * configure: Regenerate.
11906         * config.in: Regenerate.
11907         * fbsd-nat.c: Include "fbsd-tdep.h".
11908         (fbsd_fetch_cmdline): New.
11909         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11910         rather than calling error.
11911         (fbsd_info_proc): New.
11912         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11913         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11914         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11915
11916 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11917
11918         * fbsd-nat.c (struct free_deleter): Remove.
11919         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11920
11921 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11922
11923         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11924         NULL for an empty pathname.
11925
11926 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11927
11928         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11929         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11930         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11931         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11932         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11933         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11934         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11935         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11936         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11937         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11938         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11939         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11940         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11941         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11942         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11943
11944 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11945
11946         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11947         (gnu_xfer_auxv): New function.
11948         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11949         TARGET_OBJECT_AUXV.
11950
11951 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11952             Simon Marchi  <simon.marchi@ericsson.com>
11953
11954         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11955         common/selftest.c.
11956         (COMMON_OBS): Remove selftest.o.
11957         * configure.ac: Append selftest-arch.c and common/selftest.c to
11958         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11959         * configure: Re-generated.
11960         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11961         GDB_SELF_TEST.
11962         (maintenance_info_selftests): Likewise.
11963
11964 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11965
11966         * ada-valprint.c (val_print_packed_array_elements): Use
11967         proper number of elements when printing an array indexed
11968         by an enumeration type.
11969
11970 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11971
11972         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11973         (dw2_get_file_names_reader): Adjust.
11974         (lookup_dwo_signatured_type): Adjust.
11975         (lookup_dwp_signatured_type): Adjust.
11976         (lookup_signatured_type): Adjust.
11977         (create_type_unit_group): Adjust.
11978         (get_type_unit_group): Adjust.
11979         (process_psymtab_comp_unit_reader): Adjust.
11980         (build_type_psymtabs_reader): Adjust.
11981         (scan_partial_symbols): Adjust.
11982         (add_partial_symbol): Adjust.
11983         (add_partial_subprogram): Adjust.
11984         (peek_die_abbrev): Adjust.
11985         (fixup_go_packaging): Adjust.
11986         (process_imported_unit_die): Adjust.
11987         (dwarf2_compute_name): Adjust.
11988         (dwarf2_physname): Adjust.
11989         (read_import_statement): Adjust.
11990         (handle_DW_AT_stmt_list): Adjust.
11991         (read_file_scope): Adjust.
11992         (read_func_scope): Adjust.
11993         (read_lexical_block_scope): Adjust.
11994         (read_call_site_scope): Adjust.
11995         (read_variable): Adjust.
11996         (dwarf2_rnglists_process): Adjust.
11997         (dwarf2_ranges_process): Adjust.
11998         (dwarf2_ranges_read): Adjust.
11999         (dwarf2_get_pc_bounds): Adjust.
12000         (dwarf2_record_block_ranges): Adjust.
12001         (dwarf2_add_field): Adjust.
12002         (dwarf2_add_member_fn): Adjust.
12003         (read_structure_type): Adjust.
12004         (process_structure_scope): Adjust.
12005         (read_enumeration_type): Adjust.
12006         (read_array_type): Adjust.
12007         (mark_common_block_symbol_computed): Adjust.
12008         (read_common_block): Adjust.
12009         (read_namespace_type): Adjust.
12010         (read_namespace): Adjust.
12011         (read_module_type): Adjust.
12012         (read_tag_pointer_type): Adjust.
12013         (read_tag_ptr_to_member_type): Adjust.
12014         (read_tag_string_type): Adjust.
12015         (read_subroutine_type): Adjust.
12016         (read_typedef): Adjust.
12017         (read_base_type): Adjust.
12018         (attr_to_dynamic_prop): Adjust.
12019         (read_subrange_type): Adjust.
12020         (read_unspecified_type): Adjust.
12021         (dwarf2_read_abbrevs): Adjust.
12022         (load_partial_dies): Adjust.
12023         (read_partial_die): Adjust.
12024         (find_partial_die): Adjust.
12025         (guess_partial_die_structure_name): Adjust.
12026         (fixup_partial_die): Adjust.
12027         (read_attribute_value): Adjust.
12028         (read_addr_index): Adjust.
12029         (read_addr_index_from_leb128): Adjust.
12030         (read_str_index): Adjust.
12031         (dwarf2_string_attr): Adjust.
12032         (get_debug_line_section): Adjust.
12033         (dwarf_decode_line_header): Adjust.
12034         (lnp_state_machine::check_line_address): Adjust.
12035         (dwarf_decode_lines_1): Adjust.
12036         (dwarf_decode_lines): Adjust.
12037         (dwarf2_start_symtab): Adjust.
12038         (var_decode_location): Adjust.
12039         (new_symbol_full): Adjust.
12040         (dwarf2_const_value_data): Adjust.
12041         (dwarf2_const_value_attr): Adjust.
12042         (dwarf2_const_value): Adjust.
12043         (die_type): Adjust.
12044         (die_containing_type): Adjust.
12045         (build_error_marker_type): Adjust.
12046         (lookup_die_type): Adjust.
12047         (guess_full_die_structure_name): Adjust.
12048         (anonymous_struct_prefix): Adjust.
12049         (determine_prefix): Adjust.
12050         (dwarf2_name): Adjust.
12051         (follow_die_ref_or_sig): Adjust.
12052         (follow_die_offset): Adjust.
12053         (follow_die_ref): Adjust.
12054         (follow_die_sig_1): Adjust.
12055         (follow_die_sig): Adjust.
12056         (get_signatured_type): Adjust.
12057         (get_DW_AT_signature_type): Adjust.
12058         (decode_locdesc): Adjust.
12059         (dwarf_decode_macros): Adjust.
12060         (cu_debug_loc_section): Adjust.
12061         (fill_in_loclist_baton): Adjust.
12062         (dwarf2_symbol_mark_computed): Adjust.
12063         (init_one_comp_unit): Don't assign
12064         dwarf2_cu::dwarf2_per_objfile.
12065         (set_die_type): Adjust.
12066
12067 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12068
12069         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12070         <dwarf2_per_objfile>: New field.
12071         (dwarf2_per_objfile): Remove global.
12072         (get_dwarf2_per_objfile): New function.
12073         (set_dwarf2_per_objfile): New function.
12074         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12075         dwarf2_per_objfile.
12076         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12077         (read_abbrev_offset): Likewise.
12078         (read_indirect_string): Likewise.
12079         (read_indirect_line_string): Likewise.
12080         (read_indirect_string_at_offset): Likewise.
12081         (read_indirect_string_from_dwz): Likewise.
12082         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12083         dwarf2_per_objfile.
12084         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12085         (create_all_comp_units): Change objfile parameter to
12086         dwarf2_per_objfile.
12087         (create_all_type_units): Likewise.
12088         (process_queue): Add dwarf2_per_objfile parameter.
12089         (read_and_check_comp_unit_head): Likewise.
12090         (lookup_dwo_unit_in_dwp): Likewise.
12091         (get_dwp_file): Likewise.
12092         (process_cu_includes): Likewise.
12093         (struct free_dwo_file_cleanup_data): New struct.
12094         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12095         set_dwarf2_per_objfile.
12096         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12097         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12098         context, adjust calls.
12099         (dw2_instantiate_symtab): Likewise.
12100         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12101         (dw2_get_cu): Likewise.
12102         (create_cu_from_index_list): Change objfile parameter to
12103         dwarf2_per_objfile.
12104         (create_cus_from_index_list): Get dwarf2_per_objfile from
12105         context, adjust calls.
12106         (create_cus_from_index): Likewise.
12107         (create_signatured_type_table_from_index): Change objfile
12108         parameter to dwarf2_per_objfile.
12109         (create_signatured_type_table_from_debug_names): Change objfile
12110         parameter to dwarf2_per_objfile.
12111         (create_addrmap_from_index): Likewise.
12112         (create_addrmap_from_aranges): Likewise.
12113         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12114         (dw2_setup): Remove.
12115         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12116         context.
12117         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12118         get_dwarf2_per_objfile.
12119         (dw2_forget_cached_source_info): Likewise.
12120         (dw2_map_symtabs_matching_filename): Likewise.
12121         (struct dw2_symtab_iterator) <index>: Remove.
12122         <dwarf2_per_objfile>: New field.
12123         (dw2_symtab_iter_init): Replace index parameter with
12124         dwarf2_per_objfile.
12125         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12126         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12127         (dw2_print_stats): Likewise.
12128         (dw2_dump): Likewise.
12129         (dw2_expand_symtabs_for_function): Likewise.
12130         (dw2_expand_all_symtabs): Likewise.
12131         (dw2_expand_symtabs_with_fullname): Likewise.
12132         (dw2_expand_marked_cus): Replace index and objfile parameters
12133         with dwarf2_per_objfile.
12134         (dw_expand_symtabs_matching_file_matcher): Add
12135         dwarf2_per_objfile parameter and adjust calls.
12136         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12137         adjust calls.
12138         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12139         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12140         adjust calls.
12141         (create_cus_from_debug_names_list): Replace objfile parameter
12142         with dwarf2_per_objfile and adjust calls.
12143         (create_cus_from_debug_names): Likewise.
12144         (dwarf2_read_debug_names): Likewise.
12145         (mapped_debug_names::namei_to_name): Adjust call.
12146         (dw2_debug_names_iterator::next): Likewise.
12147         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12148         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12149         (dw2_debug_names_dump): Likewise.
12150         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12151         (dw2_debug_names_expand_symtabs_matching): Likewise.
12152         (dwarf2_initialize_objfile): Likewise.
12153         (dwarf2_build_psymtabs): Likewise.
12154         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12155         this_cu.
12156         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12157         (read_and_check_comp_unit_head): Likewise.
12158         (read_abbrev_offset): Likewise.
12159         (create_debug_type_hash_table): Likewise.
12160         (create_debug_types_hash_table): Likewise.
12161         (create_all_type_units): Replace objfile parameter with
12162         dwarf2_per_objfile.
12163         (add_type_unit): Add dwarf2_per_objfile parameter.
12164         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12165         with dwarf2_per_objfile.
12166         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12167         (lookup_dwp_signatured_type): Likewise.
12168         (lookup_signatured_type): Likewise.
12169         (read_cutu_die_from_dwo): Likewise.
12170         (init_tu_and_read_dwo_dies): Likewise.
12171         (init_cutu_and_read_dies): Likewise.
12172         (init_cutu_and_read_dies_no_follow): Likewise.
12173         (allocate_type_unit_groups_table): Add objfile parameter.
12174         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12175         (get_type_unit_group): Likewise.
12176         (process_psymtab_comp_unit): Update call.
12177         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12178         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12179         (print_tu_stats): Likewise.
12180         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12181         in void* parameter.
12182         (build_type_psymtabs): Change objfile parameter to
12183         dwarf2_per_objfile.
12184         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12185         passed in void* parameter.
12186         (process_skeletonless_type_units): Change objfile parameter to
12187         dwarf2_per_objfile.
12188         (set_partial_user): Likewise.
12189         (dwarf2_build_psymtabs_hard): Likewise.
12190         (read_comp_units_from_section): Likewise.
12191         (create_all_comp_units): Likewise.
12192         (scan_partial_symbols): Update calls.
12193         (add_partial_symbol): Likewise.
12194         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12195         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12196         (process_queue): Add dwarf2_per_objfile parameter.
12197         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12198         (compute_compunit_symtab_includes): Likewise.
12199         (process_cu_includes): Add dwarf2_per_objfile parameter.
12200         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12201         (process_full_type_unit): Likewise.
12202         (process_imported_unit_die): Update call.
12203         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12204         (read_file_scope): Likewise.
12205         (allocate_dwo_file_hash_table): Add objfile parameter.
12206         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12207         (create_cus_hash_table): Likewise.
12208         (create_dwp_hash_table): Likewise.
12209         (create_dwo_unit_in_dwp_v1): Likewise.
12210         (create_dwp_v2_section): Likewise.
12211         (create_dwo_unit_in_dwp_v2): Likewise.
12212         (lookup_dwo_unit_in_dwp): Likewise.
12213         (try_open_dwop_file): Likewise.
12214         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12215         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12216         cleanup to include a reference to dwarf2_per_objfile.
12217         (open_dwp_file): Add dwarf2_per_objfile parameter.
12218         (open_and_init_dwp_file): Likewise.
12219         (get_dwp_file): Likewise.
12220         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12221         (queue_and_load_all_dwo_tus): Update call.
12222         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12223         data.
12224         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12225         (dwarf2_ranges_process): Likewise.
12226         (dwarf2_get_pc_bounds): Likewise.
12227         (mark_common_block_symbol_computed): Likewise.
12228         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12229         (dwarf2_read_abbrevs): Update call.
12230         (read_partial_die): Use dwarf2_per_objfile from cu.
12231         (find_partial_die): Likewise.
12232         (fixup_partial_die): Likewise.
12233         (read_attribute_value): Likewise.
12234         (read_indirect_string_at_offset_from): Add objfile parameter.
12235         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12236         parameter.
12237         (read_indirect_string_from_dwz): Add objfile parameter.
12238         (read_indirect_string): Add objfile parameter.
12239         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12240         (read_addr_index): Use dwarf2_per_objfile from cu.
12241         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12242         call dw2_setup.
12243         (read_str_index): Use dwarf2_per_objfile from cu.
12244         (get_debug_line_section): Likewise.
12245         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12246         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12247         (new_symbol_full): Use dwarf2_per_objfile from cu.
12248         (build_error_marker_type): Likewise.
12249         (lookup_die_type): Likewise.
12250         (determine_prefix): Likewise.
12251         (follow_die_offset): Likewise.
12252         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12253         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12254         (dwarf2_fetch_die_type_sect_off): Likewise.
12255         (dwarf2_get_die_type): Likewise.
12256         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12257         (get_signatured_type): Likewise.
12258         (get_DW_AT_signature_type): Likewise.
12259         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12260         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12261         (cu_debug_loc_section): Likewise.
12262         (fill_in_loclist_baton): Likewise.
12263         (dwarf2_symbol_mark_computed): Likewise.
12264         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12265         dwarf2_per_objfile.
12266         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12267         parameter.
12268         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12269         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12270         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12271         (set_die_type): Use dwarf2_free_objfile from cu.
12272         (get_die_type_at_offset): Likewise.
12273         (dwarf2_per_objfile_free): Don't assign global variable.
12274         (debug_names) <constructor>: Add dwarf2_per_objfile
12275         parameter, update m_debugstrlookup construction.
12276         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12277         parameter.
12278         <m_dwarf2_per_objfile>: New field.
12279         <lookup>: Use m_dwarf2_per_objfile.
12280         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12281         (psyms_seen_size): Likewise.
12282         (write_gdbindex): Replace objfile parameter with
12283         dwarf2_per_objfile.
12284         (write_debug_names): Likewise.
12285         (write_psymtabs_to_index): Likewise.
12286         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12287         calls.
12288
12289 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12290
12291         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12292         <dwarf2_per_objfile>: New field.
12293         (struct dwarf2_per_cu_data) <objfile>: Remove.
12294         <dwarf2_per_objfile>: New field.
12295         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12296         of objfile.
12297         (create_signatured_type_table_from_index): Likewise.
12298         (create_debug_type_hash_table): Likewise.
12299         (fill_in_sig_entry_from_dwo_entry): Likewise.
12300         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12301         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12302         objfile.
12303         (create_partial_symtab): Access objfile through
12304         dwarf2_per_objfile.
12305         (process_psymtab_comp_unit_reader): Likewise.
12306         (read_comp_units_from_section): Likewise.
12307         (scan_partial_symbols): Likewise.
12308         (add_partial_symbol): Likewise.
12309         (add_partial_subprogram): Likewise.
12310         (peek_die_abbrev): Likewise.
12311         (fixup_go_packaging): Likewise.
12312         (process_full_comp_unit): Likewise.
12313         (process_full_type_unit): Likewise.
12314         (process_imported_unit_die): Likewise.
12315         (dwarf2_compute_name): Likewise.
12316         (dwarf2_physname): Likewise.
12317         (read_import_statement): Likewise.
12318         (create_cus_hash_table): Assign dwarf2_physname instead of
12319         objfile.
12320         (read_func_scope): Access objfile through dwarf2_per_objfile.
12321         (read_lexical_block_scope): Likewise.
12322         (read_call_site_scope): Likewise.
12323         (read_variable): Likewise.
12324         (dwarf2_rnglists_process): Likewise.
12325         (dwarf2_ranges_process): Likewise.
12326         (dwarf2_ranges_read): Likewise.
12327         (dwarf2_record_block_ranges): Likewise.
12328         (dwarf2_add_field): Likewise.
12329         (dwarf2_add_member_fn): Likewise.
12330         (read_structure_type): Likewise.
12331         (process_structure_scope): Likewise.
12332         (read_enumeration_type): Likewise.
12333         (read_array_type): Likewise.
12334         (read_common_block): Likewise.
12335         (read_namespace_type): Likewise.
12336         (read_namespace): Likewise.
12337         (read_module_type): Likewise.
12338         (read_tag_pointer_type): Likewise.
12339         (read_tag_ptr_to_member_type): Likewise.
12340         (read_tag_string_type): Likewise.
12341         (read_subroutine_type): Likewise.
12342         (read_typedef): Likewise.
12343         (read_base_type): Likewise.
12344         (attr_to_dynamic_prop): Likewise.
12345         (read_subrange_type): Likewise.
12346         (read_unspecified_type): Likewise.
12347         (load_partial_dies): Likewise.
12348         (read_partial_die): Likewise.
12349         (find_partial_die): Likewise.
12350         (guess_partial_die_structure_name): Likewise.
12351         (fixup_partial_die): Likewise.
12352         (read_attribute_value): Likewise.
12353         (read_addr_index_from_leb128): Likewise.
12354         (dwarf2_read_addr_index): Likewise.
12355         (dwarf2_string_attr): Likewise.
12356         (lnp_state_machine::check_line_address): Likewise.
12357         (dwarf_decode_lines_1): Likewise.
12358         (dwarf_decode_lines): Likewise.
12359         (dwarf2_start_symtab): Likewise.
12360         (var_decode_location): Likewise.
12361         (new_symbol_full): Likewise.
12362         (dwarf2_const_value_data): Likewise.
12363         (dwarf2_const_value_attr): Likewise.
12364         (dwarf2_const_value): Likewise.
12365         (die_type): Likewise.
12366         (die_containing_type): Likewise.
12367         (lookup_die_type): Likewise.
12368         (guess_full_die_structure_name): Likewise.
12369         (anonymous_struct_prefix): Likewise.
12370         (dwarf2_name): Likewise.
12371         (follow_die_ref_or_sig): Likewise.
12372         (follow_die_offset): Likewise.
12373         (follow_die_ref): Likewise.
12374         (dwarf2_fetch_die_loc_sect_off): Likewise.
12375         (dwarf2_fetch_constant_bytes): Likewise.
12376         (dwarf2_fetch_die_type_sect_off): Likewise.
12377         (dwarf2_get_die_type): Likewise.
12378         (follow_die_sig): Likewise.
12379         (decode_locdesc): Likewise.
12380         (dwarf2_per_cu_objfile): Likewise.
12381         (dwarf2_per_cu_text_offset): Likewise.
12382         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12383         objfile.
12384         (set_die_type): Access objfile through
12385         dwarf2_per_objfile.
12386
12387 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12388
12389         * valprint.c (converted_character_d): Remove typedef.
12390         (DEF_VEC_O (converted_character_d)): Remove.
12391         (count_next_character): Use std::vector.
12392         (print_converted_chars_to_obstack): Likewise.
12393         (generic_printstr): Likewise.
12394
12395 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12396
12397         * xml-support.h (struct gdb_xml_value): Add constructor.
12398         <value>: Change type to unique_xmalloc_ptr.
12399         (gdb_xml_value_s): Remove typedef.
12400         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12401         (gdb_xml_element_start_handler): Change parameter type to
12402         std::vector.
12403         (xml_find_attribute): Likewise.
12404         * xml-support.c (xml_find_attribute): Change parameter type to
12405         std::vector and adjust.
12406         (gdb_xml_values_cleanup): Remove.
12407         (gdb_xml_parser::start_element): Adjust to std::vector.
12408         (xinclude_start_include): Change paraeter type to std::vector
12409         and adjust.
12410         * btrace.c (check_xml_btrace_version): Likewise.
12411         (parse_xml_btrace_block): Likewise.
12412         (parse_xml_btrace_pt_config_cpu): Likewise.
12413         (parse_xml_btrace_pt): Likewise.
12414         (parse_xml_btrace_conf_bts): Likewise.
12415         (parse_xml_btrace_conf_pt): Likewise.
12416         * memory-map.c (memory_map_start_memory): Likewise.
12417         (memory_map_start_property): Likewise.
12418         * osdata.c (osdata_start_osdata): Likewise.
12419         (osdata_start_item): Likewise.
12420         (osdata_start_column): Likewise.
12421         * remote.c (start_thread): Likewise.
12422         * solib-aix.c (library_list_start_library): Likewise.
12423         (library_list_start_list): Likewise.
12424         * solib-svr4.c (library_list_start_library): Likewise.
12425         (svr4_library_list_start_list): Likewise.
12426         * solib-target.c (library_list_start_segment): Likewise.
12427         (library_list_start_section): Likewise.
12428         (library_list_start_library): Likewise.
12429         (library_list_start_list): Likewise.
12430         * tracepoint.c (traceframe_info_start_memory): Likewise.
12431         (traceframe_info_start_tvar): Likewise.
12432         * xml-syscall.c (syscall_start_syscall): Likewise.
12433         * xml-tdesc.c (tdesc_start_target): Likewise.
12434         (tdesc_start_feature): Likewise.
12435         (tdesc_start_reg): Likewise.
12436         (tdesc_start_union): Likewise.
12437         (tdesc_start_struct): Likewise.
12438         (tdesc_start_flags): Likewise.
12439         (tdesc_start_enum): Likewise.
12440         (tdesc_start_field): Likewise.
12441         (tdesc_start_enum_value): Likewise.
12442         (tdesc_start_vector): Likewise.
12443
12444 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12445
12446         * extension.h (struct xmethod_worker) <clone>: Remove.
12447         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12448         Remove.
12449         (python_xmethod_worker::clone): Remove.
12450         * valops.c (find_overload_match): Use std::move instead of
12451         clone.
12452
12453 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12454
12455         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12456         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12457         <free_xmethod_worker_data>: Remove.
12458         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12459         <get_xmethod_arg_types>: Remove.
12460         <get_xmethod_result_type>: Remove.
12461         <invoke_xmethod>: Remove.
12462         * extension.c (new_xmethod_worker): Remove.
12463         (clone_xmethod_worker): Remove.
12464         (get_matching_xmethod_workers): Return void, pass std::vector by
12465         pointer.
12466         (get_xmethod_arg_types): Rename to...
12467         (xmethod_worker::get_arg_types): ... this, and adjust.
12468         (get_xmethod_result_type): Rename to...
12469         (xmethod_worker::get_result_type): ... this, and adjust.
12470         (invoke_xmethod): Remove.
12471         (free_xmethod_worker): Remove.
12472         (free_xmethod_worker_vec): Remove.
12473         * extension.h (enum ext_lang_rc): Move here from
12474         extension-priv.h.
12475         (struct xmethod_worker): Add constructor and destructor.
12476         <data>: Remove.
12477         <value>: Remove.
12478         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12479         virtual pure methods.
12480         <get_arg_types, get_result_type>: New methods.
12481         (xmethod_worker_ptr): Remove typedef.
12482         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12483         (xmethod_worker_vec): Remove typedef.
12484         (xmethod_worker_up): New typedef.
12485         (invoke_xmethod): Remove.
12486         (clone_xmethod_worker): Remove.
12487         (free_xmethod_worker): Remove.
12488         (free_xmethod_worker_vec): Remove.
12489         (get_xmethod_arg_types): Remove.
12490         (get_xmethod_result_type): Remove.
12491         * valops.c (find_method_list): Use std::vector, don't use
12492         intermediate vector.
12493         (value_find_oload_method_list): Use std::vector.
12494         (find_overload_match): Use std::vector.
12495         (find_oload_champ): Use std::vector.
12496         * value.c (value_free): Use operator delete.
12497         (value_of_xmethod): Rename to...
12498         (value_from_xmethod): ... this.  Don't assign
12499         xmethod_worker::value, take rvalue-reference.
12500         (result_type_of_xmethod): Adjust.
12501         (call_xmethod): Adjust.
12502         * value.h: Include extension.h.
12503         (struct xmethod_worker): Don't forward-declare.
12504         (value_of_xmethod): Rename to...
12505         (value_from_xmethod): ... this, take rvalue-reference.
12506         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12507         (struct python_xmethod_worker): ... this, add constructor and
12508         destructor.
12509         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12510         (gdbpy_free_xmethod_worker_data): Rename to...
12511         (python_xmethod_worker::~python_xmethod_worker): ... this and
12512         adjust.
12513         (gdbpy_clone_xmethod_worker_data): Rename to...
12514         (python_xmethod_worker::clone): ... this and adjust.
12515         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12516         temporary vector.
12517         (gdbpy_get_xmethod_arg_types): Rename to...
12518         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12519         (gdbpy_get_xmethod_result_type): Rename to...
12520         (python_xmethod_worker::do_get_result_type): ... this and
12521         adjust.
12522         (gdbpy_invoke_xmethod): Rename to...
12523         (python_xmethod_worker::invoke): ... this and adjust.
12524         (new_python_xmethod_worker): Rename to...
12525         (python_xmethod_worker::python_xmethod_worker): ... this and
12526         adjust.
12527         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12528         Remove.
12529         (gdbpy_free_xmethod_worker_data): Remove.
12530         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12531         (gdbpy_get_xmethod_arg_types): Remove.
12532         (gdbpy_get_xmethod_result_type): Remove.
12533         (gdbpy_invoke_xmethod): Remove.
12534         * python/python.c (python_extension_ops): Remove obsolete
12535         callbacks.
12536
12537 2018-01-05  Pedro Alves  <palves@redhat.com>
12538
12539         PR gdb/18653
12540         * common/signals-state-save-restore.c
12541         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12542         find a custom handler preinstalled, instead of internal erroring.
12543         But only warn if !quiet.
12544         * common/signals-state-save-restore.h
12545         (save_original_signals_state): New parameter 'quiet'.
12546         * main.c (captured_main_1): Move save_original_signals_state call
12547         after option handling, and pass QUIET.
12548
12549 2018-01-05  Pedro Alves  <palves@redhat.com>
12550
12551         * spu-tdep.c (spu_catch_start): Pass
12552         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12553
12554 2018-01-05  Pedro Alves  <palves@redhat.com>
12555
12556         PR gdb/22670
12557         * ada-lang.c (literal_symbol_name_matcher): New function.
12558         (ada_get_symbol_name_matcher): Use it for
12559         symbol_name_match_type::SEARCH_NAME.
12560         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12561         it down instead of assuming symbol_name_match_type::FULL.
12562         * block.h (block_lookup_symbol): New parameter 'match_type'.
12563         * c-valprint.c (print_unpacked_pointer): Use
12564         lookup_symbol_search_name instead of lookup_symbol.
12565         * compile/compile-object-load.c (get_out_value_type): Pass down
12566         symbol_name_match_type::SEARCH_NAME.
12567         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12568         symbol_name_match_type::FULL.
12569         * cp-support.c (cp_get_symbol_name_matcher): Handle
12570         symbol_name_match_type::SEARCH_NAME.
12571         * infrun.c (insert_exception_resume_breakpoint): Use
12572         lookup_symbol_search_name.
12573         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12574         * psymtab.c (maintenance_check_psymtabs): Use
12575         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12576         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12577         SYMBOL_SEARCH_NAME.
12578         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12579         if symbol_name_match_type::SEARCH_NAME.
12580         (lookup_symbol_in_language): Pass down
12581         symbol_name_match_type::FULL.
12582         (lookup_symbol_search_name): New.
12583         (lookup_language_this): Pass down
12584         symbol_name_match_type::SEARCH_NAME.
12585         (lookup_symbol_aux, lookup_local_symbol): New parameter
12586         'match_type'.  Pass it down.
12587         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12588         (lookup_symbol_search_name): New declaration.
12589         (lookup_symbol_in_block): New 'match_type' parameter.
12590
12591 2018-01-05  Pedro Alves  <palves@redhat.com>
12592
12593         PR gdb/22670
12594         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12595         ada_lookup_symbol.
12596         (ada_lookup_symbol): Reimplement in terms of
12597         ada_lookup_symbol_list, bits factored out from
12598         ada_lookup_encoded_symbol.
12599
12600 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12601
12602         * ada-exp.y (write_object_renaming): When subscripting an array
12603         using a symbol as the index, pass the block in call to
12604         ada_lookup_encoded_symbol when looking that symbol up.
12605
12606 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12607
12608         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12609         TYPE_INDEX_TYPE.
12610
12611 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12612
12613         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12614         the case where VALUE_LVAL (val0) is not lval_memory.
12615
12616 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12617
12618         * ada-valprint.c (print_optional_low_bound): Handle
12619         character-indexed array printing like boolean-indexed array
12620         printing.
12621
12622 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12623
12624         * NEWS: Create a new section for the next release branch.
12625         Rename the section of the current branch, now that it has
12626         been cut.
12627
12628 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12629
12630         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12631         * version.in: Bump version to 8.1.50.DATE-git.
12632
12633 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12634
12635         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12636         Add field.
12637         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12638         Add field.
12639         (default_exception_support_info) <catch_handlers_sym>: Add field.
12640         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12641         (ada_exception_name_addr_1): Add "catch handlers" handling.
12642         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12643         Update all callers.
12644         (create_excep_cond_exprs) <ex>: Add parameter.
12645         (re_set_exception): Update create_excep_cond_exprs call.
12646         (print_it_exception, print_one_exception, print_mention_exception)
12647         (print_recreate_exception): Add "catch handler" handling.
12648         (allocate_location_catch_handlers, re_set_catch_handlers)
12649         (check_status_catch_handlers, print_it_catch_handlers)
12650         (print_one_catch_handlers, print_mention_catch_handlers)
12651         (print_recreate_catch_handlers): New function.
12652         (catch_handlers_breakpoint_ops): New variable.
12653         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12654         Add parameter.  Add "catch handler" handling.
12655         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12656         Add "catch handler" handling.
12657         (ada_exception_catchpoint_cond_string): Add "catch handler"
12658         handling.
12659         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12660         call.
12661         (catch_ada_handlers_command): New function.
12662         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12663         operations structure.
12664         (_initialize_ada_language): Add "catch handlers" command entry.
12665         * NEWS: Document "catch handlers" feature.
12666
12667 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12668
12669         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12670         account when creating the array type of the slice.
12671         (ada_value_slice): Likewise.
12672
12673 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12674
12675         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12676         New enum value.
12677         (create_array_type_with_stride): Add byte_stride_prop parameter.
12678         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12679         New parameter.  Update all callers in this file.
12680         (array_type_has_dynamic_stride): New function.
12681         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12682         of arrays with dynamic byte strides.
12683         * dwarf2read.c (read_array_type): Add support for dynamic
12684         DW_AT_byte_stride attributes.
12685
12686 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12687
12688         * dwarf2read.c (read_unspecified_type): Treat
12689         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12690
12691 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12692
12693         Update copyright year range in all GDB files.
12694
12695 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12696
12697         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12698         and gdb/testsuite/gdb.base/step-line.c.
12699
12700 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12701
12702         * copyright.py (main): Dump the contents of
12703         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12704         even if BY_HAND is empty.
12705
12706 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12707
12708         * top.c (print_gdb_version): Update Copyright year in version
12709         message.
12710
12711 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12712
12713         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12714
12715 For older changes see ChangeLog-2017.
12716 \f
12717 Local Variables:
12718 mode: change-log
12719 left-margin: 8
12720 fill-column: 74
12721 version-control: never
12722 coding: utf-8
12723 End: