Remove unnecessary casts from cli-cmds.c
[external/binutils.git] / gdb / ChangeLog
1 2018-09-05  Tom Tromey  <tom@tromey.com>
2
3         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4
5 2018-09-05  Tom de Vries  <tdevries@suse.de>
6
7         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
8         with resolve_abstract_p == true.
9         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
10         defaulting to false. Propagate resolve_abstract_p to
11         dwarf2_fetch_die_loc_sect_off.
12         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
13         parameter, defaulting to false.
14         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
15         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
16         parameter.
17         * dwarf2read.h (struct die_info): Forward-declare.
18         (die_info_ptr): New typedef.
19         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
20
21 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
22
23         GDB 8.2 released.
24
25 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
26             Pedro Alves  <palves@redhat.com>
27
28         * gnulib/Makefile.in (aclocal_m4_deps): Move to
29         "aclocal-m4-deps.mk".  Include file here.
30         $(srcdir)/aclocal.m4: Add "configure.ac".
31         * gnulib/aclocal-m4-deps.mk: New file.
32         * gnulib/update-gnulib.sh: Automatically update
33         "aclocal-m4-deps.mk".
34
35 2018-09-04  Tom Tromey  <tom@tromey.com>
36
37         * configure: Rebuild.
38         * configure.ac: Remove multi-ice code.
39
40 2018-09-04  Tom Tromey  <tom@tromey.com>
41
42         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
43         (ada-exp.o): Update.
44
45 2018-09-04  Tom Tromey  <tom@tromey.com>
46
47         * Makefile.in (printcmd.o, target-float.o): Remove.
48         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
49
50 2018-09-04  Tom Tromey  <tom@tromey.com>
51
52         * gnulib/Makefile.in: Remove obsolete comment.
53         * Makefile.in: Remove obsolete comment.
54
55 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
56
57         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
58         line with '+'.
59
60 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
61
62         * riscv-tdep.c: Add 'prologue-value.h' include.
63         (struct riscv_unwind_cache): New struct.
64         (riscv_debug_unwinder): New global.
65         (riscv_scan_prologue): Update arguments, capture register details
66         from prologue scan.
67         (riscv_skip_prologue): Reformat arguments line, move end of
68         prologue calculation into riscv_scan_prologue.
69         (riscv_frame_cache): Update return type, create
70         riscv_unwind_cache, scan the prologue, and fill in remaining cache
71         details.
72         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
73         (riscv_frame_prev_register): Use the trad_frame within the
74         riscv_unwind_cache.
75         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
76         flag.
77
78 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
79
80         * trad-frame.h (trad_frame_set_realreg): Declare.
81         (trad_frame_set_addr): Declare.
82         * trad-frame.c (trad_frame_set_realreg): Define new function.
83         (trad_frame_set_addr): Define new function.
84         (trad_frame_set_reg_realreg): Use new function.
85         (trad_frame_set_reg_addr): Use new function.
86
87 2018-09-01  Keith Seitz  <keiths@redhat.com>
88
89         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
90         pulongest instead of "%lld".
91         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
92         ATTRIBUTE_UNUSED.
93
94 2018-08-31  Tom Tromey  <tom@tromey.com>
95
96         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
97         variant part type.
98
99 2018-08-31  Pedro Alves  <palves@redhat.com>
100
101         * gdbarch.h: Regenerate.
102
103 2018-08-31  Pedro Alves  <palves@redhat.com>
104
105         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
106         * target.h (Hardware watchpoint interfaces): Describe
107         continuable/steppable/non-steppable watchpoints.
108         * gdbarch.h, gdbarch.c: Regenerate.
109
110 2018-08-31  Pedro Alves  <palves@redhat.com>
111
112         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
113         Delete.
114         * s390-linux-nat.c
115         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
116         * target.h (target_ops::have_continuable_watchpoint): Delete.
117         (target_have_continuable_watchpoint): Delete.
118         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
119         * target-delegates.c: Regenerate.
120
121 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
122
123         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
124         the files present in "gnulib/import/m4/".
125
126 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
127
128         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
129         c.sw, c.swsp, and c.sdsp.
130
131 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
132
133         * riscv-tdep.c (struct riscv_inferior_data): Delete.
134         (riscv_read_misa_reg): Don't cache value read into inferior data.
135         (riscv_new_inferior_data): Delete.
136         (riscv_inferior_data_cleanup): Delete.
137         (riscv_inferior_data): Delete.
138         (riscv_invalidate_inferior_data): Delete.
139         (_initialize_riscv_tdep): Remove initialisation of inferior data.
140
141 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
142
143         * compile/compile-cplus-types.c
144         (compile_cplus_instance::leave_scope): Take the address of scope
145         object.
146         (compile_cplus_instance::convert_qualified_base): Compare quals
147         to 0.
148
149 2018-08-30  Keith Seitz  <keiths@redhat.com>
150
151         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
152         Use "%s" and host_address_to_string instead of "%p" in printf.
153
154 2018-08-29  Keith Seitz  <keiths@redhat.com>
155
156         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
157         and compile-cplus-types.c.
158         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
159         * c-lang.c (cplus_language_defn): Set C++ compile functions.
160         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
161         Declare.
162         * compile/compile-c-support.c: Include compile-cplus.h.
163         (load_libcompile): Templatize.
164         (get_compile_context): "New" function.
165         (c_get_compile_context): Use get_compile_context.
166         (cplus_get_compile_context): New function.
167         (cplus_push_user_expression, cplus_pop_user_expression)
168         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
169         (cplus_compute_program): Define new structs/functions.
170         * compile/compile-cplus-symmbols.c: New file.
171         * compile/compile-cplus-types.c: New file.
172         * compile/compile-cplus.h: New file.
173         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
174         Declare.
175         * compile/compile-object-load.c (get_out_value_type): Use
176         strncmp_iw when comparing symbol names.
177         (compile_object_load): Add mst_bss and mst_data.
178         * compile/compile.c (_initialize_compile): Remove
179         -Wno-implicit-function-declaration from `compile_args'.
180         * compile/gcc-cp-plugin.h: New file.
181         * NEWS: Mention C++ compile support and new debug options.
182
183 2018-08-29  Keith Seitz  <keiths@redhat.com>
184
185         * linespec.c (collect_info::add_symbol): Make virtual.
186         (struct symbol_searcher_collect_info): New struct.
187         (symbol_searcher::find_all_symbols): New method.
188         * symtab.h (class symbol_searcher): New class.
189
190 2018-08-29  Keith Seitz  <keiths@redhat.com>
191
192         * linespec.c (struct linespec) <function_symbols, label_symbols>:
193         Change to vector of block_symbol.  Update all users.
194         (struct collect_info) <symbols>: Likewise.
195         (collect_info::add_symbol): Take block_symbol as argument.
196         Update all callers.
197         (decode_compound_collector) <m_symbols>: Change type to vector
198         of block_symbol.  Update all users.
199         (decode_compound_collector::operator ()): Change parameter type
200         to block_symbol.
201         (find_method, find_function_symbols, find_linespec_symbols)
202         (find_label_symbols_in_block, find_label_symbols): Change symbol
203         vectors to block_symbol vectors.
204         * symtab.h (symbol_found_callback_ftype): Change parameter type to
205         block_symbol.
206
207 2018-08-29  Keith Seitz  <keiths@redhat.com>
208
209         * linespec.c (symbolp): Remove typedef and VEC definitions.
210         (bound_minimal_symbol_d): Likewise.
211
212 2018-08-29  Keith Seitz  <keiths@redhat.com>
213
214         * linespec.c (decode_compound_collector::decode_compound_collector):
215         Remove initialization for `m_symtabs'.
216         (decode_compound_collector::release_symbols): Change return type
217         to std::vector.  Update all callers.
218         (class decode_compound_collector) <m_symbols>: Change type to
219         std::vector.
220         (lookup_prefix_sym): Change return type to std::vector.  Update all
221         callers.
222         (compare_symbols): Remove.
223         (std_compare_symbols): Rename to `compare_symbols'.
224         (find_method): Change `sym_classes' parameter to std::vector.
225         Update all callers.  Use std::sort to sort sym_classes.
226         (find_linespec_symbols): Remove cleanup.
227
228 2018-08-29  Keith Seitz  <keiths@redhat.com>
229
230         * linespec.c (struct linespec) <minimal_symbols>: Change type to
231         std::vector.  Update all users.
232         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
233         (struct collect_info) <minimal_symbols>: Likewise.
234         (compare_msymbols): Return bool.  Change parameters to const
235         bound_minimal_symbol references.
236         (find_method, find_function_symbols, find_linespec_symbols): Change
237         `minsyms' parameter to std::vector.  Update all callers.
238
239 2018-08-29  Keith Seitz  <keiths@redhat.com>
240
241         * linespec.c (struct linespec) <label_symbols>: Change type to
242         std::vector.  Update all users.
243         (find_label_symbols_in_block): Change `result' parameter to
244         std::vector.  Update all callers.
245         (find_label_symbols): Return std::vector.  Update all callers.
246
247 2018-08-29  Keith Seitz  <keiths@redhat.com>
248
249         * linespec.c (struct linespec) <function_symbols>: Change type to
250         std::vector.  Update all users.
251         (struct collect_info) <function_symbols>: Likewise.
252         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
253         (std_compare_symbols): New function.
254         (find_method, find_function_symbols, find_linespec_symbols)
255         (find_label_symbols_in_block): Change `symbols' parameter to
256         std::vector.  Update all callers.
257         (find_label_symbols): Likewise for `function_symbols' and
258         `label_funcs_ret'.
259
260 2018-08-29  Keith Seitz  <keiths@redhat.com>
261
262         * linespec.c (symtab_vector_up): Define.
263         (struct linespec) <file_symtabs>: Change type to std::vector *.
264         Update all uses.
265         (struct collect_info) <file_symtabs>: Likewise.
266         (collect_symtabs_from_filename): Return symtab_vector_up.
267         Update all callers.
268         (decode_objc): Remove cleanup.
269         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
270         (symtab_collector::release_symtabs): Return symtab_vector_up.
271         Update all callers.
272         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
273         Update all users.
274         (collect_symtabs_from_filename, symtabs_from_filename): Return
275         symtab_vector_up.  Update all callers.
276
277 2018-08-29  Tom Tromey  <tom@tromey.com>
278
279         * csky-tdep.c (csky_analyze_prologue): Use
280         core_addr_to_string_nz.
281
282 2018-08-29  Tom Tromey  <tom@tromey.com>
283
284         * windows-nat.c (struct xlate_exception) <them>: Change type to
285         DWORD.
286         (xlate): Fix formatting.  Remove last entry.
287         (struct xlate_exception, xlate): Comment out.
288         (windows_nat_target::resume): Use ranged for.
289
290 2018-08-29  Jim Wilson  <jimw@sifive.com>
291
292         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
293         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
294         of NT_PRFPREG.
295         (riscv_linux_nat_target::store_registers): Likewise.
296
297 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
298
299         PR gdb/23555
300         PR gdb/23558
301         * gnulib/aclocal.m4: Regenerate.
302         * gnulib/config.in: Regenerate.
303         * gnulib/configure: Regenerate.
304         * gnulib/import/Makefile.am: Update.
305         * gnulib/import/Makefile.in: Update.
306         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
307         * gnulib/import/_Noreturn.h: ... this.
308         * gnulib/import/alloca.in.h: Update.
309         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
310         * gnulib/import/arg-nonnull.h: ... this.
311         * gnulib/import/assure.h: Update.
312         * gnulib/import/at-func.c: Update.
313         * gnulib/import/basename-lgpl.c: Update.
314         * gnulib/import/extra/snippet/c++defs.h: Rename to...
315         * gnulib/import/c++defs.h: ... this.
316         * gnulib/import/canonicalize-lgpl.c: Update.
317         * gnulib/import/cdefs.h: Update.
318         * gnulib/import/chdir-long.c: Update.
319         * gnulib/import/chdir-long.h: Update.
320         * gnulib/import/cloexec.c: Update.
321         * gnulib/import/cloexec.h: Update.
322         * gnulib/import/close.c: Update.
323         * gnulib/import/closedir.c: Update.
324         * gnulib/import/config.charset: Update.
325         * gnulib/import/dirent-private.h: Update.
326         * gnulib/import/dirent.in.h: Update.
327         * gnulib/import/dirfd.c: Update.
328         * gnulib/import/dirname-lgpl.c: Update.
329         * gnulib/import/dirname.h: Update.
330         * gnulib/import/dosname.h: Update.
331         * gnulib/import/dup-safer-flag.c: Update.
332         * gnulib/import/dup-safer.c: Update.
333         * gnulib/import/dup.c: Update.
334         * gnulib/import/dup2.c: Update.
335         * gnulib/import/errno.in.h: Update.
336         * gnulib/import/error.c: Update.
337         * gnulib/import/error.h: Update.
338         * gnulib/import/exitfail.c: Update.
339         * gnulib/import/exitfail.h: Update.
340         * gnulib/import/extra/update-copyright: Update.
341         * gnulib/import/fchdir.c: Update.
342         * gnulib/import/fcntl.c: Update.
343         * gnulib/import/fcntl.in.h: Update.
344         * gnulib/import/fd-hook.c: Update.
345         * gnulib/import/fd-hook.h: Update.
346         * gnulib/import/fd-safer-flag.c: Update.
347         * gnulib/import/fd-safer.c: Update.
348         * gnulib/import/fdopendir.c: Update.
349         * gnulib/import/filename.h: Update.
350         * gnulib/import/filenamecat-lgpl.c: Update.
351         * gnulib/import/filenamecat.h: Update.
352         * gnulib/import/flexmember.h: Update.
353         * gnulib/import/float+.h: Update.
354         * gnulib/import/float.c: Update.
355         * gnulib/import/float.in.h: Update.
356         * gnulib/import/fnmatch.c: Update.
357         * gnulib/import/fnmatch.in.h: Update.
358         * gnulib/import/fnmatch_loop.c: Update.
359         * gnulib/import/fpucw.h: Update.
360         * gnulib/import/frexp.c: Update.
361         * gnulib/import/frexpl.c: Update.
362         * gnulib/import/fstat.c: Update.
363         * gnulib/import/fstatat.c: Update.
364         * gnulib/import/getcwd-lgpl.c: Update.
365         * gnulib/import/getcwd.c: Update.
366         * gnulib/import/getdtablesize.c: Update.
367         * gnulib/import/getlogin_r.c: Update.
368         * gnulib/import/getprogname.c: Update.
369         * gnulib/import/getprogname.h: Update.
370         * gnulib/import/gettext.h: Update.
371         * gnulib/import/gettimeofday.c: Update.
372         * gnulib/import/glob-libc.h: Update.
373         * gnulib/import/glob.c: Update.
374         * gnulib/import/glob.in.h: Update.
375         * gnulib/import/glob_internal.h: Update.
376         * gnulib/import/glob_pattern_p.c: Update.
377         * gnulib/import/globfree.c: Update.
378         * gnulib/import/hard-locale.c: Update.
379         * gnulib/import/hard-locale.h: Update.
380         * gnulib/import/intprops.h: Update.
381         * gnulib/import/inttypes.in.h: Update.
382         * gnulib/import/isnan.c: Update.
383         * gnulib/import/isnand-nolibm.h: Update.
384         * gnulib/import/isnand.c: Update.
385         * gnulib/import/isnanl-nolibm.h: Update.
386         * gnulib/import/isnanl.c: Update.
387         * gnulib/import/itold.c: Update.
388         * gnulib/import/libc-config.h: Update.
389         * gnulib/import/limits.in.h: Update.
390         * gnulib/import/localcharset.c: Update.
391         * gnulib/import/localcharset.h: Update.
392         * gnulib/import/localtime-buffer.c: Update.
393         * gnulib/import/localtime-buffer.h: Update.
394         * gnulib/import/lstat.c: Update.
395         * gnulib/import/m4/00gnulib.m4: Update.
396         * gnulib/import/m4/__inline.m4: Update.
397         * gnulib/import/m4/absolute-header.m4: Update.
398         * gnulib/import/m4/alloca.m4: Update.
399         * gnulib/import/m4/builtin-expect.m4: Update.
400         * gnulib/import/m4/canonicalize.m4: Update.
401         * gnulib/import/m4/chdir-long.m4: Update.
402         * gnulib/import/m4/close.m4: Update.
403         * gnulib/import/m4/closedir.m4: Update.
404         * gnulib/import/m4/configmake.m4: Update.
405         * gnulib/import/m4/d-ino.m4: Update.
406         * gnulib/import/m4/d-type.m4: Update.
407         * gnulib/import/m4/dirent_h.m4: Update.
408         * gnulib/import/m4/dirfd.m4: Update.
409         * gnulib/import/m4/dirname.m4: Update.
410         * gnulib/import/m4/double-slash-root.m4: Update.
411         * gnulib/import/m4/dup.m4: Update.
412         * gnulib/import/m4/dup2.m4: Update.
413         * gnulib/import/m4/eealloc.m4: Update.
414         * gnulib/import/m4/environ.m4: Update.
415         * gnulib/import/m4/errno_h.m4: Update.
416         * gnulib/import/m4/error.m4: Update.
417         * gnulib/import/m4/exponentd.m4: Update.
418         * gnulib/import/m4/exponentl.m4: Update.
419         * gnulib/import/m4/extensions.m4: Update.
420         * gnulib/import/m4/extern-inline.m4: Update.
421         * gnulib/import/m4/fchdir.m4: Update.
422         * gnulib/import/m4/fcntl-o.m4: Update.
423         * gnulib/import/m4/fcntl.m4: Update.
424         * gnulib/import/m4/fcntl_h.m4: Update.
425         * gnulib/import/m4/fdopendir.m4: Update.
426         * gnulib/import/m4/filenamecat.m4: Update.
427         * gnulib/import/m4/flexmember.m4: Update.
428         * gnulib/import/m4/float_h.m4: Update.
429         * gnulib/import/m4/fnmatch.m4: Update.
430         * gnulib/import/m4/fnmatch_h.m4: Update.
431         * gnulib/import/m4/fpieee.m4: Update.
432         * gnulib/import/m4/frexp.m4: Update.
433         * gnulib/import/m4/frexpl.m4: Update.
434         * gnulib/import/m4/fstat.m4: Update.
435         * gnulib/import/m4/fstatat.m4: Update.
436         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
437         * gnulib/import/m4/getcwd-path-max.m4: Update.
438         * gnulib/import/m4/getcwd.m4: Update.
439         * gnulib/import/m4/getdtablesize.m4: Update.
440         * gnulib/import/m4/getlogin.m4: Update.
441         * gnulib/import/m4/getlogin_r.m4: Update.
442         * gnulib/import/m4/getpagesize.m4: Update.
443         * gnulib/import/m4/getprogname.m4: Update.
444         * gnulib/import/m4/gettimeofday.m4: Update.
445         * gnulib/import/m4/glibc21.m4: Update.
446         * gnulib/import/m4/glob.m4: Update.
447         * gnulib/import/m4/glob_h.m4: Update.
448         * gnulib/import/m4/gnulib-cache.m4: Update.
449         * gnulib/import/m4/gnulib-common.m4: Update.
450         * gnulib/import/m4/gnulib-comp.m4: Update.
451         * gnulib/import/m4/gnulib-tool.m4: Update.
452         * gnulib/import/m4/hard-locale.m4: Update.
453         * gnulib/import/m4/include_next.m4: Update.
454         * gnulib/import/m4/inttypes-pri.m4: Update.
455         * gnulib/import/m4/inttypes.m4: Update.
456         * gnulib/import/m4/isnand.m4: Update.
457         * gnulib/import/m4/isnanl.m4: Update.
458         * gnulib/import/m4/largefile.m4: Update.
459         * gnulib/import/m4/limits-h.m4: Update.
460         * gnulib/import/m4/localcharset.m4: Update.
461         * gnulib/import/m4/locale-fr.m4: Update.
462         * gnulib/import/m4/locale-ja.m4: Update.
463         * gnulib/import/m4/locale-zh.m4: Update.
464         * gnulib/import/m4/localtime-buffer.m4: Update.
465         * gnulib/import/m4/longlong.m4: Update.
466         * gnulib/import/m4/lstat.m4: Update.
467         * gnulib/import/m4/malloc.m4: Update.
468         * gnulib/import/m4/malloca.m4: Update.
469         * gnulib/import/m4/math_h.m4: Update.
470         * gnulib/import/m4/mbrtowc.m4: Update.
471         * gnulib/import/m4/mbsinit.m4: Update.
472         * gnulib/import/m4/mbsrtowcs.m4: Update.
473         * gnulib/import/m4/mbstate_t.m4: Update.
474         * gnulib/import/m4/memchr.m4: Update.
475         * gnulib/import/m4/memmem.m4: Update.
476         * gnulib/import/m4/mempcpy.m4: Update.
477         * gnulib/import/m4/memrchr.m4: Update.
478         * gnulib/import/m4/mkdir.m4: Update.
479         * gnulib/import/m4/mkstemp.m4: Update.
480         * gnulib/import/m4/mmap-anon.m4: Update.
481         * gnulib/import/m4/mode_t.m4: Update.
482         * gnulib/import/m4/msvc-inval.m4: Update.
483         * gnulib/import/m4/msvc-nothrow.m4: Update.
484         * gnulib/import/m4/multiarch.m4: Update.
485         * gnulib/import/m4/nocrash.m4: Update.
486         * gnulib/import/m4/off_t.m4: Update.
487         * gnulib/import/m4/onceonly.m4: Update.
488         * gnulib/import/m4/open-cloexec.m4: Update.
489         * gnulib/import/m4/open.m4: Update.
490         * gnulib/import/m4/openat.m4: Update.
491         * gnulib/import/m4/opendir.m4: Update.
492         * gnulib/import/m4/pathmax.m4: Update.
493         * gnulib/import/m4/rawmemchr.m4: Update.
494         * gnulib/import/m4/readdir.m4: Update.
495         * gnulib/import/m4/readlink.m4: Update.
496         * gnulib/import/m4/realloc.m4: Update.
497         * gnulib/import/m4/rename.m4: Update.
498         * gnulib/import/m4/rewinddir.m4: Update.
499         * gnulib/import/m4/rmdir.m4: Update.
500         * gnulib/import/m4/save-cwd.m4: Update.
501         * gnulib/import/m4/secure_getenv.m4: Update.
502         * gnulib/import/m4/setenv.m4: Update.
503         * gnulib/import/m4/signal_h.m4: Update.
504         * gnulib/import/m4/ssize_t.m4: Update.
505         * gnulib/import/m4/stat-time.m4: Update.
506         * gnulib/import/m4/stat.m4: Update.
507         * gnulib/import/m4/std-gnu11.m4: Update.
508         * gnulib/import/m4/stdbool.m4: Update.
509         * gnulib/import/m4/stddef_h.m4: Update.
510         * gnulib/import/m4/stdint.m4: Update.
511         * gnulib/import/m4/stdio_h.m4: Update.
512         * gnulib/import/m4/stdlib_h.m4: Update.
513         * gnulib/import/m4/strchrnul.m4: Update.
514         * gnulib/import/m4/strdup.m4: Update.
515         * gnulib/import/m4/strerror.m4: Update.
516         * gnulib/import/m4/string_h.m4: Update.
517         * gnulib/import/m4/strstr.m4: Update.
518         * gnulib/import/m4/strtok_r.m4: Update.
519         * gnulib/import/m4/sys_socket_h.m4: Update.
520         * gnulib/import/m4/sys_stat_h.m4: Update.
521         * gnulib/import/m4/sys_time_h.m4: Update.
522         * gnulib/import/m4/sys_types_h.m4: Update.
523         * gnulib/import/m4/tempname.m4: Update.
524         * gnulib/import/m4/time_h.m4: Update.
525         * gnulib/import/m4/unistd-safer.m4: Update.
526         * gnulib/import/m4/unistd_h.m4: Update.
527         * gnulib/import/m4/warn-on-use.m4: Update.
528         * gnulib/import/m4/wchar_h.m4: Update.
529         * gnulib/import/m4/wchar_t.m4: Update.
530         * gnulib/import/m4/wctype_h.m4: Update.
531         * gnulib/import/m4/wint_t.m4: Update.
532         * gnulib/import/malloc.c: Update.
533         * gnulib/import/malloc/scratch_buffer.h: Update.
534         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
535         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
536         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
537         * gnulib/import/malloca.c: Update.
538         * gnulib/import/malloca.h: Update.
539         * gnulib/import/malloca.valgrind: Update.
540         * gnulib/import/math.in.h: Update.
541         * gnulib/import/mbrtowc.c: Update.
542         * gnulib/import/mbsinit.c: Update.
543         * gnulib/import/mbsrtowcs-impl.h: Update.
544         * gnulib/import/mbsrtowcs-state.c: Update.
545         * gnulib/import/mbsrtowcs.c: Update.
546         * gnulib/import/memchr.c: Update.
547         * gnulib/import/memmem.c: Update.
548         * gnulib/import/mempcpy.c: Update.
549         * gnulib/import/memrchr.c: Update.
550         * gnulib/import/mkdir.c: Update.
551         * gnulib/import/mkstemp.c: Update.
552         * gnulib/import/msvc-inval.c: Update.
553         * gnulib/import/msvc-inval.h: Update.
554         * gnulib/import/msvc-nothrow.c: Update.
555         * gnulib/import/msvc-nothrow.h: Update.
556         * gnulib/import/open.c: Update.
557         * gnulib/import/openat-die.c: Update.
558         * gnulib/import/openat-priv.h: Update.
559         * gnulib/import/openat-proc.c: Update.
560         * gnulib/import/openat.c: Update.
561         * gnulib/import/openat.h: Update.
562         * gnulib/import/opendir.c: Update.
563         * gnulib/import/pathmax.h: Update.
564         * gnulib/import/pipe-safer.c: Update.
565         * gnulib/import/rawmemchr.c: Update.
566         * gnulib/import/readdir.c: Update.
567         * gnulib/import/readlink.c: Update.
568         * gnulib/import/realloc.c: Update.
569         * gnulib/import/ref-add.sin: Update.
570         * gnulib/import/ref-del.sin: Update.
571         * gnulib/import/rename.c: Update.
572         * gnulib/import/rewinddir.c: Update.
573         * gnulib/import/rmdir.c: Update.
574         * gnulib/import/same-inode.h: Update.
575         * gnulib/import/save-cwd.c: Update.
576         * gnulib/import/save-cwd.h: Update.
577         * gnulib/import/scratch_buffer.h: Update.
578         * gnulib/import/secure_getenv.c: Update.
579         * gnulib/import/setenv.c: Update.
580         * gnulib/import/signal.in.h: Update.
581         * gnulib/import/stat-time.c: Update.
582         * gnulib/import/stat-time.h: Update.
583         * gnulib/import/stat-w32.c: Update.
584         * gnulib/import/stat-w32.h: Update.
585         * gnulib/import/stat.c: Update.
586         * gnulib/import/stdbool.in.h: Update.
587         * gnulib/import/stddef.in.h: Update.
588         * gnulib/import/stdint.in.h: Update.
589         * gnulib/import/stdio.in.h: Update.
590         * gnulib/import/stdlib.in.h: Update.
591         * gnulib/import/str-two-way.h: Update.
592         * gnulib/import/strchrnul.c: Update.
593         * gnulib/import/strdup.c: Update.
594         * gnulib/import/streq.h: Update.
595         * gnulib/import/strerror-override.c: Update.
596         * gnulib/import/strerror-override.h: Update.
597         * gnulib/import/strerror.c: Update.
598         * gnulib/import/string.in.h: Update.
599         * gnulib/import/stripslash.c: Update.
600         * gnulib/import/strnlen1.c: Update.
601         * gnulib/import/strnlen1.h: Update.
602         * gnulib/import/strstr.c: Update.
603         * gnulib/import/strtok_r.c: Update.
604         * gnulib/import/sys_stat.in.h: Update.
605         * gnulib/import/sys_time.in.h: Update.
606         * gnulib/import/sys_types.in.h: Update.
607         * gnulib/import/tempname.c: Update.
608         * gnulib/import/tempname.h: Update.
609         * gnulib/import/time.in.h: Update.
610         * gnulib/import/unistd--.h: Update.
611         * gnulib/import/unistd-safer.h: Update.
612         * gnulib/import/unistd.in.h: Update.
613         * gnulib/import/unsetenv.c: Update.
614         * gnulib/import/verify.h: Update.
615         * gnulib/import/extra/snippet/warn-on-use.h: Update.
616         * gnulib/import/wchar.in.h: Update.
617         * gnulib/import/wctype.in.h: Update.
618         * gnulib/import/xalloc-oversized.h: Update.
619         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
620         "53e2c179f26a890fa6685af4b6c1397ee370433b".
621
622 2018-08-16  Gary Benson <gbenson@redhat.com>
623
624         PR gdb/13000:
625         * gdb/main.c (captured_main_1): Exit with nonzero status
626         in batch mode if the last command to be executed failed.
627         * NEWS: Mention the above.
628
629 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
630
631         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
632         end of warning message.
633
634 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
635
636         PR gdb/22943:
637         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
638         (aarch64_extract_return_value): Use
639         aapcs_is_vfp_call_or_return_candidate.
640         (aarch64_return_in_memory): Likewise.
641         (aarch64_store_return_value): Likewise.
642
643 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
644
645         * aarch64-tdep.c
646         (aapcs_is_vfp_call_or_return_candidate): Make static
647         (pass_in_v_or_stack): Remove function.
648         (pass_in_v_vfp_candidate): New function.
649         (aarch64_push_dummy_call): Check for float register candidates.
650
651 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
652
653         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
654         (aapcs_is_vfp_call_or_return_candidate_1): New function.
655         (aapcs_is_vfp_call_or_return_candidate): Likewise.
656
657 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
658
659         PR build/23399
660         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
661         (struct ipa_sym_addresses): Rename to...
662         (struct ipa_sym_addresses_common): ... this.
663         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
664
665 2018-08-28  Tom Tromey  <tom@tromey.com>
666
667         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
668         (token_fifo): Now a std::vector.
669         (yylex, c_parse): Update.
670         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
671         (token_fifo): Now a std::vector.
672         (yylex, d_parse): Update.
673         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
674         (token_fifo): Now a std::vector.
675         (yylex, go_parse): Update.
676
677 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
678
679         * parser-defs.h (struct type_stack) <elements>: Change type to
680         std::vector<union type_stack_elt>.
681         <depth, size>: Remove.
682         * parse.c (parse_exp_in_context_1): Adjust.
683         (type_stack_reserve): Remove.
684         (check_type_stack_depth): Remove.
685         (insert_into_type_stack): Adjust to std::vector.
686         (insert_type): Likewise.
687         (push_type): Likewise.
688         (push_type_int): Likewise.
689         (insert_type_address_space): Likewise.
690         (pop_type): Likewise.
691         (pop_type_int): Likewise.
692         (pop_typelist): Likewise.
693         (pop_type_stack): Likewise.
694         (append_type_stack): Likewise.
695         (push_type_stack): Likewise.
696         (get_type_stack): Likewise.
697         (type_stack_cleanup): Likewise.
698         (push_typelist): Likewise.
699         (follow_types): Likewise.
700         (_initialize_parse): Likewise.
701
702 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
703
704         * NEWS: Mention csky target.
705
706 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
707             Hafiz Abid Qadeer  <abidh@codesourcery.com>
708             Don Breazeal  <donb@codesourcery.com>
709
710         * csky-linux-tdep.c: New file.
711         * csky-tdep.c: Likewise.
712         * csky-tdep.h: Likewise.
713         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
714         csky-tdep.o.
715         (HFILES_NO_SRCDIR): Add csky-tdep.h.
716         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
717         * configure.tgt: Add csky support.
718
719 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
720
721         * python/py-framefilter.c (py_print_frame): Print frame architecture
722         when printing on an MI output.
723
724 2018-08-27  Tom Tromey  <tom@tromey.com>
725
726         PR build/23087:
727         * configure: Rebuild.
728         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
729
730 2018-08-27  Tom Tromey  <tom@tromey.com>
731
732         * aarch64-linux-tdep.c
733         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
734         casts to int.
735
736 2018-08-27  Tom Tromey  <tom@tromey.com>
737
738         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
739         unsigned.
740         (ppc64_standard_linkage1, ppc64_standard_linkage2)
741         (ppc64_standard_linkage3, ppc64_standard_linkage4)
742         (ppc64_standard_linkage5, ppc64_standard_linkage6)
743         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
744         unsigned.
745
746 2018-08-27  Tom Tromey  <tom@tromey.com>
747
748         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
749         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
750
751 2018-08-27  Tom Tromey  <tom@tromey.com>
752
753         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
754         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
755         ULONGEST_MAX.
756         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
757         ULONGEST_MAX.
758         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
759         ULONGEST_MAX.
760         * sparc-linux-tdep.c (sparc32_linux_sigframe)
761         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
762         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
763         ULONGEST_MAX.
764         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
765         (ppc64_linux_sigaction_tramp_frame)
766         (ppc32_linux_sighandler_tramp_frame)
767         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
768         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
769         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
770         * mn10300-linux-tdep.c (am33_linux_sigframe)
771         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
772         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
773         * mips-linux-tdep.c (mips_linux_o32_sigframe)
774         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
775         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
776         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
777         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
778         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
779         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
780         * microblaze-linux-tdep.c
781         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
782         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
783         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
784         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
785         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
786         * common/common-types.h (ULONGEST_MAX): New define.
787         (CORE_ADDR_MAX): Fix formatting.
788         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
789         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
790         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
791         (arm_linux_rt_sigreturn_tramp_frame)
792         (arm_eabi_linux_sigreturn_tramp_frame)
793         (arm_eabi_linux_rt_sigreturn_tramp_frame)
794         (thumb2_eabi_linux_sigreturn_tramp_frame)
795         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
796         (arm_linux_restart_syscall_tramp_frame)
797         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
798         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
799         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
800         ULONGEST_MAX.
801         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
802
803 2018-08-27  Tom Tromey  <tom@tromey.com>
804
805         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
806         CORE_ADDR_MAX.
807         * mips-tdep.c (mips_deal_with_atomic_sequence)
808         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
809         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
810         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
811         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
812         CORE_ADDR_MAX.
813         * aarch64-tdep.c (aarch64_software_single_step): Use
814         CORE_ADDR_MAX.
815
816 2018-08-27  Tom Tromey  <tom@tromey.com>
817
818         * linespec.c (complete_linespec_component): Add cast to "char".
819         * completer.c (completion_tracker::build_completion_result): Add
820         cast to "char".
821
822 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
823
824         * solist.h (struct solist, struct target_so_ops): Fix
825         indentation.
826
827 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
828
829         * ada-tasks.c (ada_task_info_s): Remove typedef.
830         (DEF_VEC_O(ada_task_info_s)): Remove.
831         (struct ada_tasks_inferior_data): Initialize fields.
832         <task_list>: Make an std::vector.
833         (get_ada_tasks_inferior_data): Allocate with new.
834         (ada_get_task_number): Adjust.
835         (get_task_number_from_id): Likewise.
836         (valid_task_id): Likewise.
837         (ada_get_task_info_from_ptid): Likewise.
838         (iterate_over_live_ada_tasks): Likewise.
839         (add_ada_task): Likewise.
840         (read_known_tasks): Likewise.
841         (ada_build_task_list): Likewise.
842         (print_ada_task_info): Likewise.
843         (info_task): Likewise.
844         (task_command_1): Likewise.
845
846 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
847
848         * ada-lang.c (add_angle_brackets): Return std::string.
849
850 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
851
852         * python/py-threadevent.c (py_get_event_thread): Initialize
853         pythread.
854
855 2018-08-24  Pedro Alves  <palves@redhat.com>
856
857         * python/py-bpevent.c (create_breakpoint_event_object): Use
858         copy-initialization.
859         * python/py-continueevent.c (emit_continue_event): Use
860         copy-initialization.
861         * python/py-exitedevent.c (create_exited_event_object): Return a
862         gdbpy_ref<>.
863         (emit_exited_event): Use copy-initialization.
864         * python/py-inferior.c (python_new_inferior)
865         (python_inferior_deleted, add_thread_object): Use
866         copy-initialization.
867         * python/py-infevents.c (create_inferior_call_event_object)
868         (create_register_changed_event_object)
869         (create_memory_changed_event_object): Return a gdbpy_ref<>.
870         (emit_inferior_call_event, emit_memory_changed_event)
871         (emit_register_changed_event): Use copy-initialization.
872         * python/py-newobjfileevent.c (create_new_objfile_event_object):
873         Return a gdbpy_ref<>.
874         (emit_new_objfile_event): Use copy-initialization.
875         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
876         (emit_clear_objfiles_event): Use copy-initialization.
877         * python/py-signalevent.c (create_signal_event_object): Use
878         copy-initialization.
879         * python/py-threadevent.c (create_thread_event_object): Use
880         copy-initialization.
881
882 2018-08-24  Pedro Alves  <palves@redhat.com>
883             Simon Marchi  <simon.marchi@ericsson.com>
884
885         PR gdb/23379
886         * python/py-continueevent.c: Include "gdbthread.h".
887         (create_continue_event_object): Add intro comment.  Add 'ptid'
888         parameter.  Use it to find thread to pass to
889         create_thread_event_object.
890         (emit_continue_event): Pass PTID down to
891         create_continue_event_object.
892         * python/py-event.h (py_get_event_thread): Declare.
893         (create_thread_event_object): Remove default from 'thread'
894         parameter.
895         * python/py-stopevent.c (create_stop_event_object): Use
896         py_get_event_thread.
897         * python/py-threadevent.c (get_event_thread): Rename to ...
898         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
899         and use it to find the thread.
900         (create_thread_event_object): Assert that THREAD isn't null.
901         Don't find the event thread here.
902
903 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
904
905         * block.h (blockrange, blockranges): New struct declarations.
906         (struct block): Add new field named `ranges'.
907         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
908         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
909         macros for accessing ranges in struct block.
910         (make_blockranges): New declaration.
911         block.c (make_blockranges): New function.
912         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
913         for block.
914         * symtab.h (find_pc_partial_function): Add new parameter `block'.
915         * blockframe.c (cache_pc_function_block): New static global.
916         (clear_pc_function_cache): Clear cache_pc_function_block.
917         (find_pc_partial_function): Move comment to symtab.h.  Add
918         support for non-contiguous blocks.
919         * cli/cli-cmds.c (block.h): Include.
920         (print_disassembly): Handle printing of non-contiguous blocks.
921         (disassemble_current_function): Likewise.
922         (disassemble_command): Likewise.
923
924         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
925         BLOCK_START.
926         * blockframe.c (get_pc_function_start): Likewise.
927         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
928         (gcc_symbol_address): Likewise.
929         * compile/compile-object-run.c (compile_object_run): Likewise.
930         * compile/compile.c (get_expr_block_and_pc): Likewise.
931         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
932         (func_addr_to_tail_call_list): Likewise.
933         * findvar.c (default_read_var_value): Likewise.
934         * inline-frame.c (inline_frame_this_id): Likewise.
935         (skip-inline_frames): Likewise.
936         * infcmd.c (until_next_command): Likewise.
937         * linespec.c (convert_linespec_to_sals): Likewise.
938         * parse.c (parse_exp_in_context_1): Likewise.
939         * printcmd.c (build_address_symbolic): likewise.
940         (info_address_command): Likewise.
941         symtab.c (find_function_start_sal): Likewise.
942         (skip_prologue_sal): Likewise.
943         (find_function_alias_target): Likewise.
944         (find_gnu_ifunc): Likewise.
945         * stack.c (find_frame_funname): Likewise.
946         * symtab.c (fixup_symbol_section): Likewise.
947         (find_function_start_sal): Likewise.
948         (skip_prologue_sal): Likewsie.
949         (find_function_alias_target): Likewise.
950         (find_gnu_ifunc): Likewise.
951         * tracepoint.c (info_scope_command): Likewise.
952         * value.c (value_fn_field): Likewise.
953
954         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
955         in place of find_pc_partial_function.
956         * blockframe.c (find_function_entry_range_from_pc): New function.
957         * symtab.h (find_function_entry_range_from_pc): Declare and document.
958         * objfiles.c (objfile_relocate1): Relocate start and end addresses
959         for each range in a block.
960
961
962 2018-08-23  Xavier Roirand  <roirand@adacore.com>
963
964         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
965         incrementation.
966
967 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
968
969         * solib-svr4.c (read_program_headers_from_bfd): Return
970         gdb::optional<gdb::byte_vector>.
971         (svr4_exec_displacement): Adjust.
972
973 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
974
975         * solib-svr4.c (read_program_header): Return
976         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
977         (find_program_interpreter): Return
978         gdb::optional<gdb::byte_vector>.
979         (scan_dyntag_auxv): Adjust.
980         (enable_break): Adjust.
981         (svr4_exec_displacement): Adjust.
982
983 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
984
985         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
986         * inf-child.c (inf_child_target::terminal_save_inferior): New.
987
988 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
989
990         * guile/scm-string.c (gdbscm_scm_from_printf): Use
991         string_vprintf.
992         * guile/scm-utils.c (gdbscm_printf): Likewise.
993         * serial.c (serial_printf): Likewise.
994         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
995
996 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
997
998         * stack.c (print_frame): Print frame architecture when printing on
999         an MI output.
1000         * NEWS: Mention new "arch" attribute in frame output.
1001
1002 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1003
1004         * arch/aarch64.h (aarch64_regnum): Update comment.
1005
1006 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1007
1008         * NEWS: Add SVE to 8.2 section.
1009
1010 2018-08-21  Pedro Alves  <palves@redhat.com>
1011
1012         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1013         out from gdbscm_parse_function_args.
1014         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1015         gdbscm_parse_function_args_1.
1016
1017 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1018
1019         PR gdb/17816
1020         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1021         operator.
1022
1023 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1024
1025         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1026
1027 2018-08-19  Michael Spang  <spang@google.com>
1028
1029         PR gdb/11786
1030         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1031         for PT_TLS segments.
1032
1033 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1034
1035         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1036         dwarf_variable_value.
1037         * dwarf2-frame.c (class dwarf_expr_executor):
1038         Add override for dwarf_variable_value.
1039         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1040         (class symbol_needs_eval_context): Likewise.
1041         (indirect_synthetic_pointer): Add forward declaration.
1042         (sect_variable_value): New function.
1043         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1044         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1045         for DW_OP_GNU_variable_value.
1046
1047 2018-08-16  Tom Tromey  <tom@tromey.com>
1048
1049         * top.c (read_command_file): Update.
1050         (command_line_input): Remove "repeat" argument.
1051         * ada-lang.c (get_selections): Update.
1052         * linespec.c (decode_line_2): Update.
1053         * defs.h (command_line_input): Remove argument.
1054         * cli/cli-script.c (read_next_line): Update.
1055         * python/py-gdb-readline.c: Update.
1056
1057 2018-08-17  Tom Tromey  <tom@tromey.com>
1058
1059         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1060         command_line_input.
1061
1062 2018-08-15  Tom Tromey  <tom@tromey.com>
1063
1064         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1065
1066 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1067
1068         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1069         If used, use find_pc_partial_function to find address range
1070         to disassemble.
1071         * mi/mi-main.c (mi_cmd_list_features): Report
1072         "data-disassemble-a-option" feature.
1073         * NEWS: Mention new -data-disassemble option -a.
1074
1075 2018-08-13  Tom Tromey  <tom@tromey.com>
1076
1077         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1078
1079 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1080
1081         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1082         (aarch64_linux_collect_sve_regset): Likewise.
1083         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1084         * regcache.h (regcache_map_entry_size): New function.
1085
1086 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1087
1088         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1089         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1090         (SVE_HEADER_VL_LENGTH): Likewise.
1091         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1092         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1093         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1094         (SVE_HEADER_SIZE_OFFSET): Likewise.
1095         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1096         (SVE_HEADER_VL_OFFSET): Likewise.
1097         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1098         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1099         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1100         (SVE_HEADER_SIZE): Likewise.
1101         (aarch64_linux_core_read_vq): Add function.
1102         (aarch64_linux_core_read_description): Check for SVE section.
1103
1104 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1105
1106         * aarch64-fbsd-tdep.c
1107         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1108         collect_size.
1109         * aarch64-linux-tdep.c
1110         (aarch64_linux_iterate_over_regset_sections): Likewise.
1111         * alpha-linux-tdep.c
1112         (alpha_linux_iterate_over_regset_sections):
1113         * alpha-nbsd-tdep.c
1114         (alphanbsd_iterate_over_regset_sections): Likewise.
1115         * amd64-fbsd-tdep.c
1116         (amd64fbsd_iterate_over_regset_sections): Likewise.
1117         * amd64-linux-tdep.c
1118         (amd64_linux_iterate_over_regset_sections): Likewise.
1119         * arm-bsd-tdep.c
1120         (armbsd_iterate_over_regset_sections): Likewise.
1121         * arm-fbsd-tdep.c
1122         (arm_fbsd_iterate_over_regset_sections): Likewise.
1123         * arm-linux-tdep.c
1124         (arm_linux_iterate_over_regset_sections): Likewise.
1125         * corelow.c (get_core_registers_cb): Likewise.
1126         (core_target::fetch_registers): Likewise.
1127         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1128         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1129         * gdbarch.h (void): Regenerate.
1130         * gdbarch.sh: Add supply_size and collect_size.
1131         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1132         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1133         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1134         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1135         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1136         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1137         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1138         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1139         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1140         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1141         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1142         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1143         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1144         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1145         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1146         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1147         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1148         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1149         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1150         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1151         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1152         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1153         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1154         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1155         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1156         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1157         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1158         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1159         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1160         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1161
1162 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1163
1164         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1165         with string_printf.
1166
1167 2018-08-10  Keith Seitz  <keiths@redhat.com>
1168
1169         * compile/compile-c-support.c (add_code_header, add_code_footer):
1170         Move into policy class.
1171         (c_push_user_expression, pop_user_expression_nop)
1172         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1173         (compile_program): New host class.
1174         (c_compile_program): New typedef.
1175         (c_compute_porgram): Use c_compile_program.
1176
1177 2018-08-10  Keith Seitz  <keiths@redhat.com>
1178
1179         * compile/compile-internal.h (compile_instance::~compile_instance):
1180         Remove calls to htab_delete.
1181         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1182         * compile.c (compile_instance::compile_instance): Initialize
1183         htab unique pointers.
1184         (compile_instance::get_cached_type, compile_instance::insert_type)
1185         (compile_instance::error_symbol_once): Update for unique_ptr.
1186
1187 2018-08-10  Keith Seitz  <keiths@redhat.com>
1188
1189         * compile/compile-c-symbols.c (struct symbol_error)
1190         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1191         (compile_instance::insert_symbol_error)
1192         (compile_instance::error_symbol_once): Move to ...
1193         * compile/compile.c: ... here.
1194
1195 2018-08-10  Keith Seitz  <keiths@redhat.com>
1196
1197         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1198         instead of `new_compile_instance'.
1199         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1200         Update description.
1201         If the symbol error map is not initialized, create it.
1202         (generate_c_for_for_one_symbol): Do not check/initialize
1203         the symbol error map.
1204         * compile/compile-c-types.c (compile_c_instance): Make a class.
1205         Update all callers.
1206         (compile_instance::compile_instance): Initialize the type cache.
1207         (get_cached_type): New function.
1208         (insert_type): Update description.
1209         (compile_c_instance::m_default_cflags): Define.
1210         (convert_type): Update description.  Use get_cached_type.
1211         (delete_instance): Moved to destructor.
1212         (new_compile_instance): Moved to constructor.
1213         * compile/compile-c.h (compile_c_instance): Make class inheriting
1214         from compile_instance.
1215         <base>: Remove field.
1216         <type_map, symbol_err_map>: Move to base class.
1217         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1218         * compile/compile-internal.h (compile_instance): Make class.
1219         <type_map_t, symbol_err_map_t>: Define.
1220         <fe>: Rename to `m_gcc_fe'.
1221         <scope, block, gcc_target_options>: Add `m_' prefix.
1222         <m_type_map, m_symbol_err_map>: New fields, moved from
1223         compile_c_instance.
1224         <destroy>: Remove.
1225         (convert_type, new_compile_instance): Remove.
1226         * compile/compile.c (cleanup_compile_instance): Remove.
1227         (compile_to_object): Use unique_ptr to eliminate cleanups.
1228         (compile_instance::set_print_callback, compile_instance::version)
1229         (compile_instance::set_verbose)
1230         (compile_instance::set_driver_filename)
1231         (compile_instance::set_triplet_regexp)
1232         (compile_instance::set_arguments)
1233         (compile_instance::set_source_file)
1234         (compile_instance::compile): Define.
1235
1236 2018-08-10  Keith Seitz  <keiths@redhat.com>
1237
1238         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1239         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1240         gcc-c-fe.def to define C plugin.
1241         (delete_instance): Delete `c_plugin'.
1242         (new_compile_instance): Initialize `c_plugin'.
1243         * compile/compile-c.h: Include gcc_c_plugin.h.
1244         (struct compile_c_instance) <c_plugin>: New member.
1245         * gcc-c-plugin.h: New file.
1246         Update all callers with API change.
1247
1248 2018-08-10  Keith Seitz  <keiths@redhat.com>
1249
1250         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1251         (HFILES_NO_SRCDIR): ... to here.
1252         Add compile-internal.h and compile-c.h.
1253         * compile/compile-c-support.c: Include compile-c.h.
1254         * compile/compile-c-symbols.c: Include compile-c.h.
1255         (generate_c_for_variable_locations): Update comment.
1256         * compile/compile-c-types.c: Include compile-c.h.
1257         * compile/compile-c.h: New file -- moved C language declarations
1258         from other files here.
1259         * compile/compile-internal.h: Do not include hashtab.h or
1260         common/enum-flags.h.
1261         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1262         (gcc_convert_symbol, gcc_symbol_address)
1263         (generate_c_for_variable_locations, c_get_mode_for_size)
1264         (c_get_range_decl_name): Definitions moved to compile-c.h.
1265         * compile/compile-loc2c.c: Include compile-c.h.
1266
1267 2018-08-10  Keith Seitz  <keiths@redhat.com>
1268
1269         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1270         (c_symbol_substitution_name): ... this.
1271         Update all callers.
1272
1273 2018-08-10  Keith Seitz  <keiths@redhat.com>
1274
1275         * compile/compile-c-support.c (c_compute_program): Use
1276         unique_xmalloc_ptr to eliminate cleanup.
1277         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1278         Return a unique_xmalloc_ptr and eliminate cleanup.
1279         * compile/compile-internal.h (generate_c_for_variable_locations):
1280         Return unique_xmalloc_ptr and update description.
1281
1282 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1283
1284         * corelow.c (core_target::get_core_register_section): Rename
1285         min_size to section_min_size.
1286
1287 2018-08-09  Jim Wilson  <jimw@sifive.com>
1288
1289         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1290         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1291         * NEWS: Mention new GNU/Linux RISC-V target.
1292         * configure.host: Add riscv*-*-linux*.
1293         * configure.nat: Add riscv*.
1294         * configure.tgt: Add riscv*-*-linux*.
1295         * riscv-linux-nat.c: New file.
1296         * riscv-linux-tdep.c: New file.
1297
1298 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1299
1300         * infrun.c (resume): Make static, add forward declaration.
1301         (proceed): Update header comment.
1302         * infrun.h (resume): Delete declaration.
1303
1304 2018-08-09  Tom Tromey  <tom@tromey.com>
1305
1306         * riscv-tdep.h: Minor formatting fixes.
1307
1308 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1309
1310         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1311         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1312         (test_mkdir_recursive): Likewise.
1313         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1314
1315 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1316
1317         * valarith.c (value_subscripted_rvalue): If an array is not in
1318         memory, and we don't know the upper bound, then we can't know that
1319         the requested element exists or not.
1320
1321 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1322
1323         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1324         (target_options_to_string): Add comment.
1325
1326 2018-08-08  Tom Tromey  <tom@tromey.com>
1327
1328         * unittests/scoped_mmap-selftests.c: Check result of "write".
1329
1330 2018-08-08  Jim Wilson  <jimw@sifive.com>
1331
1332         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1333         (decode_register_index_short): New.
1334         (decode_j_type_insn, decode_cj_type_insn): New.
1335         (decode_b_type_insn, decode_cb_type_insn): New.
1336         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1337         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1338         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1339         is_c_sw_insn instead of is_sw_insn.
1340         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1341         (riscv_software_single_step): New.
1342         * riscv-tdep.h (riscv_software_single_step): Declare.
1343
1344         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1345         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1346
1347 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1348
1349         PR gdb/18050:
1350         * target.c (dispose_inferior): Don't dispose of inferiors that are
1351         already killed.
1352
1353 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1354
1355         * remote.c (remote_target::download_tracepoint): Change char* to
1356         const char*.
1357
1358 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1359
1360         * target.h (target_options_to_string): Return an std::string.
1361         * target.c (str_comma_list_concat_elem): Return void, use
1362         std::string.
1363         (do_option): Likewise.
1364         (target_options_to_string): Return an std::string.
1365         * linux-nat.c (linux_nat_target::wait): Adjust.
1366         * target-debug.h (target_debug_print_options): Adjust.
1367
1368 2018-08-07  Tom Tromey  <tom@tromey.com>
1369
1370         * Makefile.in (CPPFLAGS): New variable.
1371         (INTERNAL_CPPFLAGS): Use it.
1372
1373 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1374
1375         * NEWS: Mention the index cache.
1376
1377 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1378
1379         * common/pathstuff.h (get_standard_cache_dir): New.
1380         * common/pathstuff.c (get_standard_cache_dir): New.
1381         * build-id.h (build_id_to_string): New.
1382         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1383         DEBUG_STR_SUFFIX): Move to here.
1384         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1385         DEBUG_STR_SUFFIX): Move from there.
1386         (write_psymtabs_to_index): Make non-static, add basename
1387         parameter.  Write to temporary files, rename when done.
1388         (save_gdb_index_command): Adjust call to
1389         write_psymtabs_to_index.
1390         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1391         field.
1392         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1393         (get_gdb_index_contents_from_cache): New.
1394         (get_gdb_index_contents_from_cache_dwz): New.
1395         (dwarf2_initialize_objfile): Read index from cache.
1396         (dwarf2_build_psymtabs): Save to index.
1397         * dwarf-index-cache.h: New file.
1398         * dwarf-index-cache.c: New file.
1399         * dwarf-index-write.h: New file.
1400
1401 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1402
1403         * gnulib/aclocal.m4: Re-generate.
1404         * gnulib/config.in: Re-generate.
1405         * gnulib/configure: Re-generate.
1406         * gnulib/import/Makefile.am: Re-generate.
1407         * gnulib/import/Makefile.in: Re-generate.
1408         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1409         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1410         * gnulib/import/m4/mkdir.m4: New file.
1411         * gnulib/import/mkdir.c: New file.
1412         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1413         module.
1414
1415 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1416
1417         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1418         * common/scoped_mmap.c: New file.
1419         * common/scoped_mmap.h (destroy): New method.
1420         (~scoped_mmap, reset): Use destroy.
1421         (scoped_mmap): New move constructor.
1422         (mmap_file): New declaration.
1423         * unittests/scoped_mmap-selftests.c (test_normal,
1424         test_invalid_filename, run_tests): New functions.
1425         (_initialize_scoped_mmap_selftests): Register selftest.
1426
1427 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1428
1429         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1430         (read_gdb_index_from_buffer): ... this.  Remove section
1431         parameter, add buffer parameter.
1432         (get_gdb_index_contents_ftype,
1433         get_gdb_index_contents_dwz_ftype): New typedefs.
1434         (dwarf2_read_gdb_index): Add callback parameters to get the
1435         index contents.
1436         (get_gdb_index_contents_from_section): New.
1437         (dwarf2_initialize_objfile): Update call to
1438         dwarf2_read_gdb_index.
1439
1440 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1441
1442         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1443         (gdb_open_cloexec): Likewise.
1444         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1445         (commandline_from_pid): Likewise.
1446         (linux_xfer_osdata_threads): Likewise.
1447         (linux_xfer_osdata_fds): Likewise.
1448         * ada-lang.c (is_package_name): Likewise.
1449         * auxv.c (procfs_xfer_auxv): Likewise.
1450         * breakpoint.c (print_one_breakpoint_location): Use
1451         uiout::field_fmt.
1452         (print_one_catch_solib): Use string_printf.
1453         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1454         (add_pe_forwarded_sym): Likewise.
1455         * dwarf2read.c (create_type_unit_group): Likewise.
1456         (build_error_marker_type): Likewise.
1457         * infcall.c (get_function_name): Likewise.
1458         * valprint.c (print_converted_chars_to_obstack): Likewise.
1459         * xtensa-tdep.c (xtensa_register_type): Likewise.
1460
1461 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1462
1463         * remote.c (remote_target::download_tracepoint): Fix format
1464         string errors.
1465
1466 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1467
1468         * tracefile.c: Include common/byte-vector.h.
1469         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1470         with trace_regblock_size if needed.  Update uses of buf.
1471
1472 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1473
1474         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1475         std::vector<unsigned char>.
1476         * tracepoint.c (collection_list::collection_list): Remove
1477         m_regs_mask initializer from initializer list.  Resize
1478         m_regs_mask using the largest remote register number.
1479         (collection_list::add_remote_register): Remove size check on
1480         m_regs_mask.  Use at to access element.
1481         (collection_list::stringify): Change type of temp_buf to
1482         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1483         stringify the register mask.  Use pack_hex_byte for the register
1484         mask.
1485
1486 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1487
1488         * tracepoint.h (class collection_list) <add_register>: Remove.
1489         <add_remote_register, add_ax_registers, add_local_register>:
1490         Declare.
1491         <add_memrange>: Add scope parameter.
1492         * tracepoint.c (encode_actions_1): Likewise.
1493         (collection_list::add_register): Rename to ...
1494         (collection_list::add_remote_register): ... this.  Update
1495         comment.
1496         (collection_list::add_ax_registers, add_local_register): New
1497         methods.
1498         (collection_list::add_memrange): Add scope parameter.  Call
1499         add_local_register instead of add_register.
1500         (finalize_tracepoint_aexpr): New function.
1501         (collection_list::collect_symbol): Update calls to add_memrange.
1502         Call add_local_register instead of add_register.  Call
1503         add_ax_registers.  Call finalize_tracepoint_aexpr.
1504         (encode_actions_1): Get remote regnos for $reg action.  Call
1505         add_remote_register, add_ax_registers, and add_local_register.
1506         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1507         (validate_actionline): Call finalize_tracepoint_aexpr.
1508
1509 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1510
1511         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1512         Replace array buf with gdb::char_vector buf, of size
1513         get_remote_packet_size ().  Replace references to buf and
1514         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1515         and xsnprintf with snprintf.  Raise errors if the buffer is too
1516         small.
1517
1518 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1519
1520         * remote.c (remote_target::download_tracepoint): Fix the has_more
1521         predicate in the QTDP action list iteration.
1522
1523 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1524
1525         * remote.c (remote_target::download_tracepoint): Fix indentation
1526         in for block.
1527
1528 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1529
1530         * proc-api.c (_initialize_proc_api): Remove c, unused.
1531         * procfs.c (procfs_init_inferior): Remove signals, unused.
1532         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1533         unused.
1534
1535 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1536             Andrew Burgess  <andrew.burgess@embecosm.com>
1537
1538         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1539         'W_STOPCODE (0)' as this could be ambiguous.
1540
1541 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1542
1543         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1544         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1545         "ai_socktype").
1546
1547 2018-08-02  Tom Tromey  <tom@tromey.com>
1548
1549         PR symtab/16842.
1550         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1551         symbols.
1552         (process_structure_scope): Likewise.
1553
1554 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1555
1556         PR gdb/22629:
1557         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1558         kill inferior.
1559
1560 2018-08-02  Tom Tromey  <tom@tromey.com>
1561
1562         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1563         (darwin_suspend_inferior, darwin_resume_inferior)
1564         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1565         (darwin_check_new_threads): Check result of get_darwin_inferior.
1566
1567 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1568
1569         GDB 8.1.1 released.
1570
1571 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1572
1573         * varobj.c (varobj_get_path_expr_parent): Report an error if
1574         parent is a dynamic varobj.
1575
1576 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1577
1578         * gnulib/aclocal.m4: Re-generate.
1579         * gnulib/config.in: Re-generate.
1580         * gnulib/configure: Re-generate.
1581         * gnulib/import/Makefile.in: Re-generate.
1582         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1583         * gnulib/import/m4/onceonly.m4: Re-generate.
1584
1585 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1586
1587         * target-descriptions.c (struct xml_test_tdesc): New.
1588         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1589         (record_xml_tdesc): Update.
1590         (maintenance_check_xml_descriptions): Update.
1591         * target-descriptions.h (record_xml_tdesc): Update comment.
1592
1593 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1594
1595         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1596         checking array bounds are defined.
1597
1598 2018-07-30  Tom Tromey  <tom@tromey.com>
1599
1600         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1601         irreflexivity violation.
1602
1603 2018-07-30  Tom Tromey  <tom@tromey.com>
1604
1605         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1606         * value.c (unpack_long): Remove lint code.
1607         * valops.c (value_ind): Remove lint code.
1608         * valarith.c (value_x_binop, value_x_unop, value_equal)
1609         (value_pos): Remove lint code.
1610
1611 2018-07-28  Tom de Vries  <tdevries@suse.de>
1612
1613         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1614         with undefined upper bound as <optimized out>.
1615
1616 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1617
1618         * gcore.in: Rename variable "name" to "prefix".  Expand
1619         "usage" text.
1620
1621 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1622
1623         * windows-nat.c (windows_nat_target::create_inferior): Update to
1624         call close() in global namespace.
1625
1626 2018-07-26  Tom Tromey  <tom@tromey.com>
1627
1628         * dwarf-index-write.c (add_address_entry): Don't add objfile
1629         offsets.
1630         * dbxread.c (find_stab_function): Rename from
1631         find_stab_function_addr.  Return a bound_minimal_symbol.
1632         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1633         Don't add objfile offsets.
1634         (end_psymtab): Use raw_text_low, raw_text_high,
1635         MSYMBOL_VALUE_RAW_ADDRESS.
1636         (read_ofile_symtab): Update.
1637         (process_one_symbol): Update.
1638         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1639         offsets.
1640         (dw2_relocate): Remove.
1641         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1642         searching addrmap.
1643         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1644         Update.
1645         (process_psymtab_comp_unit_reader, add_partial_symbol)
1646         (add_partial_subprogram, dwarf2_ranges_read): Update.
1647         (load_partial_dies): Update.
1648         (add_address_entry): Don't add objfile offsets.
1649         (dwarf2_build_include_psymtabs): Update.
1650         (create_addrmap_from_aranges): Don't add objfile offsets.
1651         (dw2_find_pc_sect_compunit_symtab): Update.
1652         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1653         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1654         Update.
1655         (parse_partial_symbols): Don't add objfile offsets.  Use
1656         raw_text_low, raw_text_high.  Update.
1657         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1658         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1659         or call 'relocate' quick function.  Clear psymbol_map.
1660         * psympriv.h (struct partial_symbol) <address>: Add section
1661         offset.
1662         <set_unrelocated_address>: Rename from set_address.
1663         <raw_text_low, raw_text_high>: New methods.
1664         <text_low, text_high>: Add objfile parameter.
1665         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1666         set_unrelocated_address.
1667         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1668         (find_pc_psymbol): Update.
1669         (fixup_psymbol_section, relocate_psymtabs): Remove.
1670         (dump_psymtab, psym_functions): Update.
1671         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1672         parameter.
1673         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1674         (start_psymtab_common): Update.
1675         * symfile-debug.c (debug_qf_relocate): Remove.
1676         (debug_sym_quick_functions): Update.
1677         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1678         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1679         Update.
1680
1681 2018-07-26  Tom Tromey  <tromey@redhat.com>
1682
1683         * dbxread.c (end_psymtab): Use text_high_valid and
1684         text_low_valid.
1685         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1686         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1687         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1688         Update comment.
1689         <text_low_valid, text_high_valid>: New fields.
1690         <set_text_low, set_text_high>: Update.
1691         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1692
1693 2018-07-26  Tom Tromey  <tom@tromey.com>
1694
1695         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1696         Update.
1697         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1698         textlow and texthigh fields.
1699         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1700         Update.
1701         * mdebugread.c (parse_lines, parse_partial_symbols)
1702         (psymtab_to_symtab_1): Update.
1703         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1704         Rename fields.  Update comment.  Now private.
1705         <text_low, text_high, set_text_low, set_text_high>: New methods.
1706         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1707         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1708         (start_psymtab_common, maintenance_info_psymtabs)
1709         (maintenance_check_psymtabs): Update.
1710         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1711         texthigh fields.
1712         (scan_xcoff_symtab): Update.
1713
1714 2018-07-26  Tom Tromey  <tromey@redhat.com>
1715
1716         * psympriv.h (struct partial_symbol) <unrelocated_address,
1717         address, set_address>: New methods.
1718         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1719         (fixup_psymbol_section, relocate_psymtabs): Update.
1720         (print_partial_symbols): Add 'objfile' parameter.  Update.
1721         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1722         Update.
1723
1724 2018-07-26  Tom Tromey  <tom@tromey.com>
1725
1726         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1727         (debug_names::write_psymbols): Update.
1728         * psympriv.h (struct partial_symbol): Derive from
1729         general_symbol_info.
1730         <obj_section>: New method.
1731         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1732         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1733         (find_pc_sect_psymbol, fixup_psymbol_section)
1734         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1735         (print_partial_symbols, recursively_search_psymtabs)
1736         (compare_psymbols, psymbol_hash, psymbol_compare)
1737         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1738         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1739
1740 2018-07-26  Tom Tromey  <tromey@redhat.com>
1741
1742         * dbxread.c (end_psymtab): Remove dead code.
1743
1744 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1745
1746         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1747         DWARF unwinders are disabled.
1748         * dwarf2-frame.c: Add dwarf2read.h include.
1749         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1750         disabled.
1751         (dwarf2_frame_unwinders_enabled_p): Define.
1752         (show_dwarf_unwinders_enabled_p): New function.
1753         (_initialize_dwarf2_frame): Register switch to control DWARF
1754         unwinder use.
1755         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1756         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1757         (show_dwarf_cmdlist): Remove static keyword.
1758         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1759         (show_dwarf_cmdlist): Declare.
1760         * NEWS: Document new feature.
1761
1762 2018-07-26  Tom de Vries  <tdevries@suse.de>
1763
1764         PR breakpoints/23366
1765         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1766
1767 2018-07-26  Tom de Vries  <tdevries@suse.de>
1768
1769         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1770         DW_AT_count can't be translated to a dynamic prop.
1771
1772 2018-07-25  Tom de Vries  <tdevries@suse.de>
1773
1774         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1775         try/catch.
1776
1777 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1778
1779         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1780
1781 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1782
1783         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1784
1785 2018-07-24  Keith Seitz  <keiths@redhat.comt
1786
1787         PR symtab/23010
1788         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1789         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1790         instead of add_symbol_to_list.
1791         (read_file_scope): Call prepare_one_comp_unit before reading
1792         any other DIEs.
1793
1794 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1795
1796         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1797
1798 2018-07-24  Tom Tromey  <tom@tromey.com>
1799
1800         * utils.c (malloc, realloc, free): Don't declare.
1801         * configure, config.in: Rebuild.
1802         * configure.ac: Don't check for declarations of free, malloc, or
1803         realloc.
1804
1805 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1806
1807         * aarch64-linux-nat.c
1808         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1809         variable.
1810         * arm-linux-nat.c (fetch_regs): Likewise.
1811         (store_regs): Likewise.
1812         (fetch_vfp_regs): Likewise.
1813         (store_vfp_regs): Likewise.
1814         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1815         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1816         (arm_linux_nat_target::insert_watchpoint): Likewise.
1817         (arm_linux_nat_target::remove_watchpoint): Likewise.
1818         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1819         Likewise.
1820         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1821         Likewise.
1822         * ppc-linux-nat.c (fetch_register): Likewise.
1823         (fetch_all_gp_regs): Likewise.
1824         (fetch_ppc_registers): Likewise.
1825         (store_all_gp_regs): Likewise.
1826         (store_ppc_registers): Likewise.
1827         (hwdebug_insert_point): Likewise.
1828         (can_use_watchpoint_cond_accel): Likewise.
1829         * remote-sim.c (gdb_os_write_stdout): Likewise.
1830
1831 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1832             Tom Tromey  <tom@tromey.com>
1833
1834         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1835         test for it.
1836         * configure: Rebuild.
1837
1838 2018-07-22  Tom Tromey  <tom@tromey.com>
1839
1840         * regformats/regdat.sh: Define xmltarget_${name} inside
1841         #ifndef IN_PROCESS_AGENT.
1842
1843 2018-07-22  Tom Tromey  <tom@tromey.com>
1844
1845         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1846
1847 2018-07-22  Tom Tromey  <tom@tromey.com>
1848
1849         * symfile.c (reread_symbols): Notify iter, not objfile.
1850
1851 2018-07-22  Tom Tromey  <tom@tromey.com>
1852
1853         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1854         Use arch_ops.
1855         (ravenscar_thread_target::prepare_to_store): Likewise.
1856
1857 2018-07-22  Tom Tromey  <tom@tromey.com>
1858
1859         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1860         unused variable.  Call value_fetch_lazy when needed.
1861         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1862         Remove unused variable.  Call value_fetch_lazy when needed.
1863
1864 2018-07-22  Tom Tromey  <tom@tromey.com>
1865
1866         * m32c-tdep.c (mark_dma): Return void.
1867         (make_regs): Remove unused declarations.
1868
1869 2018-07-22  Tom Tromey  <tom@tromey.com>
1870
1871         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1872         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1873         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1874         bkscm_get_valid_block_smob_arg_unsafe for effect.
1875
1876 2018-07-22  Tom Tromey  <tom@tromey.com>
1877
1878         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1879         value_type.
1880
1881 2018-07-22  Tom Tromey  <tom@tromey.com>
1882
1883         * windows-nat.c (saved_context): Conditionally define.
1884         * remote.c (remote_target::remote_btrace_maybe_reopen):
1885         Conditionally declare "warned".
1886         * inflow.c (sigquit_ours): Conditionally define.
1887         (new_tty): Move "tty" declaration inside #if.
1888         * guile/guile.c (guile_datadir): Conditionally define.
1889         * charset.c (set_be_le_names): Move some declarations inside #if.
1890         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1891         #if.
1892         (parse_xml_btrace_conf): Likewise.
1893
1894 2018-07-22  Tom Tromey  <tom@tromey.com>
1895
1896         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1897
1898 2018-07-22  Tom Tromey  <tom@tromey.com>
1899
1900         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1901         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1902         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1903         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1904         * stack.c (frame_apply_level_command): Remove unused variable.
1905         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1906         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1907         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1908         unused variable.
1909         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1910         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1911         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1912         variable.
1913         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1914         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1915         variable.
1916         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1917         Remove unused variable.
1918         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1919         variable.
1920         * common/tdesc.c (print_xml_feature::visit): Remove unused
1921         variable.
1922         * compile/compile-object-load.c (store_regs): Remove unused
1923         variables.
1924         * complaints.c (clear_complaints): Remove unused variable.
1925         * corelow.c (core_target_open): Remove unused variable.
1926         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1927         variable.
1928         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1929         variable.
1930         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1931         variable.
1932         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1933         variable.
1934         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1935         variable.
1936         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1937         variable.
1938         * ia64-tdep.c (examine_prologue): Remove unused variable.
1939         * infcall.c (run_inferior_call): Remove unused variable.
1940         * inferior.c (exit_inferior): Remove unused variable.
1941         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1942         * linespec.c (decode_line_2): Remove unused variable.
1943         * linux-nat.c (super_close): Remove.
1944         * linux-tdep.c (linux_info_proc): Remove unused variable.
1945         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1946         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1947         Remove unused variable.
1948         * parse.c (find_minsym_type_and_address): Remove unused variable.
1949         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1950         variable.
1951         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1952         variable.
1953         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1954         variables.
1955         * record-btrace.c (record_btrace_target::store_registers): Remove
1956         unused variable.
1957         (cmd_show_record_btrace_cpu): Remove unused variable.
1958         * riscv-tdep.c (riscv_register_reggroup_p)
1959         (riscv_push_dummy_call, riscv_return_value): Remove unused
1960         variable.
1961         * rust-exp.y (literal): Remove unused variable.
1962         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1963         unused variable.
1964         <STRUCTOP_ANONYMOUS>: Likewise.
1965         * s390-linux-tdep.c (s390_linux_init_abi_31)
1966         (s390_linux_init_abi_64): Remove unused variable.
1967         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1968         (file_select_thread, net_windows_open, _initialize_ser_windows):
1969         Remove unused variables.
1970         * symtab.c (find_pc_sect_line): Remove unused variable.
1971         * target-memory.c (compute_garbled_blocks): Remove unused
1972         variable.
1973         (target_write_memory_blocks): Remove unused variable.
1974         * target.c (target_stack::unpush): Remove unused variables.
1975         * tracepoint.c (start_tracing, all_tracepoint_actions)
1976         (merge_uploaded_trace_state_variables)
1977         (print_one_static_tracepoint_marker): Remove unused variable.
1978         * unittests/basic_string_view/element_access/char/1.cc (test01):
1979         Remove unused variable.
1980         * windows-nat.c (windows_continue, windows_add_all_dlls)
1981         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1982         Remove unused variables.
1983
1984 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1985
1986         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1987         attr_profile in HAVE_ELF.
1988         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1989         HAVE_ELF.
1990
1991 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1992
1993         * frame.c (frame_register_unwind): Change parameter name.
1994         (frame_unwind_register): Likewise.
1995         (frame_unwind_register_value): Likewise.
1996         (frame_unwind_register_signed): Likewise.
1997         (frame_unwind_register_unsigned): Likewise.
1998         * frame.h (frame_register_unwind): Likewise.
1999         (frame_unwind_register): Likewise.
2000         (frame_unwind_register_value): Likewise.
2001         (frame_unwind_register_signed): Likewise.
2002         (frame_unwind_register_unsigned): Likewise.
2003         (frame_unwind_arch): Likewise.
2004
2005 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2006
2007         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2008         ISA maintenance.
2009
2010 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2011
2012         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2013         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2014         hand.
2015
2016 2018-07-20  Keith Seitz  <keiths@redhat.com>
2017
2018         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2019         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2020         m_compunit_symtab, m_language>: Add "m_" prefix.
2021         Update all uses.
2022         * buildsym.c: Update all uses.
2023
2024 2018-07-20  Tom Tromey  <tom@tromey.com>
2025
2026         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2027         * buildsym.h (record_line_ftype): Remove typedef.
2028
2029 2018-07-20  Tom Tromey  <tom@tromey.com>
2030
2031         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2032         (end_expandable_symtab): Likewise.
2033         (end_symtab_get_static_block): Likewise.
2034         (end_symtab_from_static_block): Likewise.
2035         * buildsym-legacy.c (augment_type_symtab): Remove.
2036         (end_expandable_symtab): Remove.
2037         (end_symtab_get_static_block): Remove.
2038         (end_symtab_from_static_block): Remove.
2039
2040 2018-07-20  Tom Tromey  <tom@tromey.com>
2041
2042         * dwarf2read.c: Include buildsym.h.
2043         (struct dwarf2_cu) <builder>: New method.
2044         (fixup_go_packaging): Update.
2045         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2046         use scoped_free_pendings.
2047         (using_directives): Add "cu" parameter, remove "language".
2048         (read_import_statement, setup_type_unit_groups, )
2049         (read_func_scope, read_lexical_block_scope)
2050         (dwarf2_record_block_ranges, read_namespace): Update.
2051         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2052         (lnp_state_machine::handle_end_sequence): Update.
2053         (class lnp_state_machine) <m_cu>: New member.
2054         <m_record_line_callback>: Remove.
2055         <m_currently_recording_lines>: New member.
2056         (lnp_state_machine::handle_set_file): Update.
2057         (noop_record_line): Remove.
2058         (dwarf_record_line_p): Add cu parameter.
2059         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2060         (lnp_state_machine::record_line)
2061         (lnp_state_machine::lnp_state_machine)
2062         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2063         (dwarf_decode_lines): Update.
2064         (dwarf2_start_subfile): Add cu parameter.
2065         (dwarf2_start_symtab, new_symbol): Update.
2066         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2067         Remove dwarf2_per_objfile parameter.
2068         (dwarf_decode_macros): Update.
2069
2070 2018-07-20  Tom Tromey  <tom@tromey.com>
2071
2072         * stabsread.c (define_symbol): Update.
2073         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2074         * dwarf2read.c (new_symbol): Update.
2075         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2076         * cp-namespace.c: Include buildsym.h.
2077         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2078         * buildsym-legacy.c (get_buildsym_compunit): New function.
2079
2080 2018-07-20  Tom Tromey  <tom@tromey.com>
2081
2082         * xcoffread.c: Include buildsym-legacy.h.
2083         * windows-nat.c: Include buildsym-legacy.h.
2084         * stabsread.c: Include buildsym-legacy.h.
2085         * mdebugread.c: Include buildsym-legacy.h.
2086         * buildsym-legacy.h: New file.
2087         * buildsym-legacy.c: New file, from buildsym.c.
2088         * go32-nat.c: Include buildsym-legacy.h.
2089         * dwarf2read.c: Include buildsym-legacy.h.
2090         * dbxread.c: Include buildsym-legacy.h.
2091         * cp-namespace.c: Include buildsym-legacy.h.
2092         * coffread.c: Include buildsym-legacy.h.
2093         * buildsym.h: Move some contents to buildsym-legacy.h.
2094         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2095         buildsym-legacy.c.
2096         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2097
2098 2018-07-20  Tom Tromey  <tom@tromey.com>
2099
2100         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2101         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2102         (buildsym_compunit::buildsym_compunit)
2103         (buildsym_compunit::~buildsym_compunit)
2104         (buildsym_compunit::get_macro_table): Define.
2105
2106 2018-07-20  Tom Tromey  <tom@tromey.com>
2107
2108         * buildsym.c (reset_symtab_globals): Remove.
2109         (buildsym_compunit::end_symtab_from_static_block): Update.
2110         (buildsym_compunit::augment_type_symtab): Update.
2111         (end_symtab_from_static_block): Call free_buildsym_compunit.
2112         (augment_type_symtab, end_symtab, end_expandable_symtab):
2113         Likewise.
2114
2115 2018-07-20  Tom Tromey  <tom@tromey.com>
2116
2117         * arch-utils.c: Do not include buildsym.h.
2118         * mipsread.c: Do not include buildsym.h.
2119         * machoread.c: Do not include buildsym.h.
2120         * elfread.c: Do not include buildsym.h.
2121
2122 2018-07-20  Tom Tromey  <tom@tromey.com>
2123
2124         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2125         initialization.
2126         (buildsym_compunit): Add new constructor.
2127         (struct buildsym_compunit) <get_last_source_file, finish_block,
2128         record_block_range, start_subfile, patch_subfile_names,
2129         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2130         set_last_source_start_addr, get_last_source_start_addr,
2131         get_local_using_directives, set_local_using_directives,
2132         get_global_using_directives, outermost_context_p,
2133         get_current_context_stack, get_context_stack_depth,
2134         get_current_subfile, get_local_symbols, get_file_symbols,
2135         get_global_symbols, record_debugformat, record_producer,
2136         push_context, pop_context, end_symtab_get_static_block,
2137         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2138         New public methods.
2139         <record_pending_block, finish_block_internal, make_blockvector,
2140         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2141         private methods.
2142         Update all users.
2143
2144 2018-05-22  Tom Tromey  <tom@tromey.com>
2145
2146         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2147         parameter.
2148         (finish_block_internal): Update.
2149
2150 2018-07-20  Tom Tromey  <tom@tromey.com>
2151
2152         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2153         parameter.
2154         (finish_block_internal): Update.
2155
2156 2018-07-20  Tom Tromey  <tom@tromey.com>
2157
2158         * buildsym.h (EXTERN): Don't define or undef.
2159         * buildsym.c (EXTERN): Don't define.
2160
2161 2018-07-20  Tom Tromey  <tom@tromey.com>
2162
2163         * buildsym.c: Remove TODO comment.
2164
2165 2018-07-20  Tom Tromey  <tom@tromey.com>
2166
2167         * coffread.c (coff_symtab_read): Update.
2168         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2169         (xcoff_new_init): Update.
2170         * mipsread.c (mipscoff_new_init): Update.
2171         * mdebugread.c (mdebug_build_psymtabs): Update.
2172         * elfread.c (elf_new_init): Update.
2173         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2174         Update.
2175         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2176         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2177         (stabsect_build_psymtabs): Update.
2178         * buildsym.h (buildsym_init): Don't declare.
2179         * buildsym.c: Update comment.
2180         (prepare_for_building): Remove.
2181         (start_symtab, restart_symtab): Update.
2182         (reset_symtab_globals): Update comment.
2183         (buildsym_init): Remove.
2184
2185 2018-07-20  Tom Tromey  <tom@tromey.com>
2186
2187         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2188         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2189         (read_enum_type, common_block_start, common_block_end)
2190         (cleanup_undefined_types_1, finish_global_stabs): Update.
2191         * mdebugread.c (psymtab_to_symtab_1): Update.
2192         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2193         (read_lexical_block_scope, new_symbol): Update.
2194         * dbxread.c (process_one_symbol): Update.
2195         * coffread.c (coff_symtab_read, process_coff_symbol)
2196         (coff_read_enum_type): Update.
2197         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2198         declare.
2199         (get_local_symbols, get_file_symbols, get_global_symbols): New
2200         functions.
2201         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2202         m_global_symbols.
2203         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2204         (~scoped_free_pendings): Update.
2205         (finish_block, prepare_for_building, reset_symtab_globals)
2206         (end_symtab_get_static_block, end_symtab_with_blockvector)
2207         (augment_type_symtab, push_context): Update.
2208         (get_local_symbols, get_file_symbols, get_global_symbols): New
2209         functions.
2210         (buildsym_init): Update.
2211
2212 2018-07-20  Tom Tromey  <tom@tromey.com>
2213
2214         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2215         (process_full_type_unit): Likewise.
2216         (dwarf2_start_symtab): Set list_in_scope.
2217
2218 2018-07-20  Tom Tromey  <tom@tromey.com>
2219
2220         * dwarf2read.c (process_psymtab_comp_unit_reader)
2221         (build_type_psymtabs_reader): Do not set list_in_scope.
2222
2223 2018-07-20  Tom Tromey  <tom@tromey.com>
2224
2225         * buildsym.c (free_pendings): Remove.
2226         (add_symbol_to_list, scoped_free_pendings)
2227         (finish_block_internal, buildsym_init): Update.
2228
2229 2018-07-20  Tom Tromey  <tom@tromey.com>
2230
2231         * xcoffread.c (read_xcoff_symtab): Update.
2232         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2233         Update.
2234         * dbxread.c (process_one_symbol): Update.
2235         * coffread.c (coff_symtab_read): Update.
2236         * buildsym.h (finish_block): Update.
2237         * buildsym.c (finish_block): Remove "listhead" argument.
2238         (end_symtab_get_static_block): Update.
2239
2240 2018-07-20  Tom Tromey  <tom@tromey.com>
2241
2242         * buildsym.h (class scoped_free_pendings): Remove constructor.
2243         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2244         method.
2245         <m_pending_block_obstack, m_pending_blocks>: New members.
2246         (pending_block_obstack, pending_blocks): Remove.
2247         (scoped_free_pendings::scoped_free_pendings): Default.
2248         (~scoped_free_pendings): Update.
2249         (free_pending_blocks): Remove.
2250         (finish_block_internal, record_pending_block, make_blockvector)
2251         (end_symtab_get_static_block, augment_type_symtab, push_context)
2252         (buildsym_init): Update.
2253
2254 2018-07-20  Tom Tromey  <tom@tromey.com>
2255
2256         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2257         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2258         members.
2259         (pending_addrmap, pending_addrmap_obstack)
2260         (pending_addrmap_interesting): Remove.
2261         (scoped_free_pendings, record_block_range, make_blockvector)
2262         (prepare_for_building, reset_symtab_globals, buildsym_init):
2263         Update.
2264
2265 2018-07-20  Tom Tromey  <tom@tromey.com>
2266
2267         * xcoffread.c (process_linenos): Update.
2268         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2269         * mdebugread.c (psymtab_to_symtab_1): Update.
2270         * dwarf2read.c (setup_type_unit_groups)
2271         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2272         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2273         * dbxread.c (process_one_symbol): Update.
2274         * coffread.c (coff_symtab_read, enter_linenos)
2275         (process_coff_symbol): Update.
2276         * buildsym.h (current_subfile): Don't declare.
2277         (get_current_subfile): Declare.
2278         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2279         member.
2280         (start_subfile, free_buildsym_compunit, push_subfile)
2281         (prepare_for_building, start_symtab): Update.
2282         (get_current_subfile): New function.
2283
2284 2018-07-20  Tom Tromey  <tom@tromey.com>
2285
2286         * coffread.c (coff_symtab_read): Update.
2287         * xcoffread.c (read_xcoff_symtab): Update.
2288         * dwarf2read.c (new_symbol): Update.
2289         (read_func_scope, read_lexical_block_scope): Update.
2290         * dbxread.c (process_one_symbol): Update.
2291         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2292         (outermost_context_p): Remove macro.
2293         (outermost_context_p, get_current_context_stack)
2294         (get_context_stack_depth): Declare.
2295         (pop_context): Return struct context_stack.
2296         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2297         member.
2298         (context_stack_size): Remove.
2299         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2300         (prepare_for_building, end_symtab_get_static_block)
2301         (augment_type_symtab, push_context): Update.
2302         (pop_context): Return struct context_stack.
2303         (outermost_context_p, get_current_context_stack)
2304         (get_context_stack_depth): New functions.
2305         (buildsym_init): Update.
2306
2307 2018-07-20  Tom Tromey  <tom@tromey.com>
2308
2309         * rust-exp.y: Now a pure parser.  Update all rules.
2310         (%union): Move earlier.
2311         (current_parser, work_obstack): Remove globals.
2312         (rust_parser, ~rust_parser): Update.
2313         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2314         lex_character, lex_number, lex_string, lex_identifier,
2315         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2316         convert_name, convert_params_to_expression,
2317         convert_ast_to_expression, ast_basic_type, ast_operation,
2318         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2319         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2320         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2321         ast_array_type, ast_slice_type, ast_reference_type,
2322         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2323         (rust_parse): Update.
2324         (rustyyerror, rustyylex): Add parser parameter.
2325         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2326         (rust_lex_stringish_test, rust_lex_test_sequence)
2327         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2328         (rust_lex_test_push_back, rust_lex_tests): Update.
2329
2330 2018-07-19  Pedro Alves  <palves@redhat.com>
2331
2332         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2333         gdb::unique_xmalloc_ptr.
2334         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2335         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2336         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2337         copy-initialization.
2338         * guile/scm-pretty-print.c (ppscm_print_children): Use
2339         gdb::unique_xmalloc_ptr instead of cleanups.
2340         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2341         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2342         gdb::unique_xmalloc_ptr.
2343         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2344         Adjust to use gdb::unique_xmalloc_ptr.
2345         * guile/scm-utils.c (extract_arg): Adjust.
2346         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2347         gdb::unique_xmalloc_ptr instead of a cleanup.
2348
2349 2018-07-19  Tom Tromey  <tom@tromey.com>
2350
2351         * utils.c (do_value_free_to_mark)
2352         (make_cleanup_value_free_to_mark): Remove.
2353         * utils.h (make_cleanup_value_free_to_mark): Remove.
2354
2355 2018-07-19  Pedro Alves  <palves@redhat.com>
2356
2357         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2358         forwarding reference.
2359
2360 2018-07-18  Pedro Alves  <palves@redhat.com>
2361
2362         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2363         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2364         cleanup.
2365
2366 2018-07-18  Pedro Alves  <palves@redhat.com>
2367
2368         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2369         exceptions.
2370         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2371         (gdbscm_wrap): New.
2372         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2373         directly instead of a cleanup.
2374         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2375         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2376         (vlscm_binop_gdbthrow): New, factored out from ...
2377         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2378         (vlscm_rich_compare): Use gdbscm_wrap.
2379         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2380         instead of a cleanup.
2381         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2382         cleanup.
2383         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2384         Use xfree directly instead of a cleanup.
2385         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2386         Adjust to use gdbscm_wrap and scoped_value_mark.
2387         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2388         (gdbscm_value_address, gdbscm_value_dereference)
2389         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2390         scoped_value_mark.
2391         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2392         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2393         scoped_value_mark.
2394         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2395         gdbscm_wrap and scoped_value_mark.
2396         (gdbscm_value_to_string): Use xfree directly instead of a
2397         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2398         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2399         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2400         scoped_value_mark.
2401         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2402         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2403         scoped_value_mark.
2404         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2405         gdbscm_wrap.
2406
2407 2018-07-18  Tom de Vries  <tdevries@suse.de>
2408
2409         * findvar.c (default_read_var_value): Also resolve dynamic type for
2410         LOC_OPTIMIZED_OUT vars.
2411
2412 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2413
2414         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2415         decoding.
2416
2417 2018-07-17  Tom Tromey  <tom@tromey.com>
2418
2419         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2420         (compute_enum_list, pascm_set_param_value_x)
2421         (gdbscm_parameter_value): Update.
2422         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2423         (gdbscm_scm_to_host_string): Update.
2424         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2425         Update.
2426         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2427         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2428         * guile/scm-string.c (gdbscm_scm_to_string): Return
2429         unique_xmalloc_ptr.
2430         (gdbscm_scm_to_host_string): Likewise.
2431
2432 2018-07-17  Tom Tromey  <tom@tromey.com>
2433
2434         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2435         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2436         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2437         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2438         unique_xmalloc_ptr.
2439
2440 2018-07-17  Tom Tromey  <tom@tromey.com>
2441
2442         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2443         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2444         Update.
2445         * guile/scm-cmd.c (cmdscm_function): Update.
2446         * guile/scm-pretty-print.c
2447         (ppscm_print_exception_unless_memory_error): Update.
2448         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2449         Return unique_xmalloc_ptr.
2450
2451 2018-07-17  Tom Tromey  <tom@tromey.com>
2452
2453         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2454         Use string_printf.
2455
2456 2018-07-17  Jim Wilson  <jimw@sifive.com>
2457
2458         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2459         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2460         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2461         unecessary braces after EF_RISCV_RVC test.  Delete call to
2462         set_gdbarch_decr_pc_after_break.
2463
2464         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2465         RISCV_LAST_FP_REGNUM + 1.
2466         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2467
2468 2018-07-17  Tom Tromey  <tom@tromey.com>
2469
2470         * configure.ac: Remove --disable-gdbcli.
2471         * configure: Rebuild.
2472         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2473         (SUBDIR_CLI_CFLAGS): Remove.
2474         (SFILES): Use SUBDIR_CLI_SRCS.
2475         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2476
2477 2018-07-17  Tom Tromey  <tom@tromey.com>
2478
2479         PR gdb/18624:
2480         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2481
2482 2018-07-16  Jim Wilson  <jimw@sifive.com>
2483
2484         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2485
2486 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2487
2488         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2489         variable.
2490         (libunwind_frame_sniffer): Likewise.
2491         (libunwind_frame_prev_register): Likewise.
2492         (libunwind_sigtramp_frame_sniffer): Likewise.
2493         * ia64-tdep.c (ia64_access_reg): Likewise.
2494         (ia64_access_rse_reg): Likewise.
2495         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2496         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2497
2498 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2499
2500         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2501
2502 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2503
2504         * remote-sim.c (gdbsim_target::close,
2505         gdbsim_target::mourn_inferior): Remove unused variables.
2506
2507 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2508
2509         * ia64-tdep.c (ktab_buf): New global.
2510         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2511         (get_kernel_table): Adjust.
2512
2513 2018-07-16  Tom Tromey  <tom@tromey.com>
2514
2515         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2516         * dwarf2read.c (using_directives, new_symbol): Use
2517         outermost_context_p.
2518         * dbxread.c (process_one_symbol): Use outermost_context_p.
2519         * coffread.c (coff_symtab_read): Use outermost_context_p.
2520
2521 2018-07-16  Tom Tromey  <tom@tromey.com>
2522
2523         * dwarf2read.c (using_directives, read_func_scope)
2524         (read_lexical_block_scope): Update.
2525         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2526         * buildsym.h (local_using_directives, global_using_directives):
2527         Don't declare.
2528         (get_local_using_directives, set_local_using_directives)
2529         (get_global_using_directives): Declare.
2530         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2531         m_global_using_directives>: New members.
2532         (finish_block_internal, prepare_for_building)
2533         (reset_symtab_globals, end_symtab_get_static_block)
2534         (push_context): Update.
2535         (get_local_using_directives, set_local_using_directives)
2536         (get_global_using_directives): New functions.
2537         (buildsym_init): Update.
2538
2539 2018-07-16  Tom Tromey  <tom@tromey.com>
2540
2541         * xcoffread.c (xcoff_initial_scan): Don't call
2542         free_pending_blocks.
2543         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2544         * buildsym.h (class scoped_free_pendings): Add constructor.
2545         (free_pending_blocks): Don't declare.
2546         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2547         (free_pending_blocks): Now static.
2548
2549 2018-07-16  Tom Tromey  <tom@tromey.com>
2550
2551         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2552         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2553         member.
2554         (struct subfile_stack): Remove.
2555         (subfile_stack): Remove.
2556         (push_subfile, pop_subfile, buildsym_init): Update.
2557
2558 2018-07-16  Tom Tromey  <tom@tromey.com>
2559
2560         * buildsym.c (push_subfile): Use gdb_assert.
2561         (pop_subfile): Use gdb_assert.
2562
2563 2018-07-16  Tom Tromey  <tom@tromey.com>
2564
2565         * buildsym.h (merge_symbol_lists): Remove.
2566         * buildsym.c (merge_symbol_lists): Remove.
2567
2568 2018-07-16  Tom Tromey  <tom@tromey.com>
2569
2570         * stabsread.c (scan_file_globals): Update comment.
2571         * stabsread.h (scan_file_globals): Move from buildsym.h.
2572         * buildsym.h (scan_file_globals): Move to stabsread.h.
2573
2574 2018-07-16  Tom Tromey  <tom@tromey.com>
2575
2576         * xcoffread.c (xcoff_new_init): Update.
2577         * mipsread.c (mipscoff_new_init): Update.
2578         * mdebugread.c (mdebug_build_psymtabs): Update.
2579         * elfread.c (elf_new_init): Update.
2580         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2581         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2582         * buildsym.h (buildsym_new_init): Don't declare.
2583         * buildsym.c (buildsym_new_init): Remove.
2584
2585 2018-07-16  Tom Tromey  <tom@tromey.com>
2586
2587         * stabsread.h (within_function): Move from buildsym.h.
2588         * stabsread.c (start_stabs): Clear within_function.
2589         * coffread.c (coff_start_symtab): Clear within_function.
2590         * buildsym.h (within_function): Move to stabsread.h.
2591         * buildsym.c (prepare_for_building): Update.
2592
2593 2018-07-16  Tom Tromey  <tom@tromey.com>
2594
2595         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2596         * dwarf2read.c (dwarf2_start_symtab): Don't set
2597         processing_gcc_compilation.
2598         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2599
2600 2018-07-16  Tom Tromey  <tom@tromey.com>
2601
2602         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2603         (next_symbol_text_func): Move from buildsym.h.
2604         * stabsread.c (hashname): Move from buildsym.c.
2605         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2606         (next_symbol_text_func, hashname): Move to stabsread.h.
2607         * buildsym.c: Don't include bcache.h
2608         (hashname): Move to stasbread.c.
2609
2610 2018-07-16  Tom Tromey  <tom@tromey.com>
2611
2612         * buildsym.h (context_stack_size): Don't declare.
2613         * buildsym.c (context_stack_size): New global.
2614
2615 2018-07-16  Tom Tromey  <tom@tromey.com>
2616
2617         * dbxread.c (processing_acc_compilation): New global.
2618         * buildsym.h (processing_acc_compilation): Don't declare.
2619
2620 2018-07-16  Tom Tromey  <tom@tromey.com>
2621
2622         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2623         * dbxread.c (read_ofile_symtab): Update.
2624         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2625         * buildsym.h (last_source_start_addr): Remove.
2626         (set_last_source_start_addr, get_last_source_start_addr):
2627         Declare.
2628         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2629         parameter.
2630         (struct buildsym_compunit) <m_last_source_start_addr>: New
2631         member.
2632         (prepare_for_building): Remove start_addr parameter.
2633         (start_symtab, restart_symtab, end_symtab_get_static_block)
2634         (end_symtab_with_blockvector): Update.
2635         (set_last_source_start_addr, get_last_source_start_addr): New
2636         functions.
2637
2638 2018-07-16  Tom Tromey  <tom@tromey.com>
2639
2640         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2641         member.
2642         (have_line_numbers): Remove.
2643         (record_line, prepare_for_building, end_symtab_get_static_block)
2644         (augment_type_symtab): Update.
2645
2646 2018-07-16  Tom Tromey  <tom@tromey.com>
2647
2648         * buildsym.c (~buildsym_compunit): Free the macro table.
2649         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2650         methods.
2651         <m_pending_macros>: New member.
2652         (pending_macros): Remove.
2653         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2654         (reset_symtab_globals, end_symtab_get_static_block)
2655         (end_symtab_with_blockvector, augment_type_symtab)
2656         (buildsym_init): Update.
2657
2658 2018-07-16  Tom Tromey  <tom@tromey.com>
2659
2660         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2661         parameter.
2662         (buildsym_compunit::set_last_source_file): New method.
2663         <m_last_source_file>: New member.
2664         (prepare_for_building): Remove "name" parameter.
2665         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2666         (last_source_file): Remove.
2667         (set_last_source_file, get_last_source_file): Update.
2668
2669 2018-07-16  Tom Tromey  <tom@tromey.com>
2670
2671         * buildsym.c (prepare_for_building): Add assert.
2672
2673 2018-07-16  Tom Tromey  <tom@tromey.com>
2674
2675         * buildsym.c (~buildsym_compunit): Update.
2676         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2677         (start_subfile, patch_subfile_names)
2678         (end_symtab_with_blockvector): Update.
2679
2680 2018-07-16  Tom Tromey  <tom@tromey.com>
2681
2682         * buildsym.c (struct buildsym_compunit): Add constructor,
2683         destructor, initializers.
2684         (start_buildsym_compunit): Remove.
2685         (free_buildsym_compunit): Use "delete".
2686         (start_symtab, restart_symtab): Use "new".
2687
2688 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2689
2690         * symfile.c (set_objfile_default_section_offset): Remove struct
2691         keyword.
2692
2693 2018-07-14  Stafford Horne  <shorne@gmail.com>
2694
2695         * (Responsible Maintainers): Add myself as or1k maintainer.
2696
2697 2018-07-13  Tom Tromey  <tom@tromey.com>
2698
2699         * symfile.c (set_objfile_default_section_offset): Use extra braces
2700         around initializer.
2701
2702 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2703
2704         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2705         non-branching basr.
2706
2707 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2708
2709         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2710         unittests/cli-utils-selftests.c
2711         * unittests/cli-utils-selftests.c: New file.
2712
2713 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2714
2715         * NEWS: Mention new commands. Mention change to 'thread apply'.
2716
2717 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2718
2719         * thread.c (thr_try_catch_cmd): New function.
2720         (thread_apply_all_command): Handle qcs flags.
2721         (thread_apply_command): Handle qcs flags.
2722         (taas_command): New function.
2723         (tfaas_command): New function.
2724         (_initialize_thread): Update to setup the new commands 'taas
2725         and 'tfaas'. Change doc string for 'thread apply'.
2726
2727 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2728
2729         * stack.c: (trailing_outermost_frame): New function, mostly
2730         extracted from backtrace_command_1.
2731         (leading_innermost_frame): New function.
2732         (backtrace_command_1): Update to call trailing_outermost_frame.
2733         (frame_apply_command_count): New function.
2734         (frame_apply_level_command): New function.
2735         (frame_apply_all_command): New function.
2736         (frame_apply_command): New function.
2737         (faas_command): New function.
2738         (frame_cmd_list): New variable.
2739         (_initialize_stack): Update to setup the new commands 'frame apply'
2740         and 'faas'.
2741
2742 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2743
2744         * cli-utils.c (number_or_range_parser::get_number): Only handle
2745         numbers or convenience var as numbers.
2746         (parse_flags): New function.
2747         (parse_flags_qcs): New function.
2748         (number_or_range_parser::finished): Ensure parsing end is detected
2749         before end of string.
2750         * cli-utils.h (parse_flags): New function.
2751         (parse_flags_qcs): New function.
2752         (number_or_range_parser): Remove m_finished bool.
2753         (number_or_range_parser::skip_range): Set m_in_range to false.
2754
2755 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2756
2757         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2758         on Windows.
2759
2760 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2761             Jan Kratochvil  <jan.kratochvil@redhat.com>
2762             Paul Fertser  <fercerpav@gmail.com>
2763             Tsutomu Seki  <sekiriki@gmail.com>
2764             Pedro Alves  <palves@redhat.com>
2765
2766         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2767         'unittests/parse-connection-spec-selftests.c'.
2768         (COMMON_SFILES): Add 'common/netstuff.c'.
2769         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2770         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2771         * common/netstuff.c: New file.
2772         * common/netstuff.h: New file.
2773         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2774         (wait_for_connect): Update comment.  New parameter
2775         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2776         Use 'sock' directly instead of 'scb->fd'.
2777         (try_connect): New function, with code from 'net_open'.
2778         (net_open): Rewrite main loop to deal with multiple
2779         sockets/addresses.  Handle IPv6-style hostnames; implement
2780         support for IPv6 connections.
2781         * unittests/parse-connection-spec-selftests.c: New file.
2782
2783 2018-07-11  Pedro Alves  <palves@redhat.com>
2784
2785         PR gdb/23377
2786         * remote.c (remote_target::remote_detach_pid): Call
2787         set_current_process.
2788
2789 2018-07-11  Pedro Alves  <palves@redhat.com>
2790
2791         * h8300-tdep.c (h8300_gdbarch_init): Remove
2792         set_gdbarch_ecoff_reg_to_regnum calls.
2793
2794 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2795
2796         PR c++/23373
2797         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2798         offsets/sizes for static members of a class/struct.
2799
2800 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2801
2802         * target-descriptions.c (tdesc_register_bitsize): Rename.
2803         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2804         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2805         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2806
2807 2018-07-10  Tom Tromey  <tom@tromey.com>
2808
2809         * breakpoint.c (moribund_locations): Now static and a
2810         std::vector.
2811         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2812         (build_bpstat_chain, update_global_location_list)
2813         (breakpoint_retire_moribund): Update.
2814         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2815         VEC.
2816
2817 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2818
2819         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2820         (riscv_register_reggroup_p): Use new function, remove unneeded
2821         parenthesis.
2822         (riscv_push_dummy_call): Extend assert to compare against xlen or
2823         flen based on register type.
2824
2825 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2826
2827         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2828
2829 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2830
2831         * remote.c (show_hardware_watchpoint_limit): New function.
2832         (show_hardware_watchpoint_length_limit): New function.
2833         (show_hardware_breakpoint_limit): New function.
2834         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2835         where appropriate, update help text.
2836
2837 2018-07-09  Tom Tromey  <tom@tromey.com>
2838
2839         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2840         (CLIBS): Don't mention NAT_CLIBS.
2841
2842 2018-07-09  Tom Tromey  <tom@tromey.com>
2843
2844         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2845         (LIBGDB_OBS, clean mostlyclean): Update.
2846         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2847
2848 2018-07-09  Tom Tromey  <tom@tromey.com>
2849
2850         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2851         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2852         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2853
2854 2018-07-09  Tom Tromey  <tom@tromey.com>
2855
2856         * Makefile.in (ALLDEPFILES): Remove exec.c.
2857         (COMMON_OBS): Remove exec.o.
2858         (COMMON_SFILES): Add exec.c.
2859
2860 2018-07-09  Tom Tromey  <tom@tromey.com>
2861
2862         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2863
2864 2018-07-09  Tom Tromey  <tom@tromey.com>
2865
2866         * Makefile.in (clean mostlyclean): Remove stamp-version.
2867         (version.c): Depend on stamp-version.
2868         (stamp-version): New rule, from version.c rule.
2869
2870 2018-07-09  Tom Tromey  <tom@tromey.com>
2871
2872         * Makefile.in (init.c): Depend on stamp-init.
2873         (stamp-init): New rule, from init.c rule.
2874         (clean mostlyclean): Remove stamp-init.
2875
2876 2018-07-09  Tom Tromey  <tom@tromey.com>
2877
2878         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2879         SUBDIR_GCC_COMPILE_SRCS.
2880
2881 2018-07-09  Tom Tromey  <tom@tromey.com>
2882
2883         * Makefile.in (init.c): Remove some unused sed rules.
2884
2885 2018-07-09  Tom Tromey  <tom@tromey.com>
2886
2887         * Makefile.in (TSOBS): Remove.
2888         (INIT_FILES): Update.
2889         (LIBGDB_OBS): Update.
2890         (COMMON_SFILES): Add inflow.c.
2891         (SFILES): Remove inflow.c.
2892
2893 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2894
2895         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2896
2897 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2898
2899         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2900         get_saveloc_name, is_signal_frame_name, step_name,
2901         init_remote_name, create_addr_space_name,
2902         destroy_addr_space_name, search_unwind_table_name,
2903         find_dyn_list_name): Constify.
2904
2905 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2906
2907         * darwin-nat.c (darwin_pthread_kill): New function.
2908         (darwin_resume_thread): Use darwin_pthread_kill.
2909
2910 2018-07-05  Tom de Vries  <tdevries@suse.de>
2911
2912         * macroexp.c (macro_buffer) <operator=>: New member function.
2913
2914 2018-07-04  Tom Tromey  <tom@tromey.com>
2915
2916         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2917
2918 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2919
2920         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2921         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2922         * maint.c: Likewise.
2923         * top.c: Likewise.
2924
2925 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2926
2927         * NEWS: Create a new section for the next release branch.
2928         Rename the section of the current branch, now that it has
2929         been cut.
2930
2931 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2932
2933         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2934         * version.in: Bump version to 8.2.50.DATE-git.
2935
2936 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2937             Pedro Alves  <palves@redhat.com>
2938
2939         * linux-nat.c (linux_init_ptrace): Rename to ...
2940         (linux_init_ptrace_procfs): ... this.  Call
2941         linux_proc_init_warnings.
2942         (linux_nat_target::post_attach)
2943         (linux_nat_target::post_startup_inferior): Adjust.
2944         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2945         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2946
2947 2018-07-04  Tom de Vries  <tdevries@suse.de>
2948
2949         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2950         check ...
2951         (read_comp_unit_head): ... here.
2952
2953 2018-07-03  Tom Tromey  <tom@tromey.com>
2954
2955         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2956         (stop_tracing, tstatus_command)
2957         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2958         (print_one_static_tracepoint_marker): Update.
2959         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2960         std::vector.
2961         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2962         VEC.
2963         (all_tracepoints, static_tracepoints_here): Return std::vector.
2964
2965 2018-07-03  Tom Tromey  <tom@tromey.com>
2966
2967         * common/ptid.c (ptid_equal): Remove.
2968         * common/ptid.h (ptid_equal): Don't declare.
2969         * ada-tasks.c: Update.
2970         * breakpoint.c: Update.
2971         * common/agent.c: Update.
2972         * corelow.c: Update.
2973         * darwin-nat-info.c: Update.
2974         * darwin-nat.c: Update.
2975         * dcache.c: Update.
2976         * dtrace-probe.c: Update.
2977         * dummy-frame.c: Update.
2978         * fbsd-nat.c: Update.
2979         * frame.c: Update.
2980         * gdbthread.h: Update.
2981         * gnu-nat.c: Update.
2982         * go32-nat.c: Update.
2983         * inf-loop.c: Update.
2984         * inf-ptrace.c: Update.
2985         * infcall.c: Update.
2986         * infcmd.c: Update.
2987         * inflow.c: Update.
2988         * infrun.c: Update.
2989         * linux-fork.c: Update.
2990         * linux-nat.c: Update.
2991         * linux-thread-db.c: Update.
2992         * mi/mi-cmd-var.c: Update.
2993         * mi/mi-interp.c: Update.
2994         * mi/mi-main.c: Update.
2995         * nto-procfs.c: Update.
2996         * ppc-linux-tdep.c: Update.
2997         * procfs.c: Update.
2998         * python/py-inferior.c: Update.
2999         * python/py-record-btrace.c: Update.
3000         * python/py-record.c: Update.
3001         * ravenscar-thread.c: Update.
3002         * regcache.c: Update.
3003         * remote-sim.c: Update.
3004         * remote.c: Update.
3005         * sol-thread.c: Update.
3006         * solib.c: Update.
3007         * target.c: Update.
3008         * tui/tui-stack.c: Update.
3009         * varobj.c: Update.
3010         * windows-nat.c: Update.
3011         * windows-tdep.c: Update.
3012
3013 2018-07-03  Tom Tromey  <tom@tromey.com>
3014
3015         * common/ptid.c (ptid_match): Remove.
3016         * common/ptid.h (ptid_match): Don't declare.
3017         * fbsd-nat.c: Update.
3018         * infcmd.c: Update.
3019         * infrun.c: Update.
3020         * linux-nat.c: Update.
3021         * record-btrace.c: Update.
3022         * regcache.c: Update.
3023         * remote.c: Update.
3024
3025 2018-07-03  Tom Tromey  <tom@tromey.com>
3026
3027         * common/ptid.c (ptid_tid_p): Remove.
3028         * common/ptid.h (ptid_tid_p): Don't declare.
3029         * sol-thread.c: Update.
3030
3031 2018-07-03  Tom Tromey  <tom@tromey.com>
3032
3033         * common/ptid.c (ptid_lwp_p): Remove.
3034         * common/ptid.h (ptid_lwp_p): Don't declare.
3035         * fbsd-nat.c: Update.
3036         * linux-nat.c: Update.
3037         * nat/linux-procfs.c: Update.
3038         * nat/x86-linux-dregs.c: Update.
3039         * sol-thread.c: Update.
3040
3041 2018-07-03  Tom Tromey  <tom@tromey.com>
3042
3043         * common/ptid.c (ptid_is_pid): Remove.
3044         * common/ptid.h (ptid_is_pid): Don't declare.
3045         * infrun.c: Update.
3046         * linux-nat.c: Update.
3047         * mi/mi-interp.c: Update.
3048         * remote.c: Update.
3049         * thread.c: Update.
3050
3051 2018-07-03  Tom Tromey  <tom@tromey.com>
3052
3053         * common/ptid.c (ptid_get_tid): Remove.
3054         * common/ptid.h (ptid_get_tid): Don't declare.
3055         * ada-tasks.c: Update.
3056         * aix-thread.c: Update.
3057         * bsd-uthread.c: Update.
3058         * darwin-nat.c: Update.
3059         * fbsd-nat.c: Update.
3060         * i386-darwin-nat.c: Update.
3061         * infrun.c: Update.
3062         * linux-tdep.c: Update.
3063         * nto-procfs.c: Update.
3064         * ppc-ravenscar-thread.c: Update.
3065         * python/py-infthread.c: Update.
3066         * ravenscar-thread.c: Update.
3067         * sol-thread.c: Update.
3068         * sparc-ravenscar-thread.c: Update.
3069         * windows-nat.c: Update.
3070
3071 2018-07-03  Tom Tromey  <tom@tromey.com>
3072
3073         * common/ptid.c (ptid_get_lwp): Remove.
3074         * common/ptid.h (ptid_get_lwp): Don't declare.
3075         * aarch64-linux-nat.c: Update.
3076         * ada-tasks.c: Update.
3077         * aix-thread.c: Update.
3078         * amd64-linux-nat.c: Update.
3079         * arm-linux-nat.c: Update.
3080         * corelow.c: Update.
3081         * fbsd-nat.c: Update.
3082         * fbsd-tdep.c: Update.
3083         * gnu-nat.c: Update.
3084         * i386-cygwin-tdep.c: Update.
3085         * i386-gnu-nat.c: Update.
3086         * i386-linux-nat.c: Update.
3087         * ia64-linux-nat.c: Update.
3088         * inf-ptrace.c: Update.
3089         * infrun.c: Update.
3090         * linux-fork.c: Update.
3091         * linux-nat.c: Update.
3092         * linux-tdep.c: Update.
3093         * linux-thread-db.c: Update.
3094         * mips-linux-nat.c: Update.
3095         * nat/aarch64-linux-hw-point.c: Update.
3096         * nat/aarch64-linux.c: Update.
3097         * nat/linux-btrace.c: Update.
3098         * nat/linux-osdata.c: Update.
3099         * nat/linux-procfs.c: Update.
3100         * nat/x86-linux-dregs.c: Update.
3101         * obsd-nat.c: Update.
3102         * ppc-fbsd-nat.c: Update.
3103         * ppc-linux-nat.c: Update.
3104         * procfs.c: Update.
3105         * python/py-infthread.c: Update.
3106         * ravenscar-thread.c: Update.
3107         * remote.c: Update.
3108         * s390-linux-nat.c: Update.
3109         * sol-thread.c: Update.
3110         * sol2-tdep.c: Update.
3111         * spu-linux-nat.c: Update.
3112         * x86-linux-nat.c: Update.
3113         * xtensa-linux-nat.c: Update.
3114
3115 2018-07-03  Tom Tromey  <tom@tromey.com>
3116
3117         * common/ptid.c (ptid_get_pid): Remove.
3118         * common/ptid.h (ptid_get_pid): Don't declare.
3119         * aarch64-linux-nat.c: Update.
3120         * ada-lang.c: Update.
3121         * aix-thread.c: Update.
3122         * alpha-bsd-nat.c: Update.
3123         * amd64-fbsd-nat.c: Update.
3124         * amd64-linux-nat.c: Update.
3125         * arm-linux-nat.c: Update.
3126         * arm-nbsd-nat.c: Update.
3127         * auxv.c: Update.
3128         * break-catch-syscall.c: Update.
3129         * breakpoint.c: Update.
3130         * bsd-uthread.c: Update.
3131         * corelow.c: Update.
3132         * ctf.c: Update.
3133         * darwin-nat.c: Update.
3134         * fbsd-nat.c: Update.
3135         * fbsd-tdep.c: Update.
3136         * gcore.c: Update.
3137         * gnu-nat.c: Update.
3138         * hppa-nbsd-nat.c: Update.
3139         * hppa-obsd-nat.c: Update.
3140         * i386-fbsd-nat.c: Update.
3141         * ia64-linux-nat.c: Update.
3142         * inf-ptrace.c: Update.
3143         * infcmd.c: Update.
3144         * inferior.c: Update.
3145         * inferior.h: Update.
3146         * inflow.c: Update.
3147         * infrun.c: Update.
3148         * linux-fork.c: Update.
3149         * linux-nat.c: Update.
3150         * linux-tdep.c: Update.
3151         * linux-thread-db.c: Update.
3152         * m68k-bsd-nat.c: Update.
3153         * mi/mi-interp.c: Update.
3154         * mi/mi-main.c: Update.
3155         * mips-linux-nat.c: Update.
3156         * mips-nbsd-nat.c: Update.
3157         * mips64-obsd-nat.c: Update.
3158         * nat/aarch64-linux-hw-point.c: Update.
3159         * nat/aarch64-linux.c: Update.
3160         * nat/linux-btrace.c: Update.
3161         * nat/linux-osdata.c: Update.
3162         * nat/linux-procfs.c: Update.
3163         * nat/x86-linux-dregs.c: Update.
3164         * nto-procfs.c: Update.
3165         * obsd-nat.c: Update.
3166         * ppc-linux-nat.c: Update.
3167         * ppc-nbsd-nat.c: Update.
3168         * ppc-obsd-nat.c: Update.
3169         * proc-service.c: Update.
3170         * procfs.c: Update.
3171         * python/py-inferior.c: Update.
3172         * python/py-infthread.c: Update.
3173         * ravenscar-thread.c: Update.
3174         * record.c: Update.
3175         * remote-sim.c: Update.
3176         * remote.c: Update.
3177         * rs6000-nat.c: Update.
3178         * s390-linux-nat.c: Update.
3179         * sh-nbsd-nat.c: Update.
3180         * sol-thread.c: Update.
3181         * sparc-nat.c: Update.
3182         * sparc64-tdep.c: Update.
3183         * spu-linux-nat.c: Update.
3184         * spu-tdep.c: Update.
3185         * target-debug.h: Update.
3186         * target.c: Update.
3187         * thread.c: Update.
3188         * tid-parse.c: Update.
3189         * tracefile-tfile.c: Update.
3190         * vax-bsd-nat.c: Update.
3191         * windows-nat.c: Update.
3192         * x86-linux-nat.c: Update.
3193         * x86-nat.c: Update.
3194
3195 2018-07-03  Tom Tromey  <tom@tromey.com>
3196
3197         * common/ptid.c (pid_to_ptid): Remove.
3198         * common/ptid.h (pid_to_ptid): Don't declare.
3199         * aix-thread.c: Update.
3200         * arm-linux-nat.c: Update.
3201         * common/ptid.c: Update.
3202         * common/ptid.h: Update.
3203         * corelow.c: Update.
3204         * ctf.c: Update.
3205         * darwin-nat.c: Update.
3206         * fbsd-nat.c: Update.
3207         * fork-child.c: Update.
3208         * gnu-nat.c: Update.
3209         * go32-nat.c: Update.
3210         * inf-ptrace.c: Update.
3211         * infcmd.c: Update.
3212         * inferior.c: Update.
3213         * infrun.c: Update.
3214         * linux-fork.c: Update.
3215         * linux-nat.c: Update.
3216         * nat/aarch64-linux-hw-point.c: Update.
3217         * nat/fork-inferior.c: Update.
3218         * nat/x86-linux-dregs.c: Update.
3219         * nto-procfs.c: Update.
3220         * obsd-nat.c: Update.
3221         * procfs.c: Update.
3222         * progspace.c: Update.
3223         * remote.c: Update.
3224         * rs6000-nat.c: Update.
3225         * s390-linux-nat.c: Update.
3226         * sol-thread.c: Update.
3227         * spu-linux-nat.c: Update.
3228         * target.c: Update.
3229         * top.c: Update.
3230         * tracefile-tfile.c: Update.
3231         * windows-nat.c: Update.
3232
3233 2018-07-03  Tom Tromey  <tom@tromey.com>
3234
3235         * common/ptid.h (ptid_build): Don't declare.
3236         * common/ptid.c (ptid_build): Remove.
3237         * aix-thread.c: Update.
3238         * bsd-kvm.c: Update.
3239         * bsd-uthread.c: Update.
3240         * common/agent.c: Update.
3241         * common/ptid.c: Update.
3242         * common/ptid.h: Update.
3243         * corelow.c: Update.
3244         * darwin-nat.c: Update.
3245         * fbsd-nat.c: Update.
3246         * gnu-nat.c: Update.
3247         * linux-fork.c: Update.
3248         * linux-nat.c: Update.
3249         * linux-thread-db.c: Update.
3250         * nat/linux-osdata.c: Update.
3251         * nat/linux-procfs.c: Update.
3252         * nto-procfs.c: Update.
3253         * obsd-nat.c: Update.
3254         * proc-service.c: Update.
3255         * procfs.c: Update.
3256         * ravenscar-thread.c: Update.
3257         * remote-sim.c: Update.
3258         * remote.c: Update.
3259         * sol-thread.c: Update.
3260         * target.c: Update.
3261         * windows-nat.c: Update.
3262
3263 2018-07-03  Tom Tromey  <tom@tromey.com>
3264
3265         * infrun.c (follow_exec): Use exit_inferior_silent.
3266         * inferior.c (exit_inferior_num_silent): Remove.
3267         * inferior.h (exit_inferior_num_silent): Don't declare.
3268
3269 2018-07-03  Tom Tromey  <tom@tromey.com>
3270
3271         PR cli/23340:
3272         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3273         inferior_ptid on error.
3274
3275 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3276             Simon Marchi  <simon.marchi@polymtl.ca>
3277
3278         PR tdep/8282
3279         * disasm.h (gdb_disassembler): Add
3280         `m_disassembler_options_holder'. member
3281         * disasm.c (get_all_disassembler_options): New function.
3282         (gdb_disassembler::gdb_disassembler): Use it.
3283         (gdb_buffered_insn_length_init_dis): Likewise.
3284         (gdb_buffered_insn_length): Adjust accordingly.
3285         (set_disassembler_options): Handle options with arguments.
3286         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3287         line if showing options with descriptions.
3288         (disassembler_options_completer): Adapt to using the
3289         `disasm_options_and_args_t' structure.
3290         * mips-tdep.c (mips_disassembler_options): New variable.
3291         (mips_disassembler_options_o32): Likewise.
3292         (mips_disassembler_options_n32): Likewise.
3293         (mips_disassembler_options_n64): Likewise.
3294         (gdb_print_insn_mips): Don't set `disassembler_options'.
3295         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3296         functions.
3297         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3298         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3299         `gdbarch_disassembler_options_implicit' and
3300         `gdbarch_valid_disassembler_options'.
3301         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3302         `disasm_options_and_args_t' structure.
3303         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3304         method.
3305         (valid_disassembler_options): Switch from `disasm_options_t' to
3306         the `disasm_options_and_args_t' structure.
3307         * NEWS: Document `set disassembler-options' support for the MIPS
3308         target.
3309         * gdbarch.h: Regenerate.
3310         * gdbarch.c: Regenerate.
3311
3312 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3313
3314         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3315
3316 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3317
3318         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3319         parameter in call to amd64_target_description.
3320         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3321         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3322         (amd64fbsd_init_abi): Likewise.
3323         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3324         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3325         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3326         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3327
3328 2018-06-29  Pedro Alves  <palves@redhat.com>
3329
3330         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3331         "segments" parameter.
3332         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3333         (_initialize_amd64_tdep): Update call to
3334         amd64_create_target_description.
3335         (amd64_target_description): Add "segments" parameter.  Adjust
3336         the implementation to use it.
3337         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3338         call to amd64_create_target_description.
3339         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3340         * gdb/arch/amd64.h (amd64_create_target_description): Add
3341         "segments" register.
3342         * gdb/arch/amd64.c (amd64_create_target_description): Add
3343         "segments" parameter.  Call create_feature_i386_64bit_segments
3344         only if SEGMENTS is true.
3345         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3346         call to amd64_create_target_description.
3347
3348 2018-06-29  Pedro Alves  <palves@redhat.com>
3349
3350         * thread.c (thread_target_id_str): New, factored out from ...
3351         (print_thread_info_1): ... here.  Use it to compute the max
3352         "Target Id" column width.
3353
3354 2018-06-29  Pedro Alves  <palves@redhat.com>
3355
3356         * remote.c (remote_target::extra_thread_info): Delete
3357         'display_buf' and 'n' locals.  from the cache, regardless of
3358         packet mechanims is in use.  Use cache for qThreadExtra and qP
3359         methods too.
3360
3361 2018-06-29  Pedro Alves  <palves@redhat.com>
3362
3363         * blockframe.c (find_pc_sect_containing_function): New function.
3364         * breakpoint.c (print_breakpoint_location): Don't call
3365         find_pc_sect_function.
3366         * linespec.c (create_sals_line_offset): Record the location's
3367         symbol in the sal.
3368         * linespec.c (convert_address_location_to_sals): Fill in sal's
3369         symbol with find_pc_sect_containing_function.
3370         * symtab.c (find_function_start_sal): Rename to ...
3371         (find_function_start_sal_1): ... this.
3372         (find_function_start_sal): Reimplement as wrapper around
3373         find_function_start_sal_1, and use
3374         find_pc_sect_containing_function to fill in the sal's symbol.
3375         (find_function_start_sal(symbol*, bool)): Adjust.
3376         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3377         comments.
3378         (find_pc_sect_containing_function): Declare.
3379
3380 2018-06-29  Pedro Alves  <palves@redhat.com>
3381
3382         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3383         true if the the location has no symbol.
3384
3385 2018-06-28  Tom Tromey  <tom@tromey.com>
3386
3387         * NEWS: Mention --enable-codesign.
3388         * silent-rules.mk (ECHO_SIGN): New variable.
3389         * configure.ac: Add --enable-codesign.
3390         * configure: Rebuild.
3391         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3392         (gdb$(EXEEXT)): Optionally invoke codesign.
3393
3394 2018-06-28  Pedro Alves  <palves@redhat.com>
3395
3396         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3397         comments.
3398         (switch_to_thread_no_regs): Adjust comment.
3399         * infcmd.c (stop_pc): Delete.
3400         (post_create_inferior, info_program_command): Replace references
3401         to stop_pc with references to thread_info->suspend.stop_pc.
3402         * inferior.h (stop_pc): Delete declaration.
3403         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3404         (handle_inferior_event_1, handle_signal_stop)
3405         (process_event_stop_test, keep_going_stepped_thread)
3406         (handle_step_into_function, handle_step_into_function_backward)
3407         (print_stop_location): Replace references to stop_pc with
3408         references to thread_info->suspend.stop_pc.
3409         (struct infcall_suspend_state) <stop_pc>: Delete field.
3410         (save_infcall_suspend_state, restore_infcall_suspend_state):
3411         Remove references to inf_stat->stop_pc.
3412         * linux-fork.c (fork_load_infrun_state): Likewise.
3413         * record-btrace.c (record_btrace_set_replay): Likewise.
3414         * record-full.c (record_full_goto_entry): Likewise.
3415         * remote.c (print_one_stopped_thread): Likewise.
3416         * target.c (target_resume): Extend comment.
3417         * thread.c (set_executing_thread): New.
3418         (set_executing): Use it.
3419         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3420         Remove references to stop_pc.
3421
3422 2018-06-28  Pedro Alves  <palves@redhat.com>
3423
3424         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3425         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3426
3427 2018-06-28  Tom Tromey  <tom@tromey.com>
3428
3429         * coffread.c (coff_symfile_finish): Update.
3430         * xcoffread.c (xcoff_symfile_finish): Update.
3431         * elfread.c (elf_symfile_finish): Update.
3432         * symfile.h (dwarf2_free_objfile): Don't declare.
3433         * dwarf2read.c (_initialize_dwarf2_read): Use
3434         register_objfile_data_with_cleanup.
3435         (dwarf2_free_objfile): Now static.  Change signature.
3436
3437 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3438
3439         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3440         option "-o" to add-symbol-file-load to add an offset to each
3441         section's load address.
3442         * symfile.c (set_objfile_default_section_offset): New function.
3443
3444 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3445
3446         * symfile.c (add_symbol_file_command): Make sure that sections
3447         with the same name are sorted in the same order.
3448
3449 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3450
3451         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3452         require the second argument.  If omitted, load sections at the
3453         addresses specified in the file.
3454
3455 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3456
3457         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3458         (_initialize_symfile): Add option "-o" to symbol-file to add an
3459         offset to each section of the symbol file.
3460
3461 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3462
3463         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3464
3465 2018-06-27  Tom Tromey  <tom@tromey.com>
3466
3467         * stack.c (_initialize_stack): Update "func" help text.
3468
3469 2018-06-27  Tom Tromey  <tom@tromey.com>
3470
3471         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3472         std::vector.
3473         (unwind_infopy_str, pyuw_create_unwind_info)
3474         (unwind_infopy_add_saved_register, pyuw_sniffer)
3475         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3476         Update.
3477         (struct saved_reg): Add constructor.
3478         <value>: Now a gdbpy_ref<>.
3479
3480 2018-06-27  Tom Tromey  <tom@tromey.com>
3481
3482         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3483
3484 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3485
3486         * gdb-gdb.py.in: Format using autopep8.
3487
3488 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3489
3490         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3491         (type_lookup_function): Recognize CORE_ADDR values.
3492
3493 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3494
3495         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3496         print tag_name.
3497
3498 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3499
3500         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3501         <__lt__>: Add.
3502
3503 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3504
3505         * gdb-gdb.py: Move to...
3506         * gdb-gdb.py.in: ... here.
3507         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3508         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3509         dependencies.
3510         (distclean): Remove gdb-gdb.py when cleaning.
3511         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3512         * configure: Re-generate.
3513
3514 2018-06-27  Pedro Alves  <palves@redhat.com>
3515
3516         * proc-service.c (get_ps_regcache): New.
3517         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3518         (ps_lsetfpregs): Use it.
3519
3520 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3521
3522         PR gdb/21695
3523         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3524         (dwarf_decode_lines_1): Adjust.
3525
3526 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3527
3528         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3529         override.
3530         <info_proc>: Likewise.
3531
3532 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3533
3534         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3535         to windows_fetch_one_register, and only handle the case of
3536         fetching one register.  Move the code that reloads the context
3537         and iterates over all registers if R is negative to...
3538         (windows_nat_target::fetch_registers): ... here.
3539         (do_windows_store_inferior_registers): Rename to
3540         windows_store_one_register, and only handle the case of storing
3541         one register.  Move the code that handles the case where r is
3542         negative to...
3543         (windows_nat_target::store_registers) ... here.
3544
3545 2018-06-26  Tom Tromey  <tom@tromey.com>
3546
3547         PR rust/22574:
3548         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3549         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3550         Update.
3551         (rust_internal_print_type): Add podata parameter.
3552         (rust_print_type): Update.
3553
3554 2018-06-26  Tom Tromey  <tom@tromey.com>
3555
3556         * typeprint.h (struct print_offset_data) <update, finish,
3557         maybe_print_hole>: New methods.
3558         <indentation>: New constant.
3559         * typeprint.c (print_offset_data::indentation): Define.
3560         (print_offset_data::maybe_print_hole, print_offset_data::update)
3561         (print_offset_data::finish): Move from c-typeprint.c and rename.
3562         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3563         (print_spaces_filtered_with_print_options): Update.
3564         (c_print_type_union_field_offset, maybe_print_hole)
3565         (c_print_type_struct_field_offset): Move to typeprint.c and
3566         rename.
3567         (c_type_print_base_struct_union): Update.
3568
3569 2018-06-25  Pedro Alves  <palves@redhat.com>
3570
3571         * gdbthread.h (thread_info_ref, delete_thread)
3572         (delete_thread_silent, first_thread_of_inferior)
3573         (any_thread_of_inferior, switch_to_thread)
3574         (enable_thread_stack_temporaries)
3575         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3576         (get_last_thread_stack_temporary)
3577         (value_in_thread_stack_temporaries, can_access_registers_thread):
3578         Spell out "struct thread_info" instead of just "thread_info".
3579         * inferior.h (notice_new_inferior): Likewise.
3580
3581 2018-06-25  Pedro Alves  <palves@redhat.com>
3582
3583         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3584         pass thread_info pointer to delete_thread.
3585         (windows_nat_target::detach): Pass inferior pointer to
3586         detach_inferior.
3587         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3588         delete_thread.
3589         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3590         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3591         and pass a thread_info pointer to delete_thread.
3592         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3593         pass thread_info pointer to delete_thread.
3594         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3595         delete_thread_silent call.
3596         * procfs.c (procfs_target::detach): Pass inferior pointer to
3597         detach_inferior.
3598         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3599         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3600         delete_thread_silent call.
3601         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3602         pass thread_info pointer to delete_thread.
3603         (windows_nat_target::detach): Pass inferior pointer to
3604         delete_inferior.
3605
3606 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3607
3608         * regcache.c (readable_regcache::read_part): Fix asserts.
3609         (reg_buffer::raw_collect_part): New function.
3610         (regcache::write_part): Fix asserts.
3611         (reg_buffer::raw_supply_part): New function.
3612         (regcache::transfer_regset_register): New helper function.
3613         (regcache::transfer_regset): Call new functions.
3614         (regcache_supply_regset): Use gdb_byte*.
3615         (regcache::supply_regset): Likewise.
3616         (regcache_collect_regset): Likewise.
3617         (regcache::collect_regset): Likewise.
3618         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3619         (reg_buffer::raw_supply_part): Likewise.
3620         (regcache::transfer_regset_register): Likewise.
3621         (regcache::transfer_regset): Use gdb_byte*.
3622
3623 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3624
3625         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3626
3627 2018-06-21  Pedro Alves  <palves@redhat.com>
3628
3629         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3630         instead of a ptid_t.  All callers adjusted.
3631         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3632         adjusted.
3633         (print_ada_task_info, display_current_task_id, task_command_1):
3634         Adjust.
3635         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3636         inferior_thread.
3637         (breakpoint_kind): Adjust.
3638         (remove_breakpoints_pid): Rename to ...
3639         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3640         pointer.  All callers adjusted.
3641         (bpstat_clear_actions): Use inferior_thread.
3642         (get_bpstat_thread): New.
3643         (bpstat_do_actions): Use it.
3644         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3645         to take a thread_info pointer.  All callers adjusted.
3646         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3647         (breakpoint_re_set_thread): Use inferior_thread.
3648         * breakpoint.h (struct inferior): Forward declare.
3649         (bpstat_stop_status): Update.
3650         (remove_breakpoints_pid): Delete.
3651         (remove_breakpoints_inf): New.
3652         * bsd-uthread.c (bsd_uthread_target::wait)
3653         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3654         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3655         (maint_btrace_packet_history_cmd)
3656         (maint_btrace_clear_packet_history_cmd): Adjust.
3657         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3658         inferior_thread.
3659         * cli/cli-interp.c: Include "inferior.h".
3660         * common/refcounted-object.h (struct
3661         refcounted_object_ref_policy): New.
3662         * compile/compile-object-load.c: Include gdbthread.h.
3663         (store_regs): Use inferior_thread.
3664         * corelow.c (core_target::close): Use current_inferior.
3665         (core_target_open): Adjust to use first_thread_of_inferior and use
3666         the current inferior.
3667         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3668         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3669         <thread>: ... this new field.  All references adjusted.
3670         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3671         Take a thread_info pointer instead of a ptid_t.
3672         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3673         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3674         thread_info pointer instead of a ptid_t.
3675         * elfread.c: Include "inferior.h".
3676         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3677         Use inferior_thread.
3678         * eval.c (evaluate_subexp): Likewise.
3679         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3680         inferior_thread.
3681         * gdb_proc_service.h (struct thread_info): Forward declare.
3682         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3683         <thread>: ... this new field.  All references adjusted.
3684         * gdbarch.h, gdbarch.c: Regenerate.
3685         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3686         'thread' parameter.  All implementations and callers adjusted.
3687         * gdbthread.h (thread_info) <set_running>: New method.
3688         (delete_thread, delete_thread_silent): Take a thread_info pointer
3689         instead of a ptid.
3690         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3691         (first_thread_of_process): Delete, replaced by ...
3692         (first_thread_of_inferior): ... this new function.  All callers
3693         adjusted.
3694         (any_live_thread_of_process): Delete, replaced by ...
3695         (any_live_thread_of_inferior): ... this new function.  All callers
3696         adjusted.
3697         (switch_to_thread, switch_to_no_thread): Declare.
3698         (is_executing): Delete.
3699         (enable_thread_stack_temporaries): Update comment.
3700         <enable_thread_stack_temporaries>: Take a thread_info pointer
3701         instead of a ptid_t.  Incref the thread.
3702         <~enable_thread_stack_temporaries>: Decref the thread.
3703         <m_ptid>: Delete
3704         <m_thr>: New.
3705         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3706         (get_last_thread_stack_temporary)
3707         (value_in_thread_stack_temporaries, can_access_registers_thread):
3708         Take a thread_info pointer instead of a ptid_t.  All callers
3709         adjusted.
3710         * infcall.c (get_call_return_value): Use inferior_thread.
3711         (run_inferior_call): Work with thread pointers instead of ptid_t.
3712         (call_function_by_hand_dummy): Work with thread pointers instead
3713         of ptid_t.  Use thread_info_ref.
3714         * infcmd.c (proceed_thread_callback): Access thread's state
3715         directly.
3716         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3717         access thread's state directly.
3718         (continue_command): Use inferior_thread.
3719         (info_program_command): Use find_thread_ptid and access thread
3720         state directly.
3721         (proceed_after_attach_callback): Use thread state directly.
3722         (notice_new_inferior): Take a thread_info pointer instead of a
3723         ptid_t.  All callers adjusted.
3724         (exit_inferior): Take an inferior pointer instead of a pid.  All
3725         callers adjusted.
3726         (exit_inferior_silent): New.
3727         (detach_inferior): Delete.
3728         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3729         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3730         (detach_inferior_command, kill_inferior_command): Use
3731         find_inferior_id instead of valid_gdb_inferior_id and
3732         gdb_inferior_id_to_pid.
3733         (inferior_command): Use inferior and thread pointers.
3734         * inferior.h (struct thread_info): Forward declare.
3735         (notice_new_inferior): Take a thread_info pointer instead of a
3736         ptid_t.  All callers adjusted.
3737         (detach_inferior): Delete declaration.
3738         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3739         instead of a pid.  All callers adjusted.
3740         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3741         (valid_gdb_inferior_id): Delete.
3742         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3743         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3744         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3745         ...
3746         <inf>: ... this new field.
3747         <step_ptid>: Delete, replaced by ...
3748         <step_thread>: ... this new field.
3749         (get_displaced_stepping_state): Take an inferior pointer instead
3750         of a pid.  All callers adjusted.
3751         (displaced_step_in_progress_any_inferior): Adjust.
3752         (displaced_step_in_progress_thread): Take a thread pointer instead
3753         of a ptid_t.  All callers adjusted.
3754         (displaced_step_in_progress, add_displaced_stepping_state): Take
3755         an inferior pointer instead of a pid.  All callers adjusted.
3756         (get_displaced_step_closure_by_addr): Adjust.
3757         (remove_displaced_stepping_state): Take an inferior pointer
3758         instead of a pid.  All callers adjusted.
3759         (displaced_step_prepare_throw, displaced_step_prepare)
3760         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3761         All callers adjusted.
3762         (start_step_over): Adjust.
3763         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3764         displaced step queue.
3765         (do_target_resume): Adjust.
3766         (fetch_inferior_event): Use inferior_thread.
3767         (context_switch, get_inferior_stop_soon): Take an
3768         execution_control_state pointer instead of a ptid_t.  All callers
3769         adjusted.
3770         (switch_to_thread_cleanup): Delete.
3771         (stop_all_threads): Use scoped_restore_current_thread.
3772         * inline-frame.c: Include "gdbthread.h".
3773         (inline_state) <inline_state>: Take a thread pointer instead of a
3774         ptid_t.  All callers adjusted.
3775         <ptid>: Delete, replaced by ...
3776         <thread>: ... this new field.
3777         (find_inline_frame_state): Take a thread pointer instead of a
3778         ptid_t.  All callers adjusted.
3779         (skip_inline_frames, step_into_inline_frame)
3780         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3781         pointer instead of a ptid_t.  All callers adjusted.
3782         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3783         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3784         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3785         pointers directly.
3786         * linux-nat.c (get_detach_signal): Likewise.
3787         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3788         (thread_db_notice_clone): Adjust.
3789         (thread_db_find_new_threads_silently)
3790         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3791         a thread pointer instead of a ptid_t.  All callers adjusted.
3792         * mi/mi-cmd-var.c: Include "inferior.h".
3793         (mi_cmd_var_update_iter): Update to use thread pointers.
3794         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3795         inferior directly.
3796         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3797         out to ...
3798         (mi_output_running): ... this new function.
3799         (mi_on_resume_1): Adjust to use it.
3800         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3801         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3802         directly.
3803         (interrupt_thread_callback): : Adjust to use thread and inferior
3804         pointers.
3805         * proc-service.c: Include "gdbthread.h".
3806         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3807         * progspace-and-thread.c: Include "inferior.h".
3808         * progspace.c: Include "inferior.h".
3809         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3810         hold a reference to an inferior_object.
3811         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3812         inferior_thread.
3813         * python/py-inferior.c (struct inferior_object): Give the type a
3814         tag name instead of a typedef.
3815         (python_on_normal_stop): No need to check if the current thread is
3816         listed.
3817         (inferior_to_inferior_object): Change return type to
3818         inferior_object.  All callers adjusted.
3819         (find_thread_object): Delete, bits factored out to ...
3820         (thread_to_thread_object): ... this new function.
3821         * python/py-infthread.c (create_thread_object): Use
3822         inferior_to_inferior_object.
3823         (thpy_is_stopped): Use thread pointer directly.
3824         (gdbpy_selected_thread): Use inferior_thread.
3825         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3826         field, replaced with ...
3827         <thread>: ... this new field.  All users adjusted.
3828         (btpy_insn_or_gap_new): Drop const.
3829         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3830         callers adjusted.
3831         * python/py-record.c: Include "gdbthread.h".
3832         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3833         a ptid_t.  All callers adjusted.
3834         (gdbpy_current_recording): Use inferior_thread.
3835         * python/py-record.h (recpy_record_object) <ptid>: Delete
3836         field, replaced with ...
3837         <thread>: ... this new field.  All users adjusted.
3838         (recpy_element_object) <ptid>: Delete
3839         field, replaced with ...
3840         <thread>: ... this new field.  All users adjusted.
3841         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3842         a ptid_t.  All callers adjusted.
3843         * python/py-threadevent.c: Include "gdbthread.h".
3844         (get_event_thread): Use thread_to_thread_object.
3845         * python/python-internal.h (struct inferior_object): Forward
3846         declare.
3847         (find_thread_object, find_inferior_object): Delete declarations.
3848         (thread_to_thread_object, inferior_to_inferior_object): New
3849         declarations.
3850         * record-btrace.c: Include "inferior.h".
3851         (require_btrace_thread): Use inferior_thread.
3852         (record_btrace_frame_sniffer)
3853         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3854         (get_thread_current_frame): Use scoped_restore_current_thread and
3855         switch_to_thread.
3856         (get_thread_current_frame): Use thread pointer directly.
3857         (record_btrace_replay_at_breakpoint): Use thread's inferior
3858         pointer directly.
3859         * record-full.c: Include "inferior.h".
3860         * regcache.c: Include "gdbthread.h".
3861         (get_thread_arch_regcache): Use the inferior's address space
3862         directly.
3863         (get_thread_regcache, registers_changed_thread): New.
3864         * regcache.h (get_thread_regcache(thread_info *thread)): New
3865         overload.
3866         (registers_changed_thread): New.
3867         (remote_target) <remote_detach_1>: Swap order of parameters.
3868         (remote_add_thread): <remote_add_thread>: Return the new thread.
3869         (get_remote_thread_info(ptid_t)): New overload.
3870         (remote_target::remote_notice_new_inferior): Use thread pointers
3871         directly.
3872         (remote_target::process_initial_stop_replies): Use
3873         thread_info::set_running.
3874         (remote_target::remote_detach_1, remote_target::detach)
3875         (extended_remote_target::detach): Adjust.
3876         * stack.c (frame_show_address): Use inferior_thread.
3877         * target-debug.h (target_debug_print_thread_info_pp): New.
3878         * target-delegates.c: Regenerate.
3879         * target.c (default_thread_address_space): Delete.
3880         (memory_xfer_partial_1): Use current_inferior.
3881         (target_detach): Use current_inferior.
3882         (target_thread_address_space): Delete.
3883         (generic_mourn_inferior): Use current_inferior.
3884         * target.h (struct target_ops) <thread_address_space>: Delete.
3885         (target_thread_address_space): Delete.
3886         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3887         pointers directly.
3888         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3889         thread pointer instead of a ptid_t.  Adjust all callers.
3890         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3891         (first_thread_of_process): Delete, replaced by ...
3892         (first_thread_of_inferior): ... this new function.  All callers
3893         adjusted.
3894         (any_thread_of_process): Rename to ...
3895         (any_thread_of_inferior): ... this, and take an inferior pointer.
3896         (any_live_thread_of_process): Rename to ...
3897         (any_live_thread_of_inferior): ... this, and take an inferior
3898         pointer.
3899         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3900         (value_in_thread_stack_temporaries)
3901         (get_last_thread_stack_temporary): Take a thread pointer instead
3902         of a ptid_t.  Adjust all callers.
3903         (thread_info::set_running): New.
3904         (validate_registers_access): Use inferior_thread.
3905         (can_access_registers_ptid): Rename to ...
3906         (can_access_registers_thread): ... this, and take a thread
3907         pointer.
3908         (print_thread_info_1): Adjust to compare thread pointers instead
3909         of ptids.
3910         (switch_to_no_thread, switch_to_thread): Make extern.
3911         (scoped_restore_current_thread::~scoped_restore_current_thread):
3912         Use m_thread pointer directly.
3913         (scoped_restore_current_thread::scoped_restore_current_thread):
3914         Use inferior_thread.
3915         (thread_command): Use thread pointer directly.
3916         (thread_num_make_value_helper): Use inferior_thread.
3917         * top.c (execute_command): Use inferior_thread.
3918         * tui/tui-interp.c: Include "inferior.h".
3919         * varobj.c (varobj_create): Use inferior_thread.
3920         (value_of_root_1): Use find_thread_global_id instead of
3921         global_thread_id_to_ptid.
3922
3923 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3924
3925         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3926         possible.
3927         (regcache::write_part): Likewise.
3928         (readable_regcache::cooked_read_part): Update comment.
3929         (readable_regcache::cooked_write_part): Likewise.
3930         * regcache.h: (readable_regcache::read_part): Likewise.
3931         (regcache::write_part): Likewise.
3932
3933 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3934             Dirk Schubert  <dirk.schubert@arm.com>
3935
3936         * aarch64-linux-nat.c (post_attach): New.
3937         (aarch64_linux_nat_target::post_attach): Override post_attach to
3938         record the number of hardware debug registers.
3939
3940 2018-06-20  Tom Tromey  <tom@tromey.com>
3941
3942         * python/py-param.c (add_setshow_generic): Make parameters const.
3943         (parmpy_init): Update.
3944
3945 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3946
3947         * regcache.h (regcache_cooked_read_ftype): Rename to...
3948         (register_read_ftype): ...this, change type to function_view.
3949         (class reg_buffer) <save>: Remove src parameter.
3950         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3951         parameter non-const in first overload.  Remove src parameter in
3952         second overload.
3953         * regcache.c (do_cooked_read): Remove.
3954         (readonly_detached_regcache::readonly_detached_regcache): Make
3955         parameter non-const, adjust call to other constructor.
3956         (reg_buffer::save): Remove src parameter.
3957         * frame.c (do_frame_register_read): Remove.
3958         (frame_save_as_regcache): Use lambda function.
3959         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3960         parameter to ppu2spu_data *.
3961         (ppu2spu_sniffer): Use lambda function.
3962
3963 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3964
3965         * record-full.c (record_full_target::insert_breakpoint): Remove
3966         "struct" keyword, add const.
3967
3968 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3969
3970         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3971         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3972         * configure.ac: Remove AC_PREREQ, add missing quoting.
3973         * gnulib/configure.ac: Modernize usage of
3974         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3975         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3976         (AUTOMAKE_VERSION): Bump to 1.15.1.
3977         * configure: Re-generate.
3978         * config.in: Re-generate.
3979         * aclocal.m4: Re-generate.
3980         * gnulib/aclocal.m4: Re-generate.
3981         * gnulib/config.in: Re-generate.
3982         * gnulib/configure: Re-generate.
3983         * gnulib/import/Makefile.in: Re-generate.
3984
3985 2018-06-19  Pedro Alves  <palves@redhat.com>
3986
3987         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3988         (lookup_minimal_symbol_by_pc_section): ... here with
3989         gdb_assert_not_reached added.
3990
3991 2018-06-19  Pedro Alves  <palves@redhat.com>
3992
3993         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3994         parameter with a block parameter.  Compare location's block symbol
3995         with the frame's block instead of addresses.
3996         (skip_inline_frames): Pass the current block instead of the
3997         frame's address.  Break out as soon as we determine the frame
3998         should not be skipped.
3999
4000 2018-06-18  Tom Tromey  <tom@tromey.com>
4001
4002         * solib-aix.c (solib_aix_get_section_offsets): Return
4003         unique_xmalloc_ptr.
4004         (solib_aix_solib_create_inferior_hook): Update.
4005
4006 2018-06-18  Tom Tromey  <tom@tromey.com>
4007
4008         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4009
4010 2018-06-18  Tom Tromey  <tom@tromey.com>
4011
4012         * solib-frv.c (frv_relocate_main_executable): Use
4013         unique_xmalloc_ptr.
4014         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4015         unique_xmalloc_ptr.
4016
4017 2018-06-18  Tom Tromey  <tom@tromey.com>
4018
4019         * objfiles.h (inhibit_section_map_updates): Update.
4020         (resume_section_map_updates, resume_section_map_updates_cleanup):
4021         Remove.
4022         * solib-svr4.c (svr4_handle_solib_event): Update.
4023         * objfiles.c (inhibit_section_map_updates): Return
4024         scoped_restore_tmpl<int>.
4025         (resume_section_map_updates, resume_section_map_updates_cleanup):
4026         Remove.
4027
4028 2018-06-18  Tom Tromey  <tom@tromey.com>
4029
4030         * valprint.h (read_string): Update.
4031         * valprint.c (read_string): Change type of "buffer".
4032         (val_print_string): Update.
4033         * python/py-value.c (valpy_string): Update.
4034         * language.h (struct language_defn) <la_get_string>: Change
4035         type of "buffer".
4036         (default_get_string, c_get_string): Update.
4037         * language.c (default_get_string): Change type of "buffer".
4038         * guile/scm-value.c (gdbscm_value_to_string): Update.
4039         * c-lang.c (c_get_string): Change type of "buffer".
4040
4041 2018-06-18  Tom Tromey  <tom@tromey.com>
4042
4043         * ser-mingw.c (struct pipe_state_destroyer): New.
4044         (pipe_state_up): New typedef.
4045         (cleanup_pipe_state): Remove.
4046         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4047
4048 2018-06-18  Tom Tromey  <tom@tromey.com>
4049
4050         * rust-lang.h (rust_yyerror): Don't declare.
4051         * rust-lang.c (rust_language_defn): Update.
4052         * rust-exp.y (yyerror): Now static.
4053         * parse.c (parse_exp_in_context_1): Update.
4054         * p-lang.h (p_yyerror): Don't declare.
4055         * p-lang.c (p_language_defn): Update.
4056         * p-exp.y (yyerror): Now static.
4057         * opencl-lang.c (opencl_language_defn): Update.
4058         * objc-lang.c (objc_language_defn): Update.
4059         * m2-lang.h (m2_yyerror): Don't declare.
4060         * m2-lang.c (m2_language_defn): Update.
4061         * m2-exp.y (yyerror): Now static.
4062         * language.h (struct language_defn) <la_error>: Remove.
4063         * language.c (unk_lang_error): Remove.
4064         (unknown_language_defn, auto_language_defn): Remove.
4065         * go-lang.h (go_yyerror): Don't declare.
4066         * go-lang.c (go_language_defn): Update.
4067         * go-exp.y (yyerror): Now static.
4068         * f-lang.h (f_yyerror): Don't declare.
4069         * f-lang.c (f_language_defn): Update.
4070         * f-exp.y (yyerror): Now static.
4071         * d-lang.h (d_yyerror): Don't declare.
4072         * d-lang.c (d_language_defn): Update.
4073         * d-exp.y (yyerror): Now static.
4074         * c-lang.h (c_yyerror): Don't declare.
4075         * c-lang.c (c_language_defn, cplus_language_defn)
4076         (asm_language_defn, minimal_language_defn): Update.
4077         * c-exp.y (yyerror): Now static.
4078         * ada-lang.h (ada_yyerror): Don't declare.
4079         * ada-lang.c (ada_language_defn): Update.
4080         * ada-exp.y (yyerror): Now static.
4081
4082 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4083
4084         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4085         (store_sveregs_to_thread): Likewise.
4086         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4087         (aarch64_linux_store_inferior_registers): Likewise.
4088         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4089         function.
4090         (aarch64_sve_regs_copy_to_regcache): Likewise.
4091         (aarch64_sve_regs_copy_from_regcache): Likewise.
4092         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4093         declaration.
4094         (aarch64_sve_regs_copy_to_regcache): Likewise.
4095         (aarch64_sve_regs_copy_from_regcache): Likewise.
4096         (sve_context): Structure from Linux headers.
4097         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4098         (SVE_SIG_ZREG_SIZE): Likewise.
4099         (SVE_SIG_PREG_SIZE): Likewise.
4100         (SVE_SIG_FFR_SIZE): Likewise.
4101         (SVE_SIG_REGS_OFFSET): Likewise.
4102         (SVE_SIG_ZREGS_OFFSET): Likewise.
4103         (SVE_SIG_ZREG_OFFSET): Likewise.
4104         (SVE_SIG_ZREGS_SIZE): Likewise.
4105         (SVE_SIG_PREGS_OFFSET): Likewise.
4106         (SVE_SIG_PREG_OFFSET): Likewise.
4107         (SVE_SIG_PREGS_SIZE): Likewise.
4108         (SVE_SIG_FFR_OFFSET): Likewise.
4109         (SVE_SIG_REGS_SIZE): Likewise.
4110         (SVE_SIG_CONTEXT_SIZE): Likewise.
4111         (SVE_PT_REGS_MASK): Likewise.
4112         (SVE_PT_REGS_FPSIMD): Likewise.
4113         (SVE_PT_REGS_SVE): Likewise.
4114         (SVE_PT_VL_INHERIT): Likewise.
4115         (SVE_PT_VL_ONEXEC): Likewise.
4116         (SVE_PT_REGS_OFFSET): Likewise.
4117         (SVE_PT_FPSIMD_OFFSET): Likewise.
4118         (SVE_PT_FPSIMD_SIZE): Likewise.
4119         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4120         (SVE_PT_SVE_PREG_SIZE): Likewise.
4121         (SVE_PT_SVE_FFR_SIZE): Likewise.
4122         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4123         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4124         (__SVE_SIG_TO_PT): Likewise.
4125         (SVE_PT_SVE_OFFSET): Likewise.
4126         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4127         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4128         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4129         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4130         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4131         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4132         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4133         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4134         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4135         (SVE_PT_SVE_SIZE): Likewise.
4136         (SVE_PT_SIZE): Likewise.
4137         (HAS_SVE_STATE): New define.
4138
4139 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4140
4141         * nat/aarch64-sve-linux-sigcontext.h: New file.
4142         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4143         new files.
4144         (SVE_VQ_MIN): Likewise.
4145         (SVE_VQ_MAX): Likewise.
4146         (SVE_VL_MIN): Likewise.
4147         (SVE_VL_MAX): Likewise.
4148         (SVE_NUM_ZREGS): Likewise.
4149         (SVE_NUM_PREGS): Likewise.
4150         (sve_vl_valid): Likewise.
4151         (struct user_sve_header): Likewise.
4152
4153 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4154             Richard Bunt <Richard.Bunt@arm.com>
4155
4156         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4157         was requested by GDB.
4158
4159 2018-06-15  Tom de Vries  <tdevries@suse.de>
4160
4161         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4162
4163 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4164
4165         * gnulib/update-gnulib.sh: Print expected versions of
4166         autoconf/aclocal.
4167
4168 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4169
4170         * arch-utils.c (default_type_align): Use type_length_units.
4171         * gdbtypes.c (type_align): Use type_length_units.
4172
4173 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4174
4175         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4176         of 'define' command.
4177
4178 2018-06-14  Tom de Vries  <tdevries@suse.de>
4179
4180         PR cli/22573
4181         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4182         get_no_prettyformat_print_options.
4183
4184 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4185
4186         * sparc-nat.h: Include target.h.
4187         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4188         <fetch_registers>: Remove this argument in function call.
4189         <store_registers>: Remove this argument in function call, remove
4190         extra semicolon.
4191         <low_forget_process>: Call sparc64_forget_process instead of
4192         sparc_forget_process.
4193
4194 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4195
4196         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4197         (procfs_target::make_corefile_notes): Adjust to new
4198         target_read_alloc return type.
4199
4200 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4201             Stephen Roberts  <stephen.roberts@arm.com>
4202
4203         PR gdb/22882
4204         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4205         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4206         Move should_notify_stop local into more inner scope.
4207
4208 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4209             Stephen Roberts  <stephen.roberts@arm.com>
4210
4211         PR gdb/22882
4212         * infrun.c (resume_1): Add call to mark_async_event_handler.
4213
4214 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4215
4216         * infrun.c (do_target_wait): Change old version of $pc printed.
4217
4218 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4219
4220         * dwarf2read.c (read_index_from_section): Rename to...
4221         (read_gdb_index_from_section): ... this, update all callers.
4222         (dwarf2_read_index): Rename to...
4223         (dwarf2_read_gdb_index): ... this, update all callers.
4224
4225 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4226
4227         * gdb/hppa-linux-nat.c
4228         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4229         hppa_linux_nat_target::fetch_registers.
4230
4231 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4232
4233         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4234         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4235         (AARCH64_DWARF_SVE_FFR): Likewise.
4236         (AARCH64_DWARF_SVE_P0): Likewise.
4237         (AARCH64_DWARF_SVE_Z0): Likewise.
4238
4239 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4240
4241         * common/common-regcache.h (raw_compare): New function.
4242         * regcache.c (regcache::raw_compare): Likewise.
4243         * regcache.h (regcache::raw_compare): New declaration.
4244
4245 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4246
4247         * common/common-regcache.h (reg_buffer_common): New structure.
4248         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4249         (reg_buffer::raw_supply): Likewise.
4250         (reg_buffer::raw_supply_integer): Likewise.
4251         (reg_buffer::raw_supply_zeroed): Likewise.
4252         (reg_buffer::raw_collect): Likewise.
4253         (reg_buffer::raw_collect_integer): Likewise.
4254         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4255         (reg_buffer::raw_supply): Likewise.
4256         (reg_buffer::raw_supply_integer): Likewise.
4257         (reg_buffer::raw_supply_zeroed): Likewise.
4258         (reg_buffer::raw_collect): Likewise.
4259         (reg_buffer::raw_collect_integer): Likewise.
4260
4261 2018-06-10  Tom Tromey  <tom@tromey.com>
4262
4263         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4264         (class remote_state) <stop_reply_queue>: Now std::vector.
4265         (remote_state::~remote_state)
4266         (remote_target::stop_reply_queue_length): Update.
4267         (struct queue_iter_param, remove_child_of_pending_fork)
4268         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4269         (check_pending_event_prevents_wildcard_vcont_callback)
4270         (remove_stop_reply_for_inferior)
4271         (remove_stop_reply_of_remote_state)
4272         (remote_notif_remove_once_on_match)
4273         (stop_reply_match_ptid_and_ws)
4274         (remote_kill_child_of_pending_fork): Remove.
4275         (remote_target::remove_new_fork_children)
4276         (remote_target::check_pending_events_prevent_wildcard_vcont)
4277         (remote_target::discard_pending_stop_replies)
4278         (remote_target::discard_pending_stop_replies_in_queue)
4279         (remote_target::remote_notif_remove_queued_reply)
4280         (remote_target::queued_stop_reply)
4281         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4282         (remote_target::wait, remote_target::kill_new_fork_children)
4283         (remote_target::async): Update.
4284
4285 2018-06-10  Tom Tromey  <tom@tromey.com>
4286
4287         * record-full.c (record_full_arch_list_cleanups): Remove.
4288         (record_full_message): Use try/catch.
4289         (record_full_wait_cleanups): Remove.
4290         (record_full_wait_1): Use try/catch.
4291         (record_full_restore): Likewise.
4292
4293 2018-06-10  Tom Tromey  <tom@tromey.com>
4294
4295         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4296         declare VEC.  Add constructor.
4297         <in_target_beneath>: Now bool.
4298         (record_full_breakpoints): Now a std::vector, static.
4299         (record_full_sync_record_breakpoints)
4300         (record_full_init_record_breakpoints)
4301         (record_full_target::insert_breakpoint)
4302         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4303
4304 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4305
4306         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4307         * serial.c (serial_interface_lookup): Remove struct keyword.
4308
4309 2018-06-10  Tom Tromey  <tom@tromey.com>
4310
4311         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4312         method.
4313         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4314         a method.
4315         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4316         method.
4317         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4318         "beneath" as a method.
4319         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4320         Use "beneath" as a method.
4321
4322 2018-06-10  Tom Tromey  <tom@tromey.com>
4323
4324         * tracefile.c (struct trace_file_writer_deleter): New.
4325         <operator()>: Rename from trace_file_writer_xfree.
4326         (trace_file_writer_up): New typedef.
4327         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4328
4329 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4330
4331         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4332         <m_registers, m_register_status>: Change type to
4333         std::unique_ptr.
4334         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4335         XCNEWVEC.
4336
4337 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4338
4339         * common/common-regcache.h (enum register_status): Add
4340         underlying type "signed char".
4341         * regcache.h (reg_buffer) <m_register_status>: Change type to
4342         register_status *.
4343         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4344         register_status instead of signed char.
4345         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4346         (reg_buffer::get_register_status): Remove cast.
4347         (readable_regcache::raw_read): Remove cast.
4348         (readable_regcache::cooked_read): Remove cast.
4349
4350 2018-06-09  Tom Tromey  <tom@tromey.com>
4351
4352         * source.c (reverse_search_command, forward_search_command): Use
4353         scoped_fd.
4354
4355 2018-06-09  Tom Tromey  <tom@tromey.com>
4356
4357         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4358         (serial_ops_list): Now static, std::vector.
4359         (serial_interface_lookup, serial_add_interface): Update.
4360
4361 2018-06-09  Tom Tromey  <tom@tromey.com>
4362
4363         * dwarf2read.c (process_cu_includes): Update.
4364         (process_full_comp_unit): Update.
4365         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4366         std::vector.
4367
4368 2018-06-08  Paul Koning  <paul_koning@dell.com>
4369
4370         PR gdb/23252
4371
4372         * python/python.c (do_start_initialization):
4373         Avoid call to internal Python API.
4374         (init__gdb_module): New function.
4375
4376 2018-06-08  Gary Benson <gbenson@redhat.com>
4377
4378         * linux-thread-db.c (valprint.h): New include.
4379         (struct check_thread_db_info): New structure.
4380         (check_thread_db_on_load, tdb_testinfo): New static globals.
4381         (check_thread_db, check_thread_db_callback): New functions.
4382         (try_thread_db_load_1): Run integrity checks if requested.
4383         (maintenance_check_libthread_db): New function.
4384         (_initialize_thread_db): Register "maint check libthread-db"
4385         and "maint set/show check-libthread-db".
4386         * NEWS: Mention the above new commands.
4387
4388 2018-06-08  Tom Tromey  <tom@tromey.com>
4389
4390         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4391         now a method.
4392
4393 2018-06-08  Tom Tromey  <tom@tromey.com>
4394
4395         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4396
4397 2018-06-08  Tom Tromey  <tom@tromey.com>
4398
4399         * common/btrace-common.h (struct btrace_data): Add constructor,
4400         destructor, move assignment operator.
4401         <empty, clear, fini>: New methods.
4402         <format>: Initialize.
4403         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4404         (btrace_data_empty): Don't declare.
4405         * common/btrace-common.c (btrace_data_init): Remove.
4406         (btrace_data::fini): Rename from btrace_data_fini.
4407         (btrace_data::empty): Rename from btrace_data_empty.
4408         (btrace_data::clear): Rename from btrace_data_clear.  Return
4409         bool.
4410         * btrace.h (make_cleanup_btrace_data): Don't declare.
4411         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4412         (parse_xml_btrace): Update.
4413         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4414         (maint_btrace_clear_packet_history_cmd): Update.
4415
4416 2018-06-07  Pedro Alves  <palves@redhat.com>
4417
4418         * target.h (target_ops) <beneath>: Now a method.  All references
4419         updated.
4420         (class target_stack): New.
4421         * target.c (g_target_stack): New.
4422         (g_current_top_target): Delete.
4423         (current_top_target): Get the top target out of g_target_stack.
4424         (target_stack::push, target_stack::unpush): New.
4425         (push_target, unpush_target): Reimplement.
4426         (target_is_pushed): Reimplement in terms of g_target_stack.
4427         (target_ops::beneath, target_stack::find_beneath): New.
4428
4429 2018-06-07  Pedro Alves  <palves@redhat.com>
4430
4431         * target.h (find_target_beneath): Delete declaration.
4432         * target.c (find_target_beneath): Delete definition.
4433         * aix-thread.c: All callers of find_target_beneath adjusted to
4434         call target_ops::beneath instead.
4435         * bsd-uthread.c: Likewise.
4436         * linux-thread-db.c: Likewise.
4437         * ravenscar-thread.c: Likewise.
4438         * sol-thread.c: Likewise.
4439         * spu-multiarch.c: Likewise.
4440
4441 2018-06-07  Pedro Alves  <palves@redhat.com>
4442
4443         * target.h (target_ops) <beneath>: Now a method.  All references
4444         updated.
4445         (target_ops) <m_beneath>: New.
4446         * target.c (target_ops::beneath): New.
4447         * corelow.c: Adjust all references to target_ops::beneath.
4448         * linux-thread-db.c: Likewise.
4449         * make-target-delegates: Likewise.
4450         * record-btrace.c: Likewise.
4451         * record-full.c: Likewise.
4452         * remote.c: Likewise.
4453         * target.c: Likewise.
4454         * target-delegates.c: Regenerate.
4455
4456 2018-06-07  Pedro Alves  <palves@redhat.com>
4457
4458         * target.h (target_stack): Delete.
4459         (current_top_target): Declare function.
4460         * target.c (target_stack): Delete.
4461         (g_current_top_target): New.
4462         (current_top_target): New function.
4463         * auxv.c: Use current_top_target instead of target_stack
4464         throughout.
4465         * avr-tdep.c: Likewise.
4466         * breakpoint.c: Likewise.
4467         * corefile.c: Likewise.
4468         * elfread.c: Likewise.
4469         * eval.c: Likewise.
4470         * exceptions.c: Likewise.
4471         * frame.c: Likewise.
4472         * gdbarch-selftests.c: Likewise.
4473         * gnu-v3-abi.c: Likewise.
4474         * ia64-tdep.c: Likewise.
4475         * ia64-vms-tdep.c: Likewise.
4476         * infcall.c: Likewise.
4477         * infcmd.c: Likewise.
4478         * infrun.c: Likewise.
4479         * linespec.c: Likewise.
4480         * linux-tdep.c: Likewise.
4481         * minsyms.c: Likewise.
4482         * ppc-linux-nat.c: Likewise.
4483         * ppc-linux-tdep.c: Likewise.
4484         * procfs.c: Likewise.
4485         * regcache.c: Likewise.
4486         * remote.c: Likewise.
4487         * rs6000-tdep.c: Likewise.
4488         * s390-linux-nat.c: Likewise.
4489         * s390-tdep.c: Likewise.
4490         * solib-aix.c: Likewise.
4491         * solib-darwin.c: Likewise.
4492         * solib-dsbt.c: Likewise.
4493         * solib-spu.c: Likewise.
4494         * solib-svr4.c: Likewise.
4495         * solib-target.c: Likewise.
4496         * sparc-tdep.c: Likewise.
4497         * sparc64-tdep.c: Likewise.
4498         * spu-tdep.c: Likewise.
4499         * symfile.c: Likewise.
4500         * symtab.c: Likewise.
4501         * target-descriptions.c: Likewise.
4502         * target-memory.c: Likewise.
4503         * target.c: Likewise.
4504         * target.h: Likewise.
4505         * tracefile-tfile.c: Likewise.
4506         * tracepoint.c: Likewise.
4507         * valops.c: Likewise.
4508         * valprint.c: Likewise.
4509         * value.c: Likewise.
4510         * windows-tdep.c: Likewise.
4511         * mi/mi-main.c: Likewise.
4512
4513 2018-06-07  Tom Tromey  <tom@tromey.com>
4514
4515         * valprint.h (build_address_symbolic): Declare.
4516         * printcmd.c (print_address_symbolic): Update.
4517         (build_address_symbolic): Change "name" and "filename" to
4518         std::string.
4519         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4520         Update.
4521         * defs.h (build_address_symbolic): Remove declaration.
4522
4523 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4524
4525         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4526         (aarch64_vnv_type): Add function.
4527         (aarch64_pseudo_register_name): Add V regs for SVE.
4528         (aarch64_pseudo_register_type): Likewise.
4529         (aarch64_pseudo_register_reggroup_p): Likewise.
4530         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4531         (aarch64_pseudo_read_value): Add V regs for SVE.
4532         (aarch64_pseudo_write_2): Use V0 offset for SVE
4533         (aarch64_pseudo_write): Add V regs for SVE.
4534         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4535
4536 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4537
4538         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4539         (sve_vl_from_vq): Likewise.
4540
4541 2018-06-05  Tom Tromey  <tom@tromey.com>
4542
4543         * cli/cli-cmds.c (show_version): Update.
4544         * top.c (print_gdb_version): Add "interactive" parameter.
4545         Update.
4546         * main.c (captured_main_1): Update.
4547         * top.h (print_gdb_version): Add "interactive" parameter and a
4548         comment.
4549
4550 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4551
4552         * common/enum-flags.h: Add trailing semicolon to example in
4553         comment.
4554
4555 2018-06-05  Tom Tromey  <tom@tromey.com>
4556
4557         PR cli/12326:
4558         * NEWS: Add entry about pager.
4559         * utils.c (pagination_disabled_for_command): New global.
4560         (prompt_for_continue): Allow "c" response to prompt.
4561         (reinitialize_more_filter): Clear
4562         pagination_disabled_for_command.
4563         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4564
4565 2018-06-04  Tom Tromey  <tom@tromey.com>
4566
4567         * ada-lang.h (ada_lookup_symbol_list): Update.
4568         * ada-lang.c (resolve_subexp): Update.
4569         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4570         parameter.
4571         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4572         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4573         results parameter to std::vector.
4574         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4575         Update.
4576         * ada-exp.y (block_lookup): Update.
4577         (select_possible_type_sym): Change type of syms.  Remove nsyms
4578         parameter.
4579         (write_var_or_type, write_name_assoc): Update.
4580
4581 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4582
4583         * windows-nat.c (windows_nat_target::xfer_partial): Return
4584         TARGET_XFER_E_IO if we need to delegate to the target beneath
4585         but BENEATH is NULL.
4586
4587 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4588
4589         * Makefile.in (config.status): Add configure.nat as a
4590         dependency.
4591
4592 2018-06-04  Tom Tromey  <tom@tromey.com>
4593
4594         * cp-name-parser.y (cpname_state): Add method declarations.
4595         (HANDLE_QUAL): Update.
4596         (cpname_state::d_grab, cpname_state::fill_comp)
4597         (cpname_state::make_operator, cpname_state::make_dtor)
4598         (cpname_state::make_builtin_type, cpname_state::make_name)
4599         (cpname_state::d_qualify, cpname_state::d_int_type)
4600         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4601         (%union): Move earlier.
4602
4603 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4604
4605         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4606
4607 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4608
4609         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4610         (aarch64_pseudo_write_1): Likewise.
4611         (aarch64_pseudo_read_value): Use helper.
4612         (aarch64_pseudo_write): Likewise.
4613
4614 2018-06-04  Pedro Alves  <palves@redhat.com>
4615
4616         * darwin-nat.c (darwin_ops): Delete.
4617         (darwin_attach_pid): Use get_native_target.
4618
4619 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4620
4621         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4622         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4623
4624 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4625
4626         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4627         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4628         (aarch64_gdbarch_init): Check for SVE.
4629         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4630
4631 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4632
4633         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4634         * aarch64-tdep.h (aarch64_read_description): Likewise.
4635         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4636         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4637         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4638         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4639         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4640
4641 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4642
4643         * value.c (value_fetch_lazy_bitfield): New.
4644         (value_fetch_lazy_memory): New.
4645         (value_fetch_lazy_register): New.
4646         (value_fetch_lazy): Factor out to smaller functions.
4647
4648 2018-06-01  Tom Tromey  <tom@tromey.com>
4649
4650         * cp-name-parser.y (backslashable, represented): Now const.
4651
4652 2018-06-01  Tom Tromey  <tom@tromey.com>
4653
4654         * cp-name-parser.y: Include parser-defs.h.
4655         (parser_fprintf): Remove declaration.
4656
4657 2018-06-01  Tom Tromey  <tom@tromey.com>
4658
4659         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4660         %parse-param.
4661         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4662         (global_result): Remove globals.
4663         (struct cpname_state): New.
4664         (yyparse): Don't declare.
4665         (yylex, yyerror): Move declarations after %union.
4666         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4667         (make_name): Add state parameter.
4668         Update all callers.
4669         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4670         parameter.
4671         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4672         Update.
4673         (yylex): Add lvalp, state parameters.
4674         (yyerror): Add state parameter.
4675         (cp_demangled_name_to_comp): Update.
4676
4677 2018-06-01  Tom Tromey  <tom@tromey.com>
4678
4679         * cp-name-parser.y (parser_fprintf): Declare.
4680         (GDB_YY_REMAP_PREFIX): Define.
4681         Include yy-remap.h.  Don't redefine yy* identifiers.
4682
4683 2018-06-01  Tom Tromey  <tom@tromey.com>
4684
4685         * python/py-type.c (typy_legacy_template_argument): Update.
4686         * cp-support.h (cp_demangled_name_to_comp): Update.
4687         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4688         parameter to be a "std::string *".
4689         (main): Update.
4690
4691 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4692
4693         * ada-lex.l: Include "diagnostics.h" instead of
4694         "common/diagnostics.h".
4695         * unittests/environ-selftests.c: Likewise.
4696         * common/diagnostics.h: Moved to ../include.
4697
4698 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4699
4700         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4701         to language_mode_manual while calling breakpoint_re_set_one.
4702
4703 2018-06-01  Tom Tromey  <tom@tromey.com>
4704
4705         * valops.c (value_cast_structs, destructor_name_p): Update.
4706         * symtab.c (gdb_mangle_name): Update.
4707         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4708         Update.
4709         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4710         (pascal_object_print_value_fields, pascal_object_print_value):
4711         Update.
4712         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4713         * linespec.c (find_methods): Update.
4714         * gdbtypes.h (type_name_no_tag): Remove.
4715         (type_name_or_error): Rename from type_name_no_tag_or_error.
4716         * gdbtypes.c (type_name_no_tag): Remove.
4717         (type_name_or_error): Rename from type_name_no_tag_or_error.
4718         (lookup_struct_elt_type, check_typedef): Update.
4719         * expprint.c (print_subexp_standard): Update.
4720         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4721         * d-namespace.c (d_lookup_nested_symbol): Update.
4722         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4723         (cp_print_class_member): Update.
4724         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4725         * completer.c (add_struct_fields): Update.
4726         * c-typeprint.c (cp_type_print_derivation_info)
4727         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4728         Update.
4729         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4730         (ada_prefer_type, ada_is_exception_sym): Update.
4731
4732 2018-06-01  Tom Tromey  <tom@tromey.com>
4733
4734         * valops.c (enum_constant_from_type, value_namespace_elt)
4735         (value_maybe_namespace_elt): Update.
4736         * valarith.c (find_size_for_pointer_math): Update.
4737         * target-descriptions.c (make_gdb_type): Update.
4738         * symmisc.c (print_symbol): Update.
4739         * stabsread.c (define_symbol, read_type)
4740         (complain_about_struct_wipeout, add_undefined_type)
4741         (cleanup_undefined_types_1): Update.
4742         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4743         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4744         (rust_internal_print_type, rust_composite_type)
4745         (rust_evaluate_funcall, rust_evaluate_subexp)
4746         (rust_inclusive_range_type_p): Update.
4747         * python/py-type.c (typy_get_tag): Update.
4748         * p-typeprint.c (pascal_type_print_base): Update.
4749         * mdebugread.c (parse_symbol, parse_type): Update.
4750         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4751         Update.
4752         * guile/scm-type.c (gdbscm_type_tag): Update.
4753         * go-lang.c (sixg_string_p): Update.
4754         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4755         Update.
4756         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4757         (TYPE_TAG_NAME): Remove.
4758         * gdbtypes.c (type_name_no_tag): Simplify.
4759         (check_typedef, check_types_equal, recursive_dump_type)
4760         (copy_type_recursive, arch_composite_type): Update.
4761         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4762         in summary mode when needed.
4763         * eval.c (evaluate_funcall): Update.
4764         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4765         (process_structure_scope, read_enumeration_type)
4766         (read_namespace_type, read_module_type, determine_prefix): Update.
4767         * cp-support.c (inspect_type): Update.
4768         * coffread.c (process_coff_symbol, decode_base_type): Update.
4769         * c-varobj.c (c_is_path_expr_parent): Update.
4770         * c-typeprint.c (c_type_print_base_struct_union): Update.
4771         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4772         summary when using C language.
4773         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4774         (gen_maybe_namespace_elt): Update.
4775         * ada-lang.c (ada_type_name): Simplify.
4776         (empty_record, ada_template_to_fixed_record_type_1)
4777         (template_to_static_fixed_type)
4778         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4779
4780 2018-06-01  Tom Tromey  <tom@tromey.com>
4781
4782         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4783         c_print_type.
4784         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4785         (c_print_type): Update.
4786         (c_print_type): New overload.
4787         (c_type_print_varspec_prefix, c_type_print_args)
4788         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4789         (c_type_print_base_struct_union, c_type_print_base_1)
4790         (cp_type_print_method_args): Add "language" parameter.
4791         (c_type_print_base): Update.
4792         * c-lang.h (c_print_type): Add new overload.
4793
4794 2018-06-01  Tom Tromey  <tom@tromey.com>
4795
4796         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4797         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4798
4799 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4800
4801         * aarch64-tdep.c (aarch64_sve_register_names): New const
4802         var.
4803         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4804         (AARCH64_SVE_Z_REGS_NUM): New define.
4805         (AARCH64_SVE_P_REGS_NUM): Likewise.
4806         (AARCH64_SVE_NUM_REGS): Likewise.
4807
4808 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4809
4810         * nat/linux-ptrace.h [__alpha__]
4811         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4812         definitions.
4813
4814 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4815
4816         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4817         the endianness selected.
4818         * NEWS: Document `set endian auto' mode operation update.
4819
4820 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4821
4822         * Makefile.in: Add new header.
4823         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4824         (sve_vl_from_vg): Likewise.
4825         (sve_vq_from_vl): Likewise.
4826         (sve_vl_from_vq): Likewise.
4827         (sve_vq_from_vg): Likewise.
4828         (sve_vg_from_vq): Likewise.
4829         * configure.nat: Add new c file.
4830         * nat/aarch64-sve-linux-ptrace.c: New file.
4831         * nat/aarch64-sve-linux-ptrace.h: New file.
4832
4833 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4834
4835         * aarch64-linux-nat.c (aarch64_linux_read_description):
4836         Add parmeter zero.
4837         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4838         Likewise.
4839         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4840         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4841         (aarch64_gdbarch_init): Add parmeter zero.
4842         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4843         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4844         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4845         parmeter.
4846         * doc/gdb.texinfo: Describe SVE feature
4847         * features/aarch64-sve.c: New file.
4848
4849 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4850
4851         PR gdb/23210
4852         * gdbarch.sh (significant_addr_bit): Default to zero when
4853         not set by target architecture.
4854         * gdbarch.c: Re-generated.
4855         * utils.c (address_significant): Update.
4856
4857 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4858
4859         * stack.c (func_command): Remove trailing newline in call to error.
4860
4861 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4862
4863         * regcache.h (regcache_raw_collect): Remove, update callers to
4864         use regcache::raw_collect.
4865         * regcache.c (regcache_raw_collect): Remove.
4866
4867 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4868
4869         * regcache.h (regcache_raw_supply): Remove, update callers to
4870         use detached_regcache::raw_supply.
4871         * regcache.c (regcache_raw_supply): Remove.
4872
4873 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4874
4875         * regcache.h (regcache_cooked_write_part): Remove, update
4876         callers to use regcache::cooked_write_part.
4877         * regcache.c (regcache_cooked_write_part): Remove.
4878
4879 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4880
4881         * regcache.h (regcache_cooked_read_part): Remove, update callers
4882         to use readable_regcache::cooked_read_part.
4883         * regcache.c (regcache_cooked_read_part): Remove.
4884
4885 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4886
4887         * regcache.h (regcache_cooked_read_value): Remove, update
4888         callers to use readable_regcache::cooked_read_value.
4889         * regcache.c (regcache_cooked_read_value): Remove.
4890
4891 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4892
4893         * regcache.h (regcache_cooked_write): Remove, update callers to
4894         use regcache::cooked_write.
4895         * regcache.c (regcache_cooked_write): Remove.
4896
4897 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4898
4899         * regcache.h (regcache_invalidate): Remove, update callers to
4900         use detached_regcache::invalidate instead.
4901         * regcache.c (regcache_invalidate): Remove.
4902
4903 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4904
4905         * regcache.h (regcache_raw_write_part): Remove, update callers
4906         to use regcache::raw_write_part instead.
4907         * regcache.c (regcache_raw_write_part): Remove.
4908
4909 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4910
4911         * regcache.h (regcache_raw_read_part): Remove, update callers to
4912         use readable_regcache::raw_read_part instead.
4913         * regcache.c (regcache_raw_read_part): Remove.
4914
4915 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4916
4917         * regcache.h (regcache_cooked_read): Remove, update callers to
4918         use readable_regcache::cooked_read instead.
4919         * regcache.c (regcache_cooked_read): Remove.
4920
4921 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4922
4923         * regcache.h (regcache_raw_write): Remove, update callers to use
4924         regcache::raw_write instead.
4925         * regcache.c (regcache_raw_write): Remove.
4926
4927 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4928
4929         * regcache.h (regcache_raw_read): Remove, update callers to use
4930         readable_regcache::raw_read instead.
4931         * regcache.c (regcache_raw_read): Remove.
4932
4933 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4934
4935         * regcache.h (regcache_raw_update): Remove, update callers to
4936         use readable_regcache::raw_update instead.
4937         * regcache.c (regcache_raw_update): Remove.
4938
4939 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4940
4941         * regcache.h (regcache_register_status): Remove, update callers
4942         to use reg_buffer::get_register_status directly instead.
4943         * regcache.c (regcache_register_status): Remove.
4944
4945 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4946
4947         * regcache.h (regcache_get_ptid): Remove, update all callers to
4948         call regcache::ptid instead.
4949         * regcache.c (regcache_get_ptid): Remove.
4950
4951 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4952
4953         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4954
4955 2018-05-30  Pedro Alves  <palves@redhat.com>
4956
4957         * common/common-exceptions.h (exception_rethrow): Use
4958         ATTRIBUTE_NORETURN.
4959
4960 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4961
4962         * breakpoint.c (print_solib_event, check_status_catch_solib):
4963         Remove struct keyword in range-based for loops.
4964         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4965         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4966         Likewise.
4967         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4968         Likewise.
4969         * symfile.c (addr_info_make_relative): Likewise.
4970         * thread.c (value_in_thread_stack_temporaries): Likewise.
4971
4972 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4973
4974         PR gdb/16841
4975         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4976         aggregate type to get its real type before accessing it.
4977
4978 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4979
4980         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4981         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4982         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4983         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4984         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4985         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4986         * printcmd.c (info_address_command): Likewise.
4987
4988 2018-05-29  Tom Tromey  <tom@tromey.com>
4989
4990         * windows-nat.c (handle_exception): Update fall-through comment.
4991
4992 2018-05-29  Tom Tromey  <tom@tromey.com>
4993
4994         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4995         (struct program_space) <added_solibs>: Now a std::vector.
4996         * breakpoint.c (print_solib_event): Update.
4997         (check_status_catch_solib): Update.
4998         * progspace.c (clear_program_space_solib_cache): Update.
4999         * solib.c (update_solib_list): Update.
5000
5001 2018-05-29  Tom Tromey  <tom@tromey.com>
5002
5003         * python/py-type.c (typy_richcompare): Update.
5004         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5005         * gdbtypes.h (types_deeply_equal): Return bool.
5006         (types_equal): Likewise.
5007         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5008         declare VEC.
5009         (check_types_equal): Change worklist to std::vector.  Return
5010         bool.
5011         (struct type_equality_entry): Add constructor.
5012         (compare_maybe_null_strings): Return bool.
5013         (check_types_worklist): Return bool.  Change worklist to
5014         std::vector.
5015         (types_deeply_equal): Use std::vector.
5016         (types_equal): Return bool.
5017         (compare_maybe_null_strings): Simplify.
5018
5019 2018-05-29  Tom Tromey  <tom@tromey.com>
5020
5021         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5022
5023 2018-05-29  Tom Tromey  <tom@tromey.com>
5024
5025         * objc-lang.h: Don't include cp-support.h.
5026         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5027         declare VEC.
5028
5029 2018-05-27  Tom Tromey  <tom@tromey.com>
5030
5031         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5032
5033 2018-05-25  Tom Tromey  <tom@tromey.com>
5034
5035         * value.c (value::location): Initialize.
5036
5037 2018-05-25  Tom Tromey  <tom@tromey.com>
5038
5039         * dbxread.c (init_bincl_list): Remove.
5040         (bincl_list): Now a std::vector.
5041         (bincls_allocated, next_bincl): Remove.
5042         (free_bincl_list, do_free_bincl_list_cleanup)
5043         (make_cleanup_free_bincl_list): Remove.
5044         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5045         unique_xmalloc_ptr.
5046         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5047         (struct header_file_location): Add constructor.
5048         (add_bincl_to_list): Remove.
5049
5050 2018-05-25  Tom Tromey  <tom@tromey.com>
5051
5052         * tui/tui.c (tui_enable): Update.
5053         * mi/mi-interp.c (mi_interp::init): Update.
5054         * interps.h (class interp) <name>: New method.
5055         <m_name>: Rename from name.
5056         (~scoped_restore_interp): Update.
5057         * interps.c (interp::interp): Update.
5058         (interp_add, interp_set, interp_lookup_existing)
5059         (current_interp_named_p): Update.
5060
5061 2018-05-25  Tom Tromey  <tom@tromey.com>
5062
5063         * interps.c (interp_name): Remove.
5064         * mi/mi-interp.c (mi_interp::init): Update.
5065         * interps.h (interp_name): Remove.
5066         (~scoped_restore_interp): Update.
5067         * tui/tui.c (tui_enable): Update.
5068
5069 2018-05-25  Tom Tromey  <tom@tromey.com>
5070
5071         * utils.c (fputs_maybe_filtered): Update.
5072         * linespec.c (decode_line_full): Update.
5073         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5074         (mi_print_breakpoint_for_event, mi_solib_loaded)
5075         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5076         (mi_user_selected_context_changed): Update.
5077         * mi/mi-main.c (mi_execute_command): Update.
5078         * cli/cli-script.c (execute_control_command): Update.
5079         * python/python.c (execute_gdb_command): Update.
5080         * solib.c (info_sharedlibrary_command): Update.
5081         * interps.c (interp_ui_out): Remove.
5082         * interps.h (interp_ui_out): Remove.
5083
5084 2018-05-25  Tom Tromey  <tom@tromey.com>
5085
5086         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5087         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5088         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5089
5090 2018-05-25  Tom Tromey  <tom@tromey.com>
5091
5092         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5093         * interps.c (interp_exec): Use scoped_restore.
5094
5095 2018-05-25  Tom Tromey  <tom@tromey.com>
5096
5097         * remote.c (remote_target::remote_file_get): Use
5098         gdb::byte_vector.
5099         (remote_target::remote_file_put): Likewise.
5100
5101 2018-05-25  Tom Tromey  <tom@tromey.com>
5102
5103         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5104         a std::string.
5105         (get_pe_section_index, add_pe_exported_sym): Update.
5106         (read_pe_exported_syms): Use gdb::def_vector.
5107
5108 2018-05-25  Tom Tromey  <tom@tromey.com>
5109
5110         * frame.c (remove_prev_frame): Remove.
5111         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5112
5113 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5114
5115         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5116         Remove prototypes.
5117         * mips-linux-nat.c (supply_fpregset): Always call
5118         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5119         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5120         `mips_fill_fpregset'.
5121         * mips-linux-tdep.c (mips_supply_fpregset)
5122         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5123         (mips_fill_fpregset_wrapper): Remove functions.
5124         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5125         (mips_linux_fpregset): Remove variable.
5126         (mips_linux_iterate_over_regset_sections): Use
5127         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5128         (mips_linux_o32_sigframe_init): Remove comment.
5129
5130 2018-05-25  Pedro Alves  <palves@redhat.com>
5131
5132         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5133         (struct readahead_cache, struct packet_reg, struct
5134         remote_arch_state, class remote_state): Move higher up in the
5135         file.
5136         (remote_target::m_remote_state): Now an object instead of a pointer.
5137         (remote_target::get_remote_state): Adjust.
5138
5139 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5140
5141         * stack.c (select_and_print_frame): Delete.
5142         (struct function_bounds): Move struct within function.
5143         (func_command): Most content moved into new function
5144         find_frame_for_function, use new function, print result, add
5145         function comment.
5146         (find_frame_for_function): New function, now returns a result.
5147
5148 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5149
5150         * stack.c (iterate_over_block_arg_vars): Fix comment.
5151         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5152
5153 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5154
5155         PR gdb/23203
5156         * frame.c
5157         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5158         Define.
5159         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5160         Define.
5161         * frame.h (class scoped_restore_selected_frame): New class.
5162         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5163         of any exception, use scoped_restore_selected_frame to restore the
5164         frame instead.
5165
5166 2018-05-24  Pedro Alves  <palves@redhat.com>
5167
5168         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5169         override.
5170
5171 2018-05-23  Tom Tromey  <tom@tromey.com>
5172
5173         * complaints.c (struct complaints): Remove.
5174         (symfile_complaint_book): Remove.
5175         (series): New global.
5176         (complaint_internal): Update.
5177         (clear_complaints): Update.
5178
5179 2018-05-23  Tom Tromey  <tom@tromey.com>
5180
5181         * complaints.c (counters): New global.
5182         (struct complain): Remove.
5183         (struct complaints) <root>: Remove.
5184         (complaint_sentinel): Remove.
5185         (symfile_complaint_book): Update.
5186         (find_complaint) Remove.
5187         (complaint_internal, clear_complaints): Update.
5188
5189 2018-05-23  Tom Tromey  <tom@tromey.com>
5190
5191         * complaints.c (struct complain) <file, line>: Remove.
5192         (find_complaint): Remove file, line parameters.
5193         (complaint_internal): Update.
5194
5195 2018-05-23  Tom Tromey  <tom@tromey.com>
5196
5197         * complaints.c (vcomplaint): Remove.
5198         (complaint_internal) Merge in contents of vcomplaint.
5199
5200 2018-05-23  Tom Tromey  <tom@tromey.com>
5201
5202         * complaints.c (struct complaints) <explanation>: Remove.
5203         (symfile_explanations): Remove.
5204         (symfile_complaint_book): Update.
5205         (vcomplaint): Update.
5206         (struct explanation): Remove.
5207
5208 2018-05-23  Tom Tromey  <tom@tromey.com>
5209
5210         * complaints.c (symfile_complaints): Remove.
5211         (complaint_internal): Remove "complaints" parameter.
5212         (clear_complaints, vcomplaint): Remove "c" parameter.
5213         (get_complaints): Remove.
5214         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5215         (dwarf2_debug_line_missing_file_complaint)
5216         (dwarf2_debug_line_missing_end_sequence_complaint)
5217         (dwarf2_complex_location_expr_complaint)
5218         (dwarf2_const_value_length_mismatch_complaint)
5219         (dwarf2_section_buffer_overflow_complaint)
5220         (dwarf2_macro_malformed_definition_complaint)
5221         (dwarf2_invalid_attrib_class_complaint)
5222         (create_addrmap_from_index, dw2_symtab_iter_next)
5223         (dw2_expand_marked_cus)
5224         (dw2_debug_names_iterator::find_vec_in_debug_names)
5225         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5226         (create_debug_type_hash_table, init_cutu_and_read_dies)
5227         (partial_die_parent_scope, add_partial_enumeration)
5228         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5229         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5230         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5231         (create_cus_hash_table, create_dwp_hash_table)
5232         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5233         (dwarf2_rnglists_process, dwarf2_ranges_process)
5234         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5235         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5236         (handle_struct_member_die, process_structure_scope)
5237         (read_array_type, read_common_block, read_module_type)
5238         (read_tag_pointer_type, read_typedef, read_base_type)
5239         (read_subrange_type, load_partial_dies, partial_die_info::read)
5240         (partial_die_info::read, partial_die_info::read)
5241         (partial_die_info::read, read_checked_initial_length_and_offset)
5242         (dwarf2_string_attr, read_formatted_entries)
5243         (dwarf_decode_line_header)
5244         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5245         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5246         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5247         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5248         (get_signatured_type, get_DW_AT_signature_type)
5249         (decode_locdesc, file_file_name, consume_improper_spaces)
5250         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5251         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5252         (dwarf2_symbol_mark_computed, set_die_type)
5253         (read_attribute_value): Update.
5254         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5255         Update.
5256         * dbxread.c (unknown_symtype_complaint)
5257         (lbrac_mismatch_complaint, repeated_header_complaint)
5258         (set_namestring, function_outside_compilation_unit_complaint)
5259         (read_dbx_symtab, process_one_symbol): Update.
5260         * gdbtypes.c (stub_noname_complaint): Update.
5261         * windows-nat.c (handle_unload_dll): Update.
5262         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5263         (decode_base_type): Update.
5264         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5265         (eb_complaint, record_include_begin, record_include_end)
5266         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5267         (process_xcoff_symbol, read_symbol)
5268         (function_outside_compilation_unit_complaint)
5269         (scan_xcoff_symtab): Update.
5270         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5271         * buildsym.c (finish_block_internal, make_blockvector)
5272         (end_symtab_get_static_block, augment_type_symtab): Update.
5273         * dtrace-probe.c (dtrace_process_dof)
5274         (dtrace_static_probe_ops::get_probes): Update.
5275         * complaints.h (struct complaint): Don't declare.
5276         (symfile_complaints): Remove.
5277         (complaint_internal): Remove "complaints" parameter.
5278         (complaint): Likewise.
5279         (clear_complaints): Likewise.
5280         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5281         (reread_symbols): Update.
5282         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5283         (dwarf2_frame_cache, decode_frame_entry): Update.
5284         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5285         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5286         (info_selectors_command): Update.
5287         * macrotab.c (macro_include, check_for_redefinition)
5288         (macro_undef): Update.
5289         * objfiles.c (filter_overlapping_sections): Update.
5290         * stabsread.c (invalid_cpp_abbrev_complaint)
5291         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5292         (define_symbol, error_type, read_type, rs6000_builtin_type)
5293         (stabs_method_name_from_physname, read_member_functions)
5294         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5295         (attach_fields_to_type, complain_about_struct_wipeout)
5296         (read_range_type, read_args, common_block_start)
5297         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5298         Update.
5299         * mdebugread.c (index_complaint, unknown_ext_complaint)
5300         (basic_type_complaint, bad_tag_guess_complaint)
5301         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5302         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5303         (parse_procedure, parse_lines)
5304         (function_outside_compilation_unit_complaint)
5305         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5306         (bad_tag_guess_complaint, reg_value_complaint): Update.
5307         * cp-support.c (demangled_name_complaint): Update.
5308         * macroscope.c (sal_macro_scope): Update.
5309         * dwarf-index-write.c (class debug_names): Update.
5310
5311 2018-05-23  Tom Tromey  <tom@tromey.com>
5312
5313         * complaints.c (clear_complaints): Remove "noisy" parameter.
5314         * complaints.h (clear_complaints): Update.
5315         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5316         (reread_symbols): Update.
5317
5318 2018-05-23  Tom Tromey  <tom@tromey.com>
5319
5320         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5321         SUBSEQUENT_MESSAGE.
5322         (vcomplaint, clear_complaints): Update.
5323         (symfile_explanations): Remove some messages.
5324
5325 2018-05-23  Tom Tromey  <tom@tromey.com>
5326
5327         * complaints.c (internal_complaint): Remove.
5328         * complaints.h (internal_complaint): Remove.
5329
5330 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5331
5332         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5333
5334 2018-05-22  Pedro Alves  <palves@redhat.com>
5335
5336         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5337         (remote_fileio_badfd, remote_fileio_return_errno)
5338         (remote_fileio_return_success, remote_fileio_func_open)
5339         (remote_fileio_func_open, remote_fileio_func_close)
5340         (remote_fileio_func_read, remote_fileio_func_write)
5341         (remote_fileio_func_lseek, remote_fileio_func_rename)
5342         (remote_fileio_func_unlink, remote_fileio_func_stat)
5343         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5344         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5345         remote_target parameter.
5346         (remote_fio_func_map) <func>: Add remote_target parameter.
5347         (do_remote_fileio_request, remote_fileio_request):
5348         * remote-fileio.h (remote_fileio_request):
5349         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5350         remote_target parameter.
5351         (remote_notif_process, handle_notification): Adjust to pass down
5352         the remote.
5353         (remote_notif_state_allocate): Add remote_target parameter.  Save
5354         it.
5355         * remote-notif.h (struct remote_target): Forward declare.
5356         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5357         remote_target parameter.
5358         (struct remote_notif_state) <remote>: New field.
5359         (remote_notif_ack, remote_notif_parse): Add remote_target
5360         parameter.
5361         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5362         remote_target parameter.
5363         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5364         (threads_listing_context, rmt_thread_action, protocol_feature)
5365         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5366         (packet_result, struct threads_listing_context, remote_state):
5367         Move definitions and declarations higher up.
5368         (remote_target) <~remote_target>: Declare.
5369         (remote_download_command_source, remote_file_put, remote_file_get)
5370         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5371         (remote_hostio_pread_vFile, remote_hostio_send_command)
5372         (remote_hostio_set_filesystem, remote_hostio_open)
5373         (remote_hostio_close, remote_hostio_unlink, remote_state)
5374         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5375         (get_memory_write_packet_size, get_memory_read_packet_size)
5376         (append_pending_thread_resumptions, remote_detach_1)
5377         (append_resumption, remote_resume_with_vcont)
5378         (add_current_inferior_and_thread, wait_ns, wait_as)
5379         (process_stop_reply, remote_notice_new_inferior)
5380         (process_initial_stop_replies, remote_add_thread)
5381         (btrace_sync_conf, remote_btrace_maybe_reopen)
5382         (remove_new_fork_children, kill_new_fork_children)
5383         (discard_pending_stop_replies, stop_reply_queue_length)
5384         (check_pending_events_prevent_wildcard_vcont)
5385         (discard_pending_stop_replies_in_queue, stop_reply)
5386         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5387         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5388         (remote_interrupt_as, remote_interrupt_ns)
5389         (remote_get_noisy_reply, remote_query_attached)
5390         (remote_add_inferior, remote_current_thread, get_current_thread)
5391         (set_thread, set_general_thread, set_continue_thread)
5392         (set_general_process, write_ptid)
5393         (remote_unpack_thread_info_response, remote_get_threadinfo)
5394         (parse_threadlist_response, remote_get_threadlist)
5395         (remote_threadlist_iterator, remote_get_threads_with_ql)
5396         (remote_get_threads_with_qxfer)
5397         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5398         (get_offsets, remote_check_symbols, remote_supported_packet)
5399         (remote_query_supported, remote_packet_size)
5400         (remote_serial_quit_handler, remote_detach_pid)
5401         (remote_vcont_probe, remote_resume_with_hc)
5402         (send_interrupt_sequence, interrupt_query)
5403         (remote_notif_get_pending_events, fetch_register_using_p)
5404         (send_g_packet, process_g_packet, fetch_registers_using_g)
5405         (store_register_using_P, store_registers_using_G)
5406         (set_remote_traceframe, check_binary_download)
5407         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5408         (remote_xfer_live_readonly_partial, remote_read_bytes)
5409         (remote_send_printf, remote_flash_write, readchar)
5410         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5411         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5412         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5413         (extended_remote_disable_randomization, extended_remote_run)
5414         (send_environment_packet, extended_remote_environment_support)
5415         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5416         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5417         (packet_command): Now methods of ...
5418         (remote_target): ... this class.
5419         (m_remote_state) <remote_target>: New field.
5420         (struct remote_state) <stop_reply_queue,
5421         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5422         fields.
5423         (remote_state::remote_state): Allocate stop_reply_queue.
5424         (remote_state): Delete global.
5425         (get_remote_state_raw): Delete.
5426         (remote_target::get_remote_state): Allocate m_remote_state on
5427         demand.
5428         (get_current_remote_target): New.
5429         (remote_ops, extended_remote_ops): Delete.
5430         (wait_forever_enabled_p, remote_async_inferior_event_token):
5431         Delete, moved to struct remote_state.
5432         (remote_target::close): Delete self.  Destruction bits split to
5433         ...
5434         (remote_target::~remote_target): ... this.
5435         (show_memory_packet_size): Adjust to use
5436         get_current_remote_target.
5437         (struct protocol_feature) <func>: Add remote_target parameter.
5438         All callers adjusted.
5439         (curr_quit_handler_target): New.
5440         (remote_serial_quit_handler): Reimplement.
5441         (remote_target::open_1): Adjust to use get_current_remote_target.
5442         Heap-allocate remote_target/extended_remote_target instances.
5443         (vcont_builder::vcont_builder): Add remote_target parameter, and
5444         save it in m_remote.  All callers adjusted.
5445         (vcont_builder::m_remote): New field.
5446         (vcont_builder::restart, vcont_builder::flush)
5447         (vcont_builder::push_action): Use it.
5448         (remote_target::commit_resume): Use it.
5449         (struct queue_iter_param) <remote>: New field.
5450         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5451         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5452         (check_pending_event_prevents_wildcard_vcont_callback)
5453         (remote_target::check_pending_events_prevent_wildcard_vcont)
5454         (remote_target::discard_pending_stop_replies)
5455         (remote_target::discard_pending_stop_replies_in_queue)
5456         (remote_target::remote_notif_remove_queued_reply): Fill in
5457         'remote' field.
5458         (remote_notif_get_pending_events): New.
5459         (remote_target::readchar, remote_target::remote_serial_write):
5460         Save/restore curr_quit_handler_target.
5461         (putpkt): New.
5462         (kill_new_fork_children): Fill in 'remote' field.
5463         (packet_command): Use get_current_remote_target, defer to
5464         remote_target method of same name.
5465         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5466         parameter, and save it in m_remote.  All callers adjusted.
5467         (scoped_remote_fd::release): Use m_remote.
5468         (scoped_remote_fd::m_remote): New field.
5469         (remote_file_put, remote_file_get, remote_file_delete): Use
5470         get_current_remote_target, defer to remote_target method of same
5471         name.
5472         (remote_btrace_reset): Add remote_state paremeter.  Update all
5473         callers.
5474         (remote_async_inferior_event_handler). Pass down 'data'.
5475         (remote_new_objfile): Use get_current_remote_target.
5476         (remote_target::vcont_r_supported): New.
5477         (set_range_stepping): Use get_current_remote_target and
5478         remote_target::vcont_r_supported.
5479         (_initialize_remote): Don't allocate 'remote_state' and
5480         'stop_reply_queue' globals.
5481         * remote.h (struct remote_target): Forward declare.
5482         (getpkt, putpkt, remote_notif_get_pending_events): Add
5483         'remote_target' parameter.
5484
5485 2018-05-22  Pedro Alves  <palves@redhat.com>
5486
5487         * remote.c (vcont_builder): Now a class.  Make all data members
5488         private.
5489         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5490         Declare methods.
5491         (vcont_builder_restart): Rename to ...
5492         (vcont_builder::restart): ... this.
5493         (vcont_builder_flush): Rename to ...
5494         (vcont_builder::flush): ... this.
5495         (vcont_builder_push_action): Rename to ...
5496         (vcont_builder::push_action): ... this.
5497         (remote_target::commit_resume): Adjust.
5498
5499 2018-05-22  Pedro Alves  <palves@redhat.com>
5500
5501         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5502         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5503         (get_fixed_memory_packet_size): New.
5504         (get_memory_packet_size): Use it.
5505         (set_memory_packet_size): Don't override the config size with
5506         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5507         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5508         Don't refer to get_memory_packet_size if not connected to a remote
5509         target.  Show "(default)" if configured size is 0.
5510
5511 2018-05-22  Pedro Alves  <palves@redhat.com>
5512
5513         * remote.c (remote_target::mourn_inferior): Move
5514         discard_pending_stop_replies call here from ...
5515         (_initialize_remote): ... here.
5516
5517 2018-05-22  Pedro Alves  <palves@redhat.com>
5518
5519         * remote.c (compare_section_command): Remove set_general_process
5520         call.
5521
5522 2018-05-22  Pedro Alves  <palves@redhat.com>
5523
5524         * remote.c (struct packet_reg, struct remote_arch_state):
5525         Move higher up in the file.
5526         (remote_state) <m_arch_states>: Store remote_arch_state values
5527         instead of remote_arch_state pointers.
5528         (remote_state::get_remote_arch_state): Adjust.
5529
5530 2018-05-22  Pedro Alves  <palves@redhat.com>
5531
5532         * remote.c: Include <unordered_map>.
5533         (remote_state): Now a class.
5534         (remote_state) <get_remote_arch_state>: Declare method.
5535         <get_remote_arch_state>: New field.
5536         (remote_arch_state) <remote_arch_state>: Declare ctor.
5537         <regs>: Now a unique_ptr.
5538         (remote_gdbarch_data_handle): Delete.
5539         (get_remote_arch_state): Delete.
5540         (remote_state::get_remote_arch_state): New.
5541         (get_remote_state): Adjust to call remote_state's
5542         get_remote_arch_state method.
5543         (init_remote_state): Delete, bits factored out to ...
5544         (remote_arch_state::remote_arch_state): ... this new method.
5545         (get_remote_packet_size, get_memory_packet_size)
5546         (process_g_packet, remote_target::fetch_registers)
5547         (remote_target::prepare_to_store, store_registers_using_G)
5548         (remote_target::store_registers, remote_target::get_trace_status):
5549         Adjust to call remote_state's method.
5550         (_initialize_remote): Remove reference to
5551         remote_gdbarch_data_handle.
5552
5553 2018-05-22  Pedro Alves  <palves@redhat.com>
5554
5555         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5556         pread>: New method declarations.
5557         (remote_target::open_1): Adjust.
5558         (readahead_cache_invalidate): Rename to ...
5559         (readahead_cache::invalidate): ... this, and adjust to be a class
5560         method.
5561         (readahead_cache_invalidate_fd): Rename to ...
5562         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5563         class method.
5564         (remote_hostio_pwrite): Adjust.
5565         (remote_hostio_pread_from_cache): Rename to ...
5566         (readahead_cache::pread): ... this, and adjust to be a class
5567         method.
5568         (remote_hostio_close): Adjust.
5569
5570 2018-05-22  Pedro Alves  <palves@redhat.com>
5571
5572         * remote.c (remote_hostio_close_cleanup): Delete.
5573         (class scoped_remote_fd): New.
5574         (remote_file_put, remote_file_get): Use it.
5575
5576 2018-05-22  Pedro Alves  <palves@redhat.com>
5577
5578         (struct vCont_action_support): Use bool and initialize all fields.
5579         (struct readahead_cache): Initialize all fields.
5580         (remote_state): Use bool and initialize all fields.
5581         (remote_state::remote_state, remote_state::~remote_state): New.
5582         (new_remote_state): Delete.
5583         (_initialize_remote): Use new to allocate remote_state.
5584
5585 2018-05-22  Pedro Alves  <palves@redhat.com>
5586             張俊芝  <zjz@zjz.name>
5587
5588         PR gdb/22973
5589         * c-exp.y: Include "c-support.h".
5590         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5591         of tolower.  Use c_ident_is_alpha to scan names.
5592         * c-lang.c: Include "c-support.h".
5593         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5594         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5595         * c-support.h: New file, with bits factored out from ...
5596         * cp-name-parser.y: ... this file.
5597         Include "c-support.h".
5598         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5599         c-support.h and renamed.
5600         (symbol_end, yylex): Adjust.
5601
5602 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5603
5604         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5605         parameter type to CORE_ADDR.
5606         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5607         parameter type in declaration to CORE_ADDR.
5608         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5609         target_auxv_search to get AT_HWCAP and use the result to get the
5610         target description.
5611         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5612         to CORE_ADDR. Remove the cast of the return value to unsigned
5613         long. Fix error predicate of target_auxv_search.
5614         (ppc_linux_nat_target::read_description): Change the type of the
5615         hwcap variable to CORE_ADDR.
5616
5617 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5618
5619         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5620         if the size of fpscr is larger than 32 bits.
5621
5622 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5623
5624         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5625         (ppc32_linux_vsxregmap): New global.
5626         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5627         regcache_supply_regset, and regcache_collect_regset.
5628         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5629         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5630         (fetch_vsx_register, store_vsx_register): Remove.
5631         (fetch_vsx_registers): Add regno parameter. Get regset using
5632         ppc_linux_vsxregset. Use regset to supply registers.
5633         (store_vsx_registers): Add regno parameter. Get regset using
5634         ppc_linux_vsxregset. Use regset to collect registers.
5635         (fetch_register): Call fetch_vsx_registers instead of
5636         fetch_vsx_register.
5637         (store_register): Call store_vsx_registers instead of
5638         store_vsx_register.
5639         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5640         new regno parameter.
5641         (store_ppc_registers): Call store_vsx_registers with -1 for the
5642         new regno parameter.
5643         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5644         (ppc_collect_vsxregset): Remove.
5645
5646 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5647
5648         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5649         offset fields.
5650         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5651         for vector register offset fields.
5652         (ppc64_fbsd_reg_offsets): Likewise.
5653         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5654         to vector register offset fields.
5655         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5656         to vector register offset fields.
5657         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5658         vector register offset fields.
5659         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5660         initializers for vector register offset fields.
5661         (rs6000_aix64_reg_offsets): Likewise.
5662         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5663         (ppc_supply_vrregset): Remove.
5664         (ppc_collect_vrregset): Remove.
5665         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5666         (ppc_linux_vrregset) : New function.
5667         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5668         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5669         (ppc32_linux_vrregset): Remove.
5670         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5671         and use result instead of ppc32_linux_vrregset.
5672         (ppc32_linux_reg_offsets): Remove initializers for vector register
5673         offset fields.
5674         (ppc64_linux_reg_offsets): Likewise.
5675         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5676         * ppc-linux-nat.c: Include regset.h.
5677         (gdb_vrregset_t): Adjust comment to account for little-endian
5678         mode.
5679         (supply_vrregset, fill_vrregset): Remove.
5680         (fetch_altivec_register, store_altivec_register): Remove.
5681         (fetch_altivec_registers): Add regno parameter. Get regset using
5682         ppc_linux_vrregset. Use regset to supply registers.
5683         (store_altivec_registers): Add regno parameter. Get regset using
5684         ppc_linux_vrregset. Use regset to collect registers.
5685         (fetch_register): Call fetch_altivec_registers instead of
5686         fetch_altivec_register.
5687         (store_register): Call store_altivec_registers instead of
5688         store_altivec_register.
5689         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5690         the new regno parameter.
5691         (store_ppc_registers): Call store_altivec_registers with -1 for
5692         the new regno parameter.
5693
5694 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5695
5696         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5697         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5698         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5699         (gdb_vrregset_t): Change array type size to
5700         PPC_LINUX_SIZEOF_VRREGSET.
5701         (gdb_vsxregset_t): Change array type size to
5702         PPC_LINUX_SIZEOF_VSXREGSET.
5703         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5704         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5705         PPC_LINUX_SIZEOF_VSXREGSET.
5706
5707 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5708
5709         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5710         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5711         nat/ppc-linux.c.
5712         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5713         ppc_linux_target_wordsize with tid.
5714         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5715         wordsize with tid.
5716         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5717         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5718         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5719         tid parameter. Remove static specifier.
5720         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5721         (ppc_linux_target_wordsize): New declaration.
5722
5723 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5724
5725         * arch/ppc-linux-common.c: New file.
5726         * arch/ppc-linux-common.h: New file.
5727         * arch/ppc-linux-tdesc.h: New file.
5728         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5729         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5730         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5731         arch/ppc-linux-tdesc.h.
5732         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5733         arch/ppc-linux-tdesc.h.
5734         (ppc_linux_nat_target::read_description): Remove target
5735         description matching code. Fill a ppc_linux_features struct and
5736         call ppc_linux_match_description with it. Move comment about ISA
5737         2.05 to ppc-linux-common.c.
5738         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5739         arch/ppc-linux-tdesc.h.
5740         (ppc_linux_core_read_description): Remove target description
5741         matching code. Fill a ppc_linux_features struct and call
5742         ppc_linux_match_description with it.
5743         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5744         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5745         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5746         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5747         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5748         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5749         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5750         (tdesc_powerpc_e500l): Remove.
5751
5752 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5753
5754         * ada-lang.c (catch_assert_command): Pass empty string instead
5755         of NULL for excep_string argument.
5756
5757 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5758
5759         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5760         the width of the requested register exceeds the width of the
5761         `ptrace' data type.
5762
5763 2018-05-21  Tom Tromey  <tom@tromey.com>
5764
5765         * printcmd.c (output_command): Remove.
5766         (output_command_const): Rename to output_command.
5767         * valprint.h (output_command): Rename from output_command_const.
5768         * tracepoint.c (trace_dump_actions): Call output_command.
5769
5770 2018-05-21  Tom Tromey  <tom@tromey.com>
5771
5772         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5773         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5774         * ada-lang.h (create_ada_exception_catchpoint): Update.
5775         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5776         std::string.
5777         (create_excep_cond_exprs, ~ada_catchpoint)
5778         (should_stop_exception, print_one_exception)
5779         (print_mention_exception, print_recreate_exception): Update.
5780         (ada_get_next_arg): Remove.
5781         (catch_ada_exception_command_split): Use std::string.  Change type
5782         of "excep_string", "cond_string".
5783         (catch_ada_exception_command): Update.
5784         (create_ada_exception_catchpoint): Change type of excep_string.
5785         (ada_exception_sal): Remove excep_string parameter.
5786         (~ada_catchpoint): Remove.
5787
5788 2018-05-21  Tom Tromey  <tom@tromey.com>
5789
5790         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5791         cleanup.
5792
5793 2018-05-21  Tom Tromey  <tom@tromey.com>
5794
5795         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5796         Return unique_xmalloc_ptr.
5797         (print_it_exception): Update.
5798
5799 2018-05-21  Tom Tromey  <tom@tromey.com>
5800
5801         * tracepoint.c (trace_dump_actions): Use std::string.
5802
5803 2018-05-21  Tom Tromey  <tom@tromey.com>
5804
5805         * symfile.c (reread_symbols): Use std::string for original_name.
5806
5807 2018-05-21  Tom Tromey  <tom@tromey.com>
5808
5809         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5810         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5811         constructor.
5812
5813 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5814
5815         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5816         instance to...
5817         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5818         * objfiles.c (get_objfile_bfd_data): Allocate
5819         objfile_per_bfd_storage with obstack_new when allocating on
5820         obstack.
5821
5822 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5823
5824         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5825         OBSTACK_ZALLOC.
5826         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5827         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5828         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5829         (add_pending): Likewise.
5830         (parse_symbol): Likewise.
5831         (parse_partial_symbols): Likewise.
5832         (psymtab_to_symtab_1): Likewise.
5833         (new_psymtab): Likewise.
5834         (elfmdebug_build_psymtabs): Likewise.
5835         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5836         * objfiles.c (get_objfile_bfd_data): Likewise.
5837         (objfile_register_static_link): Likewise.
5838         * psymtab.c (allocate_psymtab): Likewise.
5839         * stabsread.c (read_member_functions): Likewise.
5840         * xcoffread.c (xcoff_end_psymtab): Likewise.
5841
5842 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5843
5844         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5845         compiler supports std::is_trivially_constructible.
5846         * common/poison.h: Include obstack.h.
5847         (IsMallocable): Define to is_trivially_constructible if the
5848         compiler supports it, define to true_type otherwise.
5849         (xobnew): New.
5850         (XOBNEW): Redefine.
5851         (xobnewvec): New.
5852         (XOBNEWVEC): Redefine.
5853         * gdb_obstack.h (obstack_zalloc): New.
5854         (OBSTACK_ZALLOC): Redefine.
5855         (obstack_calloc): New.
5856         (OBSTACK_CALLOC): Redefine.
5857         (obstack_new): New.
5858         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5859         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5860         gdbarch.c.
5861         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5862         obstack_calloc/obstack_zalloc.
5863         (gdbarch_obstack_zalloc): Remove.
5864         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5865
5866 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5867
5868         * stack.c (backtrace_command_1): Remove useless variable int i.
5869
5870 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5871
5872         * stack.c (print_frame_info): Fix comment.
5873
5874 2018-05-18  Tom Tromey  <tom@tromey.com>
5875
5876         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5877         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5878         (~dwarf2_per_objfile): Update
5879         (dwarf2_get_dwz_file): Use new.
5880         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5881         unique_ptr.
5882
5883 2018-05-18  Tom Tromey  <tom@tromey.com>
5884
5885         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5886         unique_ptr.
5887         * dwarf2read.c (struct dwp_file): Add constructor and
5888         initializers.
5889         (open_and_init_dwp_file): Return a unique_ptr.
5890         (dwarf2_per_objfile, create_dwp_hash_table)
5891         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5892         (lookup_dwo_unit_in_dwp): Update.
5893         (open_and_init_dwp_file, get_dwp_file): Update.
5894
5895 2018-05-18  Tom Tromey  <tom@tromey.com>
5896
5897         * dwarf2read.c (dwarf2_per_objfile): Update.
5898         (struct mapped_index): Add initializers.
5899         (dwarf2_read_index): Use new.
5900         (dw2_symtab_iter_init): Update.
5901         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5902         unique_ptr.
5903
5904 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5905
5906         * dwarf2read.c (mapped_index) <total_size>: Remove.
5907
5908 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5909
5910         * unittests/format_pieces-selftests.c (test_format_specifier):
5911         Add ARI comments.
5912
5913 2018-05-18  Tom Tromey  <tom@tromey.com>
5914
5915         * c-typeprint.c (maybe_print_hole): New function.
5916         (c_print_type_struct_field_offset): Update.
5917         (c_type_print_base_struct_union): Call maybe_print_hole.
5918
5919 2018-05-17  Keith Seitz  <keiths@redhat.com>
5920
5921         * breakpoint.c (build_bpstat_chain): New function, moved from
5922         bpstat_stop_status.
5923         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5924         If no stop chain is passed, call build_bpstat_chain to build it.
5925         * breakpoint.h (build_bpstat_chain): Declare.
5926         (bpstat_stop_status): Move documentation here from breakpoint.c.
5927         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5928         build the stop chain and pass it to skip_inline_frames.
5929         Pass this stop chain to bpstat_stop_status.
5930         * inline-frame.c: Include breakpoint.h.
5931         (stopped_by_user_bp_inline_frame): New function.
5932         (skip_inline_frames): Add parameter `stop_chain'.
5933         Move documention to inline-frame.h.
5934         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5935         whether the frame should be elided.
5936         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5937         Add moved documentation and update for new parameter.
5938
5939 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5940
5941         PR cli/14975
5942         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5943         unittests/format_pieces-selftests.c.
5944         * common/format.h (format_piece) <operator==>: New.
5945         (format_pieces) <operator[]>: Remove.
5946         * common/format.c (format_pieces::format_pieces): Handle \e.
5947         * unittests/format_pieces-selftests.c: New.
5948
5949 2018-05-17  Tom Tromey  <tom@tromey.com>
5950
5951         PR symtab/23010:
5952         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5953         (dw2_instantiate_symtab): Add skip_partial parameter.
5954         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5955         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5956         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5957         (dw2_expand_symtabs_matching_one)
5958         (dw2_find_pc_sect_compunit_symtab)
5959         (dw2_debug_names_lookup_symbol)
5960         (dw2_debug_names_expand_symtabs_for_function): Update.
5961         (init_cutu_and_read_dies): Add skip_partial parameter.
5962         (process_psymtab_comp_unit, build_type_psymtabs_1)
5963         (process_skeletonless_type_unit, load_partial_comp_unit)
5964         (psymtab_to_symtab_1): Update.
5965         (load_full_comp_unit): Add skip_partial parameter.
5966         (process_imported_unit_die, dwarf2_read_addr_index)
5967         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5968         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5969         (read_signatured_type): Update.
5970
5971 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5972
5973         * value.c (release_value): Remove unused variable.
5974         (record_latest_value): Likewise.
5975         (access_value_history): Likewise.
5976         (preserve_values): Likewise.
5977
5978 2018-05-17  Tom Tromey  <tom@tromey.com>
5979
5980         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5981         Initialize.
5982
5983 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5984
5985         PR gdb/22286
5986         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5987         Also handle registers whose width is not a multiple of
5988         PTRACE_TYPE_RET.
5989         (linux_nat_trad_target::store_register): Likewise.
5990
5991 2018-05-16  Tom Tromey  <tom@tromey.com>
5992
5993         * gdbcore.h (core_bfd): Redefine.
5994         * corelow.c (core_target::close): Update.
5995         (core_target_open): Update.
5996         * progspace.h (struct program_space) <cbfd>: Now a
5997         gdb_bfd_ref_ptr.
5998
5999 2018-05-16  Tom Tromey  <tom@tromey.com>
6000
6001         PR cli/19551:
6002         * symfile-add-flags.h (enum symfile_add_flags)
6003         <SYMFILE_NOT_FILENAME>: New constant.
6004         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6005         objfile name from BFD.
6006         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6007         * minidebug.c (find_separate_debug_file_in_section): Put
6008         ".gnu_debugdata" into BFD's file name.
6009
6010 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6011
6012         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6013         Remove.
6014
6015 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6016
6017         PR binutils/21446
6018         * aarch64-tdep.c (aarch64_analyze_prologue,
6019         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6020         Indicate not interested in errors.
6021
6022 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6023
6024         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6025         Supply the MIPS_ZERO_REGNUM register.
6026
6027 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6028
6029         * mips-tdep.c (mask_address_var): Make variable static.
6030
6031 2018-05-14  Tom Tromey  <tom@tromey.com>
6032
6033         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6034
6035 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6036
6037         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6038         FXSAVE_ADDR for the mxcsr register.
6039
6040 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6041
6042         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6043
6044 2018-05-11  Pedro Alves  <palves@redhat.com>
6045
6046         * corelow.c (core_target) <core_target>: No longer inline.
6047         Initialize m_core_gdbarch, m_core_vec and build the section table
6048         here.
6049         <~core_target>: New.
6050         <core_gdbarch, get_core_register_section>: New methods.
6051         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6052         factored out from ...
6053         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6054         (core_ops): Delete.
6055         (sniff_core_bfd): Add gdbarch parameter.
6056         (core_close): Delete, merged into ...
6057         (core_target::close): ... here.  Delete self.
6058         (core_close_cleanup): Delete.
6059         (core_target_open): Allocate a core_target on the heap.  Use a
6060         unique_ptr instead of a cleanup.  Bits moved into the core_target
6061         ctor.  Adjust to use core_target methods instead of globals.
6062         (get_core_register_section): Rename to ...
6063         (core_target::get_core_register_section): ... this and adjust.
6064         (struct get_core_registers_cb_data): New.
6065         (get_core_registers_cb): Use it.  Use bool.
6066         (core_target::fetch_registers, core_target::files_info)
6067         (core_target::xfer_partial, core_target::read_description)
6068         (core_target::pid_to, core_target::thread_name): Adjust to
6069         reference class fields instead of globals.
6070         * target.h (struct target_ops_deleter, target_ops_up): New.
6071
6072 2018-05-11  Pedro Alves  <palves@redhat.com>
6073
6074         * corefile.c (core_file_command): Move to corelow.c.
6075         * corelow.c (the_core_target): Delete.
6076         (core_file_command): Moved from corefile.c.  Check exec_bfd
6077         instead of the_core_target.  Use target_detach instead of calling
6078         into the_core_target directly.
6079         (maybe_say_no_core_file_now): New.
6080         (core_target::detach): Use it.
6081         (_initialize_corelow): Remove references to the_core_target.
6082         * gdbcore.h (the_core_target): Delete.
6083
6084 2018-05-11  Tom Tromey  <tromey@redhat.com>
6085             Pedro Alves  <palves@redhat.com>
6086
6087         * corefile.c (core_bfd): Remove.
6088         * gdbcore.h (core_bfd): Now a macro.
6089         * progspace.h (struct program_space) <cbfd>: New field.
6090
6091 2018-05-11  Tom Tromey  <tom@tromey.com>
6092
6093         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6094         gdb::def_vector.
6095
6096 2018-05-10  Tom Tromey  <tom@tromey.com>
6097
6098         * configure: Rebuild.
6099         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6100
6101 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6102
6103         PR server/23158:
6104         * regformats/regdat.sh: Adjust script, following the addition
6105         of the new expedite_regs parameter to init_target_desc.
6106
6107 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6108     
6109         PR gdb/23127
6110         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6111         set_gdbarch_significant_addr_bit.
6112         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6113         set_gdbarch_significant_addr_bit.
6114         * utils.c (address_significant): Update to sign extend addr.
6115
6116 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6117
6118         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6119         (xtensa_linux_init_abi): Limit tdep->num_regs by
6120         tdep->num_nopriv_regs.
6121         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6122         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6123         not initialized.
6124
6125 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6126
6127         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6128
6129 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6130
6131         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6132         (I387_MXCSR_INIT_VAL): New constant.
6133         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6134         buffer if it was supplied by the inferior.
6135         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6136         (i387_xsave_get_clear_bv): New function.
6137         (i387_supply_xsave): Only read x87 control registers from the
6138         xsave buffer if the feature is enabled, and the state will have
6139         been written, otherwise, provide a suitable default.
6140         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6141         including x87 control registers.  Update control registers if they
6142         have changed from the default value, and mark features as enabled
6143         as required.
6144         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6145
6146 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6147
6148         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6149
6150 2018-05-07  Tom Tromey  <tom@tromey.com>
6151
6152         * configure: Rebuild.
6153         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6154
6155 2018-05-07  Tom Tromey  <tom@tromey.com>
6156
6157         PR tdep/20362:
6158         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6159         bit.  Use correct value for VDIV.
6160
6161 2018-05-04  Tom Tromey  <tom@tromey.com>
6162
6163         * configure: Rebuild.
6164         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6165
6166 2018-05-04  Tom Tromey  <tom@tromey.com>
6167
6168         * linux-record.c (record_linux_system_call) <case
6169         RECORD_SYS_RECVFROM>: Add "break".
6170
6171 2018-05-04  Tom Tromey  <tom@tromey.com>
6172
6173         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6174         Add missing "break".
6175         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6176         Add missing "break".
6177
6178 2018-05-04  Tom Tromey  <tom@tromey.com>
6179
6180         * rs6000-tdep.c (ppc_process_record_op4)
6181         (ppc_process_record_op63): Add fall-through comment.
6182
6183 2018-05-04  Tom Tromey  <tom@tromey.com>
6184
6185         * i386-tdep.c (i386_process_record): Add fall-through comment.
6186
6187 2018-05-04  Tom Tromey  <tom@tromey.com>
6188
6189         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6190         comment.
6191
6192 2018-05-04  Tom Tromey  <tom@tromey.com>
6193
6194         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6195         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6196         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6197         comment.
6198         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6199         comment.
6200         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6201         comment.
6202
6203 2018-05-04  Tom Tromey  <tom@tromey.com>
6204
6205         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6206
6207 2018-05-04  Tom Tromey  <tom@tromey.com>
6208
6209         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6210         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6211         * symfile.c (section_is_mapped): Fix fall-through comment.
6212         * stabsread.c (define_symbol, read_member_functions): Fix
6213         fall-through comment.
6214         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6215         comment.
6216         * remote.c (remote_wait_as): Fix fall-through comment.
6217         * p-exp.y (yylex): Fix fall-through comment.
6218         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6219         comment.
6220         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6221         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6222         * jv-exp.y (yylex): Fix fall-through comment.
6223         * go-exp.y (lex_one_token): Fix fall-through comment.
6224         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6225         fall-through comment.
6226         * f-exp.y (yylex): Fix fall-through comment.
6227         * dwarf2read.c (process_die): Fix fall-through comments.
6228         * dbxread.c (process_one_symbol): Fix fall-through comment.
6229         * d-exp.y (lex_one_token): Fix fall-through comment.
6230         * cp-name-parser.y (yylex): Fix fall-through comment.
6231         * coffread.c (coff_symtab_read): Fix fall-through comment.
6232         * c-exp.y (lex_one_token): Fix fall-through comment.
6233         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6234         comment.
6235         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6236         comment.
6237
6238 2018-05-04  Tom Tromey  <tom@tromey.com>
6239
6240         PR python/22730:
6241         * NEWS: Mention gdb.execute change.
6242         * gdbcmd.h (execute_control_command): Don't declare.
6243         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6244         execute_control_commands, execute_control_commands_to_string.
6245         * cli/cli-script.h (execute_control_commands)
6246         (execute_control_commands_to_string): Declare.
6247         (execute_control_command): Add from_tty parameter.
6248         * cli/cli-script.c (execute_control_commands)
6249         (execute_control_commands_to_string): New functions.
6250         (execute_user_command): Use execute_control_commands.
6251         (execute_control_command_1): Add "from_tty" parameter.  Update.
6252         (execute_control_command): Likewise.
6253
6254 2018-05-04  Tom Tromey  <tom@tromey.com>
6255
6256         PR python/22731:
6257         * NEWS: Mention that breakpoint commands are writable.
6258         * python/py-breakpoint.c (bppy_set_commands): New function.
6259         (breakpoint_object_getset) <"commands">: Use it.
6260
6261 2018-05-04  Tom Tromey  <tom@tromey.com>
6262
6263         * tracepoint.c (actions_command): Update.
6264         * mi/mi-cmd-break.c (mi_command_line_array)
6265         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6266         (mi_read_next_line): Remove.
6267         (mi_cmd_break_commands): Update.
6268         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6269         function_view.
6270         * cli/cli-script.c (get_command_line): Update.
6271         (process_next_line): Use function_view.  Constify.
6272         (recurse_read_control_structure, read_command_lines)
6273         (read_command_lines_1): Change argument types to function_view.
6274         (do_define_command, document_command): Update.
6275         * breakpoint.h (check_tracepoint_command): Don't declare.
6276         * breakpoint.c (check_tracepoint_command): Remove.
6277         (commands_command_1, create_tracepoint_from_upload): Update.
6278
6279 2018-05-04  Tom Tromey  <tom@tromey.com>
6280
6281         PR gdb/11750:
6282         * cli/cli-script.h (enum command_control_type) <define_control>:
6283         New constant.
6284         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6285         (build_command_line, execute_control_command_1)
6286         (process_next_line): Likewise.
6287         (do_define_command): New function, extracted from define_command.
6288         (define_command): Use it.
6289
6290 2018-05-04  Tom Tromey  <tom@tromey.com>
6291
6292         * tracepoint.c (actions_command): Update.
6293         * cli/cli-script.h (read_command_lines): Update.
6294         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6295         (MAX_TMPBUF): Remove define.
6296         (define_command): Use string_printf.
6297         (document_command): Likewise.
6298         * breakpoint.c (commands_command_1): Update.
6299
6300 2018-05-04  Tom Tromey  <tom@tromey.com>
6301
6302         * top.c (execute_command): Update.
6303         * cli/cli-script.h (print_command_lines): Now varargs.
6304         * cli/cli-script.c (print_command_lines): Now varargs.
6305         (execute_control_command_1) <case while_control, case if_control>:
6306         Update.
6307
6308 2018-05-04  Tom Tromey  <tom@tromey.com>
6309
6310         * tracepoint.c (all_tracepoint_actions): Rename from
6311         all_tracepoint_actions_and_cleanup.  Change return type.
6312         (actions_command, encode_actions_1, encode_actions)
6313         (trace_dump_actions, tdump_command): Update.
6314         * remote.c (remote_download_command_source): Update.
6315         * python/python.c (gdbpy_eval_from_control_command)
6316         (python_command, python_interactive_command): Update.
6317         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6318         * guile/guile.c (guile_command)
6319         (gdbscm_eval_from_control_command, guile_command): Update.
6320         * compile/compile.c (compile_code_command)
6321         (compile_print_command, compile_to_object): Update.
6322         * cli/cli-script.h (struct command_lines_deleter): New.
6323         (counted_command_line): New typedef.
6324         (struct command_line): Add constructor, destructor.
6325         <body_list>: Remove.
6326         <body_list_0, body_list_1>: New members.
6327         (command_line_up): Remove typedef.
6328         (read_command_lines, read_command_lines_1, get_command_line):
6329         Update.
6330         (copy_command_lines): Don't declare.
6331         * cli/cli-script.c (build_command_line): Use "new".
6332         (get_command_line): Return counted_command_line.
6333         (print_command_lines, execute_user_command)
6334         (execute_control_command_1, while_command, if_command): Update.
6335         (realloc_body_list): Remove.
6336         (process_next_line, recurse_read_control_structure): Update.
6337         (read_command_lines, read_command_lines_1): Return counted_command_line.
6338         (free_command_lines): Use "delete".
6339         (copy_command_lines): Remove.
6340         (define_command, document_command, show_user_1): Update.
6341         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6342         a counted_command_line.
6343         * breakpoint.h (counted_command_line): Remove typedef.
6344         (breakpoint_set_commands): Update.
6345         * breakpoint.c (check_no_tracepoint_commands)
6346         (validate_commands_for_breakpoint): Update.
6347         (breakpoint_set_commands): Change commands to be a
6348         counted_command_line.
6349         (commands_command_1, update_dprintf_command_list)
6350         (create_tracepoint_from_upload): Update.
6351
6352 2018-05-04  Tom Tromey  <tom@tromey.com>
6353
6354         * cli/cli-decode.h (cmd_list_element): New constructor.
6355         (~cmd_list_element): New destructor.
6356         (struct cmd_list_element): Add initializers.
6357         * cli/cli-decode.c (do_add_cmd): Use "new".
6358         (delete_cmd): Use "delete".
6359
6360 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6361             Pedro Alves <palves@redhat.com>
6362
6363         PR breakpoints/19806 and support for PR external/20207.
6364         * NEWS: Mention Aarch64 watchpoint improvements.
6365         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6366         watchpoints and PR external/20207 watchpoints.
6367         * nat/aarch64-linux-hw-point.c
6368         (kernel_supports_any_contiguous_range): New.
6369         (aarch64_watchpoint_offset): New.
6370         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6371         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6372         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6373         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6374         next_addr_orig_p.  Support PR external/20207 watchpoints.
6375         (aarch64_downgrade_regs): New.
6376         (aarch64_dr_state_insert_one_point): New parameters offset and
6377         addr_orig.
6378         (aarch64_dr_state_remove_one_point): Likewise.
6379         (aarch64_handle_breakpoint): Update caller.
6380         (aarch64_handle_aligned_watchpoint): Likewise.
6381         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6382         aligned_offset.
6383         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6384         aarch64_downgrade_regs.
6385         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6386         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6387         (DR_CONTROL_MASK): ... this.
6388         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6389         (unsigned int aarch64_watchpoint_offset): New prototype.
6390         (aarch64_linux_set_debug_regs): Remove const from state.
6391         * utils.c (align_up, align_down): Move to ...
6392         * common/common-utils.c (align_up, align_down): ... here.
6393         * utils.h (align_up, align_down): Move to ...
6394         * common/common-utils.h (align_up, align_down): ... here.
6395
6396 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6397
6398         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6399         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6400         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6401         Re-implement to match the ABI as summarized in GCC's
6402         gcc/config/sparc/sparc.c.  All callers updated.
6403         (sparc32_store_arguments): Remove assertion.
6404
6405 2018-05-04  Tom Tromey  <tom@tromey.com>
6406
6407         * printcmd.c: Don't include tui.h.
6408         (decode_format): Use skip_spaces.
6409
6410 2018-05-04  Tom Tromey  <tom@tromey.com>
6411
6412         PR gdb/22619:
6413         * printcmd.c (last_count): New global.
6414         (x_command): Use saved count when repeating.
6415
6416 2018-05-04  Tom Tromey  <tom@tromey.com>
6417
6418         * nto-procfs.c (do_closedir_cleanup): Remove.
6419         (procfs_pidlist): Use gdb_dir_up.
6420         * procfs.c (do_closedir_cleanup): Remove.
6421         (proc_update_threads): Use gdb_dir_up.
6422         * common/filestuff.h (struct gdb_dir_deleter): New.
6423         (gdb_dir_up): New typedef.
6424
6425 2018-05-04  Tom Tromey  <tom@tromey.com>
6426
6427         * ada-lang.c (print_mention_exception): Use std::string.
6428
6429 2018-05-04  Tom Tromey  <tom@tromey.com>
6430
6431         * ada-lang.c (create_excep_cond_exprs): Update.
6432         (ada_exception_catchpoint_cond_string): Use std::string.
6433
6434 2018-05-04  Tom Tromey  <tom@tromey.com>
6435
6436         * ada-lang.c (xget_renaming_scope): Return std::string.
6437         (old_renaming_is_invisible): Update.
6438
6439 2018-05-04  Tom Tromey  <tom@tromey.com>
6440
6441         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6442         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6443
6444 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6445
6446         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6447
6448 2018-05-04  Tom Tromey  <tom@tromey.com>
6449
6450         * remote.c (remote_query_supported_append): Change type.
6451         (remote_check_symbols): Update.
6452
6453 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6454
6455         PR gdb/11420
6456         * configure.ac: Prepend libpython.
6457         * python/python-config.py: Likewise.
6458         * configure: Regenerate.
6459
6460 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6461
6462         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6463
6464 2018-05-03  Pedro Alves  <palves@redhat.com>
6465
6466         * s390-linux-nat.c
6467         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6468         override.  Write 'true' instead of '1'.
6469         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6470         declaration.
6471
6472 2018-05-02  Pedro Alves  <palves@redhat.com>
6473
6474         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6475         add_inf_child_target.
6476         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6477         add_inf_child_target.
6478         * aix-thread.c (aix_thread_target_info): New.
6479         (aix_thread_target) <shortname, longname, doc>: Delete.
6480         <info>: New.
6481         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6482         add_inf_child_target.
6483         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6484         add_inf_child_target.
6485         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6486         add_inf_child_target.
6487         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6488         add_inf_child_target.
6489         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6490         add_inf_child_target.
6491         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6492         add_inf_child_target.
6493         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6494         add_inf_child_target.
6495         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6496         add_inf_child_target.
6497         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6498         add_inf_child_target.
6499         * bfd-target.c (target_bfd_target_info): New.
6500         (target_bfd) <shortname, longname, doc>: Delete.
6501         <info>: New.
6502         * bsd-kvm.c (bsd_kvm_target_info): New.
6503         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6504         <info>: New.
6505         (bsd_kvm_target::open): Rename to ...
6506         (bsd_kvm_target_open): ... this.  Adjust.
6507         * bsd-uthread.c (bsd_uthread_target_info): New.
6508         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6509         <info>: New.
6510         * corefile.c (core_file_command): Adjust.
6511         * corelow.c (core_target_info): New.
6512         (core_target) <shortname, longname, doc>: Delete.
6513         <info>: New.
6514         (core_target::open): Rename to ...
6515         (core_target_open): ... this.  Adjust.
6516         * ctf.c (ctf_target_info): New.
6517         (ctf_target) <shortname, longname, doc>: Delete.
6518         <info>: New.
6519         (ctf_target::open): Rename to ...
6520         (ctf_target_open): ... this.
6521         (_initialize_ctf): Adjust.
6522         * exec.c (exec_target_info): New.
6523         (exec_target) <shortname, longname, doc>: Delete.
6524         <info>: New.
6525         (exec_target::open): Rename to ...
6526         (exec_target_open): ... this.
6527         * gdbcore.h (core_target_open): Declare.
6528         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6529         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6530         add_inf_child_target.
6531         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6532         add_inf_child_target.
6533         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6534         add_inf_child_target.
6535         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6536         add_inf_child_target.
6537         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6538         add_inf_child_target.
6539         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6540         add_inf_child_target.
6541         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6542         add_inf_child_target.
6543         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6544         add_inf_child_target.
6545         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6546         add_inf_child_target.
6547         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6548         add_inf_child_target.
6549         * inf-child.c (inf_child_target_info): New.
6550         (inf_child_target::info): New.
6551         (inf_child_open_target): Remove 'target' parameter.  Use
6552         get_native_target instead.
6553         (inf_child_target::open): Delete.
6554         (add_inf_child_target): New.
6555         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6556         Delete.
6557         <info>: New.
6558         (add_inf_child_target): Declare.
6559         (inf_child_open_target): Declare.
6560         * linux-thread-db.c (thread_db_target_info): New.
6561         (thread_db_target) <shortname, longname, doc>: Delete.
6562         <info>: New.
6563         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6564         add_inf_child_target.
6565         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6566         add_inf_child_target.
6567         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6568         add_inf_child_target.
6569         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6570         add_inf_child_target.
6571         * make-target-delegates (print_class): Adjust.
6572         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6573         add_inf_child_target.
6574         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6575         add_inf_child_target.
6576         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6577         add_inf_child_target.
6578         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6579         add_inf_child_target.
6580         * nto-procfs.c (nto_native_target_info): New.
6581         (nto_procfs_target_native) <shortname, longname, doc>:
6582         Delete.
6583         <info>: New.
6584         (nto_procfs_target_info): New.
6585         (nto_procfs_target_procfs) <shortname, longname, doc>:
6586         Delete.
6587         <info>: New.
6588         (init_procfs_targets): Adjust.
6589         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6590         add_inf_child_target.
6591         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6592         add_inf_child_target.
6593         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6594         add_inf_child_target.
6595         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6596         add_inf_child_target.
6597         * ravenscar-thread.c (ravenscar_target_info): New.
6598         (ravenscar_thread_target) <shortname, longname, doc>:
6599         Delete.
6600         <info>: New.
6601         * record-btrace.c (record_btrace_target_info):
6602         (record_btrace_target) <shortname, longname, doc>: Delete.
6603         <info>: New.
6604         (record_btrace_target::open): Rename to ...
6605         (record_btrace_target_open): ... this.  Adjust.
6606         * record-full.c (record_longname, record_doc): New.
6607         (record_full_base_target) <shortname, longname, doc>: Delete.
6608         <info>: New.
6609         (record_full_target_info): New.
6610         (record_full_target): <shortname>: Delete.
6611         <info>: New.
6612         (record_full_core_open_1, record_full_open_1): Update comments.
6613         (record_full_base_target::open): Rename to ...
6614         (record_full_open): ... this.
6615         (cmd_record_full_restore): Update.
6616         (_initialize_record_full): Update.
6617         * remote-sim.c (remote_sim_target_info): New.
6618         (gdbsim_target) <shortname, longname, doc>: Delete.
6619         <info>: New.
6620         (gdbsim_target::open): Rename to ...
6621         (gdbsim_target_open): ... this.
6622         (_initialize_remote_sim): Adjust.
6623         * remote.c (remote_doc): New.
6624         (remote_target_info): New.
6625         (remote_target) <shortname, longname, doc>: Delete.
6626         <info>: New.
6627         (extended_remote_target_info): New.
6628         (extended_remote_target) <shortname, longname, doc>: Delete.
6629         <info>: New.
6630         (remote_target::open_1): Make static.  Adjust.
6631         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6632         * s390-linux-nat.c (_initialize_s390_nat): Use
6633         add_inf_child_target.
6634         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6635         add_inf_child_target.
6636         * sol-thread.c (thread_db_target_info): New.
6637         (sol_thread_target) <shortname, longname, doc>: Delete.
6638         <info>: New.
6639         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6640         add_inf_child_target.
6641         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6642         add_inf_child_target.
6643         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6644         add_inf_child_target.
6645         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6646         add_inf_child_target.
6647         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6648         add_inf_child_target.
6649         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6650         add_inf_child_target.
6651         * spu-linux-nat.c (_initialize_spu_nat): Use
6652         add_inf_child_target.
6653         * spu-multiarch.c (spu_multiarch_target_info): New.
6654         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6655         <info>: New.
6656         * target-delegates.c: Regenerate.
6657         * target.c: Include <unordered_map>.
6658         (target_ops_p): Delete.
6659         (DEF_VEC_P(target_ops_p)): Delete.
6660         (target_factories): New.
6661         (test_target_info): New.
6662         (test_target_ops::info): New.
6663         (open_target): Adjust to use target_factories.
6664         (add_target_with_completer): Rename to ...
6665         (add_target): ... this.  Change prototype.  Register target_info
6666         and open callback in target_factories.  Register target_info in
6667         command context instead of target_ops.
6668         (add_target): Delete old implementation.
6669         (add_deprecated_target_alias): Change prototype.  Adjust.
6670         (the_native_target): New.
6671         (set_native_target, get_native_target): New.
6672         (find_default_run_target): Use the_native_target.
6673         (find_attach_target, find_run_target): Simplify.
6674         (target_ops::open): Delete.
6675         (dummy_target_info): New.
6676         (dummy_target::shortname, dummy_target::longname)
6677         (dummy_target::doc): Delete.
6678         (dummy_target::info): New.
6679         (debug_target::shortname, debug_target::longname)
6680         (debug_target::doc): Delete.
6681         (debug_target::info): New.
6682         * target.h (struct target_info): New.
6683         (target_ops::~target_ops): Add comment.
6684         (target_ops::info): New.
6685         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6686         longer virtual.  Implement in terms of target_info.
6687         (set_native_target, get_native_target): Declare.
6688         (target_open_ftype): New.
6689         (add_target, add_target_with_completer)
6690         (add_deprecated_target_alias): Change prototype.
6691         (test_target) <shortname, longname, doc>: Delete.
6692         <info>: New.
6693         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6694         add_inf_child_target.
6695         * tracefile-tfile.c (tfile_target_info): New.
6696         (tfile_target) <shortname, longname, doc>: Delete.
6697         <info>: New.
6698         (tfile_target::open): Rename to ...
6699         (tfile_target_open): ... this.
6700         (_initialize_tracefile_tfile): Adjust.
6701         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6702         add_inf_child_target.
6703         * windows-nat.c (_initialize_windows_nat): Use
6704         add_inf_child_target.
6705         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6706         add_inf_child_target.
6707
6708 2018-05-02  Pedro Alves  <palves@redhat.com>
6709
6710         * linux-nat.h (linux_nat_target) <low_new_thread,
6711         low_delete_thread, low_new_fork, low_forget_process,
6712         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6713         New virtual methods.
6714         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6715         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6716         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6717         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6718         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6719         Delete.
6720         * linux-fork.c (delete_fork): Adjust to call low method.
6721         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6722         (linux_nat_new_fork, linux_nat_forget_process_hook)
6723         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6724         (linux_nat_status_is_event):
6725         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6726         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6727         to call low method.
6728         (sigtrap_is_event): Rename to ...
6729         (linux_nat_target::low_status_is_event): ... this.
6730         (linux_nat_set_status_is_event): Delete.
6731         (save_stop_reason, linux_nat_wait_1)
6732         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6733         low methods.
6734         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6735         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6736         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6737         (linux_nat_set_prepare_to_resume): Delete.
6738         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6739         low virtual methods.
6740         * amd64-linux-nat.c: Likewise.
6741         * arm-linux-nat.c: Likewise.
6742         * i386-linux-nat.c: Likewise.
6743         * ia64-linux-nat.c: Likewise.
6744         * mips-linux-nat.c: Likewise.
6745         * ppc-linux-nat.c: Likewise.
6746         * s390-linux-nat.c: Likewise.
6747         * sparc64-linux-nat.c: Likewise.
6748         * x86-linux-nat.c: Likewise.
6749         * x86-linux-nat.h: Include "nat/x86-linux.h".
6750         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6751         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6752         Override methods.
6753
6754 2018-05-02  Pedro Alves  <palves@redhat.com>
6755
6756         * target.h (target_ops)
6757         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6758         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6759         stopped_by_watchpoint, have_continuable_watchpoint,
6760         stopped_data_address, watchpoint_addr_within_range,
6761         can_accel_watchpoint_condition, can_run, thread_alive,
6762         has_all_memory, has_memory, has_stack, has_registers,
6763         has_execution, can_async_p, is_async_p, supports_non_stop,
6764         always_non_stop_p, can_execute_reverse, supports_multi_process,
6765         supports_enable_disable_tracepoint,
6766         supports_disable_randomization, supports_string_tracing,
6767         supports_evaluation_of_breakpoint_conditions,
6768         can_run_breakpoint_commands, filesystem_is_local,
6769         can_download_tracepoint, get_trace_state_variable_value,
6770         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6771         record_is_replaying, record_will_replay,
6772         augmented_libraries_svr4_read>: Adjust to return bool.
6773         * aarch64-linux-nat.c: All implementations adjusted.
6774         * aix-thread.c: All implementations adjusted.
6775         * arm-linux-nat.c: All implementations adjusted.
6776         * breakpoint.c: All implementations adjusted.
6777         * bsd-kvm.c: All implementations adjusted.
6778         * bsd-uthread.c: All implementations adjusted.
6779         * corelow.c: All implementations adjusted.
6780         * ctf.c: All implementations adjusted.
6781         * darwin-nat.c: All implementations adjusted.
6782         * darwin-nat.h: All implementations adjusted.
6783         * exec.c: All implementations adjusted.
6784         * fbsd-nat.c: All implementations adjusted.
6785         * fbsd-nat.h: All implementations adjusted.
6786         * gnu-nat.c: All implementations adjusted.
6787         * gnu-nat.h: All implementations adjusted.
6788         * go32-nat.c: All implementations adjusted.
6789         * ia64-linux-nat.c: All implementations adjusted.
6790         * inf-child.c: All implementations adjusted.
6791         * inf-child.h: All implementations adjusted.
6792         * inf-ptrace.c: All implementations adjusted.
6793         * inf-ptrace.h: All implementations adjusted.
6794         * linux-nat.c: All implementations adjusted.
6795         * linux-nat.h: All implementations adjusted.
6796         * mips-linux-nat.c: All implementations adjusted.
6797         * nto-procfs.c: All implementations adjusted.
6798         * ppc-linux-nat.c: All implementations adjusted.
6799         * procfs.c: All implementations adjusted.
6800         * ravenscar-thread.c: All implementations adjusted.
6801         * record-btrace.c: All implementations adjusted.
6802         * record-full.c: All implementations adjusted.
6803         * remote-sim.c: All implementations adjusted.
6804         * remote.c: All implementations adjusted.
6805         * s390-linux-nat.c: All implementations adjusted.
6806         * sol-thread.c: All implementations adjusted.
6807         * spu-multiarch.c: All implementations adjusted.
6808         * target-delegates.c: All implementations adjusted.
6809         * target.c: All implementations adjusted.
6810         * target.h: All implementations adjusted.
6811         * tracefile-tfile.c: All implementations adjusted.
6812         * tracefile.c: All implementations adjusted.
6813         * tracefile.h: All implementations adjusted.
6814         * windows-nat.c: All implementations adjusted.
6815         * x86-linux-nat.h: All implementations adjusted.
6816         * x86-nat.h: All implementations adjusted.
6817
6818 2018-05-02  Pedro Alves  <palves@redhat.com>
6819
6820         * make-target-delegates (scan_target_h): Don't trim lines here.
6821         Replace sequences of tabs and/or whitespace with a single
6822         whitespace.
6823         (top level, parsing methods): Trim each line before processing it
6824         here.
6825
6826 2018-05-02  Pedro Alves  <palves@redhat.com>
6827             John Baldwin  <jhb@freebsd.org>
6828
6829         * target.h (enum strata) <debug_stratum>: New.
6830         (struct target_ops) <all delegation methods>: Replace by C++
6831         virtual methods, and drop "to_" prefix.  All references updated
6832         throughout.
6833         <to_shortname, to_longname, to_doc, to_data,
6834         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6835         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6836         virtual methods.  All references updated throughout.
6837         <can_attach, supports_terminal_ours, can_create_inferior,
6838         get_thread_control_capabilities, attach_no_wait>: New
6839         virtual methods.
6840         <insert_breakpoint, remove_breakpoint>: Now
6841         TARGET_DEFAULT_NORETURN methods.
6842         <info_proc>: Now returns bool.
6843         <to_magic>: Delete.
6844         (OPS_MAGIC): Delete.
6845         (current_target): Delete.  All references replaced by references
6846         to ...
6847         (target_stack): ... this.  New.
6848         (target_shortname, target_longname): Adjust.
6849         (target_can_run): Now a function declaration.
6850         (default_child_has_all_memory, default_child_has_memory)
6851         (default_child_has_stack, default_child_has_registers)
6852         (default_child_has_execution): Remove target_ops parameter.
6853         (complete_target_initialization): Delete.
6854         (memory_breakpoint_target): New template class.
6855         (test_target_ops): Refactor as a C++ class with virtual methods.
6856         * make-target-delegates (NAME_PART): Tighten.
6857         (POINTER_PART, CP_SYMBOL): New.
6858         (SIMPLE_RETURN_PART): Reimplement.
6859         (VEC_RETURN_PART): Expect less.
6860         (RETURN_PART, VIRTUAL_PART): New.
6861         (METHOD): Adjust to C++ virtual methods.
6862         (scan_target_h): Remove reference to C99.
6863         (dname): Output "target_ops::" prefix.
6864         (write_function_header): Adjust to output a C++ class method.
6865         (write_declaration): New.
6866         (write_delegator): Adjust to output a C++ class method.
6867         (tdname): Output "dummy_target::" prefix.
6868         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6869         method.
6870         (tdefault_names, debug_names): Delete.
6871         (return_types, tdefaults, styles, argtypes_array): New.
6872         (top level): All methods are delegators.
6873         (print_class): New.
6874         (top level): Print dummy_target and debug_target classes.
6875         * target-delegates.c: Regenerate.
6876         * target-debug.h (target_debug_print_enum_info_proc_what)
6877         (target_debug_print_thread_control_capabilities)
6878         (target_debug_print_thread_info_p): New.
6879         * target.c (dummy_target): Delete.
6880         (the_dummy_target, the_debug_target): New.
6881         (target_stack): Now extern.
6882         (set_targetdebug): Push/unpush debug target.
6883         (default_child_has_all_memory, default_child_has_memory)
6884         (default_child_has_stack, default_child_has_registers)
6885         (default_child_has_execution): Remove target_ops parameter.
6886         (complete_target_initialization): Delete.
6887         (add_target_with_completer): No longer call
6888         complete_target_initialization.
6889         (target_supports_terminal_ours): Use regular delegation.
6890         (update_current_target): Delete.
6891         (push_target): No longer check magic number.  Don't call
6892         update_current_target.
6893         (unpush_target): Don't call update_current_target.
6894         (target_is_pushed): No longer check magic number.
6895         (target_require_runnable): Skip for all stratums over
6896         process_stratum.
6897         (target_ops::info_proc): New.
6898         (target_info_proc): Use find_target_at and
6899         find_default_run_target.
6900         (target_supports_disable_randomization): Use regular delegation.
6901         (target_get_osdata): Use find_target_at.
6902         (target_ops::open, target_ops::close, target_ops::can_attach)
6903         (target_ops::attach, target_ops::can_create_inferior)
6904         (target_ops::create_inferior, target_ops::can_run)
6905         (target_can_run): New.
6906         (default_fileio_target): Use regular delegation.
6907         (target_ops::fileio_open, target_ops::fileio_pwrite)
6908         (target_ops::fileio_pread, target_ops::fileio_fstat)
6909         (target_ops::fileio_close, target_ops::fileio_unlink)
6910         (target_ops::fileio_readlink): New.
6911         (target_fileio_open_1, target_fileio_unlink)
6912         (target_fileio_readlink): Always call the target method.  Handle
6913         FILEIO_ENOSYS.
6914         (return_zero, return_zero_has_execution): Delete.
6915         (init_dummy_target): Delete.
6916         (dummy_target::dummy_target, dummy_target::shortname)
6917         (dummy_target::longname, dummy_target::doc)
6918         (debug_target::debug_target, debug_target::shortname)
6919         (debug_target::longname, debug_target::doc): New.
6920         (target_supports_delete_record): Use regular delegation.
6921         (setup_target_debug): Delete.
6922         (maintenance_print_target_stack): Skip debug_stratum.
6923         (initialize_targets): Instantiate the_dummy_target and
6924         the_debug_target.
6925         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6926         use target_stack.
6927         (target_auxv_search, fprint_target_auxv): Adjust.
6928         (info_auxv_command): Adjust to use target_stack.
6929         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6930         * exceptions.c (print_flush): Handle a NULL target_stack.
6931         * regcache.c (target_ops_no_register): Refactor as class with
6932         virtual methods.
6933
6934         * exec.c (exec_target): New class.
6935         (exec_ops): Now an exec_target.
6936         (exec_open, exec_close_1, exec_get_section_table)
6937         (exec_xfer_partial, exec_files_info, exec_has_memory)
6938         (exec_make_note_section): Refactor as exec_target methods.
6939         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6940         Delete.
6941         (exec_target::find_memory_regions): New.
6942         (_initialize_exec): Don't call init_exec_ops.
6943         * gdbcore.h (exec_file_clear): Delete.
6944
6945         * corefile.c (core_target): Delete.
6946         (core_file_command): Adjust.
6947         * corelow.c (core_target): New class.
6948         (the_core_target): New.
6949         (core_close): Remove target_ops parameter.
6950         (core_close_cleanup): Adjust.
6951         (core_target::close): New.
6952         (core_open, core_detach, get_core_registers, core_files_info)
6953         (core_xfer_partial, core_thread_alive, core_read_description)
6954         (core_pid_to_str, core_thread_name, core_has_memory)
6955         (core_has_stack, core_has_registers, core_info_proc): Rework as
6956         core_target methods.
6957         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6958         (_initialize_corelow): Initialize the_core_target.
6959         * gdbcore.h (core_target): Delete.
6960         (the_core_target): New.
6961
6962         * ctf.c: (ctf_target): New class.
6963         (ctf_ops): Now a ctf_target.
6964         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6965         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6966         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6967         methods.
6968         (init_ctf_ops): Delete.
6969         (_initialize_ctf): Don't call it.
6970         * tracefile-tfile.c (tfile_target): New class.
6971         (tfile_ops): Now a tfile_target.
6972         (tfile_open, tfile_close, tfile_files_info)
6973         (tfile_get_tracepoint_status, tfile_trace_find)
6974         (tfile_fetch_registers, tfile_xfer_partial)
6975         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6976         Refactor as tfile_target methods.
6977         (tfile_xfer_partial_features): Remove target_ops parameter.
6978         (init_tfile_ops): Delete.
6979         (_initialize_tracefile_tfile): Don't call it.
6980         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6981         (tracefile_has_stack, tracefile_has_registers)
6982         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6983         tracefile_target methods.
6984         (init_tracefile_ops): Delete.
6985         (tracefile_target::tracefile_target): New.
6986         * tracefile.h: Include "target.h".
6987         (tracefile_target): New class.
6988         (init_tracefile_ops): Delete.
6989
6990         * spu-multiarch.c (spu_multiarch_target): New class.
6991         (spu_ops): Now a spu_multiarch_target.
6992         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6993         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6994         (spu_search_memory, spu_mourn_inferior): Refactor as
6995         spu_multiarch_target methods.
6996         (init_spu_ops): Delete.
6997         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6998         complete_target_initialization.
6999
7000         * ravenscar-thread.c (ravenscar_thread_target): New class.
7001         (ravenscar_ops): Now a ravenscar_thread_target.
7002         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7003         (ravenscar_thread_alive, ravenscar_pid_to_str)
7004         (ravenscar_fetch_registers, ravenscar_store_registers)
7005         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7006         (ravenscar_stopped_by_hw_breakpoint)
7007         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7008         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7009         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7010         methods.
7011         (init_ravenscar_thread_ops): Delete.
7012         (_initialize_ravenscar): Remove references to
7013         init_ravenscar_thread_ops and complete_target_initialization.
7014
7015         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7016         (bsd_uthread_target): New class.
7017         (bsd_uthread_ops): Now a bsd_uthread_target.
7018         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7019         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7020         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7021         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7022         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7023         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7024         (bsd_uthread_target): Delete function.
7025         (_initialize_bsd_uthread): Remove reference to
7026         complete_target_initialization.
7027
7028         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7029         (target_bfd): ... this new class.
7030         (target_bfd_xfer_partial, target_bfd_get_section_table)
7031         (target_bfd_close): Refactor as target_bfd methods.
7032         (target_bfd::~target_bfd): New.
7033         (target_bfd_reopen): Adjust.
7034         (target_bfd::close): New.
7035
7036         * record-btrace.c (record_btrace_target): New class.
7037         (record_btrace_ops): Now a record_btrace_target.
7038         (record_btrace_open, record_btrace_stop_recording)
7039         (record_btrace_disconnect, record_btrace_close)
7040         (record_btrace_async, record_btrace_info)
7041         (record_btrace_insn_history, record_btrace_insn_history_range)
7042         (record_btrace_insn_history_from, record_btrace_call_history)
7043         (record_btrace_call_history_range)
7044         (record_btrace_call_history_from, record_btrace_record_method)
7045         (record_btrace_is_replaying, record_btrace_will_replay)
7046         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7047         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7048         (record_btrace_store_registers, record_btrace_prepare_to_store)
7049         (record_btrace_to_get_unwinder)
7050         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7051         (record_btrace_commit_resume, record_btrace_wait)
7052         (record_btrace_stop, record_btrace_can_execute_reverse)
7053         (record_btrace_stopped_by_sw_breakpoint)
7054         (record_btrace_supports_stopped_by_sw_breakpoint)
7055         (record_btrace_stopped_by_hw_breakpoint)
7056         (record_btrace_supports_stopped_by_hw_breakpoint)
7057         (record_btrace_update_thread_list, record_btrace_thread_alive)
7058         (record_btrace_goto_begin, record_btrace_goto_end)
7059         (record_btrace_goto, record_btrace_stop_replaying_all)
7060         (record_btrace_execution_direction)
7061         (record_btrace_prepare_to_generate_core)
7062         (record_btrace_done_generating_core): Refactor as
7063         record_btrace_target methods.
7064         (init_record_btrace_ops): Delete.
7065         (_initialize_record_btrace): Remove reference to
7066         init_record_btrace_ops.
7067         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7068         the execution_direction global.
7069         (record_full_base_target, record_full_target)
7070         (record_full_core_target): New classes.
7071         (record_full_ops): Now a record_full_target.
7072         (record_full_core_ops): Now a record_full_core_target.
7073         (record_full_target::detach, record_full_target::disconnect)
7074         (record_full_core_target::disconnect)
7075         (record_full_target::mourn_inferior, record_full_target::kill):
7076         New.
7077         (record_full_open, record_full_close, record_full_async): Refactor
7078         as methods of the record_full_base_target class.
7079         (record_full_resume, record_full_commit_resume): Refactor
7080         as methods of the record_full_target class.
7081         (record_full_wait, record_full_stopped_by_watchpoint)
7082         (record_full_stopped_data_address)
7083         (record_full_stopped_by_sw_breakpoint)
7084         (record_full_supports_stopped_by_sw_breakpoint)
7085         (record_full_stopped_by_hw_breakpoint)
7086         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7087         methods of the record_full_base_target class.
7088         (record_full_store_registers, record_full_xfer_partial)
7089         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7090         Refactor as methods of the record_full_target class.
7091         (record_full_can_execute_reverse, record_full_get_bookmark)
7092         (record_full_goto_bookmark, record_full_execution_direction)
7093         (record_full_record_method, record_full_info, record_full_delete)
7094         (record_full_is_replaying, record_full_will_replay)
7095         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7096         (record_full_stop_replaying): Refactor as methods of the
7097         record_full_base_target class.
7098         (record_full_core_resume, record_full_core_kill)
7099         (record_full_core_fetch_registers)
7100         (record_full_core_prepare_to_store)
7101         (record_full_core_store_registers, record_full_core_xfer_partial)
7102         (record_full_core_insert_breakpoint)
7103         (record_full_core_remove_breakpoint)
7104         (record_full_core_has_execution): Refactor
7105         as methods of the record_full_core_target class.
7106         (record_full_base_target::supports_delete_record): New.
7107         (init_record_full_ops): Delete.
7108         (init_record_full_core_ops): Delete.
7109         (record_full_save): Refactor as method of the
7110         record_full_base_target class.
7111         (_initialize_record_full): Remove references to
7112         init_record_full_ops and init_record_full_core_ops.
7113
7114         * remote.c (remote_target, extended_remote_target): New classes.
7115         (remote_ops): Now a remote_target.
7116         (extended_remote_ops): Now an extended_remote_target.
7117         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7118         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7119         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7120         (remote_pass_signals, remote_set_syscall_catchpoint)
7121         (remote_program_signals, )
7122         (remote_thread_always_alive): Remove target_ops parameter.
7123         (remote_thread_alive, remote_thread_name)
7124         (remote_update_thread_list, remote_threads_extra_info)
7125         (remote_static_tracepoint_marker_at)
7126         (remote_static_tracepoint_markers_by_strid)
7127         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7128         (remote_open): Refactor as methods of remote_target.
7129         (extended_remote_open, extended_remote_detach)
7130         (extended_remote_attach, extended_remote_post_attach):
7131         (extended_remote_supports_disable_randomization)
7132         (extended_remote_create_inferior): : Refactor as method of
7133         extended_remote_target.
7134         (remote_set_permissions, remote_open_1, remote_detach)
7135         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7136         (remote_resume, remote_commit_resume, remote_stop)
7137         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7138         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7139         (remote_prepare_to_store, remote_store_registers)
7140         (remote_flash_erase, remote_flash_done, remote_files_info)
7141         (remote_kill, remote_mourn, remote_insert_breakpoint)
7142         (remote_remove_breakpoint, remote_insert_watchpoint)
7143         (remote_watchpoint_addr_within_range)
7144         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7145         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7146         (remote_supports_stopped_by_sw_breakpoint)
7147         (remote_stopped_by_hw_breakpoint)
7148         (remote_supports_stopped_by_hw_breakpoint)
7149         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7150         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7151         (remote_verify_memory): Refactor as methods of remote_target.
7152         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7153         parameter.
7154         (remote_xfer_partial, remote_get_memory_xfer_limit)
7155         (remote_search_memory, remote_rcmd, remote_memory_map)
7156         (remote_pid_to_str, remote_get_thread_local_address)
7157         (remote_get_tib_address, remote_read_description): Refactor as
7158         methods of remote_target.
7159         (remote_target::fileio_open, remote_target::fileio_pwrite)
7160         (remote_target::fileio_pread, remote_target::fileio_close): New.
7161         (remote_hostio_readlink, remote_hostio_fstat)
7162         (remote_filesystem_is_local, remote_can_execute_reverse)
7163         (remote_supports_non_stop, remote_supports_disable_randomization)
7164         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7165         (remote_supports_enable_disable_tracepoint)
7166         (remote_supports_string_tracing)
7167         (remote_can_run_breakpoint_commands, remote_trace_init)
7168         (remote_download_tracepoint, remote_can_download_tracepoint)
7169         (remote_download_trace_state_variable, remote_enable_tracepoint)
7170         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7171         (remote_trace_start, remote_get_trace_status)
7172         (remote_get_tracepoint_status, remote_trace_stop)
7173         (remote_trace_find, remote_get_trace_state_variable_value)
7174         (remote_save_trace_data, remote_get_raw_trace_data)
7175         (remote_set_disconnected_tracing, remote_core_of_thread)
7176         (remote_set_circular_trace_buffer, remote_traceframe_info)
7177         (remote_get_min_fast_tracepoint_insn_len)
7178         (remote_set_trace_buffer_size, remote_set_trace_notes)
7179         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7180         (remote_disable_btrace, remote_teardown_btrace)
7181         (remote_read_btrace, remote_btrace_conf)
7182         (remote_augmented_libraries_svr4_read, remote_load)
7183         (remote_pid_to_exec_file, remote_can_do_single_step)
7184         (remote_execution_direction, remote_thread_handle_to_thread_info):
7185         Refactor as methods of remote_target.
7186         (init_remote_ops, init_extended_remote_ops): Delete.
7187         (remote_can_async_p, remote_is_async_p, remote_async)
7188         (remote_thread_events, remote_upload_tracepoints)
7189         (remote_upload_trace_state_variables): Refactor as methods of
7190         remote_target.
7191         (_initialize_remote): Remove references to init_remote_ops and
7192         init_extended_remote_ops.
7193
7194         * remote-sim.c (gdbsim_target): New class.
7195         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7196         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7197         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7198         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7199         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7200         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7201         Refactor as methods of gdbsim_target.
7202         (gdbsim_ops): Now a gdbsim_target.
7203         (init_gdbsim_ops): Delete.
7204         (gdbsim_cntrl_c): Adjust.
7205         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7206
7207         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7208         (the_amd64_linux_nat_target): New.
7209         (amd64_linux_fetch_inferior_registers)
7210         (amd64_linux_store_inferior_registers): Refactor as methods of
7211         amd64_linux_nat_target.
7212         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7213         * i386-linux-nat.c: Don't include "linux-nat.h".
7214         (i386_linux_nat_target): New class.
7215         (the_i386_linux_nat_target): New.
7216         (i386_linux_fetch_inferior_registers)
7217         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7218         as methods of i386_linux_nat_target.
7219         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7220         * inf-child.c (inf_child_ops): Delete.
7221         (inf_child_fetch_inferior_registers)
7222         (inf_child_store_inferior_registers): Delete.
7223         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7224         methods of inf_child_target.
7225         (inf_child_target::supports_terminal_ours)
7226         (inf_child_target::terminal_init)
7227         (inf_child_target::terminal_inferior)
7228         (inf_child_target::terminal_ours_for_output)
7229         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7230         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7231         New.
7232         (inf_child_open, inf_child_disconnect, inf_child_close)
7233         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7234         (inf_child_post_startup_inferior, inf_child_can_run)
7235         (inf_child_pid_to_exec_file): Refactor as methods of
7236         inf_child_target.
7237         (inf_child_follow_fork): Delete.
7238         (inf_child_target::can_create_inferior)
7239         (inf_child_target::can_attach): New.
7240         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7241         (inf_child_target::has_stack, inf_child_target::has_registers)
7242         (inf_child_target::has_execution): New.
7243         (inf_child_fileio_open, inf_child_fileio_pwrite)
7244         (inf_child_fileio_pread, inf_child_fileio_fstat)
7245         (inf_child_fileio_close, inf_child_fileio_unlink)
7246         (inf_child_fileio_readlink, inf_child_use_agent)
7247         (inf_child_can_use_agent): Refactor as methods of
7248         inf_child_target.
7249         (return_zero, inf_child_target): Delete.
7250         (inf_child_target::inf_child_target): New.
7251         * inf-child.h: Include "target.h".
7252         (inf_child_target): Delete function prototype.
7253         (inf_child_target): New class.
7254         (inf_child_open_target, inf_child_mourn_inferior)
7255         (inf_child_maybe_unpush_target): Delete.
7256         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7257         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7258         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7259         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7260         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7261         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7262         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7263         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7264         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7265         methods of inf_ptrace_target.
7266         (inf_ptrace_target): Delete function.
7267         * inf-ptrace.h: Include "inf-child.h".
7268         (inf_ptrace_target): Delete function declaration.
7269         (inf_ptrace_target): New class.
7270         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7271         * linux-nat.c (linux_target): New.
7272         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7273         (linux_nat_target::~linux_nat_target): New.
7274         (linux_child_post_attach, linux_child_post_startup_inferior)
7275         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7276         (linux_child_remove_fork_catchpoint)
7277         (linux_child_insert_vfork_catchpoint)
7278         (linux_child_remove_vfork_catchpoint)
7279         (linux_child_insert_exec_catchpoint)
7280         (linux_child_remove_exec_catchpoint)
7281         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7282         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7283         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7284         (linux_nat_stopped_data_address)
7285         (linux_nat_stopped_by_sw_breakpoint)
7286         (linux_nat_supports_stopped_by_sw_breakpoint)
7287         (linux_nat_stopped_by_hw_breakpoint)
7288         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7289         (linux_nat_kill, linux_nat_mourn_inferior)
7290         (linux_nat_xfer_partial, linux_nat_thread_alive)
7291         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7292         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7293         (linux_child_static_tracepoint_markers_by_strid)
7294         (linux_nat_is_async_p, linux_nat_can_async_p)
7295         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7296         (linux_nat_supports_multi_process)
7297         (linux_nat_supports_disable_randomization, linux_nat_async)
7298         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7299         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7300         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7301         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7302         methods of linux_nat_target.
7303         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7304         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7305         parameter.
7306         (check_stopped_by_watchpoint): Adjust.
7307         (linux_xfer_partial): Delete.
7308         (linux_target_install_ops, linux_target, linux_nat_add_target):
7309         Delete.
7310         (linux_nat_target::linux_nat_target): New.
7311         * linux-nat.h: Include "inf-ptrace.h".
7312         (linux_nat_target): New.
7313         (linux_target, linux_target_install_ops, linux_nat_add_target):
7314         Delete function declarations.
7315         (linux_target): Declare global.
7316         * linux-thread-db.c (thread_db_target): New.
7317         (thread_db_target::thread_db_target): New.
7318         (thread_db_ops): Delete.
7319         (the_thread_db_target): New.
7320         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7321         (thread_db_update_thread_list, thread_db_pid_to_str)
7322         (thread_db_extra_thread_info)
7323         (thread_db_thread_handle_to_thread_info)
7324         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7325         (thread_db_resume): Refactor as methods of thread_db_target.
7326         (init_thread_db_ops): Delete.
7327         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7328         * x86-linux-nat.c: Don't include "linux-nat.h".
7329         (super_post_startup_inferior): Delete.
7330         (x86_linux_nat_target::~x86_linux_nat_target): New.
7331         (x86_linux_child_post_startup_inferior)
7332         (x86_linux_read_description, x86_linux_enable_btrace)
7333         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7334         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7335         methods of x86_linux_nat_target.
7336         (x86_linux_create_target): Delete.  Bits folded ...
7337         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7338         pointer.
7339         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7340         (x86_linux_nat_target): New class.
7341         (x86_linux_create_target): Delete.
7342         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7343         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7344         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7345         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7346         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7347         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7348         make extern.
7349         (x86_use_watchpoints): Delete.
7350         * x86-nat.h: Include "breakpoint.h" and "target.h".
7351         (x86_use_watchpoints): Delete.
7352         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7353         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7354         (x86_insert_watchpoint, x86_remove_watchpoint)
7355         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7356         (x86_stopped_by_hw_breakpoint): New declarations.
7357         (x86_nat_target): New template class.
7358
7359         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7360         (the_ppc_linux_nat_target): New.
7361         (ppc_linux_fetch_inferior_registers)
7362         (ppc_linux_can_use_hw_breakpoint)
7363         (ppc_linux_region_ok_for_hw_watchpoint)
7364         (ppc_linux_ranged_break_num_registers)
7365         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7366         (ppc_linux_insert_mask_watchpoint)
7367         (ppc_linux_remove_mask_watchpoint)
7368         (ppc_linux_can_accel_watchpoint_condition)
7369         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7370         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7371         (ppc_linux_watchpoint_addr_within_range)
7372         (ppc_linux_masked_watch_num_registers)
7373         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7374         (ppc_linux_read_description): Refactor as methods of
7375         ppc_linux_nat_target.
7376         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7377
7378         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7379         (procfs_target): New class.
7380         (the_procfs_target): New.
7381         (procfs_target): Delete function.
7382         (procfs_auxv_parse, procfs_attach, procfs_detach)
7383         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7384         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7385         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7386         (procfs_create_inferior, procfs_update_thread_list)
7387         (procfs_thread_alive, procfs_pid_to_str)
7388         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7389         (procfs_stopped_data_address, procfs_insert_watchpoint)
7390         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7391         (proc_find_memory_regions, procfs_info_proc)
7392         (procfs_make_note_section): Refactor as methods of procfs_target.
7393         (_initialize_procfs): Adjust.
7394         * sol-thread.c (sol_thread_target): New class.
7395         (sol_thread_ops): Now a sol_thread_target.
7396         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7397         (sol_thread_fetch_registers, sol_thread_store_registers)
7398         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7399         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7400         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7401         (init_sol_thread_ops): Delete.
7402         (_initialize_sol_thread): Adjust.  Remove references to
7403         init_sol_thread_ops and complete_target_initialization.
7404
7405         * windows-nat.c (windows_nat_target): New class.
7406         (windows_fetch_inferior_registers)
7407         (windows_store_inferior_registers, windows_resume, windows_wait)
7408         (windows_attach, windows_detach, windows_pid_to_exec_file)
7409         (windows_files_info, windows_create_inferior)
7410         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7411         (windows_close, windows_pid_to_str, windows_xfer_partial)
7412         (windows_get_tib_address, windows_get_ada_task_ptid)
7413         (windows_thread_name, windows_thread_alive): Refactor as
7414         windows_nat_target methods.
7415         (do_initial_windows_stuff): Adjust.
7416         (windows_target): Delete function.
7417         (_initialize_windows_nat): Adjust.
7418
7419         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7420         (darwin_mourn_inferior, darwin_kill_inferior)
7421         (darwin_create_inferior, darwin_attach, darwin_detach)
7422         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7423         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7424         (darwin_supports_multi_process): Refactor as darwin_nat_target
7425         methods.
7426         (darwin_resume_to, darwin_files_info): Delete.
7427         (_initialize_darwin_inferior): Rename to ...
7428         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7429         * darwin-nat.h: Include "inf-child.h".
7430         (darwin_nat_target): New class.
7431         (darwin_complete_target): Delete.
7432         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7433         (darwin_target): New.
7434         (i386_darwin_fetch_inferior_registers)
7435         (i386_darwin_store_inferior_registers): Refactor as methods of
7436         darwin_nat_target.
7437         (darwin_complete_target): Delete, with ...
7438         (_initialize_i386_darwin_nat): ... bits factored out here.
7439
7440         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7441         (the_alpha_linux_nat_target): New.
7442         (alpha_linux_register_u_offset): Refactor as
7443         alpha_linux_nat_target method.
7444         (_initialize_alpha_linux_nat): Adjust.
7445         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7446         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7447         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7448         methods of linux_nat_trad_target.
7449         (linux_trad_target): Delete.
7450         * linux-nat-trad.h (linux_trad_target): Delete function.
7451         (linux_nat_trad_target): New class.
7452         * mips-linux-nat.c (mips_linux_nat_target): New class.
7453         (super_fetch_registers, super_store_registers, super_close):
7454         Delete.
7455         (the_mips_linux_nat_target): New.
7456         (mips64_linux_regsets_fetch_registers)
7457         (mips64_linux_regsets_store_registers)
7458         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7459         (mips_linux_register_u_offset, mips_linux_read_description)
7460         (mips_linux_can_use_hw_breakpoint)
7461         (mips_linux_stopped_by_watchpoint)
7462         (mips_linux_stopped_data_address)
7463         (mips_linux_region_ok_for_hw_watchpoint)
7464         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7465         (mips_linux_close): Refactor as methods of mips_linux_nat.
7466         (_initialize_mips_linux_nat): Adjust to C++ification.
7467
7468         * aix-thread.c (aix_thread_target): New class.
7469         (aix_thread_ops): Now an aix_thread_target.
7470         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7471         (aix_thread_fetch_registers, aix_thread_store_registers)
7472         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7473         (aix_thread_thread_alive, aix_thread_pid_to_str)
7474         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7475         Refactor as methods of aix_thread_target.
7476         (init_aix_thread_ops): Delete.
7477         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7478         and complete_target_initialization.
7479         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7480         (rs6000_nat_target): New class.
7481         (the_rs6000_nat_target): New.
7482         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7483         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7484         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7485         (super_create_inferior): Delete.
7486         (_initialize_rs6000_nat): Adjust to C++ification.
7487
7488         * arm-linux-nat.c (arm_linux_nat_target): New class.
7489         (the_arm_linux_nat_target): New.
7490         (arm_linux_fetch_inferior_registers)
7491         (arm_linux_store_inferior_registers, arm_linux_read_description)
7492         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7493         (arm_linux_remove_hw_breakpoint)
7494         (arm_linux_region_ok_for_hw_watchpoint)
7495         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7496         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7497         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7498         arm_linux_nat_target.
7499         (_initialize_arm_linux_nat): Adjust to C++ification.
7500
7501         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7502         (the_aarch64_linux_nat_target): New.
7503         (aarch64_linux_fetch_inferior_registers)
7504         (aarch64_linux_store_inferior_registers)
7505         (aarch64_linux_child_post_startup_inferior)
7506         (aarch64_linux_read_description)
7507         (aarch64_linux_can_use_hw_breakpoint)
7508         (aarch64_linux_insert_hw_breakpoint)
7509         (aarch64_linux_remove_hw_breakpoint)
7510         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7511         (aarch64_linux_region_ok_for_hw_watchpoint)
7512         (aarch64_linux_stopped_data_address)
7513         (aarch64_linux_stopped_by_watchpoint)
7514         (aarch64_linux_watchpoint_addr_within_range)
7515         (aarch64_linux_can_do_single_step): Refactor as methods of
7516         aarch64_linux_nat_target.
7517         (super_post_startup_inferior): Delete.
7518         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7519
7520         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7521         (the_hppa_linux_nat_target): New.
7522         (hppa_linux_fetch_inferior_registers)
7523         (hppa_linux_store_inferior_registers): Refactor as methods of
7524         hppa_linux_nat_target.
7525         (_initialize_hppa_linux_nat): Adjust to C++ification.
7526
7527         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7528         (the_ia64_linux_nat_target): New.
7529         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7530         (ia64_linux_stopped_data_address)
7531         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7532         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7533         ia64_linux_nat_target methods.
7534         (super_xfer_partial): Delete.
7535         (_initialize_ia64_linux_nat): Adjust to C++ification.
7536
7537         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7538         (the_m32r_linux_nat_target): New.
7539         (m32r_linux_fetch_inferior_registers)
7540         (m32r_linux_store_inferior_registers): Refactor as
7541         m32r_linux_nat_target methods.
7542         (_initialize_m32r_linux_nat): Adjust to C++ification.
7543
7544         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7545         (the_m68k_linux_nat_target): New.
7546         (m68k_linux_fetch_inferior_registers)
7547         (m68k_linux_store_inferior_registers): Refactor as
7548         m68k_linux_nat_target methods.
7549         (_initialize_m68k_linux_nat): Adjust to C++ification.
7550
7551         * s390-linux-nat.c (s390_linux_nat_target): New class.
7552         (the_s390_linux_nat_target): New.
7553         (s390_linux_fetch_inferior_registers)
7554         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7555         (s390_insert_watchpoint, s390_remove_watchpoint)
7556         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7557         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7558         (s390_auxv_parse, s390_read_description): Refactor as methods of
7559         s390_linux_nat_target.
7560         (_initialize_s390_nat): Adjust to C++ification.
7561
7562         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7563         (the_sparc_linux_nat_target): New.
7564         (_initialize_sparc_linux_nat): Adjust to C++ification.
7565         * sparc-nat.c (sparc_fetch_inferior_registers)
7566         (sparc_store_inferior_registers): Remove target_ops parameter.
7567         * sparc-nat.h (sparc_fetch_inferior_registers)
7568         (sparc_store_inferior_registers): Remove target_ops parameter.
7569         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7570         (the_sparc64_linux_nat_target): New.
7571         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7572
7573         * spu-linux-nat.c (spu_linux_nat_target): New class.
7574         (the_spu_linux_nat_target): New.
7575         (spu_child_post_startup_inferior, spu_child_post_attach)
7576         (spu_child_wait, spu_fetch_inferior_registers)
7577         (spu_store_inferior_registers, spu_xfer_partial)
7578         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7579         methods.
7580         (_initialize_spu_nat): Adjust to C++ification.
7581
7582         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7583         (the_tilegx_linux_nat_target): New.
7584         (fetch_inferior_registers, store_inferior_registers):
7585         Refactor as methods.
7586         (_initialize_tile_linux_nat): Adjust to C++ification.
7587
7588         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7589         (the_xtensa_linux_nat_target): New.
7590         (xtensa_linux_fetch_inferior_registers)
7591         (xtensa_linux_store_inferior_registers): Refactor as
7592         xtensa_linux_nat_target methods.
7593         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7594
7595         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7596         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7597         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7598         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7599         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7600         (fbsd_stopped_by_sw_breakpoint)
7601         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7602         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7603         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7604         (fbsd_post_startup_inferior, fbsd_post_attach)
7605         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7606         (fbsd_set_syscall_catchpoint)
7607         (super_xfer_partial, super_resume, super_wait)
7608         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7609         (fbsd_handle_debug_trap): Remove target_ops parameter.
7610         (fbsd_nat_add_target): Delete.
7611         * fbsd-nat.h: Include "inf-ptrace.h".
7612         (fbsd_nat_add_target): Delete.
7613         (USE_SIGTRAP_SIGINFO): Define.
7614         (fbsd_nat_target): New class.
7615
7616         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7617         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7618         (amd64bsd_target): Delete.
7619         * amd64-bsd-nat.h: New file.
7620         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7621         "x86-bsd-nat.h".
7622         (amd64_fbsd_nat_target): New class.
7623         (the_amd64_fbsd_nat_target): New.
7624         (amd64fbsd_read_description): Refactor as method of
7625         amd64_fbsd_nat_target.
7626         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7627         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7628         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7629         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7630         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7631         (i386bsd_target): Delete.
7632         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7633         (i386bsd_fetch_inferior_registers)
7634         (i386bsd_store_inferior_registers): Declare.
7635         (i386_bsd_nat_target): New class.
7636         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7637         (the_i386_fbsd_nat_target): New.
7638         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7639         i386_fbsd_nat_target methods.
7640         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7641         (_initialize_i386fbsd_nat): Adjust to C++ification.
7642         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7643         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7644         (_initialize_x86_bsd_nat): Adjust to C++ification.
7645         * x86-bsd-nat.h: Include "x86-nat.h".
7646         (x86bsd_target): Delete declaration.
7647         (x86bsd_nat_target): New class.
7648
7649         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7650         (the_aarch64_fbsd_nat_target): New.
7651         (aarch64_fbsd_fetch_inferior_registers)
7652         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7653         aarch64_fbsd_nat_target.
7654         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7655         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7656         (the_alpha_bsd_nat_target): New.
7657         (alphabsd_fetch_inferior_registers)
7658         (alphabsd_store_inferior_registers): Refactor as
7659         alpha_bsd_nat_target methods.
7660         (_initialize_alphabsd_nat): Refactor as methods of
7661         alpha_bsd_nat_target.
7662         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7663         (the_amd64_nbsd_nat_target): New.
7664         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7665         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7666         (the_amd64_obsd_nat_target): New.
7667         (_initialize_amd64obsd_nat): Adjust to C++ification.
7668         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7669         (the_arm_fbsd_nat_target): New.
7670         (arm_fbsd_fetch_inferior_registers)
7671         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7672         (_initialize_arm_fbsd_nat): Refactor as methods of
7673         arm_fbsd_nat_target.
7674         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7675         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7676         (the_arm_netbsd_nat_target): New.
7677         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7678         arm_netbsd_nat_target.
7679         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7680         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7681         (the_hppa_nbsd_nat_target): New.
7682         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7683         hppa_nbsd_nat_target methods.
7684         (_initialize_hppanbsd_nat): Adjust to C++ification.
7685         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7686         (the_hppa_obsd_nat_target): New.
7687         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7688         methods of hppa_obsd_nat_target.
7689         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7690         add_target.
7691         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7692         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7693         add_target.
7694         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7695         (_initialize_i386obsd_nat): Use add_target.
7696         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7697         (the_m68k_bsd_nat_target): New.
7698         (m68kbsd_fetch_inferior_registers)
7699         (m68kbsd_store_inferior_registers): Refactor as methods of
7700         m68k_bsd_nat_target.
7701         (_initialize_m68kbsd_nat): Adjust to C++ification.
7702         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7703         (the_mips_fbsd_nat_target): New.
7704         (mips_fbsd_fetch_inferior_registers)
7705         (mips_fbsd_store_inferior_registers): Refactor as methods of
7706         mips_fbsd_nat_target.
7707         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7708         add_target.
7709         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7710         (the_mips_nbsd_nat_target): New.
7711         (mipsnbsd_fetch_inferior_registers)
7712         (mipsnbsd_store_inferior_registers): Refactor as methods of
7713         mips_nbsd_nat_target.
7714         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7715         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7716         (the_mips64_obsd_nat_target): New.
7717         (mips64obsd_fetch_inferior_registers)
7718         (mips64obsd_store_inferior_registers): Refactor as methods of
7719         mips64_obsd_nat_target.
7720         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7721         add_target.
7722         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7723         nbsd_nat_target.
7724         * nbsd-nat.h: Include "inf-ptrace.h".
7725         (nbsd_nat_target): New class.
7726         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7727         (obsd_wait): Refactor as methods of obsd_nat_target.
7728         (obsd_add_target): Delete.
7729         * obsd-nat.h: Include "inf-ptrace.h".
7730         (obsd_nat_target): New class.
7731         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7732         (the_ppc_fbsd_nat_target): New.
7733         (ppcfbsd_fetch_inferior_registers)
7734         (ppcfbsd_store_inferior_registers): Refactor as methods of
7735         ppc_fbsd_nat_target.
7736         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7737         add_target.
7738         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7739         (the_ppc_nbsd_nat_target): New.
7740         (ppcnbsd_fetch_inferior_registers)
7741         (ppcnbsd_store_inferior_registers): Refactor as methods of
7742         ppc_nbsd_nat_target.
7743         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7744         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7745         (the_ppc_obsd_nat_target): New.
7746         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7747         methods of ppc_obsd_nat_target.
7748         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7749         add_target.
7750         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7751         (the_sh_nbsd_nat_target): New.
7752         (shnbsd_fetch_inferior_registers)
7753         (shnbsd_store_inferior_registers): Refactor as methods of
7754         sh_nbsd_nat_target.
7755         (_initialize_shnbsd_nat): Adjust to C++ification.
7756         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7757         (inf_ptrace_xfer_partial): Delete.
7758         (sparc_xfer_partial, sparc_target): Delete.
7759         * sparc-nat.h (sparc_fetch_inferior_registers)
7760         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7761         (sparc_target): Delete function declaration.
7762         (sparc_target): New template class.
7763         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7764         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7765         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7766         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7767         add_target.
7768         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7769         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7770         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7771         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7772         add_target.
7773         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7774         (the_vax_bsd_nat_target): New.
7775         (vaxbsd_fetch_inferior_registers)
7776         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7777         methods.
7778         (_initialize_vaxbsd_nat): Adjust to C++ification.
7779
7780         * bsd-kvm.c (bsd_kvm_target): New class.
7781         (bsd_kvm_ops): Now a bsd_kvm_target.
7782         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7783         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7784         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7785         bsd_kvm_target.
7786         (bsd_kvm_return_one): Delete.
7787         (bsd_kvm_add_target): Adjust to C++ification.
7788
7789         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7790         (nto_procfs_target_procfs): New classes.
7791         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7792         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7793         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7794         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7795         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7796         (procfs_remove_hw_breakpoint, procfs_resume)
7797         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7798         (procfs_kill_inferior, procfs_store_registers)
7799         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7800         as methods of nto_procfs_target.
7801         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7802         (nto_native_ops): Delete.
7803         (procfs_open, procfs_native_open): Delete.
7804         (nto_native_ops): Now an nto_procfs_target_native.
7805         (init_procfs_targets): Adjust to C++ification.
7806         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7807         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7808         Refactor as methods of nto_procfs_target.
7809
7810         * go32-nat.c (go32_nat_target): New class.
7811         (the_go32_nat_target): New.
7812         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7813         (go32_store_registers, go32_xfer_partial, go32_files_info)
7814         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7815         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7816         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7817         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7818         (go32_target): Delete.
7819         (_initialize_go32_nat): Adjust to C++ification.
7820
7821         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7822         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7823         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7824         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7825         gnu_nat_target.
7826         (gnu_target): Delete.
7827         * gnu-nat.h (gnu_target): Delete.
7828         (gnu_nat_target): New class.
7829         * i386-gnu-nat.c (gnu_base_target): New.
7830         (i386_gnu_nat_target): New class.
7831         (the_i386_gnu_nat_target): New.
7832         (_initialize_i386gnu_nat): Adjust to C++ification.
7833
7834 2018-05-02  Pedro Alves  <palves@redhat.com>
7835
7836         * bfd-target.c (target_bfd_xclose): Rename to ...
7837         (target_bfd_close): ... this.
7838         (target_bfd_reopen): Adjust.
7839         * target.c (target_close): Remove references to to_xclose.
7840         * target.h (target_ops::to_xclose): Delete.
7841         (target_ops::to_close): Update comments.
7842
7843 2018-05-02  Pedro Alves  <palves@redhat.com>
7844
7845         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7846         "linux-nat.h".
7847         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7848         * inf-ptrace.c (inf_ptrace_register_u_offset)
7849         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7850         (inf_ptrace_store_register, inf_ptrace_store_registers)
7851         (inf_ptrace_trad_target): Move to ...
7852         * linux-nat-trad.c: ... this new file.
7853         * linux-nat-trad.h: New file.
7854         * linux-nat.c (linux_target_install_ops): Make extern.
7855         (linux_trad_target): Delete.
7856         * linux-nat.h (linux_trad_target): Delete declaration.
7857         (linux_target_install_ops): Declare.
7858         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7859         "linux-nat.h".
7860
7861 2018-05-02  Pedro Alves  <palves@redhat.com>
7862
7863         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7864         procfs_target/add_target here.
7865         * procfs.c (procfs_target): Make static.
7866         (_initialize_procfs): Call add_target here.
7867         * procfs.h (struct target_ops): Remove forward declaration.
7868         (procfs_target): Remove declaration.
7869         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7870
7871 2018-05-02  Pedro Alves  <palves@redhat.com>
7872
7873         * procfs.c (procfs_stopped_by_watchpoint)
7874         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7875         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7876         Forward declare.
7877         (procfs_use_watchpoints): Delete, move contents...
7878         (procfs_target): ... here.
7879         * procfs.h (procfs_use_watchpoints): Delete declaration.
7880         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7881         procfs_use_watchpoints.
7882         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7883         procfs_use_watchpoints.
7884
7885 2018-05-02  Tom Tromey  <tom@tromey.com>
7886
7887         PR python/20084:
7888         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7889         and var_zuinteger_unlimited.
7890         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7891         and PARAM_ZUINTEGER_UNLIMITED.
7892         (set_parameter_value): Handle var_zuinteger and
7893         var_zuinteger_unlimited.
7894         (add_setshow_generic): Likewise.
7895         (parmpy_init): Likewise.
7896
7897 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7898
7899         PR rust/23124
7900         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7901         pointer is not null before dereferencing it.
7902
7903 2018-04-30  Tom Tromey  <tom@tromey.com>
7904
7905         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7906         is_mi_like_p.
7907
7908 2018-04-30  Tom Tromey  <tom@tromey.com>
7909
7910         * breakpoint.c (mention): Remove use of is_mi_like_p.
7911         (print_mention_ranged_breakpoint): Likewise.
7912         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7913         of is_mi_like_p.
7914
7915 2018-04-30  Tom Tromey  <tom@tromey.com>
7916
7917         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7918
7919 2018-04-30  Tom Tromey  <tom@tromey.com>
7920
7921         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7922         (info_spu_event_command): Remove some uses of is_mi_like_p.
7923
7924 2018-04-30  Tom Tromey  <tom@tromey.com>
7925
7926         * python/py-framefilter.c (py_print_single_arg)
7927         (enumerate_locals, py_print_args, py_print_frame): Remove some
7928         uses of is_mi_like_p.
7929
7930 2018-04-30  Tom Tromey  <tom@tromey.com>
7931
7932         * ui-out.c: Update.
7933         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7934         * ui-out.h (ui_out::is_mi_like_p): Now const.
7935         (ui_out::do_is_mi_like_p): Now const.
7936         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7937
7938 2018-04-30  Tom Tromey  <tom@tromey.com>
7939
7940         * varobj.c (varobj_set_visualizer): Use new_reference.
7941         * python/python.c (gdbpy_decode_line): Use new_reference.
7942         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7943         new_reference.
7944
7945 2018-04-30  Tom Tromey  <tom@tromey.com>
7946
7947         * varobj.c (install_new_value): Use new_reference.
7948         * value.h (value_incref): Return void.  Swap intro comment with
7949         value_decref.
7950         * value.c (set_value_parent): Use new_reference.
7951         (value_incref): Return void.  Update intro comment.
7952         (release_value): Use new_reference.
7953         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7954
7955 2018-04-30  Tom Tromey  <tom@tromey.com>
7956
7957         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7958         * gdb_bfd.h (new_bfd_ref): Remove.
7959         (gdb_bfd_open): Update comment.
7960         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7961         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7962         (gdb_bfd_fdopenr): Use new_reference.
7963         * exec.c (exec_file_attach): Use new_reference.
7964
7965 2018-04-30  Tom Tromey  <tom@tromey.com>
7966
7967         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7968         method.
7969
7970 2018-04-30  Tom Tromey  <tom@tromey.com>
7971
7972         * jit.c (jit_read_code_entry): Use type_align.
7973         * i386-tdep.c (i386_gdbarch_init): Don't call
7974         set_gdbarch_long_long_align_bit.
7975         * gdbarch.sh: Remove long_long_align_bit.
7976         * gdbarch.c, gdbarch.h: Rebuild.
7977         * arc-tdep.c (arc_type_align): New function.
7978         (arc_gdbarch_init): Use arc_type_align.  Don't call
7979         set_gdbarch_long_long_align_bit.
7980
7981 2018-04-30  Tom Tromey  <tom@tromey.com>
7982
7983         * rust-lang.c (rust_type_alignment): Remove.
7984         (rust_composite_type): Use type_align.
7985
7986 2018-04-30  Tom Tromey  <tom@tromey.com>
7987
7988         * NEWS: Mention Type.align.
7989         * python/py-type.c (typy_get_alignof): New function.
7990         (type_object_getset): Add "alignof".
7991
7992 2018-04-30  Tom Tromey  <tom@tromey.com>
7993
7994         PR exp/17095:
7995         * NEWS: Update.
7996         * std-operator.def (UNOP_ALIGNOF): New operator.
7997         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7998         New.
7999         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8000         * c-lang.c (c_op_print_tab): Add alignof.
8001         * c-exp.y (ALIGNOF): New token.
8002         (exp): Add "ALIGNOF" production.
8003         (ident_tokens): Add _Alignof and alignof.
8004
8005 2018-04-30  Tom Tromey  <tom@tromey.com>
8006
8007         * i386-tdep.c (i386_type_align): New function.
8008         (i386_gdbarch_init): Update.
8009         * gdbarch.sh (type_align): New method.
8010         * gdbarch.c, gdbarch.h: Rebuild.
8011         * arch-utils.h (default_type_align): Declare.
8012         * arch-utils.c (default_type_align): New function.
8013         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8014         (struct type) <align_log2>: New field.
8015         <instance_flags>: Now a bitfield.
8016         (TYPE_RAW_ALIGN): New macro.
8017         (type_align, type_raw_align, set_type_align): Declare.
8018         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8019         functions.
8020         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8021         (get_alignment, maybe_set_alignment): New functions.
8022         (read_structure_type, read_enumeration_type, read_array_type)
8023         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8024         (read_subrange_type, read_base_type): Set type alignment.
8025
8026 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8027
8028         * dwarf2read.c (read_index_from_section): Use bool.
8029
8030 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8031
8032         PR gdb/22950
8033         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8034         with #ifdef.
8035
8036 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8037
8038         PR build/22873
8039         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8040         last step, and do it atomically.
8041
8042 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8043
8044         * compile/compile-c-types.c (convert_int, convert_float):
8045         Update for C FE v1.
8046
8047 2018-04-27  Tom Tromey  <tom@tromey.com>
8048
8049         PR rust/22545:
8050         * rust-lang.c (rust_inclusive_range_type_p): New function.
8051         (rust_range): Handle inclusive ranges.
8052         (rust_compute_range): Likewise.
8053         * rust-exp.y (struct rust_op) <inclusive>: New field.
8054         (DOTDOTEQ): New constant.
8055         (range_expr): Add "..=" productions.
8056         (operator_tokens): Add "..=" token.
8057         (ast_range): Add "inclusive" parameter.
8058         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8059         ranges.
8060         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8061         bounds values.
8062         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8063         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8064         Update comments.
8065         * expprint.c (print_subexp_standard): Handle new bounds values.
8066         (dump_subexp_body_standard): Likewise.
8067
8068 2018-04-27  Tom Tromey  <tom@tromey.com>
8069
8070         * configure: Rebuild.
8071         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8072         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8073         "OVERRIDE".
8074         (class symbol_needs_eval_context): Likewise.
8075         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8076         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8077         "virtual".
8078         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8079         "override".
8080         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8081         * aarch64-tdep.c (instruction_reader::read): Use "override".
8082         (instruction_reader_test::read): Likewise.
8083         * arm-tdep.c (instruction_reader::read): Use "override".
8084         (instruction_reader_thumb::read): Likewise.
8085
8086 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8087
8088         PR remote/9665
8089         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8090         instead of remote_send.
8091         (remote_send): Remove.
8092
8093 2018-04-26  Pedro Alves  <palves@redhat.com>
8094
8095         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8096         find_function_start_sal instead of find_pc_line.
8097
8098 2018-04-26  Pedro Alves  <palves@redhat.com>
8099
8100         * breakpoint.c (set_breakpoint_location_function): Handle
8101         mst_data_gnu_ifunc.
8102         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8103         * elfread.c (elf_symtab_read): Give data symbols with
8104         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8105         (elf_rel_plt_read): Update comment.
8106         * linespec.c (convert_linespec_to_sals): Handle
8107         mst_data_gnu_ifunc.
8108         (minsym_found): Handle mst_data_gnu_ifunc.
8109         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8110         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8111         * parse.c (find_minsym_type_and_address): Handle
8112         mst_data_gnu_ifunc.
8113         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8114         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8115         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8116         comment.
8117         <mst_data_gnu_ifunc>: New enumerator.
8118
8119 2018-04-26  Pedro Alves  <palves@redhat.com>
8120
8121         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8122         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8123         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8124         Handle it.
8125         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8126         (lookup_minimal_symbol_by_pc): Adjust.
8127         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8128         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8129         * minsyms.h (lookup_msym_prefer): New enum.
8130         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8131         parameter by a lookup_msym_prefer parameter.
8132
8133 2018-04-26  Pedro Alves  <palves@redhat.com>
8134
8135         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8136         ends in "@plt" instead of looking at the symbol's section.
8137
8138 2018-04-26  Pedro Alves  <palves@redhat.com>
8139
8140         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8141         all references.
8142         (find_pc_partial_function_gnu_ifunc): Rename to ...
8143         (find_pc_partial_function): ... this, and remove references to
8144         'is_gnu_ifunc_p'.
8145         (find_pc_partial_function): Delete old implementation.
8146         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8147
8148 2018-04-26  Pedro Alves  <palves@redhat.com>
8149
8150         * linespec.c (struct bound_minimal_symbol_search_key): New.
8151         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8152         skip first line if we found a GNU ifunc minimal symbol by name.
8153         (compare_msymbols): Change parameters to work with a destructured
8154         lhs minsym.
8155         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8156         functions.
8157
8158 2018-04-26  Pedro Alves  <palves@redhat.com>
8159
8160         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8161         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8162         address/name.
8163         (add_location_to_breakpoint): Store the minsym and the objfile in
8164         the breakpoint location.
8165         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8166         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8167         Record the minsym in the sal.
8168         * symtab.h (symtab_and_line) <msymbol>: New field.
8169
8170 2018-04-26  Pedro Alves  <palves@redhat.com>
8171
8172         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8173         unless we actually resolved the ifunc.
8174
8175 2018-04-26  Pedro Alves  <palves@redhat.com>
8176
8177         * c-exp.y (variable production): Prefer ifunc minsyms over
8178         regular function symbols.
8179         * symtab.c (find_gnu_ifunc): New function.
8180         * minsyms.h (lookup_msym_prefer): New enum.
8181         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8182         parameter by a lookup_msym_prefer parameter.
8183         * symtab.h (find_gnu_ifunc): New declaration.
8184
8185 2018-04-26  Pedro Alves  <palves@redhat.com>
8186
8187         * blockframe.c (find_gnu_ifunc_target_type): New function.
8188         (find_function_type): New.
8189         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8190         return a value with a memory address.
8191         (eval_call): For calls to GNU ifunc functions, try to find the
8192         type of the target function from the type that the resolver
8193         returns.
8194         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8195         symbols.
8196         * infcall.c (find_function_return_type): Delete.
8197         (find_function_addr): Add 'function_type' parameter.  For calls to
8198         GNU ifunc functions, try to find the type of the target function
8199         from the type that the resolver returns, and return it via
8200         FUNCTION_TYPE.
8201         (call_function_by_hand_dummy): Adjust to use the function type
8202         returned by find_function_addr.
8203         (find_function_addr): Add 'function_type' parameter and move
8204         description here.
8205         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8206         declarations.
8207
8208 2018-04-26  Pedro Alves  <palves@redhat.com>
8209
8210         * c-exp.y (variable production): Skip finding an alias for ifunc
8211         symbols.
8212
8213 2018-04-26  Pedro Alves  <palves@redhat.com>
8214
8215         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8216
8217 2018-04-25  Pedro Alves  <palves@redhat.com>
8218
8219         * infcmd.c (kill_command): Print the pid as string, not the whole
8220         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8221         message.
8222         * remote.c (remote_detach_1): Print the pid as string, not the
8223         whole thread's ptid.
8224
8225 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8226             Sergio Durigan Junior  <sergiodj@redhat.com>
8227             Pedro Alves  <palves@redhat.com>
8228
8229         * infcmd.c (kill_command): Print message when inferior has
8230         been killed.
8231         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8232         '1'.
8233         (add_inferior): Improve message printed when
8234         'print_inferior_events' is on.
8235         (exit_inferior): Remove message printed when
8236         'print_inferior_events' is on.
8237         (detach_inferior): Improve message printed when
8238         'print_inferior_events' is on.
8239         (initialize_inferiors): Use 'add_inferior_silent' to set
8240         'current_inferior_'.
8241         * inferior.h (print_inferior_events): Declare here as
8242         'extern'.
8243         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8244         '[Detaching...]' messages when 'print_inferior_events' is on.
8245         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8246         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8247         'Detaching after fork from child...', replace it by '... from
8248         parent...'.
8249         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8250         prefix/suffix when printing 'Detaching...' messages.  Print
8251         them when 'print_inferior_events' is on.
8252         * remote.c (remote_detach_1): Print message when detaching
8253         from inferior and '!is_fork_parent'.
8254
8255 2018-04-24  Tom Tromey  <tom@tromey.com>
8256
8257         * cli-out.h: Reindent.
8258
8259 2018-04-24  Tom Tromey  <tom@tromey.com>
8260
8261         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8262         (cli_ui_out::do_field_string): Use fputs_filtered.
8263         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8264
8265 2018-04-23  Tom Tromey  <tom@tromey.com>
8266
8267         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8268         gdb::unique_xmalloc_ptr.
8269
8270 2018-04-23  Tom Tromey  <tom@tromey.com>
8271
8272         * configure: Rebuild.
8273
8274 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8275
8276         PR gdb/23095
8277         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8278         prepare_for_testing.  Set normal_bp to r_debug_state if target
8279         is bsd.
8280
8281 2018-04-21  Pedro Alves  <palves@redhat.com>
8282             Rajendra SY  <rajendra.sy@gmail.com>
8283
8284         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8285         * remote.c (extended_remote_attach): In all-stop mode, mark the
8286         thread as executing.
8287
8288 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8289
8290         * thread.c (thread_apply_all_command): Fix comment.
8291         (thread_command): Fix comment.
8292
8293 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8294
8295         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8296         parameter.
8297         * features/aarch64-core.c (create_feature_aarch64_core):
8298         Regenerate.
8299         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8300         Likewise.
8301         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8302         Likewise.
8303         * features/i386/32bit-avx512.c
8304         (create_feature_i386_32bit_avx512): Likewise.
8305         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8306         Likewise.
8307         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8308         Likewise.
8309         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8310         Likewise.
8311         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8312         Likewise.
8313         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8314         Likewise.
8315         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8316         Likewise.
8317         * features/i386/64bit-avx512.c
8318         (create_feature_i386_64bit_avx512): Likewise.
8319         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8320         Likewise.
8321         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8322         Likewise.
8323         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8324         Likewise.
8325         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8326         Likewise.
8327         * features/i386/64bit-segments.c
8328         (create_feature_i386_64bit_segments): Likewise.
8329         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8330         Likewise.
8331         * features/i386/x32-core.c
8332         (create_feature_i386_x32_core): Likewise.
8333         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8334         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8335         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8336         * target-descriptions.c: In generated code, don't pass xml
8337         filename.
8338
8339 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8340
8341         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8342         (print_xml_feature::visit_post): Likewise.
8343         (print_xml_feature::visit): Likewise.
8344         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8345         (print_xml_feature): Add new class.
8346         * regformats/regdat.sh: Null xmltarget on feature targets.
8347         * target-descriptions.c (struct target_desc): Add xmltarget.
8348         (maintenance_check_tdesc_xml_convert): Add unittest function.
8349         (tdesc_get_features_xml): Add function to get xml.
8350         (maintenance_check_xml_descriptions): Test xml generation.
8351         * xml-tdesc.c (string_read_description_xml): Add function.
8352         * xml-tdesc.h (string_read_description_xml): Add declaration.
8353
8354 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8355
8356         * features/Makefile: Add feature marker to targets with new style
8357         target descriptions.
8358         * regformats/aarch64.dat: Regenerate.
8359         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8360         * regformats/i386/amd64-avx-linux.dat: Likewise.
8361         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8362         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8363         * regformats/i386/amd64-linux.dat: Likewise.
8364         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8365         * regformats/i386/amd64.dat: Likewise.
8366         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8367         * regformats/i386/i386-avx-linux.dat: Likewise.
8368         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8369         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8370         * regformats/i386/i386-linux.dat: Likewise.
8371         * regformats/i386/i386-mmx-linux.dat: Likewise.
8372         * regformats/i386/i386-mpx-linux.dat: Likewise.
8373         * regformats/i386/i386.dat: Likewise.
8374         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8375         * regformats/i386/x32-avx-linux.dat: Likewise.
8376         * regformats/i386/x32-linux.dat: Likewise.
8377         * regformats/tic6x-c62x-linux.dat: Likewise.
8378         * regformats/tic6x-c64x-linux.dat: Likewise.
8379         * regformats/tic6x-c64xp-linux.dat: Likewise.
8380         * regformats/regdat.sh: Parse feature marker.
8381
8382 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8383
8384         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8385         (tdesc_osabi_name): Likewise.
8386         * target-descriptions.c (tdesc_architecture_name): Add new
8387         function.
8388         (tdesc_osabi_name): Likewise.
8389
8390 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8391
8392         * common/tdesc.c (tdesc_predefined_type): Move to here.
8393         (tdesc_named_type): Likewise.
8394         (tdesc_create_vector): Likewise.
8395         (tdesc_create_struct): Likewise.
8396         (tdesc_set_struct_size): Likewise.
8397         (tdesc_create_union): Likewise.
8398         (tdesc_create_flags): Likewise.
8399         (tdesc_create_enum): Likewise.
8400         (tdesc_add_field): Likewise.
8401         (tdesc_add_typed_bitfield): Likewise.
8402         (tdesc_add_bitfield): Likewise.
8403         (tdesc_add_flag): Likewise.
8404         (tdesc_add_enum_value): Likewise.
8405         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8406         (struct tdesc_type_vector): Likewise.
8407         (struct tdesc_type_field): Likewise.
8408         (struct tdesc_type_with_fields): Likewise.
8409         (tdesc_create_enum): Add declaration.
8410         (tdesc_add_typed_bitfield): Likewise.
8411         (tdesc_add_enum_value): Likewise.
8412         * target-descriptions.c (tdesc_type_field): Move from here.
8413         (tdesc_type_builtin): Likewise.
8414         (tdesc_type_vector): Likewise.
8415         (tdesc_type_with_fields): Likewise.
8416         (tdesc_predefined_types): Likewise.
8417         (tdesc_named_type): Likewise.
8418         (tdesc_create_vector): Likewise.
8419         (tdesc_create_struct): Likewise.
8420         (tdesc_set_struct_size): Likewise.
8421         (tdesc_create_union): Likewise.
8422         (tdesc_create_flags): Likewise.
8423         (tdesc_create_enum): Likewise.
8424         (tdesc_add_field): Likewise.
8425         (tdesc_add_typed_bitfield): Likewise.
8426         (tdesc_add_bitfield): Likewise.
8427         (tdesc_add_flag): Likewise.
8428         (tdesc_add_enum_value): Likewise.
8429         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8430         (tdesc_add_typed_bitfield): Likewise.
8431         (tdesc_add_enum_value): Likewise.
8432
8433 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8434
8435         * common/tdesc.c (tdesc_feature::accept): Move to here.
8436         (tdesc_feature::operator==): Likewise.
8437         (tdesc_create_reg): Likewise.
8438         * common/tdesc.h (tdesc_type_kind): Likewise.
8439         (struct tdesc_type): Likewise.
8440         (struct tdesc_feature): Likewise.
8441         * regformats/regdat.sh: Create a feature.
8442         * target-descriptions.c (tdesc_type_kind): Move from here.
8443         (tdesc_type): Likewise.
8444         (tdesc_type_up): Likewise.
8445         (tdesc_feature): Likewise.
8446         (tdesc_create_reg): Likewise.
8447
8448 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8449
8450         * Makefile.in: Add arch/tdesc.c
8451         * common/tdesc.c: New file.
8452         * common/tdesc.h (tdesc_element_visitor): Move to here.
8453         (tdesc_element): Likewise.
8454         (tdesc_reg): Likewise.
8455         (tdesc_reg_up): Likewise.
8456         * regformats/regdef.h (reg): Add offset to constructors.
8457         * target-descriptions.c (tdesc_element_visitor): Move from here.
8458         (tdesc_element): Likewise.
8459         (tdesc_reg): Likewise.
8460         (tdesc_reg_up): Likewise.
8461
8462 2018-04-17  Tom Tromey  <tom@tromey.com>
8463
8464         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8465         discriminant field.
8466
8467 2018-04-17  Tom Tromey  <tom@tromey.com>
8468
8469         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8470
8471 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8472
8473         * symtab.c (print_symbol_info): Skip printing filename and line
8474         number when `last' is NULL.
8475         (symtab_symbol_info): Use empty string instead of NULL for first
8476         invocation of print_symbol_info.
8477         (rbreak_command): Pass NULL to `last' parameter of
8478         print_symbol_info.
8479
8480 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8481
8482         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8483         instead of nullptr.
8484
8485 2018-04-16  Pedro Alves  <palves@redhat.com>
8486
8487         * MAINTAINERS (sh): Remove.
8488         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8489         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8490         (ALLDEPFILES): Remove sh64-tdep.c.
8491         * NEWS: Mentions that support for SH-5/SH64 is removed.
8492         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8493         (sh*-*-openbsd*): Ditto.
8494         (sh64-*-elf*): Remove.
8495         (sh*): Remove.
8496         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8497         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8498         * sh-tdep.c: No longer include "sh64-tdep.h".
8499         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8500         * sh64-tdep.c, sh64-tdep.h: Remove files.
8501
8502 2018-04-16  Pedro Alves  <palves@redhat.com>
8503
8504         * MAINTAINERS: Remove m88k.
8505         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8506         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8507         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8508         * NEWS: Mention that support for m88k was removed.
8509         * configure.host (m88*-*-*): Remove support.
8510         * configure.nat (m88k-*-*): Remove support.
8511         * configure.tgt (m88*-*-openbsd*): Remove.
8512         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8513
8514 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8515
8516         * configure.tgt (x86_tobjs): New variable.
8517         (amd64_tobjs, i386_tobjs): Use it.
8518
8519 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8520
8521         * symtab.c (print_symbol_info): Precede the symbol definition by
8522         the line number when available.
8523         * NEWS: Advertise this enhancement.
8524
8525 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8526
8527         * NEWS (New options): announce set/show record btrace cpu.
8528         * btrace.c: Include record-btrace.h.
8529         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8530         the vendor is unknown.
8531         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8532         Maybe overwrite the btrace configuration's cpu.
8533         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8534         (btrace_fetch): Add cpu parameter.  Update callers.
8535         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8536         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8537         errata workarounds if the vendor is unknown.
8538         * python/py-record-btrace.c: Include record-btrace.h.
8539         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8540         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8541         * record-btrace.c (record_btrace_cpu_state_kind): New.
8542         (record_btrace_cpu): New.
8543         (set_record_btrace_cpu_cmdlist): New.
8544         (record_btrace_get_cpu): New.
8545         (require_btrace_thread, record_btrace_info)
8546         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8547         (cmd_set_record_btrace_cpu_none): New.
8548         (cmd_set_record_btrace_cpu_auto): New.
8549         (cmd_set_record_btrace_cpu): New.
8550         (cmd_show_record_btrace_cpu): New.
8551         (_initialize_record_btrace): Initialize set/show record btrace cpu
8552         commands.
8553         * record-btrace.h (record_btrace_get_cpu): New.
8554
8555 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8556
8557         * record.c (set_record_command): Fix typo in message.
8558
8559 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8560
8561         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8562
8563 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8564
8565         * infrun.c (process_event_stop_test): Call
8566         gdbarch_in_indirect_branch_thunk.
8567         * gdbarch.sh (in_indirect_branch_thunk): New.
8568         * gdbarch.c: Regenerated.
8569         * gdbarch.h: Regenerated.
8570         * x86-tdep.h: New.
8571         * x86-tdep.c: New.
8572         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8573         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8574         (ALLDEPFILES): Add x86-tdep.c.
8575         * arch-utils.h (default_in_indirect_branch_thunk): New.
8576         * arch-utils.c (default_in_indirect_branch_thunk): New.
8577         * i386-tdep: Include x86-tdep.h.
8578         (i386_in_indirect_branch_thunk): New.
8579         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8580         function.
8581         * amd64-tdep: Include x86-tdep.h.
8582         (amd64_in_indirect_branch_thunk): New.
8583         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8584
8585 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8586
8587         PR gdb/23053
8588         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8589         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8590         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8591         regression.
8592
8593 2018-04-12  Tom Tromey  <tom@tromey.com>
8594
8595         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8596         (rust_evaluate_subexp): Likewise.
8597
8598 2018-04-12  Pedro Alves  <palves@redhat.com>
8599
8600         * procfs.c (procfs_detach): Make forward declaration's prototype
8601         match definition's protototype.
8602         (proc_get_LDT_entry): Remove stale do_cleanups call.
8603
8604 2018-04-12  Pedro Alves  <palves@redhat.com>
8605
8606         * target.h (target_ops::to_has_exited): Delete.
8607         (target_has_exited): Delete.
8608         * target-delegates.c: Regenerate.
8609
8610 2018-04-11  Pedro Alves  <palves@redhat.com>
8611
8612         * target.c (fileio_fh_t::t): Add comment.
8613         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8614         (target_fileio_close): Handle a NULL target.
8615         (invalidate_fileio_fh): New.
8616         (target_close): Call it.
8617         * remote.c (remote_hostio_send_command): No longer check whether
8618         remote_desc is open.
8619
8620 2018-04-11  Pedro Alves  <palves@redhat.com>
8621
8622         * target.c (fileio_fh_t): Make it a named struct instead of a
8623         typedef.
8624         (fileio_fh_t::is_closed): New method.
8625         (DEF_VEC_O (fileio_fh_t)): Remove.
8626         (fileio_fhandles): Now a std::vector.
8627         (is_closed_fileio_fh): Delete.
8628         (acquire_fileio_fd): Adjust.  Rename parameters.
8629         (release_fileio_fd): Adjust.
8630         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8631         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8632         (target_fileio_close): Adjust.
8633
8634 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8635
8636         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8637         index.
8638
8639 2018-04-10  Pedro Alves  <palves@redhat.com>
8640
8641         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8642         (scoped_finish_thread_state): New class.
8643         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8644         cleanup.
8645         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8646         (fetch_inferior_event, normal_stop): Likewise.
8647         * thread.c (finish_thread_state_cleanup): Delete.
8648
8649 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8650             Pedro Alves  <palves@redhat.com>
8651
8652         * value.c: Include "selftest.h" and "common/array-view.h".
8653         (struct range) <operator ==>: New.
8654         (test_ranges_contain): New.
8655         (check_ranges_vector): New.
8656         (test_insert_into_bit_range_vector): New.
8657         (_initialize_values): Register selftests.
8658         * common/array-view.h (operator==, operator!=): New.
8659
8660 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8661
8662         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8663         an iterator.
8664         * inline-frame.c: Include <algorithm>.
8665         (struct inline_state): Add constructor.
8666         (inline_state_s): Remove.
8667         (DEF_VEC_O(inline_state_s)): Remove.
8668         (inline_states): Change type to std::vector.
8669         (find_inline_frame_state): Adjust to std::vector.
8670         (allocate_inline_frame_state): Remove.
8671         (clear_inline_frame_state): Adjust to std::vector.
8672         (skip_inline_frames): Adjust to std::vector.
8673
8674 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8675
8676         * tracepoint.h (struct trace_state_variable): Add constructor.
8677         <name>: Change type to std::string.
8678         * tracepoint.c (tsv_s): Remove.
8679         (DEF_VEC_O(tsv_s)): Remove.
8680         (tvariables): Change to std::vector.
8681         (create_trace_state_variable): Adjust to std::vector.
8682         (find_trace_state_variable): Likewise.
8683         (find_trace_state_variable_by_number): Likewise.
8684         (delete_trace_state_variable): Likewise.
8685         (trace_variable_command): Adjust to std::string.
8686         (delete_trace_variable_command): Likewise.
8687         (tvariables_info_1): Adjust to std::vector.
8688         (save_trace_state_variables): Likewise.
8689         (start_tracing): Likewise.
8690         (merge_uploaded_trace_state_variables): Adjust to std::vector
8691         and std::string.
8692         * target.h (struct target_ops)
8693         <to_download_trace_state_variable>: Pass reference to
8694         trace_state_variable.
8695         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8696         * target-delegates.c: Re-generate.
8697         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8698         (mi_tsv_deleted): Likewise.
8699         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8700         * remote.c (remote_download_trace_state_variable): Change
8701         pointer to reference and adjust.
8702         * make-target-delegates (parse_argtypes): Handle references.
8703         (write_function_header): Likewise.
8704         (munge_type): Likewise.
8705
8706 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8707
8708         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8709         string_view-selftests.c.
8710         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8711         testsuite.
8712         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8713         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8714         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8715         * unittests/basic_string_view/element_access/char/1.cc:
8716         Likewise.
8717         * unittests/basic_string_view/element_access/char/empty.cc:
8718         Likewise.
8719         * unittests/basic_string_view/element_access/char/front_back.cc:
8720         Likewise.
8721         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8722         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8723         Likewise.
8724         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8725         Likewise.
8726         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8727         Likewise.
8728         * unittests/basic_string_view/operations/compare/char/1.cc:
8729         Likewise.
8730         * unittests/basic_string_view/operations/compare/char/13650.cc:
8731         Likewise.
8732         * unittests/basic_string_view/operations/copy/char/1.cc:
8733         Likewise.
8734         * unittests/basic_string_view/operations/data/char/1.cc:
8735         Likewise.
8736         * unittests/basic_string_view/operations/find/char/1.cc:
8737         Likewise.
8738         * unittests/basic_string_view/operations/find/char/2.cc:
8739         Likewise.
8740         * unittests/basic_string_view/operations/find/char/3.cc:
8741         Likewise.
8742         * unittests/basic_string_view/operations/find/char/4.cc:
8743         Likewise.
8744         * unittests/basic_string_view/operations/rfind/char/1.cc:
8745         Likewise.
8746         * unittests/basic_string_view/operations/rfind/char/2.cc:
8747         Likewise.
8748         * unittests/basic_string_view/operations/rfind/char/3.cc:
8749         Likewise.
8750         * unittests/basic_string_view/operations/substr/char/1.cc:
8751         Likewise.
8752         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8753         * unittests/string_view-selftests.c: New file.
8754
8755 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8756
8757         * unittests/basic_string_view/capacity/1.cc: New file.
8758         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8759         * unittests/basic_string_view/cons/char/1.cc: New file.
8760         * unittests/basic_string_view/cons/char/2.cc: New file.
8761         * unittests/basic_string_view/cons/char/3.cc: New file.
8762         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8763         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8764         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8765         * unittests/basic_string_view/element_access/char/1.cc: New file.
8766         * unittests/basic_string_view/element_access/char/2.cc: New file.
8767         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8768         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8769         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8770         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8771         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8772         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8773         * unittests/basic_string_view/include.cc: New file.
8774         * unittests/basic_string_view/inserters/char/1.cc: New file.
8775         * unittests/basic_string_view/inserters/char/2.cc: New file.
8776         * unittests/basic_string_view/inserters/char/3.cc: New file.
8777         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8778         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8779         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8780         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8781         * unittests/basic_string_view/literals/types.cc: New file.
8782         * unittests/basic_string_view/literals/values.cc: New file.
8783         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8784         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8785         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8786         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8787         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8788         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8789         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8790         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8791         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8792         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8793         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8794         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8795         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8796         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8797         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8798         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8799         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8800         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8801         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8802         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8803         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8804         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8805         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8806         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8807         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8808         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8809         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8810         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8811         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8812         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8813         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8814         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8815         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8816         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8817         * unittests/basic_string_view/operators/char/2.cc: New file.
8818         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8819         * unittests/basic_string_view/range_access/char/1.cc: New file.
8820         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8821         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8822         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8823         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8824         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8825         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8826         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8827         * unittests/basic_string_view/typedefs.cc: New file.
8828         * unittests/basic_string_view/types/1.cc: New file.
8829
8830 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8831
8832         * common/gdb_string_view.h: Remove libstdc++ implementation
8833         details, adjust to gdb reality.
8834         * common/gdb_string_view.tcc: Likewise.
8835         * cli/cli-script.c (struct string_view): Remove.
8836         (user_args) <m_args>: Change element type to gdb::string_view.
8837         (user_args::insert_args): Adjust.
8838
8839 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8840
8841         * common/gdb_string_view.h: New file.
8842         * common/gdb_string_view.tcc: New file.
8843
8844 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8845
8846         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8847         * configure: Re-generate.
8848
8849 2018-04-09  Pedro Alves  <palves@redhat.com>
8850
8851         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8852         (set_target_gdbarch): Call
8853         gdb::observers::architecture_changed.notify instead of
8854         observer_notify_architecture_changed.
8855
8856 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8857
8858         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8859         (do_restore_current_traceframe_cleanup): Remove.
8860         (restore_current_traceframe_cleanup_dtor): Remove.
8861         (make_cleanup_restore_current_traceframe): Remove.
8862         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8863         New.
8864         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8865         * infrun.c (fetch_inferior_event): Use
8866         scoped_restore_current_traceframe.
8867
8868 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8869
8870         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8871         Remove.
8872         <n_allocated_type_units>: Remove.
8873         <all_type_units>: Change to std::vector.
8874         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8875         to std::vector change.
8876         (dwarf2_per_objfile::get_cutu): Likewise.
8877         (dwarf2_per_objfile::get_tu): Likewise.
8878         (create_signatured_type_table_from_index): Likewise.
8879         (create_signatured_type_table_from_debug_names): Likewise.
8880         (dw2_symtab_iter_next): Likewise.
8881         (dw2_print_stats): Likewise.
8882         (dw2_expand_all_symtabs): Likewise.
8883         (dw2_expand_marked_cus): Likewise.
8884         (dw2_debug_names_iterator::next): Likewise.
8885         (dwarf2_initialize_objfile): Likewise.
8886         (add_signatured_type_cu_to_table): Likewise.
8887         (create_all_type_units): Likewise.
8888         (add_type_unit): Likewise.
8889         (struct tu_abbrev_offset): Add constructor.
8890         (build_type_psymtabs_1): Adjust to std::vector change.
8891         (print_tu_stats): Likewise.
8892         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8893         (write_debug_names): Likewise.
8894
8895 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8896
8897         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8898         Make an std::vector.
8899         <n_comp_units>: Remove.
8900         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8901         to std::vector change.
8902         (dwarf2_per_objfile::get_cutu): Likewise.
8903         (dwarf2_per_objfile::get_cu): Likewise.
8904         (create_cus_from_index): Likewise.
8905         (create_addrmap_from_index): Likewise.
8906         (create_addrmap_from_aranges): Likewise.
8907         (dwarf2_read_index): Likewise.
8908         (dw2_find_last_source_symtab): Likewise.
8909         (dw2_map_symtabs_matching_filename): Likewise.
8910         (dw2_symtab_iter_next): Likewise.
8911         (dw2_print_stats): Likewise.
8912         (dw2_expand_all_symtabs): Likewise.
8913         (dw2_expand_symtabs_with_fullname): Likewise.
8914         (dw2_expand_marked_cus): Likewise.
8915         (dw2_map_symbol_filenames): Likewise.
8916         (create_cus_from_debug_names): Likewise.
8917         (dwarf2_read_debug_names): Likewise.
8918         (dw2_debug_names_iterator::next): Likewise.
8919         (dwarf2_initialize_objfile): Likewise.
8920         (set_partial_user): Likewise.
8921         (dwarf2_build_psymtabs_hard): Likewise.
8922         (read_comp_units_from_section): Remove arguments, adjust to
8923         std::vector change.
8924         (create_all_comp_units): Adjust to std::vector and
8925         read_comp_units_from_section changes.
8926         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8927         change.
8928         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8929         (psyms_seen_size): Likewise.
8930         (write_gdbindex): Likewise.
8931         (write_debug_names): Likewise.
8932
8933 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8934
8935         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8936         with dwarf2_per_objfile.
8937         (create_cus_from_index): Likewise.
8938         (create_signatured_type_table_from_index): Likewise.
8939         (dwarf2_read_index): Likewise.
8940         (dwarf2_initialize_objfile): Likewise.
8941         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8942         per_cu rather than get_dwarf2_per_objfile.
8943
8944 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8945
8946         * dwarf2read.h (struct signatured_type): Forward declare.
8947         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8948         New methods.
8949         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8950         (dw2_get_cutu): ...this.
8951         (dwarf2_per_objfile::get_cu): Rename from...
8952         (dw2_get_cu): ...this.
8953         (dwarf2_per_objfile::get_tu): New.
8954         (create_addrmap_from_index): Adjust.
8955         (create_addrmap_from_aranges): Adjust.
8956         (dw2_find_last_source_symtab): Adjust.
8957         (dw2_map_symtabs_matching_filename): Adjust.
8958         (dw2_symtab_iter_next): Adjust.
8959         (dw2_print_stats): Adjust.
8960         (dw2_expand_all_symtabs): Adjust.
8961         (dw2_expand_symtabs_with_fullname): Adjust.
8962         (dw2_expand_marked_cus): Adjust.
8963         (dw_expand_symtabs_matching_file_matcher): Adjust.
8964         (dw2_map_symbol_filenames): Adjust.
8965         (dw2_debug_names_iterator::next): Adjust.
8966         (dwarf2_initialize_objfile): Adjust.
8967         (set_partial_user): Adjust.
8968         (dwarf2_build_psymtabs_hard): Adjust.
8969
8970 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8971
8972         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8973         Remove unused variables.
8974         (dw2_map_symtabs_matching_filename): Likewise.
8975         (dwarf2_record_block_ranges): Likewise.
8976         (dwarf2_read_addr_index): Likewise.
8977         (follow_die_offset): Likewise.
8978
8979 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8980
8981         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8982         to symbol_file_add_main.
8983
8984 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8985
8986         PR mi/22299
8987         * mi/mi-console.c (do_fputc_async_safe): New.
8988         (mi_console_file::write_async_safe): New.
8989         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8990         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8991         New.
8992         * ui-file.c (ui_file::putstrn): Adjust call to
8993         fputstrn_unfiltered.
8994         * utils.c (printchar): Replace do_fputs and do_fprintf
8995         parameters by do_fputc.
8996         (fputstr_filtered): Adjust call to printchar.
8997         (fputstr_unfiltered): Likewise.
8998         (fputstrn_filtered): Likewise.
8999         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9000         printchar.
9001         * utils.h (do_fputc_ftype): New typedef.
9002         (fputstrn_unfiltered): Add do_fputc parameter.
9003
9004 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9005
9006         * regformats/i386/i386-avx.dat: Remove.
9007
9008 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9009
9010         PR gdb/22979
9011         * amd64-tdep.c (amd64_none_init_abi): New function.
9012         (amd64_x32_none_init_abi): New function.
9013         (_initialize_amd64_tdep): Register handlers for x86-64 and
9014         x64_32 with GDB_OSABI_NONE.
9015         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9016         GDB_OSABI_NONE osabi.
9017
9018 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9019
9020         PR gdb/22980
9021         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9022         GDB_OSABI_NONE.
9023         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9024         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9025
9026 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9027
9028         * common/byte-vector.h (char_vector): New type.
9029         * target.h (target_read_alloc): Return
9030         gdb::optional<byte_vector>.
9031         (target_read_stralloc): Return gdb::optional<char_vector>.
9032         (target_get_osdata): Return gdb::optional<char_vector>.
9033         * target.c (target_read_alloc_1): Templatize.  Replacement
9034         manual memory management with vector.
9035         (target_read_alloc): Change return type, adjust.
9036         (target_read_stralloc): Change return type, adjust.
9037         (target_get_osdata): Change return type, adjust.
9038         * auxv.c (struct auxv_info) <length>: Remove.
9039         <data>: Change type to gdb::optional<byte_vector>.
9040         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9041         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9042         (target_auxv_search): Adjust.
9043         (fprint_target_auxv): Adjust.
9044         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9045         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9046         (linux_make_corefile_notes): Adjust.
9047         * osdata.c (get_osdata): Adjust.
9048         * remote.c (remote_get_threads_with_qxfer): Adjust.
9049         (remote_memory_map): Adjust.
9050         (remote_traceframe_info): Adjust.
9051         (btrace_read_config): Adjust.
9052         (remote_read_btrace): Adjust.
9053         (remote_pid_to_exec_file): Adjust.
9054         * solib-aix.c (solib_aix_get_library_list): Adjust.
9055         * solib-dsbt.c (decode_loadmap): Don't free buf.
9056         (dsbt_get_initial_loadmaps): Adjust.
9057         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9058         * solib-target.c (solib_target_current_sos): Adjust.
9059         * tracepoint.c (sdata_make_value): Adjust.
9060         * xml-support.c (xinclude_start_include): Adjust.
9061         (xml_fetch_content_from_file): Adjust.
9062         * xml-support.h (xml_fetch_another): Change return type.
9063         (xml_fetch_content_from_file): Change return type.
9064         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9065         * xml-tdesc.c (file_read_description_xml): Adjust.
9066         (fetch_available_features_from_target): Change return type.
9067         (target_fetch_description_xml): Adjust.
9068         (target_read_description_xml): Adjust.
9069
9070 2018-04-06  Tom Tromey  <tom@tromey.com>
9071
9072         * value.c (~value): Update.
9073         (struct value) <contents>: Now unique_xmalloc_ptr.
9074         (value_contents_bits_eq, allocate_value_contents)
9075         (value_contents_raw, value_contents_all_raw)
9076         (value_contents_for_printing, value_contents_for_printing_const)
9077         (set_value_enclosing_type): Update.
9078
9079 2018-04-06  Tom Tromey  <tom@tromey.com>
9080
9081         * value.c (range_s): Remove typedef, VEC.
9082         (struct range): Add operator<.
9083         (range_lessthan): Remove.
9084         (ranges_contain): Change type.
9085         (~value): Update.
9086         (struct value) <unavailable, optimized_out>: Now std::vector.
9087         (value_entirely_available)
9088         (value_entirely_covered_by_range_vector)
9089         (value_entirely_unavailable, value_entirely_optimized_out):
9090         Update.
9091         (insert_into_bit_range_vector): Change argument type.
9092         (find_first_range_overlap): Likewise.
9093         (struct ranges_and_idx, value_contents_bits_eq)
9094         (require_not_optimized_out, require_available): Update.
9095         (ranges_copy_adjusted): Change argument types.
9096         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9097
9098 2018-04-06  Tom Tromey  <tom@tromey.com>
9099
9100         * value.c (~value): Update.
9101         (struct value) <parent>: Now a value_ref_ptr.
9102         (value_parent, set_value_parent, value_address, value_copy):
9103         Update.
9104
9105 2018-04-06  Tom Tromey  <tom@tromey.com>
9106
9107         * value.c (struct value): Add constructor, destructor, and member
9108         initializers.
9109         (allocate_value_lazy, value_decref): Update.
9110
9111 2018-04-06  Tom Tromey  <tom@tromey.com>
9112
9113         * value.c (struct value) <released, next>: Remove.
9114         (all_values): Now a std::vector.
9115         (allocate_value_lazy): Update.
9116         (value_next): Remove.
9117         (value_mark, value_free_to_mark, release_value)
9118         (value_release_to_mark): Update.
9119
9120 2018-04-06  Tom Tromey  <tom@tromey.com>
9121
9122         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9123         (free_value_chain): Remove.
9124         * value.c (free_value_chain): Remove.
9125         (value_release_to_mark): Return a std::vector.
9126         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9127         std::vector.
9128         (check_condition): Update.
9129         * eval.c (fetch_subexp_value): Change "val_chain" to a
9130         std::vector.
9131         * breakpoint.c (update_watchpoint): Update.
9132         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9133
9134 2018-04-06  Tom Tromey  <tom@tromey.com>
9135
9136         * value.h (free_all_values): Remove.
9137         * value.c (free_all_values): Remove.
9138
9139 2018-04-06  Tom Tromey  <tom@tromey.com>
9140
9141         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9142         (value_history_chain, value_history_count): Remove.
9143         (value_history): New global.
9144         (record_latest_value, access_value_history, show_values)
9145         (preserve_values): Update.
9146
9147 2018-04-06  Tom Tromey  <tom@tromey.com>
9148
9149         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9150         * varobj.c (varobj_set_display_format, varobj_set_value)
9151         (install_default_visualizer, construct_visualizer)
9152         (install_new_value, ~varobj, varobj_get_value_type)
9153         (my_value_of_variable, varobj_editable_p): Update.
9154         * c-varobj.c (c_describe_child, c_value_of_variable)
9155         (cplus_number_of_children, cplus_describe_child): Update.
9156         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9157         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9158         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9159
9160 2018-04-06  Tom Tromey  <tom@tromey.com>
9161
9162         * printcmd.c (last_examine_address): Change type to
9163         value_ref_ptr.
9164         (do_examine, x_command): Update.
9165
9166 2018-04-06  Tom Tromey  <tom@tromey.com>
9167
9168         * value.c (release_value): Update.
9169         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9170         (struct bpstats) <val>: Now a value_ref_ptr.
9171         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9172         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9173         (~watchpoint, print_it_watchpoint, watch_command_1)
9174         (invalidate_bp_value_on_memory_change): Update.
9175
9176 2018-04-06  Tom Tromey  <tom@tromey.com>
9177
9178         * varobj.c (varobj_clear_saved_item)
9179         (update_dynamic_varobj_children, install_new_value, ~varobj):
9180         Update.
9181         * value.h (value_incref): Move declaration earlier.
9182         (value_decref): Rename from value_free.
9183         (struct value_ref_policy): New.
9184         (value_ref_ptr): New typedef.
9185         (struct value_deleter): Remove.
9186         (gdb_value_up): Remove typedef.
9187         (release_value): Change return type.
9188         (release_value_or_incref): Remove.
9189         * value.c (set_value_parent): Update.
9190         (value_incref): Change return type.
9191         (value_decref): Rename from value_free.
9192         (value_free_to_mark, free_all_values, free_value_chain): Update.
9193         (release_value): Return value_ref_ptr.
9194         (release_value_or_incref): Remove.
9195         (record_latest_value, set_internalvar, clear_internalvar):
9196         Update.
9197         * stack.c (info_frame_command): Don't call value_free.
9198         * python/py-value.c (valpy_dealloc, valpy_new)
9199         (value_to_value_object): Update.
9200         * printcmd.c (do_examine): Update.
9201         * opencl-lang.c (lval_func_free_closure): Update.
9202         * mi/mi-main.c (register_changed_p): Don't call value_free.
9203         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9204         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9205         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9206         value_free.
9207         * guile/scm-value.c (vlscm_free_value_smob)
9208         (vlscm_scm_from_value): Update.
9209         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9210         (frame_unwind_register_unsigned, get_frame_register_bytes)
9211         (put_frame_register_bytes): Don't call value_free.
9212         * findvar.c (address_from_register): Don't call value_free.
9213         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9214         * dwarf2loc.c (entry_data_value_free_closure)
9215         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9216         (dwarf2_evaluate_loc_desc_full): Update.
9217         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9218         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9219         (~watchpoint, watch_command_1)
9220         (invalidate_bp_value_on_memory_change): Update.
9221         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9222
9223 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9224
9225         PR gdb/23022
9226         * warning.m4: Add -Wno-error=deprecated-register.
9227         * configure: Re-generate.
9228
9229 2018-04-05  Tom Tromey  <tom@tromey.com>
9230
9231         * linespec.h: Remove include of "vec.h".
9232
9233 2018-04-05  Tom Tromey  <tom@tromey.com>
9234
9235         * linespec.c (typep): Remove typedef.
9236         (find_methods, find_superclass_methods): Take a std::vector.
9237         (find_method): Use std::vector.
9238
9239 2018-04-05  Tom Tromey  <tom@tromey.com>
9240
9241         * utils.c (compare_strings): Remove.
9242         * utils.h (compare_strings): Remove.
9243         * objc-lang.h (find_imps): Update.
9244         * objc-lang.c (find_methods): Take a std::vector.
9245         (uniquify_strings, find_imps): Likewise.
9246         * linespec.c (find_methods): Take a std::vector.
9247         (decode_objc): Use std::vector.
9248         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9249         a std::vector.
9250         (find_method, find_function_symbols): Use std::vector.
9251
9252 2018-04-05  Tom Tromey  <tom@tromey.com>
9253
9254         * completer.c (completion_tracker::completion_tracker): Remove
9255         cast.
9256         (completion_tracker::discard_completions): Likewise.
9257         * breakpoint.c (ambiguous_names_p): Remove cast.
9258         * ada-lang.c (_initialize_ada_language): Remove cast.
9259         * utils.h (streq): Update.
9260         (streq_hash): Add new declaration.
9261         * utils.c (streq): Return bool.
9262         (streq_hash): New function.
9263
9264 2018-04-05  Tom Tromey  <tom@tromey.com>
9265
9266         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9267         Remove a string copy.
9268
9269 2018-04-05  Tom Tromey  <tom@tromey.com>
9270
9271         * linespec.c (filter_results): Use std::vector.
9272         (decode_line_2, decode_line_full): Update.
9273
9274 2018-04-05  Tom Tromey  <tom@tromey.com>
9275
9276         * linespec.c (canonical_to_fullform): Return std::string.
9277         (filter_results): Update.
9278         (struct decode_line_2_item): Add constructor.
9279         <fullform, displayform>: Now std::string.
9280         (decode_line_2_compare_items): Now a std::sort comparator.
9281         (decode_line_2): Update.
9282
9283 2018-04-05  Tom Tromey  <tom@tromey.com>
9284
9285         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9286         (unexpected_linespec_error): Update.
9287         (linespec_parse_basic, parse_linespec): Update.
9288
9289 2018-04-05  Tom Tromey  <tom@tromey.com>
9290
9291         * linespec.c (linespec_parse_basic): Reindent.
9292
9293 2018-04-05  Tom Tromey  <tom@tromey.com>
9294
9295         * minsyms.h (iterate_over_minimal_symbols): Update.
9296         * minsyms.c (iterate_over_minimal_symbols): Take a
9297         gdb::function_view.
9298         * linespec.c (struct collect_minsyms): Remove.
9299         (compare_msyms): Now a std::sort comparator.
9300         (add_minsym): Add parameters.
9301         (search_minsyms_for_name): Update.  Use std::vector.
9302
9303 2018-04-03  Tom Tromey  <tom@tromey.com>
9304
9305         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9306         gdb::byte_vector.
9307
9308 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9309
9310         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9311
9312 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9313
9314         PR gdb/16959
9315         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9316         printing static type.
9317
9318 2018-04-01  Tom Tromey  <tom@tromey.com>
9319
9320         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9321         (rs6000_xfer_shared_libraries): Update.
9322
9323 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9324
9325         * common/gdb_vecs.h (char_ptr): Remove.
9326         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9327
9328 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9329
9330         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9331         with std::vector.
9332         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9333
9334 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9335
9336         * tracepoint.h (struct uploaded_tp): Initialize fields.
9337         <actions, step_actions, cmd_strings>: Change type to
9338         std::vector<char *>.
9339         * tracepoint.c (get_uploaded_tp): Allocate with new.
9340         (free_uploaded_tps): Free with delete.
9341         (parse_tracepoint_definition): Adjust to std::vector change.
9342         * breakpoint.c (read_uploaded_action): Likewise.
9343         (create_tracepoint_from_upload): Likewise.
9344         * ctf.c (ctf_write_uploaded_tp): Likewise.
9345         (SET_ARRAY_FIELD): Likewise.
9346         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9347
9348 2018-03-30  Tom Tromey  <tom@tromey.com>
9349
9350         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9351         std::unique_ptr.
9352         (svr4_keep_data_in_core): Update.
9353         (svr4_read_so_list): Update.
9354
9355 2018-03-30  Tom Tromey  <tom@tromey.com>
9356
9357         * windows-nat.c (handle_output_debug_string, handle_exception):
9358         Update.
9359         * target.h (target_read_string): Update.
9360         * target.c (target_read_string): Change "string" to
9361         unique_xmalloc_ptr.
9362         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9363         Update.
9364         * solib-frv.c (frv_current_sos): Update.
9365         * solib-dsbt.c (dsbt_current_sos): Update.
9366         * solib-darwin.c (darwin_current_sos): Update.
9367         * linux-thread-db.c (inferior_has_bug): Update.
9368         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9369         Update.  Remove alloca.
9370         * ada-lang.c (ada_main_name): Update.
9371
9372 2018-03-30  Tom Tromey  <tom@tromey.com>
9373
9374         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9375         (struct dwo_file_deleter): New.
9376         (dwo_file_up): New typedef.
9377         (open_and_init_dwo_file): Use dwo_file_up.
9378         (free_dwo_file_cleanup): Remove.
9379
9380 2018-03-30  Tom Tromey  <tom@tromey.com>
9381
9382         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9383         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9384
9385 2018-03-30  Tom Tromey  <tom@tromey.com>
9386
9387         * dwarf2read.c (class free_cached_comp_units): New class.
9388         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9389         (free_cached_comp_units): Remove function.
9390
9391 2018-03-30  Tom Tromey  <tom@tromey.com>
9392
9393         * utils.h (make_cleanup_unpush_target): Remove.
9394         * inf-ptrace.c (struct target_unpusher): New.
9395         (target_unpush_up) New typedef.
9396         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9397         target_unpush_up.
9398         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9399
9400 2018-03-27  Tom Tromey  <tom@tromey.com>
9401
9402         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9403
9404 2018-03-27  Pedro Alves  <palves@redhat.com>
9405             Tom Tromey  <tom@tromey.com>
9406
9407         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9408         destructor.  Now a class.
9409         (gdb_readline_wrapper_cleanup): Remove function.
9410         (gdb_readline_wrapper): Remove cleanups.
9411
9412 2018-03-27  Tom Tromey  <tom@tromey.com>
9413
9414         * typeprint.h (struct type_print_options) <local_typedefs,
9415         global_typedefs>: Remove "struct" keyword.
9416         (class typedef_hash_table): New class.
9417         (recursively_update_typedef_hash, add_template_parameters)
9418         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9419         (find_typedef_in_hash): Don't declare.
9420         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9421         (typedef_hash_table::recursively_update): Rename from
9422         recursively_update_typedef_hash.  Now a member.
9423         (typedef_hash_table::add_template_parameters): Rename from
9424         add_template_parameters.  Now a member.
9425         (typedef_hash_table::typedef_hash_table): Now a constructor;
9426         rename from create_typedef_hash.
9427         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9428         rename from free_typedef_hash.
9429         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9430         (do_free_global_table): Remove.
9431         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9432         from copy_type_recursive.
9433         (create_global_typedef_table): Remove.
9434         (typedef_hash_table::find_global_typedef): Now a member of
9435         typedef_hash_table.
9436         (typedef_hash_table::find_typedef): Rename from
9437         find_typedef_in_hash; now a member.
9438         (whatis_exp): Update.
9439         * extension.h (struct ext_lang_type_printers): Add constructor and
9440         destructor.
9441         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9442         declare.
9443         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9444         Now a constructor; rename from start_ext_lang_type_printers.
9445         (ext_lang_type_printers): Now a destructor; rename from
9446         free_ext_lang_type_printers.
9447         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9448         Update.
9449         (c_type_print_base_struct_union): Update.  Remove cleanups.
9450
9451 2018-03-27  Tom Tromey  <tom@tromey.com>
9452
9453         * dwarf-index-write.c: Include <cmath>.
9454
9455 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9456
9457         * NEWS: Add entry describing new "set|show varsize-limit" command.
9458         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9459         command.
9460         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9461         "set variable".
9462
9463 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9464
9465         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9466         dwarf-index-write.c
9467         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9468         * dwarf-index-common.c: New file.
9469         * dwarf-index-common.h: New file.
9470         * dwarf-index-write.c: New file.
9471         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9472         (struct dwarf2_section_info): Move from here.
9473         (dwarf2_section_info_def): Likewise.
9474         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9475         (offset_type): Likewise.
9476         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9477         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9478         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9479         (byte_swap): Likewise.
9480         (MAYBE_SWAP): Likewise.
9481         (dwarf2_per_cu_ptr): Likewise.
9482         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9483         (struct tu_stats): Likewise.
9484         (struct dwarf2_per_objfile): Likewise.
9485         (struct dwarf2_per_cu_data): Likewise.
9486         (struct signatured_type): Likewise.
9487         (sig_type_ptr): Likewise.
9488         (DEF_VEC_P (sig_type_ptr)): Likewise.
9489         (INDEX4_SUFFIX): Likewise.
9490         (INDEX5_SUFFIX): Likewise.
9491         (DEBUG_STR_SUFFIX): Likewise.
9492         (dwarf2_read_section): Make non-static.
9493         (mapped_index_string_hash): Move from here.
9494         (dwarf5_djb_hash): Likewise.
9495         (file_write): Likewise.
9496         (class data_buf): Likewise.
9497         (struct symtab_index_entry): Likewise.
9498         (struct mapped_symtab): Likewise.
9499         (find_slot): Likewise.
9500         (hash_expand): Likewise.
9501         (add_index_entry): Likewise.
9502         (uniquify_cu_indices): Likewise.
9503         (class c_str_view): Likewise.
9504         (class c_str_view_hasher): Likewise.
9505         (class vector_hasher): Likewise.
9506         (write_hash_table): Likewise.
9507         (psym_index_map): Likewise.
9508         (struct addrmap_index_data): Likewise.
9509         (add_address_entry): Likewise.
9510         (add_address_entry_worker): Likewise.
9511         (write_address_map): Likewise.
9512         (symbol_kind): Likewise.
9513         (write_psymbols): Likewise.
9514         (struct signatured_type_index_data): Likewise.
9515         (write_one_signatured_type): Likewise.
9516         (recursively_count_psymbols): Likewise.
9517         (recursively_write_psymbols): Likewise.
9518         (class debug_names): Likewise.
9519         (check_dwarf64_offsets): Likewise.
9520         (psyms_seen_size): Likewise.
9521         (write_gdbindex): Likewise.
9522         (write_debug_names): Likewise.
9523         (assert_file_size): Likewise.
9524         (write_psymtabs_to_index): Likewise.
9525         (save_gdb_index_command): Likewise.
9526         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9527         command.
9528         * dwarf2read.h: New file.
9529
9530 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9531
9532         PR gdb/22670
9533         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9534         symbol name if the CU's language stores symbol names in linkage
9535         format.
9536         * language.h (struct language_defn)
9537         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9538         all instances of this struct.
9539
9540 2018-03-26  Tom Tromey  <tom@tromey.com>
9541
9542         * stack.c (backtrace_command_1): Remove verbose code.
9543
9544 2018-03-26  Tom Tromey  <tom@tromey.com>
9545
9546         * python/py-framefilter.c (py_print_type): Don't catch
9547         exceptions.  Return void.
9548         (py_print_value): Likewise.
9549         (py_print_single_arg): Likewise.
9550         (enumerate_args): Don't catch exceptions.
9551         (py_print_args): Likewise.
9552         (py_print_frame): Likewise.
9553         (gdbpy_apply_frame_filter): Catch exceptions here.
9554
9555 2018-03-26  Tom Tromey  <tom@tromey.com>
9556
9557         * stack.c (_initialize_stack): Remove trailing newlines from help
9558         text.  Add "Usage" line to "backtrace" help.
9559
9560 2018-03-26  Tom Tromey  <tom@tromey.com>
9561
9562         PR python/16486:
9563         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9564
9565 2018-03-26  Tom Tromey  <tom@tromey.com>
9566
9567         * python/py-framefilter.c (py_print_single_arg): Return
9568         EXT_LANG_BT_ERROR from catch.
9569
9570 2018-03-26  Tom Tromey  <tom@tromey.com>
9571
9572         PR backtrace/15584:
9573         * stack.c (backtrace_command_1): Move some code into no-filters
9574         "if".
9575
9576 2018-03-26  Tom Tromey  <tom@tromey.com>
9577
9578         * python/py-framefilter.c (throw_quit_or_print_exception): New
9579         function.
9580         (gdbpy_apply_frame_filter): Use it.
9581
9582 2018-03-26  Tom Tromey  <tom@tromey.com>
9583
9584         PR cli/17716:
9585         * python/py-framefilter.c (py_print_type, py_print_value)
9586         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9587         RETURN_MASK_ERROR.
9588
9589 2018-03-26  Tom Tromey  <tom@tromey.com>
9590
9591         * python/py-framefilter.c (enumerate_args): Use
9592         gdb::unique_xmalloc_ptr.
9593
9594 2018-03-26  Tom Tromey  <tom@tromey.com>
9595
9596         * python/py-framefilter.c (py_print_frame): Return
9597         EXT_LANG_BT_OK.
9598         (gdbpy_apply_frame_filter): Update comment.
9599         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9600         Remove.
9601         <EXT_LANG_BT_NO_FILTERS>: Change value.
9602
9603 2018-03-26  Tom Tromey  <tom@tromey.com>
9604
9605         PR backtrace/15582:
9606         * stack.c (backtrace_command): Parse "hide" argument.
9607         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9608         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9609         constant.
9610
9611 2018-03-26  Tom Tromey  <tom@tromey.com>
9612
9613         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9614         add "flags".
9615         (backtrace_command): Remove "fulltrace", add "flags".
9616
9617 2018-03-26  Tom Tromey  <tom@tromey.com>
9618
9619         * stack.c (backtrace_command): Rewrite command line parsing.
9620
9621 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9622
9623         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9624
9625 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9626
9627         * filename-seen-cache.h: Add include guard.
9628
9629 2018-03-26  Keith Seitz  <keiths@redhat.com>
9630
9631         * symfile.c (place_section): Remove "struct" from section_addr_info
9632         in comment.
9633         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9634         "struct" keyword from section_addr_info.
9635
9636 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9637
9638         * regformats/regdef.h (reg): Add constructors.
9639
9640 2018-03-25  Pedro Alves  <palves@redhat.com>
9641
9642         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9643         if then/else bodies in var_func_name extraction.
9644
9645 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9646
9647         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9648         lookup_minimal_symbol() to find symbol entry.
9649         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9650
9651 2018-03-23  Keith Seitz  <keiths@redhat.com>
9652
9653         PR c++/22968
9654         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9655         nested type definitions for C++, too.
9656
9657 2018-03-23  Tom Tromey  <tom@tromey.com>
9658
9659         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9660         a typedef.
9661         (macho_register_oso): Remove.
9662         (macho_symtab_read): Take a std::vector.
9663         (oso_el_compare_name): Now a std::sort comparator.
9664         (macho_symfile_read_all_oso): Take a std::vector.
9665         (macho_symfile_read): Use std::vector.  Remove cleanups.
9666
9667 2018-03-22  Tom Tromey  <tom@tromey.com>
9668
9669         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9670         (record_full_goto_bookmark): Use std::string.
9671
9672 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9673
9674         PR tdep/18295
9675         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9676         a single mask.
9677
9678 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9679
9680         * rs6000-tdep.c (store_insn_p): New function.
9681         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9682         and cr_reg to their unshifted values. Use store_insn_p to
9683         match LR saves using either R1 or fdata->alloca_reg. Use
9684         store_insn_p to match CR saves. Set alloca_reg_offset
9685         when alloca_reg and framep are set. Remove lr_reg shift
9686         when assigning to fdata->lr_register.
9687
9688 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9689
9690         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9691         command line args instead of emitting a warning.
9692
9693 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9694
9695         * tracepoint.h (struct static_tracepoint_marker): Initialize
9696         fields, define default constructor, move constructor and move
9697         assignment, disable the rest.
9698         <str_id, extra>: Make std::string.
9699         (release_static_tracepoint_marker): Remove.
9700         (free_current_marker): Remove.
9701         * tracepoint.c (free_current_marker): Remove.
9702         (parse_static_tracepoint_marker_definition): Adjust to
9703         std::string, use new hex2str overload.
9704         (release_static_tracepoint_marker): Remove.
9705         (print_one_static_tracepoint_marker): Get marker by reference
9706         and adjust to std::string.
9707         (info_static_tracepoint_markers_command): Adjust to std::vector
9708         changes
9709         * target.h (static_tracepoint_marker_p): Remove typedef.
9710         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9711         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9712         bool.
9713         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9714         * target-debug.h
9715         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9716         (target_debug_print_std_vector_static_tracepoint_marker): New.
9717         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9718         to...
9719         (target_debug_print_static_tracepoint_marker_p): ... this.
9720         * target-delegates.c: Re-generate.
9721         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9722         Make std::string.
9723         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9724         (decode_static_tracepoint_spec): Adjust to std::vector.
9725         (tracepoint_print_one_detail): Adjust to std::string.
9726         (strace_marker_decode_location): Adjust to std::string.
9727         (update_static_tracepoint): Adjust to std::string, remove call
9728         to release_static_tracepoint_marker.
9729         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9730         Adjust to std::vector.
9731         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9732         (remote_static_tracepoint_markers_by_strid): Adjust to
9733         std::vector.
9734         * common/rsp-low.h (hex2str): New overload with explicit count
9735         of bytes.
9736         * common/rsp-low.c (hex2str): New overload with explicit count
9737         of bytes.
9738         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9739         (_initialize_rsp_low_selftests): Add test_hex2str test.
9740         * unittests/tracepoint-selftests.c
9741         (test_parse_static_tracepoint_marker_definition): Adjust to
9742         std::string.
9743
9744 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9745
9746         * tracepoint.c (parse_static_tracepoint_marker_definition):
9747         Consider case where the definition is followed by more
9748         definitions.
9749         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9750         tracepoint-selftests.c.
9751         * unittests/tracepoint-selftests.c: New.
9752
9753 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9754
9755         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9756         Carvalho.
9757
9758 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9759
9760         * symtab.c (find_pc_sect_line): fixed indentation.
9761
9762 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9763
9764         * symtab.c (find_pc_sect_line): now uses binary search.
9765
9766 2018-03-19  Tom Tromey  <tom@tromey.com>
9767
9768         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9769         "IDENT" production.
9770
9771 2018-03-19  Pedro Alves  <palves@redhat.com>
9772             Tom Tromey  <tom@tromey.com>
9773
9774         * unittests/observable-selftests.c: New file.
9775         * common/observable.h: New file.
9776         * observable.h: New file.
9777         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9778         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9779         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9780         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9781         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9782         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9783         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9784         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9785         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9786         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9787         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9788         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9789         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9790         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9791         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9792         tui/tui-interp.c, valops.c: Update all users.
9793         * tui/tui-hooks.c (tui_bp_created_observer)
9794         (tui_bp_deleted_observer, tui_bp_modified_observer)
9795         (tui_inferior_exit_observer, tui_before_prompt_observer)
9796         (tui_normal_stop_observer, tui_register_changed_observer):
9797         Remove.
9798         (tui_observers_token): New global.
9799         (attach_or_detach, tui_attach_detach_observers): New functions.
9800         (tui_install_hooks, tui_remove_hooks): Use
9801         tui_attach_detach_observers.
9802         * record-btrace.c (record_btrace_thread_observer): Remove.
9803         (record_btrace_thread_observer_token): New global.
9804         * observer.sh: Remove.
9805         * observer.c: Rename to observable.c.
9806         * observable.c (namespace gdb_observers): Define new objects.
9807         (observer_debug): Move into gdb_observers namespace.
9808         (struct observer, struct observer_list, xalloc_observer_list_node)
9809         (xfree_observer_list_node, generic_observer_attach)
9810         (generic_observer_detach, generic_observer_notify): Remove.
9811         (_initialize_observer): Update.
9812         Don't include observer.inc.
9813         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9814         (clean mostlyclean): Likewise.
9815         (observer.h, observer.inc): Remove targets.
9816         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9817         (COMMON_SFILES): Use observable.c, not observer.c.
9818         * .gitignore: Remove observer.h.
9819
9820 2018-03-18  Tom Tromey  <tom@tromey.com>
9821
9822         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9823         gdb::def_vector.
9824         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9825
9826 2018-03-17  Tom Tromey  <tom@tromey.com>
9827
9828         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9829
9830 2018-03-17  Tom Tromey  <tom@tromey.com>
9831
9832         * target.c (class scoped_target_fd): New.
9833         (target_fileio_close_cleanup): Remove.
9834         (target_fileio_read_alloc_1): Use scoped_target_fd.
9835
9836 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9837
9838         * silent-rules.mk: New.
9839         * Makefile.in: Include silent-rules.mk
9840         (srcdir, VPATH, top_srcdir): Move up.
9841         (COMPILE): Add ECHO_CXX.
9842         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9843         (init.c): Add ECHO_INIT_C.
9844         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9845         (version.c): Add ECHO_GEN.
9846         (printcmd.o): Add ECHO_CXX.
9847         (target-float.o): Add ECHO_CXX.
9848         (ada-exp.o): Add ECHO_CXX.
9849         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9850         (insight$(EXEEXT)): Add ECHO_CXXLD.
9851         * gnulib/configure.ac: Add AM_SILENT_RULES.
9852         * gnulib/aclocal.m4: Re-generate.
9853         * gnulib/configure: Re-generate.
9854         * gnulib/import/Makefile.in: Re-generate.
9855
9856 2018-03-16  Tom Tromey  <tom@tromey.com>
9857
9858         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9859         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9860         * utils.c (do_free_section_addr_info)
9861         (make_cleanup_free_section_addr_info): Remove.
9862         * symfile.h (struct other_sections): Add constructor.
9863         (struct section_addr_info): Remove.
9864         (section_addr_info): New typedef.
9865         (struct sym_fns) <sym_offsets>: Change type of parameter.
9866         (build_section_addr_info_from_objfile)
9867         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9868         (default_symfile_offsets, symbol_file_add)
9869         (symbol_file_add_from_bfd)
9870         (build_section_addr_info_from_section_table): Update.
9871         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9872         * symfile.c (alloc_section_addr_info): Remove.
9873         (build_section_addr_info_from_section_table): Change return type.
9874         Update.
9875         (build_section_addr_info_from_bfd)
9876         (build_section_addr_info_from_objfile): Likewise.
9877         (free_section_addr_info): Remove.
9878         (relative_addr_info_to_section_offsets): Change type of "addrs".
9879         (addrs_section_compar): Now a std::sort comparator.
9880         (addrs_section_sort): Change return type.
9881         (addr_info_make_relative): Change type of "addrs".  Update.
9882         (default_symfile_offsets, syms_from_objfile_1)
9883         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9884         (symbol_file_add_separate): Update.
9885         (symbol_file_add): Change type of "addrs".  Update.
9886         (add_symbol_file_command): Update.  Remove cleanups.
9887         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9888         cleanups.
9889         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9890         * solib.c (solib_read_symbols): Update.
9891         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9892         * machoread.c (macho_symfile_offsets): Update.
9893         * jit.c (jit_bfd_try_read_symtab): Update.
9894
9895 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9896
9897         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9898         unittests/utils-selftests.c.
9899         * unittests/utils-selftests.c: New file.
9900
9901 2018-03-14  Tom Tromey  <tom@tromey.com>
9902
9903         PR cli/14977:
9904         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9905         for NULL.
9906
9907 2018-03-14  Tom Tromey  <tom@tromey.com>
9908
9909         PR cli/19918:
9910         * printcmd.c (printf_pointer): Allow "-" in format.
9911
9912 2018-03-14  Tom Tromey  <tom@tromey.com>
9913
9914         * printcmd.c (_initialize_printcmd): Add usage to printf.
9915
9916 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9917
9918         * MAINTAINERS: Update my email address.
9919
9920 2018-03-13  Tom Tromey  <tom@tromey.com>
9921
9922         * machoread.c (macho_check_dsym): Change filenamep to a
9923         std::string*.
9924         (macho_symfile_read): Update.
9925         * symfile.c (load_command): Use std::string.
9926
9927 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9928
9929         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9930         to error message string.
9931         (riscv_register_name): Use xsnprintf instead of sprintf.
9932         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9933         internal_error.
9934         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9935         error.
9936         (riscv_push_dummy_call): Likewise.
9937
9938 2018-03-12  Tom Tromey  <tom@tromey.com>
9939
9940         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9941         Use gdb::byte_vector.
9942         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9943
9944 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9945
9946         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9947         parameter type to readable_regcache.
9948         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9949         the declaration.
9950
9951 2018-03-11  Tom Tromey  <tom@tromey.com>
9952
9953         * dwarf2read.c (struct nextfield): Add initializers.
9954         (struct nextfnfield): Remove.
9955         (struct fnfieldlist): Add initializers.  Remove "length" and
9956         "head", use std::vector.
9957         (struct decl_field_list): Remove.
9958         (struct field_info): Add initializers.
9959         <fields, baseclasses>: Now std::vector.
9960         <nbaseclasses, nfnfields, typedef_field_list_count,
9961         nested_types_list_count>: Remove.
9962         (dwarf2_add_field, dwarf2_add_type_defn)
9963         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9964         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9965         (process_structure_scope): Update.
9966
9967 2018-03-11  Tom Tromey  <tom@tromey.com>
9968
9969         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9970         for use by std::sort.
9971         (build_type_psymtabs_1): Use std::vector.
9972
9973 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9974
9975         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9976         and LIBMPFR in the printed configuration.
9977
9978 2018-03-08  Tom Tromey  <tom@tromey.com>
9979
9980         * source.c (get_filename_and_charpos): Use scoped_fd.
9981         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9982         (procfs_pidlist): Likewise.
9983         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9984         (iterate_over_mappings): Likewise.
9985
9986 2018-03-08  Tom Tromey  <tom@tromey.com>
9987
9988         * infcall.c (struct call_return_meta_info)
9989         <stack_temporaries_enabled>: Remove.
9990         (get_call_return_value, call_function_by_hand_dummy): Update.
9991         * thread.c (disable_thread_stack_temporaries): Remove.
9992         (enable_thread_stack_temporaries): Remove.
9993         (thread_stack_temporaries_enabled_p): Return bool.
9994         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9995         (get_last_thread_stack_temporary): Update.
9996         * eval.c (evaluate_subexp): Update.
9997         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9998         class, not a function.
9999         (value_ptr, value_vec): Remove typedefs.
10000         (class thread_info) <stack_temporaries_enabled>: Now bool.
10001         <stack_temporaries>: Now a std::vector.
10002         (thread_stack_temporaries_enabled_p)
10003         (value_in_thread_stack_temporaries): Return bool.
10004
10005 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10006
10007         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10008         (getpkt_or_notif_sane_1): Likewise.
10009
10010 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10011
10012         * build-id.c (build_id_to_debug_bfd): Use std::string.
10013
10014 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10015
10016         * build-id.c (find_separate_debug_file_by_buildid): Return
10017         std::string.
10018         * build-id.h (find_separate_debug_file_by_buildid): Return
10019         std::string.
10020         * coffread.c (coff_symfile_read): Adjust to std::string.
10021         * elfread.c (elf_symfile_read): Adjust to std::string.
10022         * symfile.c (separate_debug_file_exists): Change parameter to
10023         std::string.
10024         (find_separate_debug_file): Return std::string.
10025         (find_separate_debug_file_by_debuglink): Return std::string.
10026         * symfile.h (find_separate_debug_file_by_debuglink): Return
10027         std::string.
10028
10029 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10030
10031         * common/xml-utils.c (xml_escape_text): Move code to...
10032         (xml_escape_text_append): ... this new function.
10033         * common/xml-utils.h (xml_escape_text_append): New declaration.
10034         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10035         New function.
10036         (_initialize_xml_utils): register test_xml_escape_text_append as
10037         a selftest.
10038
10039 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10040
10041         * defs.h: Remove MAX_REGISTER_SIZE.
10042         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10043         asserts.
10044         * python/py-unwind.c (pyuw_sniffer): Likewise.
10045
10046 2018-03-07  Tom Tromey  <tom@tromey.com>
10047
10048         * linux-tdep.c (linux_info_proc): Update.
10049         * target.h (struct target_ops) <to_fileio_readlink>: Return
10050         optional<string>.
10051         (target_fileio_readlink): Return optional<string>.
10052         * remote.c (remote_hostio_readlink): Return optional<string>.
10053         * inf-child.c (inf_child_fileio_readlink): Return
10054         optional<string>.
10055         * target.c (target_fileio_readlink): Return optional<string>.
10056
10057 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10058
10059         * regcache.c (cooked_read_test): Add riscv to the list of
10060         architectures that have a save_reggroup.
10061
10062 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10063
10064         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10065         value is not a dynamic class object.
10066
10067 2018-03-06  Tom Tromey  <tom@tromey.com>
10068
10069         * rust-exp.y: Formatting fixes.
10070
10071 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10072
10073         * riscv-tdep.c (riscv_register_name): Remove target description
10074         support.
10075         (riscv_gdbarch_init): Remove target description check.
10076
10077 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10078
10079         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10080         comment.
10081         * riscv-tdep.h: Likewise.
10082
10083 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10084
10085         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10086         (riscv_pseudo_register_write): Delete.
10087         (riscv_gdbarch_init): Remove all use of pseudo registers.
10088
10089 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10090
10091         * record-btrace.c (btrace_print_lines): Replace cleanup
10092         parameter with RAII equivalents.
10093         (btrace_insn_history): Replace cleanup with RAII equivalents.
10094         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10095         make_cleanup_ui_out_tuple_begin_end): Remove.
10096         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10097         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10098         make_cleanup_ui_out_list_begin_end): Remove.
10099
10100 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10101
10102         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10103         parameter types to std::vector.  Use bool.
10104         (record_btrace_wait): Replace VEC(tp_t) with
10105         std::vector<thread_info *>.
10106         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10107
10108 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10109
10110         * record-btrace.c (record_btrace_disable_callback): Remove.
10111         (struct scoped_btrace_disable): New.
10112         (record_btrace_open): Use scoped_btrace_disable.
10113
10114 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10115
10116         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10117         reading values from registers.
10118
10119 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10120
10121         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10122         where appropriate.
10123
10124 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10125
10126         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10127         change parameter type.  Use GDB's print functions, and use
10128         core_addr_to_string where appropriate.
10129         (riscv_push_dummy_call): Use core_addr_to_string where
10130         appropriate, update call to riscv_print_arg_location, and reindent
10131         a few lines.
10132         (riscv_return_value): Update call to riscv_print_arg_location.
10133
10134 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10135             Tim Newsome <tim@sifive.com>
10136             Albert Ou <a0u@eecs.berkeley.edu>
10137             Darius Rad <darius@bluespec.com>
10138
10139         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10140         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10141         (ALLDEPFILES): Add riscv-tdep.c
10142         * configure.tgt: Add riscv support.
10143         * riscv-tdep.c: New file.
10144         * riscv-tdep.h: New file.
10145         * NEWS: Mention new target.
10146         * MAINTAINERS: Add entry for riscv.
10147
10148 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10149
10150         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10151         fields within aggregates.
10152
10153 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10154
10155         * record-btrace.c (btrace_print_lines): Change type of flags to
10156         gdb_disassembly_flags.
10157
10158 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10159
10160         * fbsd-nat.c: Include "inf-ptrace.h".
10161         (USE_SIGTRAP_SIGINFO): Conditionally define.
10162         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10163         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10164         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10165         function.
10166         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10167         Likewise.
10168         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10169         Likewise.
10170         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10171         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10172         "supports_stopped_by_hw_breakpoint" target methods.
10173
10174 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10175
10176         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10177         * fbsd-nat.c (debug_fbsd_nat): New variable.
10178         (show_fbsd_nat_debug): New function.
10179         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10180         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10181
10182 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10183
10184         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10185         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10186         prototype.
10187         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10188         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10189         method.
10190
10191 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10192
10193         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10194         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10195
10196 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10197
10198         * charset.c (struct charset_vector): New.
10199         (charsets): Change type to charset_vector.
10200         (find_charset_names): Adjust.
10201         (add_one): Adjust.
10202         (_initialize_charset): Adjust.
10203
10204 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10205
10206         * progspace.h (struct program_space) <deleted_solibs>: Change
10207         type to std::vector<std::string>.
10208         * progspace.c (clear_program_space_solib_cache): Adjust.
10209         * breakpoint.c (print_solib_event): Adjust.
10210         (check_status_catch_solib): Adjust.
10211         * solib.c (update_solib_list): Adjust.
10212         * ui-out.h (class ui_out) <field_string>: New overload.
10213         * ui-out.c (ui_out::field_string): New overload.
10214
10215 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10216
10217         * progspace.h (struct program_space): Add constructor and
10218         destructor, initialize fields.
10219         (add_program_space): Remove.
10220         * progspace.c (add_program_space): Rename to...
10221         (program_space::program_space): ... this.
10222         (release_program_space): Rename to...
10223         (program_space::~program_space): ... this.
10224         (delete_program_space): Use delete to delete program_space.
10225         (initialize_progspace): Use new to allocate program_space.
10226         * inferior.c (add_inferior_with_spaces): Likewise.
10227         (clone_inferior_command): Likewise.
10228         * infrun.c (follow_fork_inferior): Likewise.
10229         (handle_vfork_child_exec_or_exit): Likewise.
10230
10231 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10232
10233         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10234         (delim_string_to_char_ptr_vec): Return std::vector of
10235         gdb::unique_xmalloc_ptr.
10236         (dirnames_to_char_ptr_vec_append): Take std::vector of
10237         gdb::unique_xmalloc_ptr.
10238         (dirnames_to_char_ptr_vec): Return std::vector of
10239         gdb::unique_xmalloc_ptr.
10240         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10241         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10242         (delim_string_to_char_ptr_vec): Return an std::vector of
10243         gdb::unique_xmalloc_ptr, adjust the code.
10244         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10245         gdb::unique_xmalloc_ptr, adjust the code.
10246         (dirnames_to_char_ptr_vec): Return an std::vector of
10247         gdb::unique_xmalloc_ptr, adjust the code.
10248         * auto-load.c (auto_load_safe_path_vec): Change type to
10249         std::vector of gdb::unique_xmalloc_ptr.
10250         (auto_load_expand_dir_vars): Return an std::vector of
10251         gdb::unique_xmalloc_ptr, adjust the code.
10252         (auto_load_safe_path_vec_update): Adjust.
10253         (filename_is_in_auto_load_safe_path_vec): Adjust.
10254         (auto_load_objfile_script_1): Adjust.
10255         * build-id.c (build_id_to_debug_bfd): Adjust.
10256         * linux-thread-db.c (thread_db_load_search): Adjust.
10257         * source.c (add_path): Adjust.
10258         (openp): Adjust.
10259         * symfile.c (find_separate_debug_file): Adjust.
10260         * utils.c (do_free_char_ptr_vec): Remove.
10261         (make_cleanup_free_char_ptr_vec): Remove.
10262
10263 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10264
10265         PR gdb/22907
10266         * common/pathstuff.c: Conditionally include "<windows.h>".
10267
10268 2018-03-01  Georg Sauthoff  <mail@georg.so>
10269
10270         PR gdb/22888
10271         * gcore.in: Quote variables and switch interpreter to bash.
10272
10273 2018-03-01  Tom Tromey  <tom@tromey.com>
10274
10275         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10276         assertion.  Add assertion for discriminant_index.
10277         (quirk_rust_enum): Use correct base type name in univariant case.
10278
10279 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10280
10281         * record.c (get_call_history_modifiers): Return a
10282         record_print_flags.
10283         (cmd_record_call_history): Adjust.
10284         * record-btrace.c (record_btrace_call_history): Adjust.
10285         (record_btrace_call_history_range): Adjust.
10286         (record_btrace_call_history_from): Adjust.
10287         * target-debug.h (target_debug_print_record_print_flags): New.
10288         * target-delegates.c: Re-generate.
10289         * target.c (target_call_history): Change flags type.
10290         (target_call_history_from): Likewise.
10291         (target_call_history_range): Likewise.
10292         * target.h (struct target_ops) <target_call_history>: Likewise.
10293         (target_call_history_from): Likewise.
10294         (target_call_history_range): Likewise.
10295
10296 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10297             Simon Marchi  <simon.marchi@polymtl.ca>
10298
10299         * common/common-utils.c: Include "sys/stat.h".
10300         (is_regular_file): Move here from "source.c"; change return
10301         type to "bool".
10302         * common/common-utils.h (is_regular_file): New prototype.
10303         * common/pathstuff.c (contains_dir_separator): New function.
10304         * common/pathstuff.h (contains_dir_separator): New prototype.
10305         * source.c: Don't include "sys/stat.h".
10306         (is_regular_file): Move to "common/common-utils.c".
10307
10308 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10309
10310         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10311         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10312         * auto-load.c: Include "common/pathstuff.h".
10313         * common/common-def.h (current_directory): Move here.
10314         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10315         function.
10316         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10317         prototype.
10318         * common/pathstuff.c: New file.
10319         * common/pathstuff.h: New file.
10320         * compile/compile.c: Include "common/pathstuff.h".
10321         * defs.h (current_directory): Move to "common/common-defs.h".
10322         * dwarf2read.c: Include "common/pathstuff.h".
10323         * exec.c: Likewise.
10324         * guile/scm-safe-call.c: Likewise.
10325         * linux-thread-db.c: Likewise.
10326         * main.c: Likewise.
10327         * nto-tdep.c: Likewise.
10328         * objfiles.c: Likewise.
10329         * source.c: Likewise.
10330         * symtab.c: Likewise.
10331         * utils.c: Include "common/pathstuff.h".
10332         (gdb_realpath): Move to "common/pathstuff.c".
10333         (gdb_realpath_keepfile): Likewise.
10334         (gdb_abspath): Likewise.
10335         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10336         (gdb_realpath_keepfile): Likewise.
10337         (gdb_abspath): Likewise.
10338
10339 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10340
10341         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10342         wildcard process pid for super_resume for kernels with a
10343         specific bug.
10344
10345 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10346
10347         * compile/compile.c (get_args): Add additional comments
10348         explaining function.
10349
10350 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10351             Tom Tromey  <tom@tromey.com>
10352
10353         * target.h (memory_write_request_s): Remove typedef.  Don't define
10354         VEC.
10355         (target_write_memory_blocks): Change argument to std::vector.
10356         (struct memory_write_request): Add constructor.
10357         * target-memory.c (compare_block_starting_address): Return bool.
10358         Change argument types.
10359         (claim_memory): Change arguments to use std::vector.
10360         (split_regular_and_flash_blocks, blocks_to_erase)
10361         (compute_garbled_blocks): Likewise.
10362         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10363         (target_write_memory_blocks): Change argument to std::vector.
10364         * symfile.c (struct load_section_data): Add constructor and
10365         destructor.  Use std::vector for "requests".
10366         (struct load_progress_data): Add initializers.
10367         (load_section_callback): Update.  Use "new".
10368         (clear_memory_write_data): Remove.
10369         (generic_load): Update.
10370
10371 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10372
10373         * arch/aarch64.h: Use common/tdesc.h.
10374
10375 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10376
10377         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10378         architecture with a 64-bit ABI.
10379
10380 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10381
10382         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10383         ahead of target description loading.
10384
10385 2018-02-26  Tom Tromey  <tom@tromey.com>
10386
10387         * stack.c (backtrace_command_1): Update.
10388         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10389         of "flags".
10390         * python/py-framefilter.c (py_print_frame)
10391         (gdbpy_apply_frame_filter): Change type of "flags".
10392         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10393         of "flags".
10394         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10395         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10396         * extension.h (enum frame_filter_flag): Rename from
10397         frame_filter_flags.
10398         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10399         (apply_ext_lang_frame_filter): Change type of "flags".
10400         * extension.c (apply_ext_lang_frame_filter): Change type of
10401         "flags".
10402         * extension-priv.h (struct extension_language_ops)
10403         <apply_frame_filter>: Change type of "flags".
10404
10405 2018-02-26  Tom Tromey  <tom@tromey.com>
10406
10407         PR python/16497:
10408         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10409         off-by-one in py_end computation.
10410         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10411         PRINT_MORE_FRAMES.
10412         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10413         constant.
10414
10415 2018-02-26  Tom Tromey  <tom@tromey.com>
10416
10417         * dwarf2read.c (struct variant_field): New.
10418         (struct nextfield) <variant>: New field.
10419         (dwarf2_add_field): Handle DW_TAG_variant_part.
10420         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10421         discriminated union.
10422         (read_structure_type): Handle DW_TAG_variant_part.
10423         (handle_struct_member_die): New function, extracted from
10424         process_structure_scope.  Handle DW_TAG_variant.
10425         (process_structure_scope): Handle discriminated unions.  Call
10426         handle_struct_member_die.
10427
10428 2018-02-26  Tom Tromey  <tom@tromey.com>
10429
10430         * rust-lang.h (rust_last_path_segment): Declare.
10431         * rust-lang.c (rust_last_path_segment): Now public.  Change
10432         contract.
10433         (struct disr_info): Remove.
10434         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10435         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10436         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10437         (rust_enum_p, rust_enum_variant): New function.
10438         (rust_underscore_fields): Remove "offset" parameter.
10439         (rust_print_enum): New function.
10440         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10441         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10442         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10443         enums.
10444         (rust_internal_print_type): New function, from rust_print_type.
10445         Remove enum code.
10446         (rust_print_type): Call rust_internal_print_type.
10447         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10448         Update enum handling.
10449         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10450         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10451         (rust_union_quirks): New functions.
10452         (process_full_comp_unit, process_full_type_unit): Call
10453         rust_union_quirks.
10454         (process_structure_scope): Update rust_unions if necessary.
10455
10456 2018-02-26  Tom Tromey  <tom@tromey.com>
10457
10458         * value.h (value_union_variant): Declare.
10459         * valops.c (value_union_variant): New function.
10460         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10461         (struct discriminant_info): New.
10462         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10463         enumerator.
10464         (struct main_type) <flag_discriminated_union>: New field.
10465
10466 2018-02-26  Tom Tromey  <tom@tromey.com>
10467
10468         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10469         unittests/unpack-selftests.c.
10470         * unittests/unpack-selftests.c: New file.
10471         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10472
10473 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10474
10475         * dwarf2read.c (struct partial_die_info) <read>: New method.
10476         (read_partial_die): Remove the declaration.
10477         (load_partial_dies): Update.
10478         (partial_die_info::partial_die_info):
10479         (read_partial_die): Change it to partial_die_info::read.
10480
10481 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10482
10483         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10484         (fixup_partial_die): Remove declaration.
10485         (scan_partial_symbols): Update.
10486         (partial_die_parent_scope): Likewise.
10487         (partial_die_full_name): Likewise.
10488         (fixup_partial_die): Change it to partial_die_info::fixup.
10489
10490 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10491
10492         * dwarf2read.c (read_partial_die): Update the declaration.
10493         (load_partial_dies): Caller update.
10494         (read_partial_die): Remove one argument abbrev_len.
10495
10496 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10497
10498         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10499         assignment operator.
10500         (load_partial_dies): Use ctor and copy ctor.
10501         (read_partial_die): Update.
10502         (dwarf2_cu::find_partial_die): Use ctor.
10503
10504 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10505
10506         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10507         (find_partial_die_in_comp_unit): Change it to
10508         dwarf2_cu::find_partial_die.
10509         (find_partial_die): Update.
10510
10511 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10512
10513         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10514         is NULL.
10515
10516 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10517
10518         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10519
10520 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10521
10522         * arch/amd64.h: Use common/tdesc.h.
10523         * arch/i386.c: Likewise.
10524         * arch/i386.h: Likewise.
10525         * arch/tic6x.c: Likewise.
10526         * arch/tdesc.h: Move file from here...
10527         * common/tdesc.h: ...to here.
10528         * features/aarch64-core.c: Regenerate.
10529         * features/aarch64-fpu.c: Regenerate.
10530         * features/i386/32bit-avx.c: Regenerate.
10531         * features/i386/32bit-avx512.c: Regenerate.
10532         * features/i386/32bit-core.c: Regenerate.
10533         * features/i386/32bit-linux.c: Regenerate.
10534         * features/i386/32bit-mpx.c: Regenerate.
10535         * features/i386/32bit-pkeys.c: Regenerate.
10536         * features/i386/32bit-sse.c: Regenerate.
10537         * features/i386/64bit-avx.c: Regenerate.
10538         * features/i386/64bit-avx512.c: Regenerate.
10539         * features/i386/64bit-core.c: Regenerate.
10540         * features/i386/64bit-linux.c: Regenerate.
10541         * features/i386/64bit-mpx.c: Regenerate.
10542         * features/i386/64bit-pkeys.c: Regenerate.
10543         * features/i386/64bit-segments.c: Regenerate.
10544         * features/i386/64bit-sse.c: Regenerate.
10545         * features/i386/x32-core.c: Regenerate.
10546         * features/tic6x-c6xp.c: Regenerate.
10547         * features/tic6x-core.c: Regenerate.
10548         * features/tic6x-gp.c: Regenerate.
10549         * target-descriptions.c: Use common/tdesc.h.
10550         * target-descriptions.h: Likewise.
10551
10552 2018-02-24  Tom Tromey  <tom@tromey.com>
10553
10554         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10555         (try_thread_db_load_from_dir, thread_db_load_search): Use
10556         std::string.
10557         (info_auto_load_libthread_db_compare): Return bool.  Change
10558         argument types.
10559         (info_auto_load_libthread_db): Use std::vector, std::string.
10560         Remove cleanups.
10561
10562 2018-02-24  Tom Tromey  <tom@tromey.com>
10563
10564         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10565         std::string.
10566         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10567         std::string*.
10568         * gdbarch.c: Rebuild.
10569         * gdbarch.h: Rebuild.
10570         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10571         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10572         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10573         std::string*.
10574
10575 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10576
10577         * gdbtypes.h (sect_offset): Change type to uint64_t.
10578         (sect_offset_str): New function.
10579         * dwarf2read.c (create_addrmap_from_aranges): Use
10580         sect_offset_str.
10581         (error_check_comp_unit_head): Likewise.
10582         (create_debug_type_hash_table): Likewise.
10583         (read_cutu_die_from_dwo): Likewise.
10584         (init_cutu_and_read_dies): Likewise.
10585         (init_cutu_and_read_dies_no_follow): Likewise.
10586         (process_psymtab_comp_unit_reader): Likewise.
10587         (partial_die_parent_scope): Likewise.
10588         (peek_die_abbrev): Likewise.
10589         (process_queue): Likewise.
10590         (dwarf2_physname): Likewise.
10591         (read_namespace_alias): Likewise.
10592         (read_import_statement): Likewise.
10593         (create_dwo_cu_reader): Likewise.
10594         (create_cus_hash_table): Likewise.
10595         (lookup_dwo_cutu): Likewise.
10596         (inherit_abstract_dies): Likewise.
10597         (read_func_scope): Likewise.
10598         (read_call_site_scope): Likewise.
10599         (dwarf2_add_member_fn): Likewise.
10600         (read_common_block): Likewise.
10601         (read_module_type): Likewise.
10602         (read_typedef): Likewise.
10603         (read_subrange_type): Likewise.
10604         (load_partial_dies): Likewise.
10605         (read_partial_die): Likewise.
10606         (find_partial_die): Likewise.
10607         (read_str_index): Likewise.
10608         (dwarf2_string_attr): Likewise.
10609         (build_error_marker_type): Likewise.
10610         (lookup_die_type): Likewise.
10611         (dump_die_shallow): Likewise.
10612         (follow_die_ref): Likewise.
10613         (dwarf2_fetch_die_loc_sect_off): Likewise.
10614         (dwarf2_fetch_constant_bytes): Likewise.
10615         (follow_die_sig): Likewise.
10616         (get_signatured_type): Likewise.
10617         (get_DW_AT_signature_type): Likewise.
10618         (dwarf2_find_containing_comp_unit): Likewise.
10619         (set_die_type): Likewise.
10620
10621 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10622
10623         * arch/aarch64.c: Include "common-defs.h".
10624         * arch/amd64.c: Likewise.
10625         * arch/i386.c: Likewise.
10626
10627 2018-02-21  Tom Tromey  <tom@tromey.com>
10628
10629         * value.h: (extract_field_op): Update.
10630         * eval.c (extract_field_op): Return a const char *.
10631         * expression.h (parse_expression_for_completion): Update.
10632         * completer.c (complete_expression): Update.
10633         (add_struct_fields): Make fieldname const.
10634         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10635         (mark_completion_tag, parse_exp_in_context_1): Update.
10636         (parse_expression_for_completion): Change "name" to
10637         unique_xmalloc_ptr*.
10638
10639 2018-02-21  Tom Tromey  <tom@tromey.com>
10640
10641         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10642
10643 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10644
10645         * avr-tdep.c (avr_read_pc): Change parameter type to
10646         readable_regcache.
10647         * gdbarch.sh (read_pc): Likewise.
10648         * gdbarch.c: Re-generated.
10649         * gdbarch.h: Re-generated.
10650         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10651         readable_regcache.
10652         * ia64-tdep.c (ia64_read_pc): Likewise.
10653         * mips-tdep.c (mips_read_pc): Likewise.
10654         * spu-tdep.c (spu_read_pc): Likewise.
10655
10656 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10657
10658         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10659         * regcache-dump.c: New file.
10660         * regcache.c: Move register_dump to regcache-dump.c.
10661         (maintenance_print_registers): Likewise.
10662         (maintenance_print_raw_registers): Likewise.
10663         (maintenance_print_cooked_registers): Likewise.
10664         (maintenance_print_register_groups): Likewise.
10665         (maintenance_print_remote_registers): Likewise.
10666         (_initialize_regcache): Likewise.
10667         * regcache.h (register_dump): Moved from regcache.c.
10668
10669 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10670
10671         * regcache.c (regcache::regcache): Update.
10672         (regcache::invalidate): Move it to detached_regcache::invalidate.
10673         (get_thread_arch_aspace_regcache): Update.
10674         (regcache::raw_update): Update.
10675         (regcache::cooked_read): Remove some code.
10676         (regcache::cooked_read_value): Likewise.
10677         (regcache::raw_write): Remove assert on m_readonly_p.
10678         (regcache::raw_supply_integer): Move it to
10679         detached_regcache::raw_supply_integer.
10680         (regcache::raw_supply_zeroed): Likewise.
10681         * regcache.h (detached_regcache) <raw_supply_integer>: New
10682         declaration.
10683         <raw_supply_zeroed, invalidate>: Likewise.
10684         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10685         <invalidate>: Likewise.
10686         <m_readonly_p>: Removed.
10687
10688 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10689
10690         * infcmd.c (get_return_value): Let stop_regs point to
10691         get_current_regcache.
10692         * regcache.c (regcache::regcache): Remove.
10693         (register_dump_reg_buffer): New class.
10694         (regcache_print): Adjust.
10695         * regcache.h (regcache): Remove constructors.
10696
10697 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10698
10699         * regcache.c (class register_dump): New class.
10700         (register_dump_regcache, register_dump_none): New class.
10701         (register_dump_remote, register_dump_groups): New class.
10702         (regcache_print): Update.
10703         * regcache.h (regcache_dump_what): Move it to regcache.c.
10704         (regcache) <dump>: Remove.
10705
10706 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10707
10708         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10709          reg_buffer_rw *.
10710         (jit_unwind_reg_set_impl): Call raw_supply.
10711         (jit_frame_sniffer): Use reg_buffer_rw.
10712         * record-full.c (record_full_core_regbuf): Change its type.
10713         (record_full_core_open_1): Use reg_buffer_rw.
10714         (record_full_close): Likewise.
10715         (record_full_core_fetch_registers): Use regcache->raw_supply.
10716         (record_full_core_store_registers): Likewise.
10717         * regcache.c (regcache::get_register_status): Move it to
10718         reg_buffer.
10719         (regcache_raw_set_cached_value): Remove.
10720         (regcache::raw_set_cached_value): Remove.
10721         (regcache::raw_write): Call raw_supply.
10722         (regcache::raw_supply): Move it to reg_buffer_rw.
10723         * regcache.h (regcache_raw_set_cached_value): Remove.
10724         (reg_buffer_rw): New class.
10725
10726 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10727
10728         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10729         readonly_detached_regcache.
10730         (dummy_frame_prev_register): Use regcache->cooked_read.
10731         * frame.c (frame_save_as_regcache): Change return type.
10732         (frame_pop): Update.
10733         * frame.h (frame_save_as_regcache): Update declaration.
10734         * inferior.h (get_infcall_suspend_state_regcache): Update
10735         declaration.
10736         * infrun.c (infcall_suspend_state) <registers>: use
10737         readonly_detached_regcache.
10738         (save_infcall_suspend_state): Don't use regcache_dup.
10739         (get_infcall_suspend_state_regcache): Change return type.
10740         * linux-fork.c (struct fork_info) <savedregs>: Change to
10741         readonly_detached_regcache.
10742         <pc>: New field.
10743         (fork_save_infrun_state): Don't use regcache_dup.
10744         (info_checkpoints_command): Adjust.
10745         * mi/mi-main.c (register_changed_p): Update declaration.
10746         (mi_cmd_data_list_changed_registers): Use
10747         readonly_detached_regcache.
10748         (register_changed_p): Change parameter type to
10749         readonly_detached_regcache.
10750         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10751         readonly_detached_regcache.
10752         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10753         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10754         New.
10755         (regcache::save): Move it to reg_buffer.
10756         (regcache::restore): Change parameter type.
10757         (regcache_dup): Remove.
10758         * regcache.h (reg_buffer) <save>: New method.
10759         (readonly_detached_regcache): New class.
10760         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10761         readonly_detached_regcache.
10762         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10763
10764 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10765
10766         * frame.c (frame_save_as_regcache): Use regcache method save.
10767         (frame_pop): Use regcache method restore.
10768         * infrun.c (restore_infcall_suspend_state): Likewise.
10769         * linux-fork.c (fork_load_infrun_state): Likewise.
10770         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10771         save.
10772         * regcache.c (regcache_save): Remove.
10773         (regcache::restore): More asserts.
10774         (regcache_cpy): Remove.
10775         * regcache.h (regcache_save): Remove the declaration.
10776         (regcache::restore): Move from private to public.
10777         Remove the friend declaration of regcache_cpy.
10778         (regcache_cpy): Remove declaration.
10779
10780 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10781
10782         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10783         parameter type to 'readable_regcache *'.
10784         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10785         * arm-tdep.c (arm_neon_quad_read): Likewise.
10786         (arm_pseudo_read): Likewise.
10787         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10788         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10789         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10790         * gdbarch.c: Re-generated.
10791         * gdbarch.h: Re-generated.
10792         * gdbarch.sh (pseudo_register_read): Change parameter type to
10793         'readable_regcache *'.
10794         (pseudo_register_read_value): Likewise.
10795         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10796         (h8300_pseudo_register_read): Likewise.
10797         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10798         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10799         (i386_pseudo_register_read_into_value): Likewise.
10800         (i386_pseudo_register_read_value): Likewise.
10801         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10802         declaration.
10803         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10804         * m32c-tdep.c (m32c_raw_read): Likewise.
10805         (m32c_read_flg): Likewise.
10806         (m32c_banked_register): Likewise.
10807         (m32c_banked_read): Likewise.
10808         (m32c_sb_read): Likewise.
10809         (m32c_part_read): Likewise.
10810         (m32c_cat_read): Likewise.
10811         (m32c_r3r2r1r0_read): Likewise.
10812         (m32c_pseudo_register_read): Likewise.
10813         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10814         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10815         (mep_pseudo_cr64_read): Likewise.
10816         (mep_pseudo_register_read): Likewise.
10817         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10818         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10819         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10820         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10821         (regcache::cooked_read): Likewise.
10822         (regcache::cooked_read_value): Likewise.
10823         (regcache_cooked_read_signed):
10824         (regcache::cooked_read): Likewise.
10825         * regcache.h (readable_regcache): New class.
10826         (regcache): Inherit readable_regcache.  Move some methods to
10827         readable_regcache.
10828         * rl78-tdep.c (rl78_pseudo_register_read): Change
10829         parameter type to 'readable_regcache *'.
10830         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10831         (e500_pseudo_register_read): Change parameter type to
10832         'readable_regcache *'.
10833         (dfp_pseudo_register_read): Likewise.
10834         (vsx_pseudo_register_read): Likewise.
10835         (efpr_pseudo_register_read): Likewise.
10836         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10837         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10838         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10839         (sh64_pseudo_register_read): Likewise.
10840         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10841         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10842         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10843         (spu_pseudo_register_read): Likewise.
10844         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10845         (xtensa_pseudo_register_read): Likewise.
10846
10847 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10848
10849         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10850         (regcache::arch): Move it to reg_buffer::arch.
10851         (regcache::register_buffer): Likewise.
10852         (regcache::assert_regnum): Likewise.
10853         (regcache::num_raw_registers): Likewise.
10854         * regcache.h (reg_buffer): New class.
10855         (regcache): Inherit reg_buffer.
10856
10857 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10858
10859         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10860         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10861
10862 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10863
10864         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10865
10866 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10867
10868         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10869         (SFILES): Remove common/*.c files.
10870         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10871         * common/common.host: Add common reference.
10872         * configure.ac: Likewise.
10873         * configure: Regenerate.
10874
10875 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10876
10877         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10878         (block_initialize_namespace): Use new.
10879         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10880         (dwarf2_free_objfile): Use delete.
10881         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10882         (copy_type_recursive): Use new.
10883         * gdb_obstack.h (allocate_on_obstack): New.
10884
10885 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10886
10887         PR gdb/22849
10888         * inferior.c (exit_inferior_1): Reset inf->control.
10889
10890 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10891
10892         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10893         declaration.
10894
10895 2018-02-14  Pedro Alves  <palves@redhat.com>
10896
10897         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10898         frame_cleanup_after_sniffer on exception.
10899
10900 2018-02-14  Tom Tromey  <tom@tromey.com>
10901
10902         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10903         const.
10904         (solib_bfd_open): Make pathname const.
10905         * solib.c (solib_bfd_open): Make pathname const.
10906         * solib-spu.c (spu_bfd_fopen): Make name const.
10907         (spu_bfd_open): Make pathname const.
10908         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10909         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10910
10911 2018-02-14  Tom Tromey  <tom@tromey.com>
10912
10913         * symfile.c (symfile_bfd_open): Update.
10914         * source.h (openp, source_full_path_of, find_and_open_source):
10915         Change argument type to unique_xmalloc_ptr.
10916         * source.c (openp): Take a unique_xmalloc_ptr.
10917         (source_full_path_of, find_and_open_source): Likewise.
10918         (open_source_file, symtab_to_fullname): Update.
10919         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10920         unique_xmalloc_ptr.
10921         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10922         (exec_file_find): Update.
10923         * psymtab.c (psymtab_to_fullname): Update.
10924         * nto-tdep.h (nto_find_and_open_solib): Update.
10925         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10926         unique_xmalloc_ptr.
10927         * exec.c (exec_file_attach): Update.
10928         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10929         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10930
10931 2018-02-14  Tom Tromey  <tom@tromey.com>
10932
10933         * solib.c: Include source.h.
10934         * nto-tdep.c: Include source.h.
10935         * mi/mi-cmd-env.c: Include source.h.
10936         * infcmd.c: Include source.h.
10937         * exec.c: Include source.h.
10938         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10939         (add_path, directory_switch, source_path, init_source_path): Move
10940         declarations...
10941         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10942         (add_path, directory_switch, source_path, init_source_path):
10943         ...here.
10944
10945 2018-02-14  Tom Tromey  <tom@tromey.com>
10946
10947         * solist.h (exec_file_find, solib_find): Return
10948         unique_xmalloc_ptr.
10949         (solib_bfd_fopen): Take a const char *.
10950         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10951         (exec_file_find, solib_find): Likewise.
10952         (solib_bfd_fopen): Do not take ownership of "pathname".
10953         (solib_bfd_open): Use unique_xmalloc_ptr.
10954         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10955         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10956         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10957         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10958
10959 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10960
10961         * ada-lang.c (name_match_type_from_name): Remove reference to
10962         ada_name_for_lookup in function's documentation.
10963         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10964
10965 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10966
10967         * defs.h (enum openp_flags): New enum.
10968         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10969         Move to enum openp_flags.
10970         (openp_flags): New enum flags.
10971         (openp): Change parameter type to openp_flags.
10972         * source.c (openp): Change parameter type to openp_flags.
10973         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10974         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10975
10976 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10977
10978         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10979         per-command.
10980
10981 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10982
10983         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10984         into...
10985         (class dwarf2_queue_guard): ...the destructor of this new class.
10986         (dw2_do_instantiate_symtab): Create instance of the new class
10987         dwarf2_queue_guard, remove cleanup.
10988
10989 2018-02-09  Tom Tromey  <tom@tromey.com>
10990
10991         * source.c (find_source_lines): Don't reference past the end of
10992         the vector.
10993
10994 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10995
10996         * remote.c (remote_btrace_maybe_reopen): Change error message.
10997         * btrace.c (btrace_enable): Likewise.
10998         (parse_xml_btrace): Likewise.
10999         (parse_xml_btrace_conf): Likewise.
11000
11001 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11002
11003         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11004         (linux_enable_pt, linux_enable_bts): Call
11005         diagnose_perf_event_open_fail.
11006
11007 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11008
11009         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11010         Remove parameter and change return type.  Update callers.  Move it.
11011         (linux_enable_bts, linux_enable_pt): Improve error message.
11012         (linux_enable_pt): Remove zero buffer size check.
11013         (linux_enable_btrace): Improve error messages.  Remove NULL return
11014         check.
11015
11016 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11017
11018         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11019         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11020         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11021         (linux_supports_pt, linux_supports_btrace): Remove.
11022         (linux_enable_bts): Call cpu_supports_bts.
11023         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11024         * remote.c (remote_supports_btrace): Remove.
11025         (init_remote_ops): Remove remote_supports_btrace.
11026         * target-delegates.c: Regenerated.
11027         * target.c (target_supports_btrace): Remove.
11028         * target.h (target_ops) <to_supports_btrace>: Remove
11029         (target_supports_btrace): Remove.
11030         * x86-linux-nat.c (x86_linux_create_target): Remove
11031         linux_supports_btrace.
11032
11033 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11034
11035         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11036         btrace failed.
11037         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11038         exception and use message in own exception.
11039
11040 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11041
11042         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11043         (perf_event_pt_event_type): Use gdb_file_up.
11044         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11045         scoped_fd, and scoped_mmap.
11046
11047 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11048
11049         * common/scoped_mmap.h: New.
11050         * unittests/scoped_mmap-selftest.c: New.
11051         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11052         unittests/scoped_mmap-selftest.c.
11053
11054 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11055
11056         * common/scoped_fd.h: New.
11057         * unittests/scoped_fd-selftest.c: New.
11058         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11059         unittests/scoped_fd-selftest.c.
11060
11061 2018-02-09  Tom Tromey  <tom@tromey.com>
11062
11063         * auto-load.c (auto_load_section_scripts): Use
11064         gdb::unique_xmalloc_ptr.
11065
11066 2018-02-09  Tom Tromey  <tom@tromey.com>
11067
11068         * auto-load.c (execute_script_contents): Use std::string.
11069
11070 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11071
11072         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11073         Python function, rather than a new command.
11074
11075 2018-02-08  Tom Tromey  <tom@tromey.com>
11076
11077         * solib.c (solib_find_1): Use std::string.
11078         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11079
11080 2018-02-08  Tom Tromey  <tom@tromey.com>
11081
11082         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11083
11084 2018-02-08  Tom Tromey  <tom@tromey.com>
11085
11086         * source.c (find_source_lines): Use gdb::def_vector.
11087
11088 2018-02-08  Tom Tromey  <tom@tromey.com>
11089
11090         * macrocmd.c (struct temporary_macro_definition): New.
11091         (macro_define_command): Use temporary_macro_definition.  Remove
11092         cleanups.
11093         (free_macro_definition_ptr): Remove.
11094
11095 2018-02-08  Tom Tromey  <tom@tromey.com>
11096
11097         * macroexp.c (maybe_expand): Use std::string.
11098
11099 2018-02-08  Tom Tromey  <tom@tromey.com>
11100
11101         * macroexp.c (struct macro_buffer): Add initializers for some
11102         members.
11103         (init_buffer, init_shared_buffer, free_buffer)
11104         (free_buffer_return_text): Remove.
11105         (macro_buffer): New constructors.
11106         (~macro_buffer): New destructor.
11107         (macro_buffer::set_shared): New method.
11108         (macro_buffer::resize_buffer, macro_buffer::appendc)
11109         (macro_buffer::appendmem): Now methods, not free functions.
11110         (set_token, append_tokens_without_splicing, stringify)
11111         (macro_stringify): Update.
11112         (gather_arguments): Change return type.  Remove argc_p argument,
11113         add args_ptr argument.  Use std::vector.
11114         (substitute_args): Remove argc argument.  Accept std::vector.
11115         (expand): Update.  Use std::vector.
11116         (scan, macro_expand, macro_expand_next): Update.
11117
11118 2018-02-08  Tom Tromey  <tom@tromey.com>
11119
11120         * symtab.c (default_collect_symbol_completion_matches_break_on):
11121         Use unique_xmalloc_ptr.
11122         * macroscope.h: (sal_macro_scope, user_macro_scope)
11123         (default_macro_scope): Return unique_xmalloc_ptr.
11124         * macroscope.c (sal_macro_scope, user_macro_scope)
11125         (default_macro_scope): Return unique_xmalloc_ptr.
11126         * macroexp.h (macro_expand, macro_expand_once): Return
11127         unique_xmalloc_ptr.
11128         * macroexp.c (macro_expand, macro_expand_once): Return
11129         unique_xmalloc_ptr.
11130         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11131         (info_macro_command, info_macros_command): Use
11132         unique_xmalloc_ptr.
11133         * compile/compile-c-support.c (write_macro_definitions): Use
11134         unique_xmalloc_ptr.
11135         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11136
11137 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11138
11139         * value.c (value_static_field): Assign field type instead of
11140         containing type when returning an optimized out value.
11141
11142 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11143
11144         * ft32-tdep.c (ft32_read_pc): Remove.
11145         (ft32_write_pc): Remove.
11146         (ft32_gdbarch_init): Update.
11147         * m32r-tdep.c (m32r_read_pc): Remove.
11148         (m32r_gdbarch_init): Update.
11149         * mep-tdep.c (mep_read_pc): Remove.
11150         (mep_gdbarch_init): Update.
11151         * microblaze-tdep.c (microblaze_write_pc): Remove.
11152         (microblaze_gdbarch_init): Update.
11153         * mn10300-tdep.c (mn10300_read_pc): Remove.
11154         (mn10300_write_pc): Remove.
11155         (mn10300_gdbarch_init): Update.
11156         * moxie-tdep.c (moxie_read_pc): Remove.
11157         (moxie_write_pc): Remove.
11158         (moxie_gdbarch_init): Update.
11159
11160 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11161
11162         * expprint.c (print_subexp_standard): Handle
11163         OP_F77_UNDETERMINED_ARGLIST.
11164         (dump_subexp_body_standard): Likewise.
11165
11166 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11167
11168         * target-descriptions.c (tdesc_element_visitor) Add empty
11169         implementations.
11170         (tdesc_type): Move make_gdb_type from here.
11171         (tdesc_type_builtin): Likewise.
11172         (tdesc_type_vector): Likewise.
11173         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11174         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11175         (make_gdb_type_union): Likewise.
11176         (make_gdb_type_flags): Likewise.
11177         (make_gdb_type_enum): Likewise.
11178         (make_gdb_type): New function.
11179         (tdesc_register_type): Use static make_gdb_type.
11180
11181 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11182
11183         * infcmd.c (default_print_one_register_info): Align natural-format
11184         column values consistently one under another.
11185         (pad_to_column): New function.
11186
11187 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11188
11189         * dwarf2read.c (dwarf2_physname): Move commment.
11190
11191 2018-02-01  Leszek Swirski  <leszeks@google.com>
11192
11193         * varobj.c (varobj_formatted_print_options): Allow recursive
11194         pretty printing if pretty printing is enabled.
11195
11196 2018-02-01  Leszek Swirski  <leszeks@google.com>
11197
11198         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11199         names after a structop as a filename.
11200
11201 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11202
11203         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11204         (arm_record_coproc_data_proc): Likewise.
11205
11206 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11207
11208         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11209
11210 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11211
11212         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11213         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11214
11215 2018-01-31  Pedro Alves  <palves@redhat.com>
11216
11217         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11218         * inflow.c (child_terminal_save_inferior): Wrap reference to
11219         tcgetpgrp in HAVE_TERMIOS_H.
11220         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11221         _WIN32.
11222         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11223         always iterate over all inferiors.
11224         (gdbsim_cntrl_c): Adjust.
11225         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11226
11227 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11228
11229         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11230         index type is objfile-owned if the element type is as well.
11231
11232 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11233
11234         GDB 8.1 released.
11235
11236 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11237
11238         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11239         "features/s390x-linux64.c".
11240         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11241         s390_linux32 and s390x_linux64.
11242         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11243         default tdesc.
11244         * s390-tdep.c: Include "features/s390-linux32.c" and
11245         "features/s390x-linux64.c".
11246         (s390_tdesc_valid): Add check for tdesc_has_registers.
11247         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11248         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11249         tdesc_s390x_linux64.
11250         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11251         tdesc_s390x_linux64 to...
11252         * s390-tdep.h: ...here.
11253
11254 2018-01-30  Pedro Alves  <palves@redhat.com>
11255
11256         PR gdb/13211
11257         * config.in, configure: Regenerate.
11258         * configure.ac: Check for getpgid.
11259         * go32-nat.c (go32_pass_ctrlc): New.
11260         (go32_target): Install it.
11261         * inf-child.c (inf_child_target): Install
11262         child_terminal_save_inferior, child_pass_ctrlc and
11263         child_interrupt.
11264         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11265         (inf_ptrace_target): No longer install it.
11266         * infcmd.c (interrupt_target_1): Adjust.
11267         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11268         (child_interrupt): Declare.
11269         (inferior::terminal_state): New.
11270         * inflow.c (struct terminal_info): Update comments.
11271         (inferior_process_group): Delete.
11272         (terminal_is_ours): Delete.
11273         (gdb_tty_state): New.
11274         (child_terminal_init): Adjust.
11275         (is_gdb_terminal, sharing_input_terminal_1)
11276         (sharing_input_terminal): New functions.
11277         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11278         Set the process's actual process group in the foreground if
11279         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11280         mark terminal as the inferior's if not sharing GDB's terminal.
11281         Don't check attach_flag.
11282         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11283         pass down a target_terminal_state.
11284         (child_terminal_save_inferior): New, factored out from ...
11285         (child_terminal_ours_1): ... this.  Handle
11286         target_terminal_state::is_ours_for_output.
11287         (child_interrupt, child_pass_ctrlc): New.
11288         (inflow_inferior_exit): Clear the inferior's terminal_state.
11289         (copy_terminal_info): Copy the inferior's terminal state.
11290         (_initialize_inflow): Remove reference to terminal_is_ours.
11291         * inflow.h (inferior_process_group): Delete.
11292         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11293         * procfs.c (procfs_target): Don't install procfs_interrupt.
11294         (procfs_interrupt): Delete.
11295         * remote.c (remote_serial_quit_handler): Adjust.
11296         (remote_interrupt): Remove ptid parameter.  Adjust.
11297         * target-delegates.c: Regenerate.
11298         * target.c: Include "terminal.h".
11299         (target_terminal::terminal_state): Rename to ...
11300         (target_terminal::m_terminal_state): ... this.
11301         (target_terminal::init): Adjust.
11302         (target_terminal::inferior): Adjust to per-inferior
11303         terminal_state.
11304         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11305         (target_terminal::ours, target_terminal::ours_for_output): Use
11306         target_terminal_is_ours_kind.
11307         (target_interrupt): Remove ptid parameter.  Adjust.
11308         (default_target_pass_ctrlc): Adjust.
11309         * target.h (target_ops::to_terminal_save_inferior): New field.
11310         (target_ops::to_interrupt): Remove ptid_t parameter.
11311         (target_interrupt): Remove ptid_t parameter.  Update comment.
11312         (target_pass_ctrlc): Update comment.
11313         * target/target.h (target_terminal_state): New scoped enum,
11314         factored out of ...
11315         (target_terminal::terminal_state): ... here.
11316         (target_terminal::inferior): Update comments.
11317         (target_terminal::restore_inferior): New.
11318         (target_terminal::is_inferior, target_terminal::is_ours)
11319         (target_terminal::is_ours_for_output): Adjust.
11320         (target_terminal::scoped_restore_terminal_state): Adjust to
11321         rename, and call restore_inferior() instead of inferior().
11322         (target_terminal::scoped_restore_terminal_state::m_state): Change
11323         type.
11324         (target_terminal::terminal_state): Rename to ...
11325         (target_terminal::m_terminal_state): ... this and change type.
11326
11327 2018-01-30  Pedro Alves  <palves@redhat.com>
11328
11329         * linux-nat.c (wait_for_signal): New function.
11330         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11331         directly.
11332         (async_terminal_is_ours)
11333         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11334         (linux_nat_add_target): Don't override
11335         to_terminal_inferior/to_terminal_ours.
11336
11337 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11338
11339         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11340
11341 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11342
11343         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11344         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11345         dwarf2_per_objfile_free here.
11346         (dwarf2_per_objfile_free): Remove.
11347         (_initialize_dwarf2_read): Don't register
11348         dwarf2_per_objfile_free as a registry cleanup.
11349
11350 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11351
11352         Avoid compilation errors in MinGW native builds
11353
11354         The error is triggered by including python-internal.h, and the
11355         error message is:
11356
11357              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11358                       from build-gnulib/import/math.h:27,
11359                       from d:/usr/Python26/include/pyport.h:235,
11360                       from d:/usr/Python26/include/Python.h:58,
11361                       from python/python-internal.h:94,
11362                       from python/py-arch.c:24:
11363              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11364         using ::hypot;
11365                 ^~~~~
11366
11367         This happens because Python headers define 'hypot' to expand t
11368         '_hypot' in the Windows builds.
11369         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11370         'hypoth'.  This avoids a compilation error.
11371
11372 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11373
11374         * MAINTAINERS (Write After Approval): Fix ordering.
11375
11376 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11377
11378         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11379
11380 2018-01-26  Alan Modra  <amodra@gmail.com>
11381
11382         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11383         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11384         Remove nop.  Make const.  Comment.
11385         (powerpc32_plt_stub_so_2): New.
11386         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11387         Correct count.  Update uses.
11388         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11389         Move common code reading PLT entry word.  Correct
11390         powerpc32_plt_stub PLT address calculation.
11391         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11392         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11393         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11394         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11395         (ppc64_standard_linkage8): Likewise.
11396         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11397         Correct insns description.
11398         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11399
11400 2018-01-24  Pedro Alves  <palves@redhat.com>
11401
11402         GCC PR libstdc++/83906
11403         * gdbtypes.c (operator==(const dynamic_prop &,
11404         const dynamic_prop &)): New.
11405         (operator==(const range_bounds &, const range_bounds &)): New.
11406         (check_types_equal): Use them instead of memcmp.
11407         * gdbtypes.h (operator==(const dynamic_prop &,
11408         const dynamic_prop &)): Declare.
11409         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11410         (operator==(const range_bounds &, const range_bounds &)): Declare.
11411         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11412
11413 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11414
11415         * s390-linux-tdep.c (s390_record_address_mask)
11416         (s390_record_calc_disp_common, s390_record_calc_disp)
11417         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11418         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11419         (s390_process_record): Move to s390-tdep.c.
11420         (s390_linux_init_abi_any): Adjust.
11421         * s390-tdep.c (s390_record_address_mask)
11422         (s390_record_calc_disp_common, s390_record_calc_disp)
11423         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11424         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11425         (s390_process_record): Moved from s390-linux-tdep.c
11426         (s390_gdbarch_init): Adjust.
11427
11428 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11429
11430         * s390-linux-nat.c (s390-tdep.h): New include.
11431         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11432         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11433         (ALLDEPFILES): Add s390-tdep.c.
11434         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11435         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11436         * s390-tdep.h: ...this.  New file.
11437         * s390-linux-tdep.c (s390-tdep.h): New include.
11438         (_initialize_s390_tdep): Rename to...
11439         (_initialize_s390_linux_tdep): ...this and adjust.
11440         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11441         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11442         s390-tdep.h.
11443         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11444         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11445         (s390_is_partial_instruction, s390_software_single_step)
11446         (is_non_branch_ril, s390_displaced_step_copy_insn)
11447         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11448         (s390_prologue_data, s390_addr, s390_store, s390_load)
11449         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11450         (s390_register_call_saved, s390_guess_tracepoint_registers)
11451         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11452         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11453         (s390_pseudo_register_name, s390_pseudo_register_type)
11454         (s390_pseudo_register_read, s390_pseudo_register_write)
11455         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11456         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11457         (s390_addr_bits_remove, s390_address_class_type_flags)
11458         (s390_address_class_type_flags_to_name)
11459         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11460         (s390_function_arg_float, s390_function_arg_vector)
11461         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11462         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11463         (s390_frame_align, s390_register_return_value, s390_return_value)
11464         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11465         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11466         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11467         (s390_trad_frame_prev_register, s390_unwind_cache)
11468         (s390_prologue_frame_unwind_cache)
11469         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11470         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11471         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11472         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11473         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11474         (s390_frame_base_address, s390_local_base_address)
11475         (s390_frame_base, s390_gcc_target_options)
11476         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11477         (s390_validate_reg_range, s390_tdesc_valid)
11478         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11479         * s390-tdep.c: ...this.  New file.
11480
11481 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11482
11483         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11484         (s390_process_record, s390_gdbarch_tdep_alloc)
11485         (s390_linux_init_abi_any): Use/set new hook.
11486
11487 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11488
11489         * s390-linux-tdep.c (osabi.h): New include.
11490         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11491         (s390_linux_init_abi_any): New functions.
11492         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11493
11494 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11495
11496         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11497         tdesc_has_registers check
11498
11499 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11500
11501         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11502         (s390_validate_reg_range): New macro.
11503         (s390_gdbarch_init): Adjust.
11504
11505 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11506
11507         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11508         (s390_gdbarch_tdep_alloc): Adjust.
11509         (s390_gdbarch_init): Adjust.
11510
11511 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11512
11513         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11514         <have_tdb>: Change type to bool.
11515         (s390_gdbarch_tdep_alloc): Adjust.
11516         (s390_gdbarch_init): Adjust.
11517
11518 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11519
11520         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11521         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11522         (s390_gdbarch_tdep_alloc): New function.
11523         (s390_gdbarch_init): Allocate tdep at start and use its fields
11524         instead of separate variables.
11525
11526 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11527
11528         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11529         when looking for cached gdbarch and add comment for remaining.
11530
11531 2018-01-22  Pedro Alves  <palves@redhat.com>
11532             Sergio Durigan Junior  <sergiodj@redhat.com>
11533
11534         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11535         case.
11536
11537 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11538
11539         * MAINTAINERS: Update my company e-mail address.
11540
11541 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11542
11543         * regcache.c (cooked_write_test): New function.
11544         (_initialize_regcache): Register the test.
11545
11546 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11547
11548         * ia64-tdep.c (ia64_pseudo_register_read): Call
11549         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11550         * m32c-tdep.c (m32c_cat_read): Likewise.
11551         (m32c_r3r2r1r0_read): Likewise.
11552         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11553         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11554
11555 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11556
11557         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11558         method raw_read instead of regcache_raw_read.
11559         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11560         * arm-tdep.c (arm_neon_quad_read): Likewise.
11561         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11562         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11563         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11564         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11565         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11566         (i386_pseudo_register_read_into_value): Likewise.
11567         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11568         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11569         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11570         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11571         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11572         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11573         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11574         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11575         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11576
11577 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11578
11579         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11580         * configure.tgt: Remove target mt.
11581         * mt-tdep.c: Remove.
11582         * regcache.c (cooked_read_test): Remove the check for mt.
11583
11584 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11585
11586         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11587         instead of gdbarch_pseudo_register_read_value.
11588
11589 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11590
11591         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11592         language is Ada.
11593
11594 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11595
11596         * linespec.c (create_sals_line_offset): Remove code that preserved
11597         the symtab_and_line's line number.
11598
11599 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11600
11601         * varobj.c (varobj_create): Don't set valid_block when creating a
11602         floating varobj.
11603
11604 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11605
11606         * varobj.c (varobj_create): Remove out of date comment.
11607
11608 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11609
11610         PR mi/20395
11611         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11612         updating innermost block.
11613         * parse.c (innermost_block_tracker::update): Take extra type
11614         parameter, and check types match before updating innermost block.
11615         (write_dollar_variable): Update innermost block for registers.
11616         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11617         (innermost_block_tracker::innermost_block_tracker): Initialise
11618         m_types member.
11619         (innermost_block_tracker::reset): Take type parameter.
11620         (innermost_block_tracker::update): Take type parameter, and pass
11621         type through as needed.
11622         (innermost_block_tracker::m_types): New member.
11623         * varobj.c (varobj_create): Pass type when reseting innermost
11624         block.
11625
11626 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11627
11628         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11629         * ada-lang.c (resolve_subexp): Likewise.
11630         * breakpoint.c (set_breakpoint_condition) Likewise.
11631         (watch_command_1) Likewise.
11632         * c-exp.y (variable): Likewise.
11633         * d-exp.y (PrimaryExpression): Likewise.
11634         * f-exp.y (variable): Likewise.
11635         * go-exp.y (variable): Likewise.
11636         * m2-exp.y (variable): Likewise.
11637         * objfiles.c (objfile::~objfile): Likewise.
11638         * p-exp.y (variable): Likewise.
11639         * parse.c (innermost_block): Change type.
11640         * parser-defs.h (class innermost_block_tracker): New.
11641         (innermost_block): Change to innermost_block_tracker.
11642         * printcmd.c (display_command): Switch to innermost_block API.
11643         (do_one_display): Likewise.
11644         * rust-exp.y (do_one_display): Likewise.
11645         * symfile.c (clear_symtab_users): Likewise.
11646         * varobj.c (varobj_create): Switch to innermost_block API, replace
11647         use of innermost_block with block stored on varobj object.
11648
11649 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11650
11651         * expression.h (innermost_block): Remove declaration.
11652         * varobj.c: Add 'parser-defs.h' include.
11653
11654 2018-01-19  Tom Tromey  <tom@tromey.com>
11655
11656         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11657         symbols in the static and global blocks.
11658
11659 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11660
11661         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11662         gdb_ptrace.h, and move including gdb_wait.h ...
11663         * nat/linux-ptrace.h: ... to here.
11664
11665 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11666
11667         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11668         inf_ptrace_detach_success.
11669         (inf_ptrace_detach_success): Add inferior parameter, use it
11670         instead of inferior_ptid, pass it to detach_inferior.
11671         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11672         parameter.
11673         * inferior.c (detach_inferior): Add overload that takes an
11674         inferior object.
11675         * inferior.h (detach_inferior): Likewise.
11676         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11677         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11678         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11679
11680 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11681
11682         * target.h (struct target_ops) <to_detach>: Add inferior
11683         parameter.
11684         (target_detach): Likewise.
11685         * target.c (dispose_inferior): Pass inferior down.
11686         (target_detach): Pass inferior down.  Assert that it is equal to
11687         the current inferior.
11688         * aix-thread.c (aix_thread_detach): Pass inferior down.
11689         * corefile.c (core_file_command): Pass current_inferior() down.
11690         * corelow.c (core_detach): Add inferior parameter.
11691         * darwin-nat.c (darwin_detach): Likewise.
11692         * gnu-nat.c (gnu_detach): Likewise.
11693         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11694         * infcmd.c (detach_command): Pass current_inferior() down to
11695         target_detach.
11696         * infrun.c (follow_fork_inferior): Pass parent_inf to
11697         target_detach.
11698         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11699         target_detach.
11700         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11701         * linux-thread-db.c (thread_db_detach): Likewise.
11702         * nto-procfs.c (procfs_detach): Likewise.
11703         * procfs.c (procfs_detach): Likewise.
11704         * record.c (record_detach): Likewise.
11705         * record.h (struct inferior): Forward-declare.
11706         (record_detach): Add inferior parameter.
11707         * remote-sim.c (gdbsim_detach): Likewise.
11708         * remote.c (remote_detach_1): Likewise.
11709         (remote_detach): Likewise.
11710         (extended_remote_detach): Likewise.
11711         * sol-thread.c (sol_thread_detach): Likewise.
11712         * target-debug.h (target_debug_print_inferior_p): New macro.
11713         * target-delegates.c: Re-generate.
11714         * top.c (kill_or_detach): Pass inferior down to target_detach.
11715         * windows-nat.c (windows_detach): Add inferior parameter.
11716
11717 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11718
11719         * target.h (struct target_ops) <to_detach>: Remove args
11720         parameter.
11721         (target_detach): Likewise.
11722         * target.c (dispose_inferior): Adjust.
11723         (target_detach): Remove args parameter, adjust.
11724         * aix-thread.c (aix_thread_detach): Adjust.
11725         * corefile.c (core_file_command): Adjust.
11726         * corelow.c (core_detach): Adjust.
11727         * darwin-nat.c (darwin_detach): Adjust.
11728         * gnu-nat.c (gnu_detach): Adjust.
11729         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11730         * infcmd.c (detach_command): Adjust
11731         * infrun.c (follow_fork_inferior): Adjust.
11732         (handle_vfork_child_exec_or_exit): Adjust.
11733         * linux-fork.c (linux_fork_detach): Remove args parameter.
11734         * linux-fork.h (linux_fork_detach): Likewise.
11735         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11736         * linux-thread-db.c (thread_db_detach): Likewise.
11737         * nto-procfs.c (procfs_detach): Likewise.
11738         * procfs.c (procfs_detach): Likewise.
11739         (do_detach): Remove signo parameter.
11740         * record.c (record_detach): Remove args parameter.
11741         * record.h (record_detach): Likewise.
11742         * remote-sim.c (gdbsim_detach): Likewise.
11743         * remote.c (remote_detach_1): Likewise.
11744         (remote_detach): Likewise.
11745         (extended_remote_detach): Likewise.
11746         * sol-thread.c (sol_thread_detach): Likewise.
11747         * target-delegates.c: Re-generate.
11748         * top.c (struct qt_args) <args>: Remove field.
11749         (kill_or_detach): Don't pass args.
11750         (quit_force): Don't set args.
11751         * windows-nat.c (windows_detach): Remove args parameter.
11752
11753 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11754
11755         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11756         (arm_linux_init_abi): Install it.
11757
11758 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11759
11760         * osabi.c (gdb_osabi_names): Extend the regexp for
11761         arm-linux-gnueabihf.
11762
11763 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11764
11765         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11766         m_abbrevs.
11767         (abbrev_table::add_abbrev): Update.
11768         (abbrev_table::lookup_abbrev): Update.
11769
11770 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11771
11772         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11773
11774 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11775
11776         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11777         to "std::string".
11778
11779 2018-01-17  Tom Tromey  <tom@tromey.com>
11780
11781         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11782
11783 2018-01-17  Tom Tromey  <tom@tromey.com>
11784
11785         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11786         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11787         (create_array_type_with_stride): Update.
11788         * dwarf2read.c (set_die_type): Update.
11789
11790 2018-01-17  Tom Tromey  <tom@tromey.com>
11791
11792         * dwarf2read.c (delayed_method_info): Remove typedef.
11793         (dwarf2_cu::method_info): Now a std::vector.
11794         (add_to_method_list): Update.
11795         (free_delayed_list): Remove.
11796         (compute_delayed_physnames): Update.
11797         (process_full_comp_unit, process_full_type_unit): Clear the method
11798         list.  Remove cleanups.
11799         (psymtab_include_file_name): Add name_holder parameter.  Use
11800         unique_xmalloc_ptr.
11801         (dwarf_decode_lines): Update.
11802
11803 2018-01-17  Tom Tromey  <tom@tromey.com>
11804             Simon Marchi  <simon.marchi@ericsson.com>
11805
11806         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11807         (dwarf2_per_objfile::free_cached_comp_units)
11808         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11809         (init_cutu_and_read_dies_no_follow): Update.
11810         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11811         (dwarf2_cu::~dwarf2_cu): New.
11812         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11813         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11814
11815 2018-01-17  Tom Tromey  <tom@tromey.com>
11816             Simon Marchi  <simon.marchi@ericsson.com>
11817
11818         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11819         (struct die_reader_specs) <abbrev_table>: New member.
11820         (struct abbrev_table): Add constructor.
11821         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11822         <abbrev_obstack>: Now an auto_obstack.
11823         (abbrev_table_up): New typedef.
11824         (init_cu_die_reader): Add abbrev_table parameter.
11825         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11826         Add result_dwo_abbrev_table.
11827         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11828         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11829         Update.
11830         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11831         parameter.
11832         (skip_children): Update.
11833         (abbrev_table::alloc_abbrev): Rename from
11834         abbrev_table_alloc_abbrev.
11835         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11836         (abbrev_table::lookup_abbrev): Rename from
11837         abbrev_table_lookup_abbrev.
11838         (abbrev_table_read_table): Return abbrev_table_up.
11839         (abbrev_table_free, abbrev_table_free_cleanup)
11840         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11841         (load_partial_dies): Update.
11842
11843 2018-01-17  Tom Tromey  <tom@tromey.com>
11844
11845         * dwarf2read.c (dwarf2_compute_name): Update comment.
11846         (read_func_scope, read_variable): Update.
11847         (new_symbol): Remove.
11848         (new_symbol_full): Rename to new_symbol.
11849
11850 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11851
11852         PR gdb/16577
11853         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11854         a warning instead of throwing an error, set section size to 0 and return
11855         NULL.
11856         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11857
11858 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11859
11860         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11861         std::string.
11862         (linux_ptrace_attach_fail_reason_string): Likewise.
11863         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11864         Likewise.
11865         (linux_ptrace_attach_fail_reason_string): Likewise.
11866         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11867
11868 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11869
11870         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11871
11872 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11873
11874         PR gdb/21559
11875         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11876         checking for fs_base/gs_base fields in struct user_regs_struct.
11877         * configure: Regenerate.
11878
11879 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11880
11881         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11882         function.
11883         (aarch64_linux_init_abi): Install it to gdbarch hook
11884         gcc_target_options.
11885
11886 2018-01-15  Pedro Alves  <palves@redhat.com>
11887
11888         * common/signals-state-save-restore.c
11889         (save_original_signals_state): Fix typos.
11890
11891 2017-01-12  Tom Tromey  <tom@tromey.com>
11892             Sergio Durigan Junior  <sergiodj@redhat.com>
11893
11894         * Makefile.in (install-only): Install gdb-add-index.
11895
11896 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11897
11898         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11899
11900 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11901
11902         * infrun.c (keep_going_pass_signal): Clear step-over info when
11903         insert_breakpoints fails.
11904
11905 2018-01-11  Pedro Alves  <palves@redhat.com>
11906
11907         PR gdb/22583
11908         * infrun.c (resume): Rename to ...
11909         (resume_1): ... this.
11910         (resume): Reimplement as wrapper around resume_1.
11911
11912 2018-01-11  Pedro Alves  <palves@redhat.com>
11913
11914         PR remote/22597
11915         * remote.c (remote_parse_stop_reply): Default to the last-set
11916         general thread instead of to 'magic_null_ptid'.
11917
11918 2018-01-10  Pedro Alves  <palves@redhat.com>
11919
11920         * language.h (language_get_symbol_name_matcher): Rename ...
11921         (get_symbol_name_matcher): ... this.
11922         * language.c (language_get_symbol_name_matcher): Ditto.
11923         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11924         callers adjusted.
11925
11926 2018-01-10  Pedro Alves  <palves@redhat.com>
11927
11928         PR gdb/22670
11929         * dwarf2read.c
11930         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11931         Adjust to use language_get_symbol_name_matcher instead of
11932         language_defn::la_get_symbol_name_matcher.
11933         * language.c (language_get_symbol_name_matcher): If in Ada mode
11934         and the lookup name is a verbatim match, return Ada's matcher.
11935         * language.h (language_get_symbol_name_matcher): Adjust comment.
11936         (ada_lookup_name_info::verbatim_p):: New method.
11937
11938 2018-01-10  Pedro Alves  <palves@redhat.com>
11939
11940         PR gdb/22670
11941         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11942         minsym's language is language_auto or language_cplus, pass down
11943         language_ada instead.
11944         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11945
11946 2018-01-10  Pedro Alves  <palves@redhat.com>
11947
11948         PR gdb/22670
11949         * minsyms.c (linkage_name_str): New function.
11950         (iterate_over_minimal_symbols): Use it.
11951
11952 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11953
11954         * NEWS: Document that 'info proc' now works on FreeBSD.
11955
11956 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11957
11958         * configure.ac: Check for kinfo_getfile in libutil.
11959         * configure: Regenerate.
11960         * config.in: Regenerate.
11961         * fbsd-nat.c: Include "fbsd-tdep.h".
11962         (fbsd_fetch_cmdline): New.
11963         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11964         rather than calling error.
11965         (fbsd_info_proc): New.
11966         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11967         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11968         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11969
11970 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11971
11972         * fbsd-nat.c (struct free_deleter): Remove.
11973         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11974
11975 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11976
11977         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11978         NULL for an empty pathname.
11979
11980 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11981
11982         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11983         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11984         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11985         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11986         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11987         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11988         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11989         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11990         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11991         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11992         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11993         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11994         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11995         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11996         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11997
11998 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11999
12000         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12001         (gnu_xfer_auxv): New function.
12002         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12003         TARGET_OBJECT_AUXV.
12004
12005 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12006             Simon Marchi  <simon.marchi@ericsson.com>
12007
12008         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12009         common/selftest.c.
12010         (COMMON_OBS): Remove selftest.o.
12011         * configure.ac: Append selftest-arch.c and common/selftest.c to
12012         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12013         * configure: Re-generated.
12014         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12015         GDB_SELF_TEST.
12016         (maintenance_info_selftests): Likewise.
12017
12018 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12019
12020         * ada-valprint.c (val_print_packed_array_elements): Use
12021         proper number of elements when printing an array indexed
12022         by an enumeration type.
12023
12024 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12025
12026         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12027         (dw2_get_file_names_reader): Adjust.
12028         (lookup_dwo_signatured_type): Adjust.
12029         (lookup_dwp_signatured_type): Adjust.
12030         (lookup_signatured_type): Adjust.
12031         (create_type_unit_group): Adjust.
12032         (get_type_unit_group): Adjust.
12033         (process_psymtab_comp_unit_reader): Adjust.
12034         (build_type_psymtabs_reader): Adjust.
12035         (scan_partial_symbols): Adjust.
12036         (add_partial_symbol): Adjust.
12037         (add_partial_subprogram): Adjust.
12038         (peek_die_abbrev): Adjust.
12039         (fixup_go_packaging): Adjust.
12040         (process_imported_unit_die): Adjust.
12041         (dwarf2_compute_name): Adjust.
12042         (dwarf2_physname): Adjust.
12043         (read_import_statement): Adjust.
12044         (handle_DW_AT_stmt_list): Adjust.
12045         (read_file_scope): Adjust.
12046         (read_func_scope): Adjust.
12047         (read_lexical_block_scope): Adjust.
12048         (read_call_site_scope): Adjust.
12049         (read_variable): Adjust.
12050         (dwarf2_rnglists_process): Adjust.
12051         (dwarf2_ranges_process): Adjust.
12052         (dwarf2_ranges_read): Adjust.
12053         (dwarf2_get_pc_bounds): Adjust.
12054         (dwarf2_record_block_ranges): Adjust.
12055         (dwarf2_add_field): Adjust.
12056         (dwarf2_add_member_fn): Adjust.
12057         (read_structure_type): Adjust.
12058         (process_structure_scope): Adjust.
12059         (read_enumeration_type): Adjust.
12060         (read_array_type): Adjust.
12061         (mark_common_block_symbol_computed): Adjust.
12062         (read_common_block): Adjust.
12063         (read_namespace_type): Adjust.
12064         (read_namespace): Adjust.
12065         (read_module_type): Adjust.
12066         (read_tag_pointer_type): Adjust.
12067         (read_tag_ptr_to_member_type): Adjust.
12068         (read_tag_string_type): Adjust.
12069         (read_subroutine_type): Adjust.
12070         (read_typedef): Adjust.
12071         (read_base_type): Adjust.
12072         (attr_to_dynamic_prop): Adjust.
12073         (read_subrange_type): Adjust.
12074         (read_unspecified_type): Adjust.
12075         (dwarf2_read_abbrevs): Adjust.
12076         (load_partial_dies): Adjust.
12077         (read_partial_die): Adjust.
12078         (find_partial_die): Adjust.
12079         (guess_partial_die_structure_name): Adjust.
12080         (fixup_partial_die): Adjust.
12081         (read_attribute_value): Adjust.
12082         (read_addr_index): Adjust.
12083         (read_addr_index_from_leb128): Adjust.
12084         (read_str_index): Adjust.
12085         (dwarf2_string_attr): Adjust.
12086         (get_debug_line_section): Adjust.
12087         (dwarf_decode_line_header): Adjust.
12088         (lnp_state_machine::check_line_address): Adjust.
12089         (dwarf_decode_lines_1): Adjust.
12090         (dwarf_decode_lines): Adjust.
12091         (dwarf2_start_symtab): Adjust.
12092         (var_decode_location): Adjust.
12093         (new_symbol_full): Adjust.
12094         (dwarf2_const_value_data): Adjust.
12095         (dwarf2_const_value_attr): Adjust.
12096         (dwarf2_const_value): Adjust.
12097         (die_type): Adjust.
12098         (die_containing_type): Adjust.
12099         (build_error_marker_type): Adjust.
12100         (lookup_die_type): Adjust.
12101         (guess_full_die_structure_name): Adjust.
12102         (anonymous_struct_prefix): Adjust.
12103         (determine_prefix): Adjust.
12104         (dwarf2_name): Adjust.
12105         (follow_die_ref_or_sig): Adjust.
12106         (follow_die_offset): Adjust.
12107         (follow_die_ref): Adjust.
12108         (follow_die_sig_1): Adjust.
12109         (follow_die_sig): Adjust.
12110         (get_signatured_type): Adjust.
12111         (get_DW_AT_signature_type): Adjust.
12112         (decode_locdesc): Adjust.
12113         (dwarf_decode_macros): Adjust.
12114         (cu_debug_loc_section): Adjust.
12115         (fill_in_loclist_baton): Adjust.
12116         (dwarf2_symbol_mark_computed): Adjust.
12117         (init_one_comp_unit): Don't assign
12118         dwarf2_cu::dwarf2_per_objfile.
12119         (set_die_type): Adjust.
12120
12121 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12122
12123         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12124         <dwarf2_per_objfile>: New field.
12125         (dwarf2_per_objfile): Remove global.
12126         (get_dwarf2_per_objfile): New function.
12127         (set_dwarf2_per_objfile): New function.
12128         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12129         dwarf2_per_objfile.
12130         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12131         (read_abbrev_offset): Likewise.
12132         (read_indirect_string): Likewise.
12133         (read_indirect_line_string): Likewise.
12134         (read_indirect_string_at_offset): Likewise.
12135         (read_indirect_string_from_dwz): Likewise.
12136         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12137         dwarf2_per_objfile.
12138         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12139         (create_all_comp_units): Change objfile parameter to
12140         dwarf2_per_objfile.
12141         (create_all_type_units): Likewise.
12142         (process_queue): Add dwarf2_per_objfile parameter.
12143         (read_and_check_comp_unit_head): Likewise.
12144         (lookup_dwo_unit_in_dwp): Likewise.
12145         (get_dwp_file): Likewise.
12146         (process_cu_includes): Likewise.
12147         (struct free_dwo_file_cleanup_data): New struct.
12148         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12149         set_dwarf2_per_objfile.
12150         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12151         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12152         context, adjust calls.
12153         (dw2_instantiate_symtab): Likewise.
12154         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12155         (dw2_get_cu): Likewise.
12156         (create_cu_from_index_list): Change objfile parameter to
12157         dwarf2_per_objfile.
12158         (create_cus_from_index_list): Get dwarf2_per_objfile from
12159         context, adjust calls.
12160         (create_cus_from_index): Likewise.
12161         (create_signatured_type_table_from_index): Change objfile
12162         parameter to dwarf2_per_objfile.
12163         (create_signatured_type_table_from_debug_names): Change objfile
12164         parameter to dwarf2_per_objfile.
12165         (create_addrmap_from_index): Likewise.
12166         (create_addrmap_from_aranges): Likewise.
12167         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12168         (dw2_setup): Remove.
12169         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12170         context.
12171         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12172         get_dwarf2_per_objfile.
12173         (dw2_forget_cached_source_info): Likewise.
12174         (dw2_map_symtabs_matching_filename): Likewise.
12175         (struct dw2_symtab_iterator) <index>: Remove.
12176         <dwarf2_per_objfile>: New field.
12177         (dw2_symtab_iter_init): Replace index parameter with
12178         dwarf2_per_objfile.
12179         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12180         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12181         (dw2_print_stats): Likewise.
12182         (dw2_dump): Likewise.
12183         (dw2_expand_symtabs_for_function): Likewise.
12184         (dw2_expand_all_symtabs): Likewise.
12185         (dw2_expand_symtabs_with_fullname): Likewise.
12186         (dw2_expand_marked_cus): Replace index and objfile parameters
12187         with dwarf2_per_objfile.
12188         (dw_expand_symtabs_matching_file_matcher): Add
12189         dwarf2_per_objfile parameter and adjust calls.
12190         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12191         adjust calls.
12192         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12193         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12194         adjust calls.
12195         (create_cus_from_debug_names_list): Replace objfile parameter
12196         with dwarf2_per_objfile and adjust calls.
12197         (create_cus_from_debug_names): Likewise.
12198         (dwarf2_read_debug_names): Likewise.
12199         (mapped_debug_names::namei_to_name): Adjust call.
12200         (dw2_debug_names_iterator::next): Likewise.
12201         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12202         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12203         (dw2_debug_names_dump): Likewise.
12204         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12205         (dw2_debug_names_expand_symtabs_matching): Likewise.
12206         (dwarf2_initialize_objfile): Likewise.
12207         (dwarf2_build_psymtabs): Likewise.
12208         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12209         this_cu.
12210         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12211         (read_and_check_comp_unit_head): Likewise.
12212         (read_abbrev_offset): Likewise.
12213         (create_debug_type_hash_table): Likewise.
12214         (create_debug_types_hash_table): Likewise.
12215         (create_all_type_units): Replace objfile parameter with
12216         dwarf2_per_objfile.
12217         (add_type_unit): Add dwarf2_per_objfile parameter.
12218         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12219         with dwarf2_per_objfile.
12220         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12221         (lookup_dwp_signatured_type): Likewise.
12222         (lookup_signatured_type): Likewise.
12223         (read_cutu_die_from_dwo): Likewise.
12224         (init_tu_and_read_dwo_dies): Likewise.
12225         (init_cutu_and_read_dies): Likewise.
12226         (init_cutu_and_read_dies_no_follow): Likewise.
12227         (allocate_type_unit_groups_table): Add objfile parameter.
12228         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12229         (get_type_unit_group): Likewise.
12230         (process_psymtab_comp_unit): Update call.
12231         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12232         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12233         (print_tu_stats): Likewise.
12234         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12235         in void* parameter.
12236         (build_type_psymtabs): Change objfile parameter to
12237         dwarf2_per_objfile.
12238         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12239         passed in void* parameter.
12240         (process_skeletonless_type_units): Change objfile parameter to
12241         dwarf2_per_objfile.
12242         (set_partial_user): Likewise.
12243         (dwarf2_build_psymtabs_hard): Likewise.
12244         (read_comp_units_from_section): Likewise.
12245         (create_all_comp_units): Likewise.
12246         (scan_partial_symbols): Update calls.
12247         (add_partial_symbol): Likewise.
12248         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12249         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12250         (process_queue): Add dwarf2_per_objfile parameter.
12251         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12252         (compute_compunit_symtab_includes): Likewise.
12253         (process_cu_includes): Add dwarf2_per_objfile parameter.
12254         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12255         (process_full_type_unit): Likewise.
12256         (process_imported_unit_die): Update call.
12257         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12258         (read_file_scope): Likewise.
12259         (allocate_dwo_file_hash_table): Add objfile parameter.
12260         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12261         (create_cus_hash_table): Likewise.
12262         (create_dwp_hash_table): Likewise.
12263         (create_dwo_unit_in_dwp_v1): Likewise.
12264         (create_dwp_v2_section): Likewise.
12265         (create_dwo_unit_in_dwp_v2): Likewise.
12266         (lookup_dwo_unit_in_dwp): Likewise.
12267         (try_open_dwop_file): Likewise.
12268         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12269         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12270         cleanup to include a reference to dwarf2_per_objfile.
12271         (open_dwp_file): Add dwarf2_per_objfile parameter.
12272         (open_and_init_dwp_file): Likewise.
12273         (get_dwp_file): Likewise.
12274         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12275         (queue_and_load_all_dwo_tus): Update call.
12276         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12277         data.
12278         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12279         (dwarf2_ranges_process): Likewise.
12280         (dwarf2_get_pc_bounds): Likewise.
12281         (mark_common_block_symbol_computed): Likewise.
12282         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12283         (dwarf2_read_abbrevs): Update call.
12284         (read_partial_die): Use dwarf2_per_objfile from cu.
12285         (find_partial_die): Likewise.
12286         (fixup_partial_die): Likewise.
12287         (read_attribute_value): Likewise.
12288         (read_indirect_string_at_offset_from): Add objfile parameter.
12289         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12290         parameter.
12291         (read_indirect_string_from_dwz): Add objfile parameter.
12292         (read_indirect_string): Add objfile parameter.
12293         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12294         (read_addr_index): Use dwarf2_per_objfile from cu.
12295         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12296         call dw2_setup.
12297         (read_str_index): Use dwarf2_per_objfile from cu.
12298         (get_debug_line_section): Likewise.
12299         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12300         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12301         (new_symbol_full): Use dwarf2_per_objfile from cu.
12302         (build_error_marker_type): Likewise.
12303         (lookup_die_type): Likewise.
12304         (determine_prefix): Likewise.
12305         (follow_die_offset): Likewise.
12306         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12307         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12308         (dwarf2_fetch_die_type_sect_off): Likewise.
12309         (dwarf2_get_die_type): Likewise.
12310         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12311         (get_signatured_type): Likewise.
12312         (get_DW_AT_signature_type): Likewise.
12313         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12314         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12315         (cu_debug_loc_section): Likewise.
12316         (fill_in_loclist_baton): Likewise.
12317         (dwarf2_symbol_mark_computed): Likewise.
12318         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12319         dwarf2_per_objfile.
12320         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12321         parameter.
12322         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12323         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12324         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12325         (set_die_type): Use dwarf2_free_objfile from cu.
12326         (get_die_type_at_offset): Likewise.
12327         (dwarf2_per_objfile_free): Don't assign global variable.
12328         (debug_names) <constructor>: Add dwarf2_per_objfile
12329         parameter, update m_debugstrlookup construction.
12330         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12331         parameter.
12332         <m_dwarf2_per_objfile>: New field.
12333         <lookup>: Use m_dwarf2_per_objfile.
12334         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12335         (psyms_seen_size): Likewise.
12336         (write_gdbindex): Replace objfile parameter with
12337         dwarf2_per_objfile.
12338         (write_debug_names): Likewise.
12339         (write_psymtabs_to_index): Likewise.
12340         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12341         calls.
12342
12343 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12344
12345         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12346         <dwarf2_per_objfile>: New field.
12347         (struct dwarf2_per_cu_data) <objfile>: Remove.
12348         <dwarf2_per_objfile>: New field.
12349         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12350         of objfile.
12351         (create_signatured_type_table_from_index): Likewise.
12352         (create_debug_type_hash_table): Likewise.
12353         (fill_in_sig_entry_from_dwo_entry): Likewise.
12354         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12355         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12356         objfile.
12357         (create_partial_symtab): Access objfile through
12358         dwarf2_per_objfile.
12359         (process_psymtab_comp_unit_reader): Likewise.
12360         (read_comp_units_from_section): Likewise.
12361         (scan_partial_symbols): Likewise.
12362         (add_partial_symbol): Likewise.
12363         (add_partial_subprogram): Likewise.
12364         (peek_die_abbrev): Likewise.
12365         (fixup_go_packaging): Likewise.
12366         (process_full_comp_unit): Likewise.
12367         (process_full_type_unit): Likewise.
12368         (process_imported_unit_die): Likewise.
12369         (dwarf2_compute_name): Likewise.
12370         (dwarf2_physname): Likewise.
12371         (read_import_statement): Likewise.
12372         (create_cus_hash_table): Assign dwarf2_physname instead of
12373         objfile.
12374         (read_func_scope): Access objfile through dwarf2_per_objfile.
12375         (read_lexical_block_scope): Likewise.
12376         (read_call_site_scope): Likewise.
12377         (read_variable): Likewise.
12378         (dwarf2_rnglists_process): Likewise.
12379         (dwarf2_ranges_process): Likewise.
12380         (dwarf2_ranges_read): Likewise.
12381         (dwarf2_record_block_ranges): Likewise.
12382         (dwarf2_add_field): Likewise.
12383         (dwarf2_add_member_fn): Likewise.
12384         (read_structure_type): Likewise.
12385         (process_structure_scope): Likewise.
12386         (read_enumeration_type): Likewise.
12387         (read_array_type): Likewise.
12388         (read_common_block): Likewise.
12389         (read_namespace_type): Likewise.
12390         (read_namespace): Likewise.
12391         (read_module_type): Likewise.
12392         (read_tag_pointer_type): Likewise.
12393         (read_tag_ptr_to_member_type): Likewise.
12394         (read_tag_string_type): Likewise.
12395         (read_subroutine_type): Likewise.
12396         (read_typedef): Likewise.
12397         (read_base_type): Likewise.
12398         (attr_to_dynamic_prop): Likewise.
12399         (read_subrange_type): Likewise.
12400         (read_unspecified_type): Likewise.
12401         (load_partial_dies): Likewise.
12402         (read_partial_die): Likewise.
12403         (find_partial_die): Likewise.
12404         (guess_partial_die_structure_name): Likewise.
12405         (fixup_partial_die): Likewise.
12406         (read_attribute_value): Likewise.
12407         (read_addr_index_from_leb128): Likewise.
12408         (dwarf2_read_addr_index): Likewise.
12409         (dwarf2_string_attr): Likewise.
12410         (lnp_state_machine::check_line_address): Likewise.
12411         (dwarf_decode_lines_1): Likewise.
12412         (dwarf_decode_lines): Likewise.
12413         (dwarf2_start_symtab): Likewise.
12414         (var_decode_location): Likewise.
12415         (new_symbol_full): Likewise.
12416         (dwarf2_const_value_data): Likewise.
12417         (dwarf2_const_value_attr): Likewise.
12418         (dwarf2_const_value): Likewise.
12419         (die_type): Likewise.
12420         (die_containing_type): Likewise.
12421         (lookup_die_type): Likewise.
12422         (guess_full_die_structure_name): Likewise.
12423         (anonymous_struct_prefix): Likewise.
12424         (dwarf2_name): Likewise.
12425         (follow_die_ref_or_sig): Likewise.
12426         (follow_die_offset): Likewise.
12427         (follow_die_ref): Likewise.
12428         (dwarf2_fetch_die_loc_sect_off): Likewise.
12429         (dwarf2_fetch_constant_bytes): Likewise.
12430         (dwarf2_fetch_die_type_sect_off): Likewise.
12431         (dwarf2_get_die_type): Likewise.
12432         (follow_die_sig): Likewise.
12433         (decode_locdesc): Likewise.
12434         (dwarf2_per_cu_objfile): Likewise.
12435         (dwarf2_per_cu_text_offset): Likewise.
12436         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12437         objfile.
12438         (set_die_type): Access objfile through
12439         dwarf2_per_objfile.
12440
12441 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12442
12443         * valprint.c (converted_character_d): Remove typedef.
12444         (DEF_VEC_O (converted_character_d)): Remove.
12445         (count_next_character): Use std::vector.
12446         (print_converted_chars_to_obstack): Likewise.
12447         (generic_printstr): Likewise.
12448
12449 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12450
12451         * xml-support.h (struct gdb_xml_value): Add constructor.
12452         <value>: Change type to unique_xmalloc_ptr.
12453         (gdb_xml_value_s): Remove typedef.
12454         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12455         (gdb_xml_element_start_handler): Change parameter type to
12456         std::vector.
12457         (xml_find_attribute): Likewise.
12458         * xml-support.c (xml_find_attribute): Change parameter type to
12459         std::vector and adjust.
12460         (gdb_xml_values_cleanup): Remove.
12461         (gdb_xml_parser::start_element): Adjust to std::vector.
12462         (xinclude_start_include): Change paraeter type to std::vector
12463         and adjust.
12464         * btrace.c (check_xml_btrace_version): Likewise.
12465         (parse_xml_btrace_block): Likewise.
12466         (parse_xml_btrace_pt_config_cpu): Likewise.
12467         (parse_xml_btrace_pt): Likewise.
12468         (parse_xml_btrace_conf_bts): Likewise.
12469         (parse_xml_btrace_conf_pt): Likewise.
12470         * memory-map.c (memory_map_start_memory): Likewise.
12471         (memory_map_start_property): Likewise.
12472         * osdata.c (osdata_start_osdata): Likewise.
12473         (osdata_start_item): Likewise.
12474         (osdata_start_column): Likewise.
12475         * remote.c (start_thread): Likewise.
12476         * solib-aix.c (library_list_start_library): Likewise.
12477         (library_list_start_list): Likewise.
12478         * solib-svr4.c (library_list_start_library): Likewise.
12479         (svr4_library_list_start_list): Likewise.
12480         * solib-target.c (library_list_start_segment): Likewise.
12481         (library_list_start_section): Likewise.
12482         (library_list_start_library): Likewise.
12483         (library_list_start_list): Likewise.
12484         * tracepoint.c (traceframe_info_start_memory): Likewise.
12485         (traceframe_info_start_tvar): Likewise.
12486         * xml-syscall.c (syscall_start_syscall): Likewise.
12487         * xml-tdesc.c (tdesc_start_target): Likewise.
12488         (tdesc_start_feature): Likewise.
12489         (tdesc_start_reg): Likewise.
12490         (tdesc_start_union): Likewise.
12491         (tdesc_start_struct): Likewise.
12492         (tdesc_start_flags): Likewise.
12493         (tdesc_start_enum): Likewise.
12494         (tdesc_start_field): Likewise.
12495         (tdesc_start_enum_value): Likewise.
12496         (tdesc_start_vector): Likewise.
12497
12498 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12499
12500         * extension.h (struct xmethod_worker) <clone>: Remove.
12501         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12502         Remove.
12503         (python_xmethod_worker::clone): Remove.
12504         * valops.c (find_overload_match): Use std::move instead of
12505         clone.
12506
12507 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12508
12509         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12510         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12511         <free_xmethod_worker_data>: Remove.
12512         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12513         <get_xmethod_arg_types>: Remove.
12514         <get_xmethod_result_type>: Remove.
12515         <invoke_xmethod>: Remove.
12516         * extension.c (new_xmethod_worker): Remove.
12517         (clone_xmethod_worker): Remove.
12518         (get_matching_xmethod_workers): Return void, pass std::vector by
12519         pointer.
12520         (get_xmethod_arg_types): Rename to...
12521         (xmethod_worker::get_arg_types): ... this, and adjust.
12522         (get_xmethod_result_type): Rename to...
12523         (xmethod_worker::get_result_type): ... this, and adjust.
12524         (invoke_xmethod): Remove.
12525         (free_xmethod_worker): Remove.
12526         (free_xmethod_worker_vec): Remove.
12527         * extension.h (enum ext_lang_rc): Move here from
12528         extension-priv.h.
12529         (struct xmethod_worker): Add constructor and destructor.
12530         <data>: Remove.
12531         <value>: Remove.
12532         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12533         virtual pure methods.
12534         <get_arg_types, get_result_type>: New methods.
12535         (xmethod_worker_ptr): Remove typedef.
12536         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12537         (xmethod_worker_vec): Remove typedef.
12538         (xmethod_worker_up): New typedef.
12539         (invoke_xmethod): Remove.
12540         (clone_xmethod_worker): Remove.
12541         (free_xmethod_worker): Remove.
12542         (free_xmethod_worker_vec): Remove.
12543         (get_xmethod_arg_types): Remove.
12544         (get_xmethod_result_type): Remove.
12545         * valops.c (find_method_list): Use std::vector, don't use
12546         intermediate vector.
12547         (value_find_oload_method_list): Use std::vector.
12548         (find_overload_match): Use std::vector.
12549         (find_oload_champ): Use std::vector.
12550         * value.c (value_free): Use operator delete.
12551         (value_of_xmethod): Rename to...
12552         (value_from_xmethod): ... this.  Don't assign
12553         xmethod_worker::value, take rvalue-reference.
12554         (result_type_of_xmethod): Adjust.
12555         (call_xmethod): Adjust.
12556         * value.h: Include extension.h.
12557         (struct xmethod_worker): Don't forward-declare.
12558         (value_of_xmethod): Rename to...
12559         (value_from_xmethod): ... this, take rvalue-reference.
12560         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12561         (struct python_xmethod_worker): ... this, add constructor and
12562         destructor.
12563         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12564         (gdbpy_free_xmethod_worker_data): Rename to...
12565         (python_xmethod_worker::~python_xmethod_worker): ... this and
12566         adjust.
12567         (gdbpy_clone_xmethod_worker_data): Rename to...
12568         (python_xmethod_worker::clone): ... this and adjust.
12569         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12570         temporary vector.
12571         (gdbpy_get_xmethod_arg_types): Rename to...
12572         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12573         (gdbpy_get_xmethod_result_type): Rename to...
12574         (python_xmethod_worker::do_get_result_type): ... this and
12575         adjust.
12576         (gdbpy_invoke_xmethod): Rename to...
12577         (python_xmethod_worker::invoke): ... this and adjust.
12578         (new_python_xmethod_worker): Rename to...
12579         (python_xmethod_worker::python_xmethod_worker): ... this and
12580         adjust.
12581         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12582         Remove.
12583         (gdbpy_free_xmethod_worker_data): Remove.
12584         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12585         (gdbpy_get_xmethod_arg_types): Remove.
12586         (gdbpy_get_xmethod_result_type): Remove.
12587         (gdbpy_invoke_xmethod): Remove.
12588         * python/python.c (python_extension_ops): Remove obsolete
12589         callbacks.
12590
12591 2018-01-05  Pedro Alves  <palves@redhat.com>
12592
12593         PR gdb/18653
12594         * common/signals-state-save-restore.c
12595         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12596         find a custom handler preinstalled, instead of internal erroring.
12597         But only warn if !quiet.
12598         * common/signals-state-save-restore.h
12599         (save_original_signals_state): New parameter 'quiet'.
12600         * main.c (captured_main_1): Move save_original_signals_state call
12601         after option handling, and pass QUIET.
12602
12603 2018-01-05  Pedro Alves  <palves@redhat.com>
12604
12605         * spu-tdep.c (spu_catch_start): Pass
12606         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12607
12608 2018-01-05  Pedro Alves  <palves@redhat.com>
12609
12610         PR gdb/22670
12611         * ada-lang.c (literal_symbol_name_matcher): New function.
12612         (ada_get_symbol_name_matcher): Use it for
12613         symbol_name_match_type::SEARCH_NAME.
12614         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12615         it down instead of assuming symbol_name_match_type::FULL.
12616         * block.h (block_lookup_symbol): New parameter 'match_type'.
12617         * c-valprint.c (print_unpacked_pointer): Use
12618         lookup_symbol_search_name instead of lookup_symbol.
12619         * compile/compile-object-load.c (get_out_value_type): Pass down
12620         symbol_name_match_type::SEARCH_NAME.
12621         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12622         symbol_name_match_type::FULL.
12623         * cp-support.c (cp_get_symbol_name_matcher): Handle
12624         symbol_name_match_type::SEARCH_NAME.
12625         * infrun.c (insert_exception_resume_breakpoint): Use
12626         lookup_symbol_search_name.
12627         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12628         * psymtab.c (maintenance_check_psymtabs): Use
12629         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12630         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12631         SYMBOL_SEARCH_NAME.
12632         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12633         if symbol_name_match_type::SEARCH_NAME.
12634         (lookup_symbol_in_language): Pass down
12635         symbol_name_match_type::FULL.
12636         (lookup_symbol_search_name): New.
12637         (lookup_language_this): Pass down
12638         symbol_name_match_type::SEARCH_NAME.
12639         (lookup_symbol_aux, lookup_local_symbol): New parameter
12640         'match_type'.  Pass it down.
12641         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12642         (lookup_symbol_search_name): New declaration.
12643         (lookup_symbol_in_block): New 'match_type' parameter.
12644
12645 2018-01-05  Pedro Alves  <palves@redhat.com>
12646
12647         PR gdb/22670
12648         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12649         ada_lookup_symbol.
12650         (ada_lookup_symbol): Reimplement in terms of
12651         ada_lookup_symbol_list, bits factored out from
12652         ada_lookup_encoded_symbol.
12653
12654 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12655
12656         * ada-exp.y (write_object_renaming): When subscripting an array
12657         using a symbol as the index, pass the block in call to
12658         ada_lookup_encoded_symbol when looking that symbol up.
12659
12660 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12661
12662         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12663         TYPE_INDEX_TYPE.
12664
12665 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12666
12667         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12668         the case where VALUE_LVAL (val0) is not lval_memory.
12669
12670 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12671
12672         * ada-valprint.c (print_optional_low_bound): Handle
12673         character-indexed array printing like boolean-indexed array
12674         printing.
12675
12676 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12677
12678         * NEWS: Create a new section for the next release branch.
12679         Rename the section of the current branch, now that it has
12680         been cut.
12681
12682 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12683
12684         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12685         * version.in: Bump version to 8.1.50.DATE-git.
12686
12687 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12688
12689         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12690         Add field.
12691         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12692         Add field.
12693         (default_exception_support_info) <catch_handlers_sym>: Add field.
12694         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12695         (ada_exception_name_addr_1): Add "catch handlers" handling.
12696         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12697         Update all callers.
12698         (create_excep_cond_exprs) <ex>: Add parameter.
12699         (re_set_exception): Update create_excep_cond_exprs call.
12700         (print_it_exception, print_one_exception, print_mention_exception)
12701         (print_recreate_exception): Add "catch handler" handling.
12702         (allocate_location_catch_handlers, re_set_catch_handlers)
12703         (check_status_catch_handlers, print_it_catch_handlers)
12704         (print_one_catch_handlers, print_mention_catch_handlers)
12705         (print_recreate_catch_handlers): New function.
12706         (catch_handlers_breakpoint_ops): New variable.
12707         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12708         Add parameter.  Add "catch handler" handling.
12709         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12710         Add "catch handler" handling.
12711         (ada_exception_catchpoint_cond_string): Add "catch handler"
12712         handling.
12713         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12714         call.
12715         (catch_ada_handlers_command): New function.
12716         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12717         operations structure.
12718         (_initialize_ada_language): Add "catch handlers" command entry.
12719         * NEWS: Document "catch handlers" feature.
12720
12721 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12722
12723         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12724         account when creating the array type of the slice.
12725         (ada_value_slice): Likewise.
12726
12727 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12728
12729         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12730         New enum value.
12731         (create_array_type_with_stride): Add byte_stride_prop parameter.
12732         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12733         New parameter.  Update all callers in this file.
12734         (array_type_has_dynamic_stride): New function.
12735         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12736         of arrays with dynamic byte strides.
12737         * dwarf2read.c (read_array_type): Add support for dynamic
12738         DW_AT_byte_stride attributes.
12739
12740 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12741
12742         * dwarf2read.c (read_unspecified_type): Treat
12743         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12744
12745 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12746
12747         Update copyright year range in all GDB files.
12748
12749 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12750
12751         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12752         and gdb/testsuite/gdb.base/step-line.c.
12753
12754 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12755
12756         * copyright.py (main): Dump the contents of
12757         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12758         even if BY_HAND is empty.
12759
12760 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12761
12762         * top.c (print_gdb_version): Update Copyright year in version
12763         message.
12764
12765 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12766
12767         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12768
12769 For older changes see ChangeLog-2017.
12770 \f
12771 Local Variables:
12772 mode: change-log
12773 left-margin: 8
12774 fill-column: 74
12775 version-control: never
12776 coding: utf-8
12777 End: