python: Make two functions return gdbpy_ref<>
[external/binutils.git] / gdb / ChangeLog
1 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * python/py-prettyprint.c (pretty_print_one_value): Return
4         gdbpy_ref<>.
5         (print_string_repr): Adjust.
6         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
7         * python/python-internal.h (apply_varobj_pretty_printer): Return
8         gdbpy_ref<>.
9         * varobj.c (varobj_value_get_print_value): Adjust.
10
11 2018-09-08  Tom Tromey  <tom@tromey.com>
12
13         PR python/16047:
14         * python/py-prettyprint.c (pretty_print_one_value): Check for
15         to_string method.
16
17 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
18
19         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
20         replace_operator_with_call.
21
22 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
23
24         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
25
26 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
27
28         * ada-typeprint.c (print_range): Print the bounds using TYPE
29         rather than its TYPE_TARGET_TYPE.
30
31 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
32
33         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
34         call to ada_to_fixed_value_create.
35
36 2018-09-08  Jerome Guitton  <guitton@adacore.com>
37
38         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
39
40 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
41
42         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
43         by calls to error.
44
45 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
46
47         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
48         Move update of loop variable "fi".
49
50 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
51
52         * ada-lang.c (value_assign_to_component): In the case of
53         big-endian targets, extract the bits of the given VAL
54         using an src_offset of zero if container is not a scalar.
55
56 2018-09-06  Simon Ser  <contact@emersion.fr>
57
58         PR gdb/23105
59         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
60         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
61         * fbsd-tdep.c (fbsd_make_note_desc): New.
62         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
63         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
64         * target.h (enum target_object) Add FreeBSD-specific
65         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
66
67 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
68
69         * compile/compile-c.h (generate_c_for_variable_locations):
70         Change reference to pointer.
71         * compile/compile-c-support.c (compile_program) <compute>:
72         Likewise.
73         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
74         (generate_c_for_for_one_variable): Likewise
75         (generate_c_for_variable_locations): Likewise
76         * compile/compile-c-types.c (compile_c_instance::convert_type):
77         Likewise
78         * compile/compile-cplus-symbols.c (convert_one_symbol):
79         std::move the scope passed to enter_scope.
80         * compile/compile-cplus-types.c
81         (compile_cplus_instance::enter_scope): Make parameter
82         rvalue-reference.
83         (compile_cplus_instance::new_scope): Change reference to
84         pointer.
85         (compile_cplus_instance::convert_type): Likewise
86         (compile_cplus_convert_typedef): std::move the scope passed to
87         enter_scope.
88         (compile_cplus_convert_struct_or_union): Likewise.
89         (compile_cplus_convert_enum): Likewise.
90         (compile_cplus_convert_namespace): Likewise.
91         * compile/compile-cplus.h (compile_cplus_instance)
92         <enter_scope>: Make parameter rvalue-reference.
93         * compile/compile-internal.h (compile_instance)
94         <get_cached_type>: Likewise
95         * compile/compile-loc2c.c (push): Likewise
96         (pushf): Likewise
97         (unary): Likewise
98         (binary): Likewise
99         (print_label): Likewise
100         (pushf_register_address): Likewise
101         (pushf_register): Likewise
102         (do_compile_dwarf_expr_to_c): Likewise
103         (compile_dwarf_expr_to_c): Likewise
104         (compile_dwarf_bounds_to_c): Likewise
105         * compile/compile.c (compile_instance::get_cached_type):
106         Likewise
107         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
108         (compile_dwarf_bounds_to_c): Likewise
109         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
110         (dwarf2_compile_property_to_c): Likewise
111         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
112         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
113         Likewise
114
115 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
116
117         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
118         * tui/tui-data.c (init_content_element): Don't initialize it.
119
120 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
121
122         * tui/tui-data.h (struct tui_win_info)
123         <detail::opaque>: Remove.
124         * tui/tui-data.c (init_win_info): Remove assignment.
125
126 2018-09-05  Tom Tromey  <tom@tromey.com>
127
128         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
129         -Wformat-nonliteral.
130         * target-float.c (host_float_ops<T>::to_string)
131         (host_float_ops<T>::from_string): Use
132         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
133         * configure: Rebuild.
134
135 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
136
137         * printcmd.c (printf_c_string): Use
138         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
139         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
140
141 2018-09-05  Tom Tromey  <tom@tromey.com>
142
143         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
144
145 2018-09-05  Tom de Vries  <tdevries@suse.de>
146
147         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
148         with resolve_abstract_p == true.
149         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
150         defaulting to false. Propagate resolve_abstract_p to
151         dwarf2_fetch_die_loc_sect_off.
152         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
153         parameter, defaulting to false.
154         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
155         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
156         parameter.
157         * dwarf2read.h (struct die_info): Forward-declare.
158         (die_info_ptr): New typedef.
159         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
160
161 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
162
163         GDB 8.2 released.
164
165 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
166             Pedro Alves  <palves@redhat.com>
167
168         * gnulib/Makefile.in (aclocal_m4_deps): Move to
169         "aclocal-m4-deps.mk".  Include file here.
170         $(srcdir)/aclocal.m4: Add "configure.ac".
171         * gnulib/aclocal-m4-deps.mk: New file.
172         * gnulib/update-gnulib.sh: Automatically update
173         "aclocal-m4-deps.mk".
174
175 2018-09-04  Tom Tromey  <tom@tromey.com>
176
177         * configure: Rebuild.
178         * configure.ac: Remove multi-ice code.
179
180 2018-09-04  Tom Tromey  <tom@tromey.com>
181
182         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
183         (ada-exp.o): Update.
184
185 2018-09-04  Tom Tromey  <tom@tromey.com>
186
187         * Makefile.in (printcmd.o, target-float.o): Remove.
188         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
189
190 2018-09-04  Tom Tromey  <tom@tromey.com>
191
192         * gnulib/Makefile.in: Remove obsolete comment.
193         * Makefile.in: Remove obsolete comment.
194
195 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
196
197         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
198         line with '+'.
199
200 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
201
202         * riscv-tdep.c: Add 'prologue-value.h' include.
203         (struct riscv_unwind_cache): New struct.
204         (riscv_debug_unwinder): New global.
205         (riscv_scan_prologue): Update arguments, capture register details
206         from prologue scan.
207         (riscv_skip_prologue): Reformat arguments line, move end of
208         prologue calculation into riscv_scan_prologue.
209         (riscv_frame_cache): Update return type, create
210         riscv_unwind_cache, scan the prologue, and fill in remaining cache
211         details.
212         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
213         (riscv_frame_prev_register): Use the trad_frame within the
214         riscv_unwind_cache.
215         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
216         flag.
217
218 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
219
220         * trad-frame.h (trad_frame_set_realreg): Declare.
221         (trad_frame_set_addr): Declare.
222         * trad-frame.c (trad_frame_set_realreg): Define new function.
223         (trad_frame_set_addr): Define new function.
224         (trad_frame_set_reg_realreg): Use new function.
225         (trad_frame_set_reg_addr): Use new function.
226
227 2018-09-01  Keith Seitz  <keiths@redhat.com>
228
229         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
230         pulongest instead of "%lld".
231         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
232         ATTRIBUTE_UNUSED.
233
234 2018-08-31  Tom Tromey  <tom@tromey.com>
235
236         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
237         variant part type.
238
239 2018-08-31  Pedro Alves  <palves@redhat.com>
240
241         * gdbarch.h: Regenerate.
242
243 2018-08-31  Pedro Alves  <palves@redhat.com>
244
245         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
246         * target.h (Hardware watchpoint interfaces): Describe
247         continuable/steppable/non-steppable watchpoints.
248         * gdbarch.h, gdbarch.c: Regenerate.
249
250 2018-08-31  Pedro Alves  <palves@redhat.com>
251
252         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
253         Delete.
254         * s390-linux-nat.c
255         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
256         * target.h (target_ops::have_continuable_watchpoint): Delete.
257         (target_have_continuable_watchpoint): Delete.
258         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
259         * target-delegates.c: Regenerate.
260
261 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
262
263         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
264         the files present in "gnulib/import/m4/".
265
266 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
267
268         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
269         c.sw, c.swsp, and c.sdsp.
270
271 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
272
273         * riscv-tdep.c (struct riscv_inferior_data): Delete.
274         (riscv_read_misa_reg): Don't cache value read into inferior data.
275         (riscv_new_inferior_data): Delete.
276         (riscv_inferior_data_cleanup): Delete.
277         (riscv_inferior_data): Delete.
278         (riscv_invalidate_inferior_data): Delete.
279         (_initialize_riscv_tdep): Remove initialisation of inferior data.
280
281 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
282
283         * compile/compile-cplus-types.c
284         (compile_cplus_instance::leave_scope): Take the address of scope
285         object.
286         (compile_cplus_instance::convert_qualified_base): Compare quals
287         to 0.
288
289 2018-08-30  Keith Seitz  <keiths@redhat.com>
290
291         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
292         Use "%s" and host_address_to_string instead of "%p" in printf.
293
294 2018-08-29  Keith Seitz  <keiths@redhat.com>
295
296         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
297         and compile-cplus-types.c.
298         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
299         * c-lang.c (cplus_language_defn): Set C++ compile functions.
300         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
301         Declare.
302         * compile/compile-c-support.c: Include compile-cplus.h.
303         (load_libcompile): Templatize.
304         (get_compile_context): "New" function.
305         (c_get_compile_context): Use get_compile_context.
306         (cplus_get_compile_context): New function.
307         (cplus_push_user_expression, cplus_pop_user_expression)
308         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
309         (cplus_compute_program): Define new structs/functions.
310         * compile/compile-cplus-symmbols.c: New file.
311         * compile/compile-cplus-types.c: New file.
312         * compile/compile-cplus.h: New file.
313         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
314         Declare.
315         * compile/compile-object-load.c (get_out_value_type): Use
316         strncmp_iw when comparing symbol names.
317         (compile_object_load): Add mst_bss and mst_data.
318         * compile/compile.c (_initialize_compile): Remove
319         -Wno-implicit-function-declaration from `compile_args'.
320         * compile/gcc-cp-plugin.h: New file.
321         * NEWS: Mention C++ compile support and new debug options.
322
323 2018-08-29  Keith Seitz  <keiths@redhat.com>
324
325         * linespec.c (collect_info::add_symbol): Make virtual.
326         (struct symbol_searcher_collect_info): New struct.
327         (symbol_searcher::find_all_symbols): New method.
328         * symtab.h (class symbol_searcher): New class.
329
330 2018-08-29  Keith Seitz  <keiths@redhat.com>
331
332         * linespec.c (struct linespec) <function_symbols, label_symbols>:
333         Change to vector of block_symbol.  Update all users.
334         (struct collect_info) <symbols>: Likewise.
335         (collect_info::add_symbol): Take block_symbol as argument.
336         Update all callers.
337         (decode_compound_collector) <m_symbols>: Change type to vector
338         of block_symbol.  Update all users.
339         (decode_compound_collector::operator ()): Change parameter type
340         to block_symbol.
341         (find_method, find_function_symbols, find_linespec_symbols)
342         (find_label_symbols_in_block, find_label_symbols): Change symbol
343         vectors to block_symbol vectors.
344         * symtab.h (symbol_found_callback_ftype): Change parameter type to
345         block_symbol.
346
347 2018-08-29  Keith Seitz  <keiths@redhat.com>
348
349         * linespec.c (symbolp): Remove typedef and VEC definitions.
350         (bound_minimal_symbol_d): Likewise.
351
352 2018-08-29  Keith Seitz  <keiths@redhat.com>
353
354         * linespec.c (decode_compound_collector::decode_compound_collector):
355         Remove initialization for `m_symtabs'.
356         (decode_compound_collector::release_symbols): Change return type
357         to std::vector.  Update all callers.
358         (class decode_compound_collector) <m_symbols>: Change type to
359         std::vector.
360         (lookup_prefix_sym): Change return type to std::vector.  Update all
361         callers.
362         (compare_symbols): Remove.
363         (std_compare_symbols): Rename to `compare_symbols'.
364         (find_method): Change `sym_classes' parameter to std::vector.
365         Update all callers.  Use std::sort to sort sym_classes.
366         (find_linespec_symbols): Remove cleanup.
367
368 2018-08-29  Keith Seitz  <keiths@redhat.com>
369
370         * linespec.c (struct linespec) <minimal_symbols>: Change type to
371         std::vector.  Update all users.
372         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
373         (struct collect_info) <minimal_symbols>: Likewise.
374         (compare_msymbols): Return bool.  Change parameters to const
375         bound_minimal_symbol references.
376         (find_method, find_function_symbols, find_linespec_symbols): Change
377         `minsyms' parameter to std::vector.  Update all callers.
378
379 2018-08-29  Keith Seitz  <keiths@redhat.com>
380
381         * linespec.c (struct linespec) <label_symbols>: Change type to
382         std::vector.  Update all users.
383         (find_label_symbols_in_block): Change `result' parameter to
384         std::vector.  Update all callers.
385         (find_label_symbols): Return std::vector.  Update all callers.
386
387 2018-08-29  Keith Seitz  <keiths@redhat.com>
388
389         * linespec.c (struct linespec) <function_symbols>: Change type to
390         std::vector.  Update all users.
391         (struct collect_info) <function_symbols>: Likewise.
392         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
393         (std_compare_symbols): New function.
394         (find_method, find_function_symbols, find_linespec_symbols)
395         (find_label_symbols_in_block): Change `symbols' parameter to
396         std::vector.  Update all callers.
397         (find_label_symbols): Likewise for `function_symbols' and
398         `label_funcs_ret'.
399
400 2018-08-29  Keith Seitz  <keiths@redhat.com>
401
402         * linespec.c (symtab_vector_up): Define.
403         (struct linespec) <file_symtabs>: Change type to std::vector *.
404         Update all uses.
405         (struct collect_info) <file_symtabs>: Likewise.
406         (collect_symtabs_from_filename): Return symtab_vector_up.
407         Update all callers.
408         (decode_objc): Remove cleanup.
409         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
410         (symtab_collector::release_symtabs): Return symtab_vector_up.
411         Update all callers.
412         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
413         Update all users.
414         (collect_symtabs_from_filename, symtabs_from_filename): Return
415         symtab_vector_up.  Update all callers.
416
417 2018-08-29  Tom Tromey  <tom@tromey.com>
418
419         * csky-tdep.c (csky_analyze_prologue): Use
420         core_addr_to_string_nz.
421
422 2018-08-29  Tom Tromey  <tom@tromey.com>
423
424         * windows-nat.c (struct xlate_exception) <them>: Change type to
425         DWORD.
426         (xlate): Fix formatting.  Remove last entry.
427         (struct xlate_exception, xlate): Comment out.
428         (windows_nat_target::resume): Use ranged for.
429
430 2018-08-29  Jim Wilson  <jimw@sifive.com>
431
432         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
433         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
434         of NT_PRFPREG.
435         (riscv_linux_nat_target::store_registers): Likewise.
436
437 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
438
439         PR gdb/23555
440         PR gdb/23558
441         * gnulib/aclocal.m4: Regenerate.
442         * gnulib/config.in: Regenerate.
443         * gnulib/configure: Regenerate.
444         * gnulib/import/Makefile.am: Update.
445         * gnulib/import/Makefile.in: Update.
446         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
447         * gnulib/import/_Noreturn.h: ... this.
448         * gnulib/import/alloca.in.h: Update.
449         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
450         * gnulib/import/arg-nonnull.h: ... this.
451         * gnulib/import/assure.h: Update.
452         * gnulib/import/at-func.c: Update.
453         * gnulib/import/basename-lgpl.c: Update.
454         * gnulib/import/extra/snippet/c++defs.h: Rename to...
455         * gnulib/import/c++defs.h: ... this.
456         * gnulib/import/canonicalize-lgpl.c: Update.
457         * gnulib/import/cdefs.h: Update.
458         * gnulib/import/chdir-long.c: Update.
459         * gnulib/import/chdir-long.h: Update.
460         * gnulib/import/cloexec.c: Update.
461         * gnulib/import/cloexec.h: Update.
462         * gnulib/import/close.c: Update.
463         * gnulib/import/closedir.c: Update.
464         * gnulib/import/config.charset: Update.
465         * gnulib/import/dirent-private.h: Update.
466         * gnulib/import/dirent.in.h: Update.
467         * gnulib/import/dirfd.c: Update.
468         * gnulib/import/dirname-lgpl.c: Update.
469         * gnulib/import/dirname.h: Update.
470         * gnulib/import/dosname.h: Update.
471         * gnulib/import/dup-safer-flag.c: Update.
472         * gnulib/import/dup-safer.c: Update.
473         * gnulib/import/dup.c: Update.
474         * gnulib/import/dup2.c: Update.
475         * gnulib/import/errno.in.h: Update.
476         * gnulib/import/error.c: Update.
477         * gnulib/import/error.h: Update.
478         * gnulib/import/exitfail.c: Update.
479         * gnulib/import/exitfail.h: Update.
480         * gnulib/import/extra/update-copyright: Update.
481         * gnulib/import/fchdir.c: Update.
482         * gnulib/import/fcntl.c: Update.
483         * gnulib/import/fcntl.in.h: Update.
484         * gnulib/import/fd-hook.c: Update.
485         * gnulib/import/fd-hook.h: Update.
486         * gnulib/import/fd-safer-flag.c: Update.
487         * gnulib/import/fd-safer.c: Update.
488         * gnulib/import/fdopendir.c: Update.
489         * gnulib/import/filename.h: Update.
490         * gnulib/import/filenamecat-lgpl.c: Update.
491         * gnulib/import/filenamecat.h: Update.
492         * gnulib/import/flexmember.h: Update.
493         * gnulib/import/float+.h: Update.
494         * gnulib/import/float.c: Update.
495         * gnulib/import/float.in.h: Update.
496         * gnulib/import/fnmatch.c: Update.
497         * gnulib/import/fnmatch.in.h: Update.
498         * gnulib/import/fnmatch_loop.c: Update.
499         * gnulib/import/fpucw.h: Update.
500         * gnulib/import/frexp.c: Update.
501         * gnulib/import/frexpl.c: Update.
502         * gnulib/import/fstat.c: Update.
503         * gnulib/import/fstatat.c: Update.
504         * gnulib/import/getcwd-lgpl.c: Update.
505         * gnulib/import/getcwd.c: Update.
506         * gnulib/import/getdtablesize.c: Update.
507         * gnulib/import/getlogin_r.c: Update.
508         * gnulib/import/getprogname.c: Update.
509         * gnulib/import/getprogname.h: Update.
510         * gnulib/import/gettext.h: Update.
511         * gnulib/import/gettimeofday.c: Update.
512         * gnulib/import/glob-libc.h: Update.
513         * gnulib/import/glob.c: Update.
514         * gnulib/import/glob.in.h: Update.
515         * gnulib/import/glob_internal.h: Update.
516         * gnulib/import/glob_pattern_p.c: Update.
517         * gnulib/import/globfree.c: Update.
518         * gnulib/import/hard-locale.c: Update.
519         * gnulib/import/hard-locale.h: Update.
520         * gnulib/import/intprops.h: Update.
521         * gnulib/import/inttypes.in.h: Update.
522         * gnulib/import/isnan.c: Update.
523         * gnulib/import/isnand-nolibm.h: Update.
524         * gnulib/import/isnand.c: Update.
525         * gnulib/import/isnanl-nolibm.h: Update.
526         * gnulib/import/isnanl.c: Update.
527         * gnulib/import/itold.c: Update.
528         * gnulib/import/libc-config.h: Update.
529         * gnulib/import/limits.in.h: Update.
530         * gnulib/import/localcharset.c: Update.
531         * gnulib/import/localcharset.h: Update.
532         * gnulib/import/localtime-buffer.c: Update.
533         * gnulib/import/localtime-buffer.h: Update.
534         * gnulib/import/lstat.c: Update.
535         * gnulib/import/m4/00gnulib.m4: Update.
536         * gnulib/import/m4/__inline.m4: Update.
537         * gnulib/import/m4/absolute-header.m4: Update.
538         * gnulib/import/m4/alloca.m4: Update.
539         * gnulib/import/m4/builtin-expect.m4: Update.
540         * gnulib/import/m4/canonicalize.m4: Update.
541         * gnulib/import/m4/chdir-long.m4: Update.
542         * gnulib/import/m4/close.m4: Update.
543         * gnulib/import/m4/closedir.m4: Update.
544         * gnulib/import/m4/configmake.m4: Update.
545         * gnulib/import/m4/d-ino.m4: Update.
546         * gnulib/import/m4/d-type.m4: Update.
547         * gnulib/import/m4/dirent_h.m4: Update.
548         * gnulib/import/m4/dirfd.m4: Update.
549         * gnulib/import/m4/dirname.m4: Update.
550         * gnulib/import/m4/double-slash-root.m4: Update.
551         * gnulib/import/m4/dup.m4: Update.
552         * gnulib/import/m4/dup2.m4: Update.
553         * gnulib/import/m4/eealloc.m4: Update.
554         * gnulib/import/m4/environ.m4: Update.
555         * gnulib/import/m4/errno_h.m4: Update.
556         * gnulib/import/m4/error.m4: Update.
557         * gnulib/import/m4/exponentd.m4: Update.
558         * gnulib/import/m4/exponentl.m4: Update.
559         * gnulib/import/m4/extensions.m4: Update.
560         * gnulib/import/m4/extern-inline.m4: Update.
561         * gnulib/import/m4/fchdir.m4: Update.
562         * gnulib/import/m4/fcntl-o.m4: Update.
563         * gnulib/import/m4/fcntl.m4: Update.
564         * gnulib/import/m4/fcntl_h.m4: Update.
565         * gnulib/import/m4/fdopendir.m4: Update.
566         * gnulib/import/m4/filenamecat.m4: Update.
567         * gnulib/import/m4/flexmember.m4: Update.
568         * gnulib/import/m4/float_h.m4: Update.
569         * gnulib/import/m4/fnmatch.m4: Update.
570         * gnulib/import/m4/fnmatch_h.m4: Update.
571         * gnulib/import/m4/fpieee.m4: Update.
572         * gnulib/import/m4/frexp.m4: Update.
573         * gnulib/import/m4/frexpl.m4: Update.
574         * gnulib/import/m4/fstat.m4: Update.
575         * gnulib/import/m4/fstatat.m4: Update.
576         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
577         * gnulib/import/m4/getcwd-path-max.m4: Update.
578         * gnulib/import/m4/getcwd.m4: Update.
579         * gnulib/import/m4/getdtablesize.m4: Update.
580         * gnulib/import/m4/getlogin.m4: Update.
581         * gnulib/import/m4/getlogin_r.m4: Update.
582         * gnulib/import/m4/getpagesize.m4: Update.
583         * gnulib/import/m4/getprogname.m4: Update.
584         * gnulib/import/m4/gettimeofday.m4: Update.
585         * gnulib/import/m4/glibc21.m4: Update.
586         * gnulib/import/m4/glob.m4: Update.
587         * gnulib/import/m4/glob_h.m4: Update.
588         * gnulib/import/m4/gnulib-cache.m4: Update.
589         * gnulib/import/m4/gnulib-common.m4: Update.
590         * gnulib/import/m4/gnulib-comp.m4: Update.
591         * gnulib/import/m4/gnulib-tool.m4: Update.
592         * gnulib/import/m4/hard-locale.m4: Update.
593         * gnulib/import/m4/include_next.m4: Update.
594         * gnulib/import/m4/inttypes-pri.m4: Update.
595         * gnulib/import/m4/inttypes.m4: Update.
596         * gnulib/import/m4/isnand.m4: Update.
597         * gnulib/import/m4/isnanl.m4: Update.
598         * gnulib/import/m4/largefile.m4: Update.
599         * gnulib/import/m4/limits-h.m4: Update.
600         * gnulib/import/m4/localcharset.m4: Update.
601         * gnulib/import/m4/locale-fr.m4: Update.
602         * gnulib/import/m4/locale-ja.m4: Update.
603         * gnulib/import/m4/locale-zh.m4: Update.
604         * gnulib/import/m4/localtime-buffer.m4: Update.
605         * gnulib/import/m4/longlong.m4: Update.
606         * gnulib/import/m4/lstat.m4: Update.
607         * gnulib/import/m4/malloc.m4: Update.
608         * gnulib/import/m4/malloca.m4: Update.
609         * gnulib/import/m4/math_h.m4: Update.
610         * gnulib/import/m4/mbrtowc.m4: Update.
611         * gnulib/import/m4/mbsinit.m4: Update.
612         * gnulib/import/m4/mbsrtowcs.m4: Update.
613         * gnulib/import/m4/mbstate_t.m4: Update.
614         * gnulib/import/m4/memchr.m4: Update.
615         * gnulib/import/m4/memmem.m4: Update.
616         * gnulib/import/m4/mempcpy.m4: Update.
617         * gnulib/import/m4/memrchr.m4: Update.
618         * gnulib/import/m4/mkdir.m4: Update.
619         * gnulib/import/m4/mkstemp.m4: Update.
620         * gnulib/import/m4/mmap-anon.m4: Update.
621         * gnulib/import/m4/mode_t.m4: Update.
622         * gnulib/import/m4/msvc-inval.m4: Update.
623         * gnulib/import/m4/msvc-nothrow.m4: Update.
624         * gnulib/import/m4/multiarch.m4: Update.
625         * gnulib/import/m4/nocrash.m4: Update.
626         * gnulib/import/m4/off_t.m4: Update.
627         * gnulib/import/m4/onceonly.m4: Update.
628         * gnulib/import/m4/open-cloexec.m4: Update.
629         * gnulib/import/m4/open.m4: Update.
630         * gnulib/import/m4/openat.m4: Update.
631         * gnulib/import/m4/opendir.m4: Update.
632         * gnulib/import/m4/pathmax.m4: Update.
633         * gnulib/import/m4/rawmemchr.m4: Update.
634         * gnulib/import/m4/readdir.m4: Update.
635         * gnulib/import/m4/readlink.m4: Update.
636         * gnulib/import/m4/realloc.m4: Update.
637         * gnulib/import/m4/rename.m4: Update.
638         * gnulib/import/m4/rewinddir.m4: Update.
639         * gnulib/import/m4/rmdir.m4: Update.
640         * gnulib/import/m4/save-cwd.m4: Update.
641         * gnulib/import/m4/secure_getenv.m4: Update.
642         * gnulib/import/m4/setenv.m4: Update.
643         * gnulib/import/m4/signal_h.m4: Update.
644         * gnulib/import/m4/ssize_t.m4: Update.
645         * gnulib/import/m4/stat-time.m4: Update.
646         * gnulib/import/m4/stat.m4: Update.
647         * gnulib/import/m4/std-gnu11.m4: Update.
648         * gnulib/import/m4/stdbool.m4: Update.
649         * gnulib/import/m4/stddef_h.m4: Update.
650         * gnulib/import/m4/stdint.m4: Update.
651         * gnulib/import/m4/stdio_h.m4: Update.
652         * gnulib/import/m4/stdlib_h.m4: Update.
653         * gnulib/import/m4/strchrnul.m4: Update.
654         * gnulib/import/m4/strdup.m4: Update.
655         * gnulib/import/m4/strerror.m4: Update.
656         * gnulib/import/m4/string_h.m4: Update.
657         * gnulib/import/m4/strstr.m4: Update.
658         * gnulib/import/m4/strtok_r.m4: Update.
659         * gnulib/import/m4/sys_socket_h.m4: Update.
660         * gnulib/import/m4/sys_stat_h.m4: Update.
661         * gnulib/import/m4/sys_time_h.m4: Update.
662         * gnulib/import/m4/sys_types_h.m4: Update.
663         * gnulib/import/m4/tempname.m4: Update.
664         * gnulib/import/m4/time_h.m4: Update.
665         * gnulib/import/m4/unistd-safer.m4: Update.
666         * gnulib/import/m4/unistd_h.m4: Update.
667         * gnulib/import/m4/warn-on-use.m4: Update.
668         * gnulib/import/m4/wchar_h.m4: Update.
669         * gnulib/import/m4/wchar_t.m4: Update.
670         * gnulib/import/m4/wctype_h.m4: Update.
671         * gnulib/import/m4/wint_t.m4: Update.
672         * gnulib/import/malloc.c: Update.
673         * gnulib/import/malloc/scratch_buffer.h: Update.
674         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
675         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
676         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
677         * gnulib/import/malloca.c: Update.
678         * gnulib/import/malloca.h: Update.
679         * gnulib/import/malloca.valgrind: Update.
680         * gnulib/import/math.in.h: Update.
681         * gnulib/import/mbrtowc.c: Update.
682         * gnulib/import/mbsinit.c: Update.
683         * gnulib/import/mbsrtowcs-impl.h: Update.
684         * gnulib/import/mbsrtowcs-state.c: Update.
685         * gnulib/import/mbsrtowcs.c: Update.
686         * gnulib/import/memchr.c: Update.
687         * gnulib/import/memmem.c: Update.
688         * gnulib/import/mempcpy.c: Update.
689         * gnulib/import/memrchr.c: Update.
690         * gnulib/import/mkdir.c: Update.
691         * gnulib/import/mkstemp.c: Update.
692         * gnulib/import/msvc-inval.c: Update.
693         * gnulib/import/msvc-inval.h: Update.
694         * gnulib/import/msvc-nothrow.c: Update.
695         * gnulib/import/msvc-nothrow.h: Update.
696         * gnulib/import/open.c: Update.
697         * gnulib/import/openat-die.c: Update.
698         * gnulib/import/openat-priv.h: Update.
699         * gnulib/import/openat-proc.c: Update.
700         * gnulib/import/openat.c: Update.
701         * gnulib/import/openat.h: Update.
702         * gnulib/import/opendir.c: Update.
703         * gnulib/import/pathmax.h: Update.
704         * gnulib/import/pipe-safer.c: Update.
705         * gnulib/import/rawmemchr.c: Update.
706         * gnulib/import/readdir.c: Update.
707         * gnulib/import/readlink.c: Update.
708         * gnulib/import/realloc.c: Update.
709         * gnulib/import/ref-add.sin: Update.
710         * gnulib/import/ref-del.sin: Update.
711         * gnulib/import/rename.c: Update.
712         * gnulib/import/rewinddir.c: Update.
713         * gnulib/import/rmdir.c: Update.
714         * gnulib/import/same-inode.h: Update.
715         * gnulib/import/save-cwd.c: Update.
716         * gnulib/import/save-cwd.h: Update.
717         * gnulib/import/scratch_buffer.h: Update.
718         * gnulib/import/secure_getenv.c: Update.
719         * gnulib/import/setenv.c: Update.
720         * gnulib/import/signal.in.h: Update.
721         * gnulib/import/stat-time.c: Update.
722         * gnulib/import/stat-time.h: Update.
723         * gnulib/import/stat-w32.c: Update.
724         * gnulib/import/stat-w32.h: Update.
725         * gnulib/import/stat.c: Update.
726         * gnulib/import/stdbool.in.h: Update.
727         * gnulib/import/stddef.in.h: Update.
728         * gnulib/import/stdint.in.h: Update.
729         * gnulib/import/stdio.in.h: Update.
730         * gnulib/import/stdlib.in.h: Update.
731         * gnulib/import/str-two-way.h: Update.
732         * gnulib/import/strchrnul.c: Update.
733         * gnulib/import/strdup.c: Update.
734         * gnulib/import/streq.h: Update.
735         * gnulib/import/strerror-override.c: Update.
736         * gnulib/import/strerror-override.h: Update.
737         * gnulib/import/strerror.c: Update.
738         * gnulib/import/string.in.h: Update.
739         * gnulib/import/stripslash.c: Update.
740         * gnulib/import/strnlen1.c: Update.
741         * gnulib/import/strnlen1.h: Update.
742         * gnulib/import/strstr.c: Update.
743         * gnulib/import/strtok_r.c: Update.
744         * gnulib/import/sys_stat.in.h: Update.
745         * gnulib/import/sys_time.in.h: Update.
746         * gnulib/import/sys_types.in.h: Update.
747         * gnulib/import/tempname.c: Update.
748         * gnulib/import/tempname.h: Update.
749         * gnulib/import/time.in.h: Update.
750         * gnulib/import/unistd--.h: Update.
751         * gnulib/import/unistd-safer.h: Update.
752         * gnulib/import/unistd.in.h: Update.
753         * gnulib/import/unsetenv.c: Update.
754         * gnulib/import/verify.h: Update.
755         * gnulib/import/extra/snippet/warn-on-use.h: Update.
756         * gnulib/import/wchar.in.h: Update.
757         * gnulib/import/wctype.in.h: Update.
758         * gnulib/import/xalloc-oversized.h: Update.
759         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
760         "53e2c179f26a890fa6685af4b6c1397ee370433b".
761
762 2018-08-16  Gary Benson <gbenson@redhat.com>
763
764         PR gdb/13000:
765         * gdb/main.c (captured_main_1): Exit with nonzero status
766         in batch mode if the last command to be executed failed.
767         * NEWS: Mention the above.
768
769 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
770
771         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
772         end of warning message.
773
774 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
775
776         PR gdb/22943:
777         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
778         (aarch64_extract_return_value): Use
779         aapcs_is_vfp_call_or_return_candidate.
780         (aarch64_return_in_memory): Likewise.
781         (aarch64_store_return_value): Likewise.
782
783 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
784
785         * aarch64-tdep.c
786         (aapcs_is_vfp_call_or_return_candidate): Make static
787         (pass_in_v_or_stack): Remove function.
788         (pass_in_v_vfp_candidate): New function.
789         (aarch64_push_dummy_call): Check for float register candidates.
790
791 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
792
793         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
794         (aapcs_is_vfp_call_or_return_candidate_1): New function.
795         (aapcs_is_vfp_call_or_return_candidate): Likewise.
796
797 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
798
799         PR build/23399
800         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
801         (struct ipa_sym_addresses): Rename to...
802         (struct ipa_sym_addresses_common): ... this.
803         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
804
805 2018-08-28  Tom Tromey  <tom@tromey.com>
806
807         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
808         (token_fifo): Now a std::vector.
809         (yylex, c_parse): Update.
810         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
811         (token_fifo): Now a std::vector.
812         (yylex, d_parse): Update.
813         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
814         (token_fifo): Now a std::vector.
815         (yylex, go_parse): Update.
816
817 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
818
819         * parser-defs.h (struct type_stack) <elements>: Change type to
820         std::vector<union type_stack_elt>.
821         <depth, size>: Remove.
822         * parse.c (parse_exp_in_context_1): Adjust.
823         (type_stack_reserve): Remove.
824         (check_type_stack_depth): Remove.
825         (insert_into_type_stack): Adjust to std::vector.
826         (insert_type): Likewise.
827         (push_type): Likewise.
828         (push_type_int): Likewise.
829         (insert_type_address_space): Likewise.
830         (pop_type): Likewise.
831         (pop_type_int): Likewise.
832         (pop_typelist): Likewise.
833         (pop_type_stack): Likewise.
834         (append_type_stack): Likewise.
835         (push_type_stack): Likewise.
836         (get_type_stack): Likewise.
837         (type_stack_cleanup): Likewise.
838         (push_typelist): Likewise.
839         (follow_types): Likewise.
840         (_initialize_parse): Likewise.
841
842 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
843
844         * NEWS: Mention csky target.
845
846 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
847             Hafiz Abid Qadeer  <abidh@codesourcery.com>
848             Don Breazeal  <donb@codesourcery.com>
849
850         * csky-linux-tdep.c: New file.
851         * csky-tdep.c: Likewise.
852         * csky-tdep.h: Likewise.
853         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
854         csky-tdep.o.
855         (HFILES_NO_SRCDIR): Add csky-tdep.h.
856         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
857         * configure.tgt: Add csky support.
858
859 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
860
861         * python/py-framefilter.c (py_print_frame): Print frame architecture
862         when printing on an MI output.
863
864 2018-08-27  Tom Tromey  <tom@tromey.com>
865
866         PR build/23087:
867         * configure: Rebuild.
868         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
869
870 2018-08-27  Tom Tromey  <tom@tromey.com>
871
872         * aarch64-linux-tdep.c
873         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
874         casts to int.
875
876 2018-08-27  Tom Tromey  <tom@tromey.com>
877
878         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
879         unsigned.
880         (ppc64_standard_linkage1, ppc64_standard_linkage2)
881         (ppc64_standard_linkage3, ppc64_standard_linkage4)
882         (ppc64_standard_linkage5, ppc64_standard_linkage6)
883         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
884         unsigned.
885
886 2018-08-27  Tom Tromey  <tom@tromey.com>
887
888         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
889         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
890
891 2018-08-27  Tom Tromey  <tom@tromey.com>
892
893         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
894         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
895         ULONGEST_MAX.
896         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
897         ULONGEST_MAX.
898         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
899         ULONGEST_MAX.
900         * sparc-linux-tdep.c (sparc32_linux_sigframe)
901         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
902         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
903         ULONGEST_MAX.
904         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
905         (ppc64_linux_sigaction_tramp_frame)
906         (ppc32_linux_sighandler_tramp_frame)
907         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
908         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
909         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
910         * mn10300-linux-tdep.c (am33_linux_sigframe)
911         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
912         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
913         * mips-linux-tdep.c (mips_linux_o32_sigframe)
914         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
915         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
916         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
917         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
918         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
919         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
920         * microblaze-linux-tdep.c
921         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
922         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
923         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
924         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
925         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
926         * common/common-types.h (ULONGEST_MAX): New define.
927         (CORE_ADDR_MAX): Fix formatting.
928         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
929         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
930         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
931         (arm_linux_rt_sigreturn_tramp_frame)
932         (arm_eabi_linux_sigreturn_tramp_frame)
933         (arm_eabi_linux_rt_sigreturn_tramp_frame)
934         (thumb2_eabi_linux_sigreturn_tramp_frame)
935         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
936         (arm_linux_restart_syscall_tramp_frame)
937         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
938         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
939         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
940         ULONGEST_MAX.
941         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
942
943 2018-08-27  Tom Tromey  <tom@tromey.com>
944
945         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
946         CORE_ADDR_MAX.
947         * mips-tdep.c (mips_deal_with_atomic_sequence)
948         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
949         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
950         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
951         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
952         CORE_ADDR_MAX.
953         * aarch64-tdep.c (aarch64_software_single_step): Use
954         CORE_ADDR_MAX.
955
956 2018-08-27  Tom Tromey  <tom@tromey.com>
957
958         * linespec.c (complete_linespec_component): Add cast to "char".
959         * completer.c (completion_tracker::build_completion_result): Add
960         cast to "char".
961
962 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
963
964         * solist.h (struct solist, struct target_so_ops): Fix
965         indentation.
966
967 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
968
969         * ada-tasks.c (ada_task_info_s): Remove typedef.
970         (DEF_VEC_O(ada_task_info_s)): Remove.
971         (struct ada_tasks_inferior_data): Initialize fields.
972         <task_list>: Make an std::vector.
973         (get_ada_tasks_inferior_data): Allocate with new.
974         (ada_get_task_number): Adjust.
975         (get_task_number_from_id): Likewise.
976         (valid_task_id): Likewise.
977         (ada_get_task_info_from_ptid): Likewise.
978         (iterate_over_live_ada_tasks): Likewise.
979         (add_ada_task): Likewise.
980         (read_known_tasks): Likewise.
981         (ada_build_task_list): Likewise.
982         (print_ada_task_info): Likewise.
983         (info_task): Likewise.
984         (task_command_1): Likewise.
985
986 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
987
988         * ada-lang.c (add_angle_brackets): Return std::string.
989
990 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
991
992         * python/py-threadevent.c (py_get_event_thread): Initialize
993         pythread.
994
995 2018-08-24  Pedro Alves  <palves@redhat.com>
996
997         * python/py-bpevent.c (create_breakpoint_event_object): Use
998         copy-initialization.
999         * python/py-continueevent.c (emit_continue_event): Use
1000         copy-initialization.
1001         * python/py-exitedevent.c (create_exited_event_object): Return a
1002         gdbpy_ref<>.
1003         (emit_exited_event): Use copy-initialization.
1004         * python/py-inferior.c (python_new_inferior)
1005         (python_inferior_deleted, add_thread_object): Use
1006         copy-initialization.
1007         * python/py-infevents.c (create_inferior_call_event_object)
1008         (create_register_changed_event_object)
1009         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1010         (emit_inferior_call_event, emit_memory_changed_event)
1011         (emit_register_changed_event): Use copy-initialization.
1012         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1013         Return a gdbpy_ref<>.
1014         (emit_new_objfile_event): Use copy-initialization.
1015         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1016         (emit_clear_objfiles_event): Use copy-initialization.
1017         * python/py-signalevent.c (create_signal_event_object): Use
1018         copy-initialization.
1019         * python/py-threadevent.c (create_thread_event_object): Use
1020         copy-initialization.
1021
1022 2018-08-24  Pedro Alves  <palves@redhat.com>
1023             Simon Marchi  <simon.marchi@ericsson.com>
1024
1025         PR gdb/23379
1026         * python/py-continueevent.c: Include "gdbthread.h".
1027         (create_continue_event_object): Add intro comment.  Add 'ptid'
1028         parameter.  Use it to find thread to pass to
1029         create_thread_event_object.
1030         (emit_continue_event): Pass PTID down to
1031         create_continue_event_object.
1032         * python/py-event.h (py_get_event_thread): Declare.
1033         (create_thread_event_object): Remove default from 'thread'
1034         parameter.
1035         * python/py-stopevent.c (create_stop_event_object): Use
1036         py_get_event_thread.
1037         * python/py-threadevent.c (get_event_thread): Rename to ...
1038         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1039         and use it to find the thread.
1040         (create_thread_event_object): Assert that THREAD isn't null.
1041         Don't find the event thread here.
1042
1043 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1044
1045         * block.h (blockrange, blockranges): New struct declarations.
1046         (struct block): Add new field named `ranges'.
1047         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1048         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1049         macros for accessing ranges in struct block.
1050         (make_blockranges): New declaration.
1051         block.c (make_blockranges): New function.
1052         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1053         for block.
1054         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1055         * blockframe.c (cache_pc_function_block): New static global.
1056         (clear_pc_function_cache): Clear cache_pc_function_block.
1057         (find_pc_partial_function): Move comment to symtab.h.  Add
1058         support for non-contiguous blocks.
1059         * cli/cli-cmds.c (block.h): Include.
1060         (print_disassembly): Handle printing of non-contiguous blocks.
1061         (disassemble_current_function): Likewise.
1062         (disassemble_command): Likewise.
1063
1064         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1065         BLOCK_START.
1066         * blockframe.c (get_pc_function_start): Likewise.
1067         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1068         (gcc_symbol_address): Likewise.
1069         * compile/compile-object-run.c (compile_object_run): Likewise.
1070         * compile/compile.c (get_expr_block_and_pc): Likewise.
1071         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1072         (func_addr_to_tail_call_list): Likewise.
1073         * findvar.c (default_read_var_value): Likewise.
1074         * inline-frame.c (inline_frame_this_id): Likewise.
1075         (skip-inline_frames): Likewise.
1076         * infcmd.c (until_next_command): Likewise.
1077         * linespec.c (convert_linespec_to_sals): Likewise.
1078         * parse.c (parse_exp_in_context_1): Likewise.
1079         * printcmd.c (build_address_symbolic): likewise.
1080         (info_address_command): Likewise.
1081         symtab.c (find_function_start_sal): Likewise.
1082         (skip_prologue_sal): Likewise.
1083         (find_function_alias_target): Likewise.
1084         (find_gnu_ifunc): Likewise.
1085         * stack.c (find_frame_funname): Likewise.
1086         * symtab.c (fixup_symbol_section): Likewise.
1087         (find_function_start_sal): Likewise.
1088         (skip_prologue_sal): Likewsie.
1089         (find_function_alias_target): Likewise.
1090         (find_gnu_ifunc): Likewise.
1091         * tracepoint.c (info_scope_command): Likewise.
1092         * value.c (value_fn_field): Likewise.
1093
1094         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1095         in place of find_pc_partial_function.
1096         * blockframe.c (find_function_entry_range_from_pc): New function.
1097         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1098         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1099         for each range in a block.
1100
1101
1102 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1103
1104         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1105         incrementation.
1106
1107 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1108
1109         * solib-svr4.c (read_program_headers_from_bfd): Return
1110         gdb::optional<gdb::byte_vector>.
1111         (svr4_exec_displacement): Adjust.
1112
1113 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1114
1115         * solib-svr4.c (read_program_header): Return
1116         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1117         (find_program_interpreter): Return
1118         gdb::optional<gdb::byte_vector>.
1119         (scan_dyntag_auxv): Adjust.
1120         (enable_break): Adjust.
1121         (svr4_exec_displacement): Adjust.
1122
1123 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1124
1125         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1126         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1127
1128 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1129
1130         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1131         string_vprintf.
1132         * guile/scm-utils.c (gdbscm_printf): Likewise.
1133         * serial.c (serial_printf): Likewise.
1134         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1135
1136 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1137
1138         * stack.c (print_frame): Print frame architecture when printing on
1139         an MI output.
1140         * NEWS: Mention new "arch" attribute in frame output.
1141
1142 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1143
1144         * arch/aarch64.h (aarch64_regnum): Update comment.
1145
1146 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1147
1148         * NEWS: Add SVE to 8.2 section.
1149
1150 2018-08-21  Pedro Alves  <palves@redhat.com>
1151
1152         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1153         out from gdbscm_parse_function_args.
1154         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1155         gdbscm_parse_function_args_1.
1156
1157 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1158
1159         PR gdb/17816
1160         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1161         operator.
1162
1163 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1164
1165         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1166
1167 2018-08-19  Michael Spang  <spang@google.com>
1168
1169         PR gdb/11786
1170         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1171         for PT_TLS segments.
1172
1173 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1174
1175         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1176         dwarf_variable_value.
1177         * dwarf2-frame.c (class dwarf_expr_executor):
1178         Add override for dwarf_variable_value.
1179         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1180         (class symbol_needs_eval_context): Likewise.
1181         (indirect_synthetic_pointer): Add forward declaration.
1182         (sect_variable_value): New function.
1183         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1184         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1185         for DW_OP_GNU_variable_value.
1186
1187 2018-08-16  Tom Tromey  <tom@tromey.com>
1188
1189         * top.c (read_command_file): Update.
1190         (command_line_input): Remove "repeat" argument.
1191         * ada-lang.c (get_selections): Update.
1192         * linespec.c (decode_line_2): Update.
1193         * defs.h (command_line_input): Remove argument.
1194         * cli/cli-script.c (read_next_line): Update.
1195         * python/py-gdb-readline.c: Update.
1196
1197 2018-08-17  Tom Tromey  <tom@tromey.com>
1198
1199         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1200         command_line_input.
1201
1202 2018-08-15  Tom Tromey  <tom@tromey.com>
1203
1204         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1205
1206 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1207
1208         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1209         If used, use find_pc_partial_function to find address range
1210         to disassemble.
1211         * mi/mi-main.c (mi_cmd_list_features): Report
1212         "data-disassemble-a-option" feature.
1213         * NEWS: Mention new -data-disassemble option -a.
1214
1215 2018-08-13  Tom Tromey  <tom@tromey.com>
1216
1217         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1218
1219 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1220
1221         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1222         (aarch64_linux_collect_sve_regset): Likewise.
1223         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1224         * regcache.h (regcache_map_entry_size): New function.
1225
1226 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1227
1228         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1229         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1230         (SVE_HEADER_VL_LENGTH): Likewise.
1231         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1232         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1233         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1234         (SVE_HEADER_SIZE_OFFSET): Likewise.
1235         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1236         (SVE_HEADER_VL_OFFSET): Likewise.
1237         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1238         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1239         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1240         (SVE_HEADER_SIZE): Likewise.
1241         (aarch64_linux_core_read_vq): Add function.
1242         (aarch64_linux_core_read_description): Check for SVE section.
1243
1244 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1245
1246         * aarch64-fbsd-tdep.c
1247         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1248         collect_size.
1249         * aarch64-linux-tdep.c
1250         (aarch64_linux_iterate_over_regset_sections): Likewise.
1251         * alpha-linux-tdep.c
1252         (alpha_linux_iterate_over_regset_sections):
1253         * alpha-nbsd-tdep.c
1254         (alphanbsd_iterate_over_regset_sections): Likewise.
1255         * amd64-fbsd-tdep.c
1256         (amd64fbsd_iterate_over_regset_sections): Likewise.
1257         * amd64-linux-tdep.c
1258         (amd64_linux_iterate_over_regset_sections): Likewise.
1259         * arm-bsd-tdep.c
1260         (armbsd_iterate_over_regset_sections): Likewise.
1261         * arm-fbsd-tdep.c
1262         (arm_fbsd_iterate_over_regset_sections): Likewise.
1263         * arm-linux-tdep.c
1264         (arm_linux_iterate_over_regset_sections): Likewise.
1265         * corelow.c (get_core_registers_cb): Likewise.
1266         (core_target::fetch_registers): Likewise.
1267         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1268         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1269         * gdbarch.h (void): Regenerate.
1270         * gdbarch.sh: Add supply_size and collect_size.
1271         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1272         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1273         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1274         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1275         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1276         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1277         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1278         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1279         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1280         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1281         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1282         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1283         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1284         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1285         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1286         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1287         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1288         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1289         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1290         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1291         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1292         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1293         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1294         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1295         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1296         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1297         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1298         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1299         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1300         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1301
1302 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1303
1304         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1305         with string_printf.
1306
1307 2018-08-10  Keith Seitz  <keiths@redhat.com>
1308
1309         * compile/compile-c-support.c (add_code_header, add_code_footer):
1310         Move into policy class.
1311         (c_push_user_expression, pop_user_expression_nop)
1312         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1313         (compile_program): New host class.
1314         (c_compile_program): New typedef.
1315         (c_compute_porgram): Use c_compile_program.
1316
1317 2018-08-10  Keith Seitz  <keiths@redhat.com>
1318
1319         * compile/compile-internal.h (compile_instance::~compile_instance):
1320         Remove calls to htab_delete.
1321         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1322         * compile.c (compile_instance::compile_instance): Initialize
1323         htab unique pointers.
1324         (compile_instance::get_cached_type, compile_instance::insert_type)
1325         (compile_instance::error_symbol_once): Update for unique_ptr.
1326
1327 2018-08-10  Keith Seitz  <keiths@redhat.com>
1328
1329         * compile/compile-c-symbols.c (struct symbol_error)
1330         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1331         (compile_instance::insert_symbol_error)
1332         (compile_instance::error_symbol_once): Move to ...
1333         * compile/compile.c: ... here.
1334
1335 2018-08-10  Keith Seitz  <keiths@redhat.com>
1336
1337         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1338         instead of `new_compile_instance'.
1339         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1340         Update description.
1341         If the symbol error map is not initialized, create it.
1342         (generate_c_for_for_one_symbol): Do not check/initialize
1343         the symbol error map.
1344         * compile/compile-c-types.c (compile_c_instance): Make a class.
1345         Update all callers.
1346         (compile_instance::compile_instance): Initialize the type cache.
1347         (get_cached_type): New function.
1348         (insert_type): Update description.
1349         (compile_c_instance::m_default_cflags): Define.
1350         (convert_type): Update description.  Use get_cached_type.
1351         (delete_instance): Moved to destructor.
1352         (new_compile_instance): Moved to constructor.
1353         * compile/compile-c.h (compile_c_instance): Make class inheriting
1354         from compile_instance.
1355         <base>: Remove field.
1356         <type_map, symbol_err_map>: Move to base class.
1357         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1358         * compile/compile-internal.h (compile_instance): Make class.
1359         <type_map_t, symbol_err_map_t>: Define.
1360         <fe>: Rename to `m_gcc_fe'.
1361         <scope, block, gcc_target_options>: Add `m_' prefix.
1362         <m_type_map, m_symbol_err_map>: New fields, moved from
1363         compile_c_instance.
1364         <destroy>: Remove.
1365         (convert_type, new_compile_instance): Remove.
1366         * compile/compile.c (cleanup_compile_instance): Remove.
1367         (compile_to_object): Use unique_ptr to eliminate cleanups.
1368         (compile_instance::set_print_callback, compile_instance::version)
1369         (compile_instance::set_verbose)
1370         (compile_instance::set_driver_filename)
1371         (compile_instance::set_triplet_regexp)
1372         (compile_instance::set_arguments)
1373         (compile_instance::set_source_file)
1374         (compile_instance::compile): Define.
1375
1376 2018-08-10  Keith Seitz  <keiths@redhat.com>
1377
1378         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1379         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1380         gcc-c-fe.def to define C plugin.
1381         (delete_instance): Delete `c_plugin'.
1382         (new_compile_instance): Initialize `c_plugin'.
1383         * compile/compile-c.h: Include gcc_c_plugin.h.
1384         (struct compile_c_instance) <c_plugin>: New member.
1385         * gcc-c-plugin.h: New file.
1386         Update all callers with API change.
1387
1388 2018-08-10  Keith Seitz  <keiths@redhat.com>
1389
1390         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1391         (HFILES_NO_SRCDIR): ... to here.
1392         Add compile-internal.h and compile-c.h.
1393         * compile/compile-c-support.c: Include compile-c.h.
1394         * compile/compile-c-symbols.c: Include compile-c.h.
1395         (generate_c_for_variable_locations): Update comment.
1396         * compile/compile-c-types.c: Include compile-c.h.
1397         * compile/compile-c.h: New file -- moved C language declarations
1398         from other files here.
1399         * compile/compile-internal.h: Do not include hashtab.h or
1400         common/enum-flags.h.
1401         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1402         (gcc_convert_symbol, gcc_symbol_address)
1403         (generate_c_for_variable_locations, c_get_mode_for_size)
1404         (c_get_range_decl_name): Definitions moved to compile-c.h.
1405         * compile/compile-loc2c.c: Include compile-c.h.
1406
1407 2018-08-10  Keith Seitz  <keiths@redhat.com>
1408
1409         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1410         (c_symbol_substitution_name): ... this.
1411         Update all callers.
1412
1413 2018-08-10  Keith Seitz  <keiths@redhat.com>
1414
1415         * compile/compile-c-support.c (c_compute_program): Use
1416         unique_xmalloc_ptr to eliminate cleanup.
1417         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1418         Return a unique_xmalloc_ptr and eliminate cleanup.
1419         * compile/compile-internal.h (generate_c_for_variable_locations):
1420         Return unique_xmalloc_ptr and update description.
1421
1422 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1423
1424         * corelow.c (core_target::get_core_register_section): Rename
1425         min_size to section_min_size.
1426
1427 2018-08-09  Jim Wilson  <jimw@sifive.com>
1428
1429         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1430         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1431         * NEWS: Mention new GNU/Linux RISC-V target.
1432         * configure.host: Add riscv*-*-linux*.
1433         * configure.nat: Add riscv*.
1434         * configure.tgt: Add riscv*-*-linux*.
1435         * riscv-linux-nat.c: New file.
1436         * riscv-linux-tdep.c: New file.
1437
1438 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1439
1440         * infrun.c (resume): Make static, add forward declaration.
1441         (proceed): Update header comment.
1442         * infrun.h (resume): Delete declaration.
1443
1444 2018-08-09  Tom Tromey  <tom@tromey.com>
1445
1446         * riscv-tdep.h: Minor formatting fixes.
1447
1448 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1449
1450         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1451         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1452         (test_mkdir_recursive): Likewise.
1453         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1454
1455 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1456
1457         * valarith.c (value_subscripted_rvalue): If an array is not in
1458         memory, and we don't know the upper bound, then we can't know that
1459         the requested element exists or not.
1460
1461 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1462
1463         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1464         (target_options_to_string): Add comment.
1465
1466 2018-08-08  Tom Tromey  <tom@tromey.com>
1467
1468         * unittests/scoped_mmap-selftests.c: Check result of "write".
1469
1470 2018-08-08  Jim Wilson  <jimw@sifive.com>
1471
1472         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1473         (decode_register_index_short): New.
1474         (decode_j_type_insn, decode_cj_type_insn): New.
1475         (decode_b_type_insn, decode_cb_type_insn): New.
1476         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1477         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1478         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1479         is_c_sw_insn instead of is_sw_insn.
1480         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1481         (riscv_software_single_step): New.
1482         * riscv-tdep.h (riscv_software_single_step): Declare.
1483
1484         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1485         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1486
1487 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1488
1489         PR gdb/18050:
1490         * target.c (dispose_inferior): Don't dispose of inferiors that are
1491         already killed.
1492
1493 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1494
1495         * remote.c (remote_target::download_tracepoint): Change char* to
1496         const char*.
1497
1498 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1499
1500         * target.h (target_options_to_string): Return an std::string.
1501         * target.c (str_comma_list_concat_elem): Return void, use
1502         std::string.
1503         (do_option): Likewise.
1504         (target_options_to_string): Return an std::string.
1505         * linux-nat.c (linux_nat_target::wait): Adjust.
1506         * target-debug.h (target_debug_print_options): Adjust.
1507
1508 2018-08-07  Tom Tromey  <tom@tromey.com>
1509
1510         * Makefile.in (CPPFLAGS): New variable.
1511         (INTERNAL_CPPFLAGS): Use it.
1512
1513 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1514
1515         * NEWS: Mention the index cache.
1516
1517 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1518
1519         * common/pathstuff.h (get_standard_cache_dir): New.
1520         * common/pathstuff.c (get_standard_cache_dir): New.
1521         * build-id.h (build_id_to_string): New.
1522         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1523         DEBUG_STR_SUFFIX): Move to here.
1524         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1525         DEBUG_STR_SUFFIX): Move from there.
1526         (write_psymtabs_to_index): Make non-static, add basename
1527         parameter.  Write to temporary files, rename when done.
1528         (save_gdb_index_command): Adjust call to
1529         write_psymtabs_to_index.
1530         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1531         field.
1532         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1533         (get_gdb_index_contents_from_cache): New.
1534         (get_gdb_index_contents_from_cache_dwz): New.
1535         (dwarf2_initialize_objfile): Read index from cache.
1536         (dwarf2_build_psymtabs): Save to index.
1537         * dwarf-index-cache.h: New file.
1538         * dwarf-index-cache.c: New file.
1539         * dwarf-index-write.h: New file.
1540
1541 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1542
1543         * gnulib/aclocal.m4: Re-generate.
1544         * gnulib/config.in: Re-generate.
1545         * gnulib/configure: Re-generate.
1546         * gnulib/import/Makefile.am: Re-generate.
1547         * gnulib/import/Makefile.in: Re-generate.
1548         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1549         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1550         * gnulib/import/m4/mkdir.m4: New file.
1551         * gnulib/import/mkdir.c: New file.
1552         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1553         module.
1554
1555 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1556
1557         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1558         * common/scoped_mmap.c: New file.
1559         * common/scoped_mmap.h (destroy): New method.
1560         (~scoped_mmap, reset): Use destroy.
1561         (scoped_mmap): New move constructor.
1562         (mmap_file): New declaration.
1563         * unittests/scoped_mmap-selftests.c (test_normal,
1564         test_invalid_filename, run_tests): New functions.
1565         (_initialize_scoped_mmap_selftests): Register selftest.
1566
1567 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1568
1569         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1570         (read_gdb_index_from_buffer): ... this.  Remove section
1571         parameter, add buffer parameter.
1572         (get_gdb_index_contents_ftype,
1573         get_gdb_index_contents_dwz_ftype): New typedefs.
1574         (dwarf2_read_gdb_index): Add callback parameters to get the
1575         index contents.
1576         (get_gdb_index_contents_from_section): New.
1577         (dwarf2_initialize_objfile): Update call to
1578         dwarf2_read_gdb_index.
1579
1580 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1581
1582         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1583         (gdb_open_cloexec): Likewise.
1584         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1585         (commandline_from_pid): Likewise.
1586         (linux_xfer_osdata_threads): Likewise.
1587         (linux_xfer_osdata_fds): Likewise.
1588         * ada-lang.c (is_package_name): Likewise.
1589         * auxv.c (procfs_xfer_auxv): Likewise.
1590         * breakpoint.c (print_one_breakpoint_location): Use
1591         uiout::field_fmt.
1592         (print_one_catch_solib): Use string_printf.
1593         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1594         (add_pe_forwarded_sym): Likewise.
1595         * dwarf2read.c (create_type_unit_group): Likewise.
1596         (build_error_marker_type): Likewise.
1597         * infcall.c (get_function_name): Likewise.
1598         * valprint.c (print_converted_chars_to_obstack): Likewise.
1599         * xtensa-tdep.c (xtensa_register_type): Likewise.
1600
1601 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1602
1603         * remote.c (remote_target::download_tracepoint): Fix format
1604         string errors.
1605
1606 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1607
1608         * tracefile.c: Include common/byte-vector.h.
1609         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1610         with trace_regblock_size if needed.  Update uses of buf.
1611
1612 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1613
1614         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1615         std::vector<unsigned char>.
1616         * tracepoint.c (collection_list::collection_list): Remove
1617         m_regs_mask initializer from initializer list.  Resize
1618         m_regs_mask using the largest remote register number.
1619         (collection_list::add_remote_register): Remove size check on
1620         m_regs_mask.  Use at to access element.
1621         (collection_list::stringify): Change type of temp_buf to
1622         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1623         stringify the register mask.  Use pack_hex_byte for the register
1624         mask.
1625
1626 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1627
1628         * tracepoint.h (class collection_list) <add_register>: Remove.
1629         <add_remote_register, add_ax_registers, add_local_register>:
1630         Declare.
1631         <add_memrange>: Add scope parameter.
1632         * tracepoint.c (encode_actions_1): Likewise.
1633         (collection_list::add_register): Rename to ...
1634         (collection_list::add_remote_register): ... this.  Update
1635         comment.
1636         (collection_list::add_ax_registers, add_local_register): New
1637         methods.
1638         (collection_list::add_memrange): Add scope parameter.  Call
1639         add_local_register instead of add_register.
1640         (finalize_tracepoint_aexpr): New function.
1641         (collection_list::collect_symbol): Update calls to add_memrange.
1642         Call add_local_register instead of add_register.  Call
1643         add_ax_registers.  Call finalize_tracepoint_aexpr.
1644         (encode_actions_1): Get remote regnos for $reg action.  Call
1645         add_remote_register, add_ax_registers, and add_local_register.
1646         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1647         (validate_actionline): Call finalize_tracepoint_aexpr.
1648
1649 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1650
1651         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1652         Replace array buf with gdb::char_vector buf, of size
1653         get_remote_packet_size ().  Replace references to buf and
1654         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1655         and xsnprintf with snprintf.  Raise errors if the buffer is too
1656         small.
1657
1658 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1659
1660         * remote.c (remote_target::download_tracepoint): Fix the has_more
1661         predicate in the QTDP action list iteration.
1662
1663 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1664
1665         * remote.c (remote_target::download_tracepoint): Fix indentation
1666         in for block.
1667
1668 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1669
1670         * proc-api.c (_initialize_proc_api): Remove c, unused.
1671         * procfs.c (procfs_init_inferior): Remove signals, unused.
1672         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1673         unused.
1674
1675 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1676             Andrew Burgess  <andrew.burgess@embecosm.com>
1677
1678         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1679         'W_STOPCODE (0)' as this could be ambiguous.
1680
1681 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1682
1683         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1684         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1685         "ai_socktype").
1686
1687 2018-08-02  Tom Tromey  <tom@tromey.com>
1688
1689         PR symtab/16842.
1690         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1691         symbols.
1692         (process_structure_scope): Likewise.
1693
1694 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1695
1696         PR gdb/22629:
1697         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1698         kill inferior.
1699
1700 2018-08-02  Tom Tromey  <tom@tromey.com>
1701
1702         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1703         (darwin_suspend_inferior, darwin_resume_inferior)
1704         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1705         (darwin_check_new_threads): Check result of get_darwin_inferior.
1706
1707 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1708
1709         GDB 8.1.1 released.
1710
1711 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1712
1713         * varobj.c (varobj_get_path_expr_parent): Report an error if
1714         parent is a dynamic varobj.
1715
1716 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1717
1718         * gnulib/aclocal.m4: Re-generate.
1719         * gnulib/config.in: Re-generate.
1720         * gnulib/configure: Re-generate.
1721         * gnulib/import/Makefile.in: Re-generate.
1722         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1723         * gnulib/import/m4/onceonly.m4: Re-generate.
1724
1725 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1726
1727         * target-descriptions.c (struct xml_test_tdesc): New.
1728         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1729         (record_xml_tdesc): Update.
1730         (maintenance_check_xml_descriptions): Update.
1731         * target-descriptions.h (record_xml_tdesc): Update comment.
1732
1733 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1734
1735         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1736         checking array bounds are defined.
1737
1738 2018-07-30  Tom Tromey  <tom@tromey.com>
1739
1740         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1741         irreflexivity violation.
1742
1743 2018-07-30  Tom Tromey  <tom@tromey.com>
1744
1745         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1746         * value.c (unpack_long): Remove lint code.
1747         * valops.c (value_ind): Remove lint code.
1748         * valarith.c (value_x_binop, value_x_unop, value_equal)
1749         (value_pos): Remove lint code.
1750
1751 2018-07-28  Tom de Vries  <tdevries@suse.de>
1752
1753         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1754         with undefined upper bound as <optimized out>.
1755
1756 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1757
1758         * gcore.in: Rename variable "name" to "prefix".  Expand
1759         "usage" text.
1760
1761 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1762
1763         * windows-nat.c (windows_nat_target::create_inferior): Update to
1764         call close() in global namespace.
1765
1766 2018-07-26  Tom Tromey  <tom@tromey.com>
1767
1768         * dwarf-index-write.c (add_address_entry): Don't add objfile
1769         offsets.
1770         * dbxread.c (find_stab_function): Rename from
1771         find_stab_function_addr.  Return a bound_minimal_symbol.
1772         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1773         Don't add objfile offsets.
1774         (end_psymtab): Use raw_text_low, raw_text_high,
1775         MSYMBOL_VALUE_RAW_ADDRESS.
1776         (read_ofile_symtab): Update.
1777         (process_one_symbol): Update.
1778         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1779         offsets.
1780         (dw2_relocate): Remove.
1781         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1782         searching addrmap.
1783         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1784         Update.
1785         (process_psymtab_comp_unit_reader, add_partial_symbol)
1786         (add_partial_subprogram, dwarf2_ranges_read): Update.
1787         (load_partial_dies): Update.
1788         (add_address_entry): Don't add objfile offsets.
1789         (dwarf2_build_include_psymtabs): Update.
1790         (create_addrmap_from_aranges): Don't add objfile offsets.
1791         (dw2_find_pc_sect_compunit_symtab): Update.
1792         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1793         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1794         Update.
1795         (parse_partial_symbols): Don't add objfile offsets.  Use
1796         raw_text_low, raw_text_high.  Update.
1797         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1798         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1799         or call 'relocate' quick function.  Clear psymbol_map.
1800         * psympriv.h (struct partial_symbol) <address>: Add section
1801         offset.
1802         <set_unrelocated_address>: Rename from set_address.
1803         <raw_text_low, raw_text_high>: New methods.
1804         <text_low, text_high>: Add objfile parameter.
1805         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1806         set_unrelocated_address.
1807         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1808         (find_pc_psymbol): Update.
1809         (fixup_psymbol_section, relocate_psymtabs): Remove.
1810         (dump_psymtab, psym_functions): Update.
1811         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1812         parameter.
1813         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1814         (start_psymtab_common): Update.
1815         * symfile-debug.c (debug_qf_relocate): Remove.
1816         (debug_sym_quick_functions): Update.
1817         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1818         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1819         Update.
1820
1821 2018-07-26  Tom Tromey  <tromey@redhat.com>
1822
1823         * dbxread.c (end_psymtab): Use text_high_valid and
1824         text_low_valid.
1825         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1826         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1827         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1828         Update comment.
1829         <text_low_valid, text_high_valid>: New fields.
1830         <set_text_low, set_text_high>: Update.
1831         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1832
1833 2018-07-26  Tom Tromey  <tom@tromey.com>
1834
1835         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1836         Update.
1837         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1838         textlow and texthigh fields.
1839         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1840         Update.
1841         * mdebugread.c (parse_lines, parse_partial_symbols)
1842         (psymtab_to_symtab_1): Update.
1843         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1844         Rename fields.  Update comment.  Now private.
1845         <text_low, text_high, set_text_low, set_text_high>: New methods.
1846         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1847         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1848         (start_psymtab_common, maintenance_info_psymtabs)
1849         (maintenance_check_psymtabs): Update.
1850         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1851         texthigh fields.
1852         (scan_xcoff_symtab): Update.
1853
1854 2018-07-26  Tom Tromey  <tromey@redhat.com>
1855
1856         * psympriv.h (struct partial_symbol) <unrelocated_address,
1857         address, set_address>: New methods.
1858         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1859         (fixup_psymbol_section, relocate_psymtabs): Update.
1860         (print_partial_symbols): Add 'objfile' parameter.  Update.
1861         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1862         Update.
1863
1864 2018-07-26  Tom Tromey  <tom@tromey.com>
1865
1866         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1867         (debug_names::write_psymbols): Update.
1868         * psympriv.h (struct partial_symbol): Derive from
1869         general_symbol_info.
1870         <obj_section>: New method.
1871         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1872         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1873         (find_pc_sect_psymbol, fixup_psymbol_section)
1874         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1875         (print_partial_symbols, recursively_search_psymtabs)
1876         (compare_psymbols, psymbol_hash, psymbol_compare)
1877         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1878         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1879
1880 2018-07-26  Tom Tromey  <tromey@redhat.com>
1881
1882         * dbxread.c (end_psymtab): Remove dead code.
1883
1884 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1885
1886         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1887         DWARF unwinders are disabled.
1888         * dwarf2-frame.c: Add dwarf2read.h include.
1889         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1890         disabled.
1891         (dwarf2_frame_unwinders_enabled_p): Define.
1892         (show_dwarf_unwinders_enabled_p): New function.
1893         (_initialize_dwarf2_frame): Register switch to control DWARF
1894         unwinder use.
1895         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1896         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1897         (show_dwarf_cmdlist): Remove static keyword.
1898         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1899         (show_dwarf_cmdlist): Declare.
1900         * NEWS: Document new feature.
1901
1902 2018-07-26  Tom de Vries  <tdevries@suse.de>
1903
1904         PR breakpoints/23366
1905         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1906
1907 2018-07-26  Tom de Vries  <tdevries@suse.de>
1908
1909         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1910         DW_AT_count can't be translated to a dynamic prop.
1911
1912 2018-07-25  Tom de Vries  <tdevries@suse.de>
1913
1914         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1915         try/catch.
1916
1917 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1918
1919         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1920
1921 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1922
1923         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1924
1925 2018-07-24  Keith Seitz  <keiths@redhat.comt
1926
1927         PR symtab/23010
1928         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1929         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1930         instead of add_symbol_to_list.
1931         (read_file_scope): Call prepare_one_comp_unit before reading
1932         any other DIEs.
1933
1934 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1935
1936         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1937
1938 2018-07-24  Tom Tromey  <tom@tromey.com>
1939
1940         * utils.c (malloc, realloc, free): Don't declare.
1941         * configure, config.in: Rebuild.
1942         * configure.ac: Don't check for declarations of free, malloc, or
1943         realloc.
1944
1945 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1946
1947         * aarch64-linux-nat.c
1948         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1949         variable.
1950         * arm-linux-nat.c (fetch_regs): Likewise.
1951         (store_regs): Likewise.
1952         (fetch_vfp_regs): Likewise.
1953         (store_vfp_regs): Likewise.
1954         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1955         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1956         (arm_linux_nat_target::insert_watchpoint): Likewise.
1957         (arm_linux_nat_target::remove_watchpoint): Likewise.
1958         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1959         Likewise.
1960         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1961         Likewise.
1962         * ppc-linux-nat.c (fetch_register): Likewise.
1963         (fetch_all_gp_regs): Likewise.
1964         (fetch_ppc_registers): Likewise.
1965         (store_all_gp_regs): Likewise.
1966         (store_ppc_registers): Likewise.
1967         (hwdebug_insert_point): Likewise.
1968         (can_use_watchpoint_cond_accel): Likewise.
1969         * remote-sim.c (gdb_os_write_stdout): Likewise.
1970
1971 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1972             Tom Tromey  <tom@tromey.com>
1973
1974         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1975         test for it.
1976         * configure: Rebuild.
1977
1978 2018-07-22  Tom Tromey  <tom@tromey.com>
1979
1980         * regformats/regdat.sh: Define xmltarget_${name} inside
1981         #ifndef IN_PROCESS_AGENT.
1982
1983 2018-07-22  Tom Tromey  <tom@tromey.com>
1984
1985         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1986
1987 2018-07-22  Tom Tromey  <tom@tromey.com>
1988
1989         * symfile.c (reread_symbols): Notify iter, not objfile.
1990
1991 2018-07-22  Tom Tromey  <tom@tromey.com>
1992
1993         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1994         Use arch_ops.
1995         (ravenscar_thread_target::prepare_to_store): Likewise.
1996
1997 2018-07-22  Tom Tromey  <tom@tromey.com>
1998
1999         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2000         unused variable.  Call value_fetch_lazy when needed.
2001         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2002         Remove unused variable.  Call value_fetch_lazy when needed.
2003
2004 2018-07-22  Tom Tromey  <tom@tromey.com>
2005
2006         * m32c-tdep.c (mark_dma): Return void.
2007         (make_regs): Remove unused declarations.
2008
2009 2018-07-22  Tom Tromey  <tom@tromey.com>
2010
2011         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2012         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2013         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2014         bkscm_get_valid_block_smob_arg_unsafe for effect.
2015
2016 2018-07-22  Tom Tromey  <tom@tromey.com>
2017
2018         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2019         value_type.
2020
2021 2018-07-22  Tom Tromey  <tom@tromey.com>
2022
2023         * windows-nat.c (saved_context): Conditionally define.
2024         * remote.c (remote_target::remote_btrace_maybe_reopen):
2025         Conditionally declare "warned".
2026         * inflow.c (sigquit_ours): Conditionally define.
2027         (new_tty): Move "tty" declaration inside #if.
2028         * guile/guile.c (guile_datadir): Conditionally define.
2029         * charset.c (set_be_le_names): Move some declarations inside #if.
2030         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2031         #if.
2032         (parse_xml_btrace_conf): Likewise.
2033
2034 2018-07-22  Tom Tromey  <tom@tromey.com>
2035
2036         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2037
2038 2018-07-22  Tom Tromey  <tom@tromey.com>
2039
2040         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2041         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2042         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2043         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2044         * stack.c (frame_apply_level_command): Remove unused variable.
2045         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2046         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2047         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2048         unused variable.
2049         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2050         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2051         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2052         variable.
2053         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2054         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2055         variable.
2056         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2057         Remove unused variable.
2058         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2059         variable.
2060         * common/tdesc.c (print_xml_feature::visit): Remove unused
2061         variable.
2062         * compile/compile-object-load.c (store_regs): Remove unused
2063         variables.
2064         * complaints.c (clear_complaints): Remove unused variable.
2065         * corelow.c (core_target_open): Remove unused variable.
2066         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2067         variable.
2068         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2069         variable.
2070         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2071         variable.
2072         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2073         variable.
2074         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2075         variable.
2076         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2077         variable.
2078         * ia64-tdep.c (examine_prologue): Remove unused variable.
2079         * infcall.c (run_inferior_call): Remove unused variable.
2080         * inferior.c (exit_inferior): Remove unused variable.
2081         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2082         * linespec.c (decode_line_2): Remove unused variable.
2083         * linux-nat.c (super_close): Remove.
2084         * linux-tdep.c (linux_info_proc): Remove unused variable.
2085         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2086         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2087         Remove unused variable.
2088         * parse.c (find_minsym_type_and_address): Remove unused variable.
2089         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2090         variable.
2091         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2092         variable.
2093         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2094         variables.
2095         * record-btrace.c (record_btrace_target::store_registers): Remove
2096         unused variable.
2097         (cmd_show_record_btrace_cpu): Remove unused variable.
2098         * riscv-tdep.c (riscv_register_reggroup_p)
2099         (riscv_push_dummy_call, riscv_return_value): Remove unused
2100         variable.
2101         * rust-exp.y (literal): Remove unused variable.
2102         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2103         unused variable.
2104         <STRUCTOP_ANONYMOUS>: Likewise.
2105         * s390-linux-tdep.c (s390_linux_init_abi_31)
2106         (s390_linux_init_abi_64): Remove unused variable.
2107         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2108         (file_select_thread, net_windows_open, _initialize_ser_windows):
2109         Remove unused variables.
2110         * symtab.c (find_pc_sect_line): Remove unused variable.
2111         * target-memory.c (compute_garbled_blocks): Remove unused
2112         variable.
2113         (target_write_memory_blocks): Remove unused variable.
2114         * target.c (target_stack::unpush): Remove unused variables.
2115         * tracepoint.c (start_tracing, all_tracepoint_actions)
2116         (merge_uploaded_trace_state_variables)
2117         (print_one_static_tracepoint_marker): Remove unused variable.
2118         * unittests/basic_string_view/element_access/char/1.cc (test01):
2119         Remove unused variable.
2120         * windows-nat.c (windows_continue, windows_add_all_dlls)
2121         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2122         Remove unused variables.
2123
2124 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2125
2126         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2127         attr_profile in HAVE_ELF.
2128         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2129         HAVE_ELF.
2130
2131 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2132
2133         * frame.c (frame_register_unwind): Change parameter name.
2134         (frame_unwind_register): Likewise.
2135         (frame_unwind_register_value): Likewise.
2136         (frame_unwind_register_signed): Likewise.
2137         (frame_unwind_register_unsigned): Likewise.
2138         * frame.h (frame_register_unwind): Likewise.
2139         (frame_unwind_register): Likewise.
2140         (frame_unwind_register_value): Likewise.
2141         (frame_unwind_register_signed): Likewise.
2142         (frame_unwind_register_unsigned): Likewise.
2143         (frame_unwind_arch): Likewise.
2144
2145 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2146
2147         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2148         ISA maintenance.
2149
2150 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2151
2152         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2153         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2154         hand.
2155
2156 2018-07-20  Keith Seitz  <keiths@redhat.com>
2157
2158         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2159         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2160         m_compunit_symtab, m_language>: Add "m_" prefix.
2161         Update all uses.
2162         * buildsym.c: Update all uses.
2163
2164 2018-07-20  Tom Tromey  <tom@tromey.com>
2165
2166         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2167         * buildsym.h (record_line_ftype): Remove typedef.
2168
2169 2018-07-20  Tom Tromey  <tom@tromey.com>
2170
2171         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2172         (end_expandable_symtab): Likewise.
2173         (end_symtab_get_static_block): Likewise.
2174         (end_symtab_from_static_block): Likewise.
2175         * buildsym-legacy.c (augment_type_symtab): Remove.
2176         (end_expandable_symtab): Remove.
2177         (end_symtab_get_static_block): Remove.
2178         (end_symtab_from_static_block): Remove.
2179
2180 2018-07-20  Tom Tromey  <tom@tromey.com>
2181
2182         * dwarf2read.c: Include buildsym.h.
2183         (struct dwarf2_cu) <builder>: New method.
2184         (fixup_go_packaging): Update.
2185         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2186         use scoped_free_pendings.
2187         (using_directives): Add "cu" parameter, remove "language".
2188         (read_import_statement, setup_type_unit_groups, )
2189         (read_func_scope, read_lexical_block_scope)
2190         (dwarf2_record_block_ranges, read_namespace): Update.
2191         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2192         (lnp_state_machine::handle_end_sequence): Update.
2193         (class lnp_state_machine) <m_cu>: New member.
2194         <m_record_line_callback>: Remove.
2195         <m_currently_recording_lines>: New member.
2196         (lnp_state_machine::handle_set_file): Update.
2197         (noop_record_line): Remove.
2198         (dwarf_record_line_p): Add cu parameter.
2199         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2200         (lnp_state_machine::record_line)
2201         (lnp_state_machine::lnp_state_machine)
2202         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2203         (dwarf_decode_lines): Update.
2204         (dwarf2_start_subfile): Add cu parameter.
2205         (dwarf2_start_symtab, new_symbol): Update.
2206         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2207         Remove dwarf2_per_objfile parameter.
2208         (dwarf_decode_macros): Update.
2209
2210 2018-07-20  Tom Tromey  <tom@tromey.com>
2211
2212         * stabsread.c (define_symbol): Update.
2213         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2214         * dwarf2read.c (new_symbol): Update.
2215         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2216         * cp-namespace.c: Include buildsym.h.
2217         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2218         * buildsym-legacy.c (get_buildsym_compunit): New function.
2219
2220 2018-07-20  Tom Tromey  <tom@tromey.com>
2221
2222         * xcoffread.c: Include buildsym-legacy.h.
2223         * windows-nat.c: Include buildsym-legacy.h.
2224         * stabsread.c: Include buildsym-legacy.h.
2225         * mdebugread.c: Include buildsym-legacy.h.
2226         * buildsym-legacy.h: New file.
2227         * buildsym-legacy.c: New file, from buildsym.c.
2228         * go32-nat.c: Include buildsym-legacy.h.
2229         * dwarf2read.c: Include buildsym-legacy.h.
2230         * dbxread.c: Include buildsym-legacy.h.
2231         * cp-namespace.c: Include buildsym-legacy.h.
2232         * coffread.c: Include buildsym-legacy.h.
2233         * buildsym.h: Move some contents to buildsym-legacy.h.
2234         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2235         buildsym-legacy.c.
2236         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2237
2238 2018-07-20  Tom Tromey  <tom@tromey.com>
2239
2240         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2241         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2242         (buildsym_compunit::buildsym_compunit)
2243         (buildsym_compunit::~buildsym_compunit)
2244         (buildsym_compunit::get_macro_table): Define.
2245
2246 2018-07-20  Tom Tromey  <tom@tromey.com>
2247
2248         * buildsym.c (reset_symtab_globals): Remove.
2249         (buildsym_compunit::end_symtab_from_static_block): Update.
2250         (buildsym_compunit::augment_type_symtab): Update.
2251         (end_symtab_from_static_block): Call free_buildsym_compunit.
2252         (augment_type_symtab, end_symtab, end_expandable_symtab):
2253         Likewise.
2254
2255 2018-07-20  Tom Tromey  <tom@tromey.com>
2256
2257         * arch-utils.c: Do not include buildsym.h.
2258         * mipsread.c: Do not include buildsym.h.
2259         * machoread.c: Do not include buildsym.h.
2260         * elfread.c: Do not include buildsym.h.
2261
2262 2018-07-20  Tom Tromey  <tom@tromey.com>
2263
2264         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2265         initialization.
2266         (buildsym_compunit): Add new constructor.
2267         (struct buildsym_compunit) <get_last_source_file, finish_block,
2268         record_block_range, start_subfile, patch_subfile_names,
2269         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2270         set_last_source_start_addr, get_last_source_start_addr,
2271         get_local_using_directives, set_local_using_directives,
2272         get_global_using_directives, outermost_context_p,
2273         get_current_context_stack, get_context_stack_depth,
2274         get_current_subfile, get_local_symbols, get_file_symbols,
2275         get_global_symbols, record_debugformat, record_producer,
2276         push_context, pop_context, end_symtab_get_static_block,
2277         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2278         New public methods.
2279         <record_pending_block, finish_block_internal, make_blockvector,
2280         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2281         private methods.
2282         Update all users.
2283
2284 2018-05-22  Tom Tromey  <tom@tromey.com>
2285
2286         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2287         parameter.
2288         (finish_block_internal): Update.
2289
2290 2018-07-20  Tom Tromey  <tom@tromey.com>
2291
2292         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2293         parameter.
2294         (finish_block_internal): Update.
2295
2296 2018-07-20  Tom Tromey  <tom@tromey.com>
2297
2298         * buildsym.h (EXTERN): Don't define or undef.
2299         * buildsym.c (EXTERN): Don't define.
2300
2301 2018-07-20  Tom Tromey  <tom@tromey.com>
2302
2303         * buildsym.c: Remove TODO comment.
2304
2305 2018-07-20  Tom Tromey  <tom@tromey.com>
2306
2307         * coffread.c (coff_symtab_read): Update.
2308         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2309         (xcoff_new_init): Update.
2310         * mipsread.c (mipscoff_new_init): Update.
2311         * mdebugread.c (mdebug_build_psymtabs): Update.
2312         * elfread.c (elf_new_init): Update.
2313         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2314         Update.
2315         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2316         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2317         (stabsect_build_psymtabs): Update.
2318         * buildsym.h (buildsym_init): Don't declare.
2319         * buildsym.c: Update comment.
2320         (prepare_for_building): Remove.
2321         (start_symtab, restart_symtab): Update.
2322         (reset_symtab_globals): Update comment.
2323         (buildsym_init): Remove.
2324
2325 2018-07-20  Tom Tromey  <tom@tromey.com>
2326
2327         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2328         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2329         (read_enum_type, common_block_start, common_block_end)
2330         (cleanup_undefined_types_1, finish_global_stabs): Update.
2331         * mdebugread.c (psymtab_to_symtab_1): Update.
2332         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2333         (read_lexical_block_scope, new_symbol): Update.
2334         * dbxread.c (process_one_symbol): Update.
2335         * coffread.c (coff_symtab_read, process_coff_symbol)
2336         (coff_read_enum_type): Update.
2337         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2338         declare.
2339         (get_local_symbols, get_file_symbols, get_global_symbols): New
2340         functions.
2341         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2342         m_global_symbols.
2343         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2344         (~scoped_free_pendings): Update.
2345         (finish_block, prepare_for_building, reset_symtab_globals)
2346         (end_symtab_get_static_block, end_symtab_with_blockvector)
2347         (augment_type_symtab, push_context): Update.
2348         (get_local_symbols, get_file_symbols, get_global_symbols): New
2349         functions.
2350         (buildsym_init): Update.
2351
2352 2018-07-20  Tom Tromey  <tom@tromey.com>
2353
2354         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2355         (process_full_type_unit): Likewise.
2356         (dwarf2_start_symtab): Set list_in_scope.
2357
2358 2018-07-20  Tom Tromey  <tom@tromey.com>
2359
2360         * dwarf2read.c (process_psymtab_comp_unit_reader)
2361         (build_type_psymtabs_reader): Do not set list_in_scope.
2362
2363 2018-07-20  Tom Tromey  <tom@tromey.com>
2364
2365         * buildsym.c (free_pendings): Remove.
2366         (add_symbol_to_list, scoped_free_pendings)
2367         (finish_block_internal, buildsym_init): Update.
2368
2369 2018-07-20  Tom Tromey  <tom@tromey.com>
2370
2371         * xcoffread.c (read_xcoff_symtab): Update.
2372         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2373         Update.
2374         * dbxread.c (process_one_symbol): Update.
2375         * coffread.c (coff_symtab_read): Update.
2376         * buildsym.h (finish_block): Update.
2377         * buildsym.c (finish_block): Remove "listhead" argument.
2378         (end_symtab_get_static_block): Update.
2379
2380 2018-07-20  Tom Tromey  <tom@tromey.com>
2381
2382         * buildsym.h (class scoped_free_pendings): Remove constructor.
2383         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2384         method.
2385         <m_pending_block_obstack, m_pending_blocks>: New members.
2386         (pending_block_obstack, pending_blocks): Remove.
2387         (scoped_free_pendings::scoped_free_pendings): Default.
2388         (~scoped_free_pendings): Update.
2389         (free_pending_blocks): Remove.
2390         (finish_block_internal, record_pending_block, make_blockvector)
2391         (end_symtab_get_static_block, augment_type_symtab, push_context)
2392         (buildsym_init): Update.
2393
2394 2018-07-20  Tom Tromey  <tom@tromey.com>
2395
2396         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2397         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2398         members.
2399         (pending_addrmap, pending_addrmap_obstack)
2400         (pending_addrmap_interesting): Remove.
2401         (scoped_free_pendings, record_block_range, make_blockvector)
2402         (prepare_for_building, reset_symtab_globals, buildsym_init):
2403         Update.
2404
2405 2018-07-20  Tom Tromey  <tom@tromey.com>
2406
2407         * xcoffread.c (process_linenos): Update.
2408         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2409         * mdebugread.c (psymtab_to_symtab_1): Update.
2410         * dwarf2read.c (setup_type_unit_groups)
2411         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2412         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2413         * dbxread.c (process_one_symbol): Update.
2414         * coffread.c (coff_symtab_read, enter_linenos)
2415         (process_coff_symbol): Update.
2416         * buildsym.h (current_subfile): Don't declare.
2417         (get_current_subfile): Declare.
2418         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2419         member.
2420         (start_subfile, free_buildsym_compunit, push_subfile)
2421         (prepare_for_building, start_symtab): Update.
2422         (get_current_subfile): New function.
2423
2424 2018-07-20  Tom Tromey  <tom@tromey.com>
2425
2426         * coffread.c (coff_symtab_read): Update.
2427         * xcoffread.c (read_xcoff_symtab): Update.
2428         * dwarf2read.c (new_symbol): Update.
2429         (read_func_scope, read_lexical_block_scope): Update.
2430         * dbxread.c (process_one_symbol): Update.
2431         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2432         (outermost_context_p): Remove macro.
2433         (outermost_context_p, get_current_context_stack)
2434         (get_context_stack_depth): Declare.
2435         (pop_context): Return struct context_stack.
2436         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2437         member.
2438         (context_stack_size): Remove.
2439         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2440         (prepare_for_building, end_symtab_get_static_block)
2441         (augment_type_symtab, push_context): Update.
2442         (pop_context): Return struct context_stack.
2443         (outermost_context_p, get_current_context_stack)
2444         (get_context_stack_depth): New functions.
2445         (buildsym_init): Update.
2446
2447 2018-07-20  Tom Tromey  <tom@tromey.com>
2448
2449         * rust-exp.y: Now a pure parser.  Update all rules.
2450         (%union): Move earlier.
2451         (current_parser, work_obstack): Remove globals.
2452         (rust_parser, ~rust_parser): Update.
2453         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2454         lex_character, lex_number, lex_string, lex_identifier,
2455         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2456         convert_name, convert_params_to_expression,
2457         convert_ast_to_expression, ast_basic_type, ast_operation,
2458         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2459         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2460         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2461         ast_array_type, ast_slice_type, ast_reference_type,
2462         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2463         (rust_parse): Update.
2464         (rustyyerror, rustyylex): Add parser parameter.
2465         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2466         (rust_lex_stringish_test, rust_lex_test_sequence)
2467         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2468         (rust_lex_test_push_back, rust_lex_tests): Update.
2469
2470 2018-07-19  Pedro Alves  <palves@redhat.com>
2471
2472         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2473         gdb::unique_xmalloc_ptr.
2474         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2475         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2476         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2477         copy-initialization.
2478         * guile/scm-pretty-print.c (ppscm_print_children): Use
2479         gdb::unique_xmalloc_ptr instead of cleanups.
2480         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2481         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2482         gdb::unique_xmalloc_ptr.
2483         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2484         Adjust to use gdb::unique_xmalloc_ptr.
2485         * guile/scm-utils.c (extract_arg): Adjust.
2486         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2487         gdb::unique_xmalloc_ptr instead of a cleanup.
2488
2489 2018-07-19  Tom Tromey  <tom@tromey.com>
2490
2491         * utils.c (do_value_free_to_mark)
2492         (make_cleanup_value_free_to_mark): Remove.
2493         * utils.h (make_cleanup_value_free_to_mark): Remove.
2494
2495 2018-07-19  Pedro Alves  <palves@redhat.com>
2496
2497         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2498         forwarding reference.
2499
2500 2018-07-18  Pedro Alves  <palves@redhat.com>
2501
2502         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2503         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2504         cleanup.
2505
2506 2018-07-18  Pedro Alves  <palves@redhat.com>
2507
2508         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2509         exceptions.
2510         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2511         (gdbscm_wrap): New.
2512         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2513         directly instead of a cleanup.
2514         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2515         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2516         (vlscm_binop_gdbthrow): New, factored out from ...
2517         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2518         (vlscm_rich_compare): Use gdbscm_wrap.
2519         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2520         instead of a cleanup.
2521         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2522         cleanup.
2523         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2524         Use xfree directly instead of a cleanup.
2525         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2526         Adjust to use gdbscm_wrap and scoped_value_mark.
2527         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2528         (gdbscm_value_address, gdbscm_value_dereference)
2529         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2530         scoped_value_mark.
2531         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2532         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2533         scoped_value_mark.
2534         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2535         gdbscm_wrap and scoped_value_mark.
2536         (gdbscm_value_to_string): Use xfree directly instead of a
2537         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2538         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2539         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2540         scoped_value_mark.
2541         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2542         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2543         scoped_value_mark.
2544         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2545         gdbscm_wrap.
2546
2547 2018-07-18  Tom de Vries  <tdevries@suse.de>
2548
2549         * findvar.c (default_read_var_value): Also resolve dynamic type for
2550         LOC_OPTIMIZED_OUT vars.
2551
2552 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2553
2554         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2555         decoding.
2556
2557 2018-07-17  Tom Tromey  <tom@tromey.com>
2558
2559         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2560         (compute_enum_list, pascm_set_param_value_x)
2561         (gdbscm_parameter_value): Update.
2562         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2563         (gdbscm_scm_to_host_string): Update.
2564         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2565         Update.
2566         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2567         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2568         * guile/scm-string.c (gdbscm_scm_to_string): Return
2569         unique_xmalloc_ptr.
2570         (gdbscm_scm_to_host_string): Likewise.
2571
2572 2018-07-17  Tom Tromey  <tom@tromey.com>
2573
2574         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2575         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2576         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2577         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2578         unique_xmalloc_ptr.
2579
2580 2018-07-17  Tom Tromey  <tom@tromey.com>
2581
2582         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2583         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2584         Update.
2585         * guile/scm-cmd.c (cmdscm_function): Update.
2586         * guile/scm-pretty-print.c
2587         (ppscm_print_exception_unless_memory_error): Update.
2588         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2589         Return unique_xmalloc_ptr.
2590
2591 2018-07-17  Tom Tromey  <tom@tromey.com>
2592
2593         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2594         Use string_printf.
2595
2596 2018-07-17  Jim Wilson  <jimw@sifive.com>
2597
2598         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2599         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2600         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2601         unecessary braces after EF_RISCV_RVC test.  Delete call to
2602         set_gdbarch_decr_pc_after_break.
2603
2604         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2605         RISCV_LAST_FP_REGNUM + 1.
2606         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2607
2608 2018-07-17  Tom Tromey  <tom@tromey.com>
2609
2610         * configure.ac: Remove --disable-gdbcli.
2611         * configure: Rebuild.
2612         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2613         (SUBDIR_CLI_CFLAGS): Remove.
2614         (SFILES): Use SUBDIR_CLI_SRCS.
2615         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2616
2617 2018-07-17  Tom Tromey  <tom@tromey.com>
2618
2619         PR gdb/18624:
2620         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2621
2622 2018-07-16  Jim Wilson  <jimw@sifive.com>
2623
2624         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2625
2626 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2627
2628         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2629         variable.
2630         (libunwind_frame_sniffer): Likewise.
2631         (libunwind_frame_prev_register): Likewise.
2632         (libunwind_sigtramp_frame_sniffer): Likewise.
2633         * ia64-tdep.c (ia64_access_reg): Likewise.
2634         (ia64_access_rse_reg): Likewise.
2635         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2636         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2637
2638 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2639
2640         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2641
2642 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2643
2644         * remote-sim.c (gdbsim_target::close,
2645         gdbsim_target::mourn_inferior): Remove unused variables.
2646
2647 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2648
2649         * ia64-tdep.c (ktab_buf): New global.
2650         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2651         (get_kernel_table): Adjust.
2652
2653 2018-07-16  Tom Tromey  <tom@tromey.com>
2654
2655         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2656         * dwarf2read.c (using_directives, new_symbol): Use
2657         outermost_context_p.
2658         * dbxread.c (process_one_symbol): Use outermost_context_p.
2659         * coffread.c (coff_symtab_read): Use outermost_context_p.
2660
2661 2018-07-16  Tom Tromey  <tom@tromey.com>
2662
2663         * dwarf2read.c (using_directives, read_func_scope)
2664         (read_lexical_block_scope): Update.
2665         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2666         * buildsym.h (local_using_directives, global_using_directives):
2667         Don't declare.
2668         (get_local_using_directives, set_local_using_directives)
2669         (get_global_using_directives): Declare.
2670         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2671         m_global_using_directives>: New members.
2672         (finish_block_internal, prepare_for_building)
2673         (reset_symtab_globals, end_symtab_get_static_block)
2674         (push_context): Update.
2675         (get_local_using_directives, set_local_using_directives)
2676         (get_global_using_directives): New functions.
2677         (buildsym_init): Update.
2678
2679 2018-07-16  Tom Tromey  <tom@tromey.com>
2680
2681         * xcoffread.c (xcoff_initial_scan): Don't call
2682         free_pending_blocks.
2683         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2684         * buildsym.h (class scoped_free_pendings): Add constructor.
2685         (free_pending_blocks): Don't declare.
2686         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2687         (free_pending_blocks): Now static.
2688
2689 2018-07-16  Tom Tromey  <tom@tromey.com>
2690
2691         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2692         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2693         member.
2694         (struct subfile_stack): Remove.
2695         (subfile_stack): Remove.
2696         (push_subfile, pop_subfile, buildsym_init): Update.
2697
2698 2018-07-16  Tom Tromey  <tom@tromey.com>
2699
2700         * buildsym.c (push_subfile): Use gdb_assert.
2701         (pop_subfile): Use gdb_assert.
2702
2703 2018-07-16  Tom Tromey  <tom@tromey.com>
2704
2705         * buildsym.h (merge_symbol_lists): Remove.
2706         * buildsym.c (merge_symbol_lists): Remove.
2707
2708 2018-07-16  Tom Tromey  <tom@tromey.com>
2709
2710         * stabsread.c (scan_file_globals): Update comment.
2711         * stabsread.h (scan_file_globals): Move from buildsym.h.
2712         * buildsym.h (scan_file_globals): Move to stabsread.h.
2713
2714 2018-07-16  Tom Tromey  <tom@tromey.com>
2715
2716         * xcoffread.c (xcoff_new_init): Update.
2717         * mipsread.c (mipscoff_new_init): Update.
2718         * mdebugread.c (mdebug_build_psymtabs): Update.
2719         * elfread.c (elf_new_init): Update.
2720         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2721         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2722         * buildsym.h (buildsym_new_init): Don't declare.
2723         * buildsym.c (buildsym_new_init): Remove.
2724
2725 2018-07-16  Tom Tromey  <tom@tromey.com>
2726
2727         * stabsread.h (within_function): Move from buildsym.h.
2728         * stabsread.c (start_stabs): Clear within_function.
2729         * coffread.c (coff_start_symtab): Clear within_function.
2730         * buildsym.h (within_function): Move to stabsread.h.
2731         * buildsym.c (prepare_for_building): Update.
2732
2733 2018-07-16  Tom Tromey  <tom@tromey.com>
2734
2735         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2736         * dwarf2read.c (dwarf2_start_symtab): Don't set
2737         processing_gcc_compilation.
2738         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2739
2740 2018-07-16  Tom Tromey  <tom@tromey.com>
2741
2742         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2743         (next_symbol_text_func): Move from buildsym.h.
2744         * stabsread.c (hashname): Move from buildsym.c.
2745         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2746         (next_symbol_text_func, hashname): Move to stabsread.h.
2747         * buildsym.c: Don't include bcache.h
2748         (hashname): Move to stasbread.c.
2749
2750 2018-07-16  Tom Tromey  <tom@tromey.com>
2751
2752         * buildsym.h (context_stack_size): Don't declare.
2753         * buildsym.c (context_stack_size): New global.
2754
2755 2018-07-16  Tom Tromey  <tom@tromey.com>
2756
2757         * dbxread.c (processing_acc_compilation): New global.
2758         * buildsym.h (processing_acc_compilation): Don't declare.
2759
2760 2018-07-16  Tom Tromey  <tom@tromey.com>
2761
2762         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2763         * dbxread.c (read_ofile_symtab): Update.
2764         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2765         * buildsym.h (last_source_start_addr): Remove.
2766         (set_last_source_start_addr, get_last_source_start_addr):
2767         Declare.
2768         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2769         parameter.
2770         (struct buildsym_compunit) <m_last_source_start_addr>: New
2771         member.
2772         (prepare_for_building): Remove start_addr parameter.
2773         (start_symtab, restart_symtab, end_symtab_get_static_block)
2774         (end_symtab_with_blockvector): Update.
2775         (set_last_source_start_addr, get_last_source_start_addr): New
2776         functions.
2777
2778 2018-07-16  Tom Tromey  <tom@tromey.com>
2779
2780         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2781         member.
2782         (have_line_numbers): Remove.
2783         (record_line, prepare_for_building, end_symtab_get_static_block)
2784         (augment_type_symtab): Update.
2785
2786 2018-07-16  Tom Tromey  <tom@tromey.com>
2787
2788         * buildsym.c (~buildsym_compunit): Free the macro table.
2789         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2790         methods.
2791         <m_pending_macros>: New member.
2792         (pending_macros): Remove.
2793         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2794         (reset_symtab_globals, end_symtab_get_static_block)
2795         (end_symtab_with_blockvector, augment_type_symtab)
2796         (buildsym_init): Update.
2797
2798 2018-07-16  Tom Tromey  <tom@tromey.com>
2799
2800         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2801         parameter.
2802         (buildsym_compunit::set_last_source_file): New method.
2803         <m_last_source_file>: New member.
2804         (prepare_for_building): Remove "name" parameter.
2805         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2806         (last_source_file): Remove.
2807         (set_last_source_file, get_last_source_file): Update.
2808
2809 2018-07-16  Tom Tromey  <tom@tromey.com>
2810
2811         * buildsym.c (prepare_for_building): Add assert.
2812
2813 2018-07-16  Tom Tromey  <tom@tromey.com>
2814
2815         * buildsym.c (~buildsym_compunit): Update.
2816         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2817         (start_subfile, patch_subfile_names)
2818         (end_symtab_with_blockvector): Update.
2819
2820 2018-07-16  Tom Tromey  <tom@tromey.com>
2821
2822         * buildsym.c (struct buildsym_compunit): Add constructor,
2823         destructor, initializers.
2824         (start_buildsym_compunit): Remove.
2825         (free_buildsym_compunit): Use "delete".
2826         (start_symtab, restart_symtab): Use "new".
2827
2828 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2829
2830         * symfile.c (set_objfile_default_section_offset): Remove struct
2831         keyword.
2832
2833 2018-07-14  Stafford Horne  <shorne@gmail.com>
2834
2835         * (Responsible Maintainers): Add myself as or1k maintainer.
2836
2837 2018-07-13  Tom Tromey  <tom@tromey.com>
2838
2839         * symfile.c (set_objfile_default_section_offset): Use extra braces
2840         around initializer.
2841
2842 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2843
2844         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2845         non-branching basr.
2846
2847 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2848
2849         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2850         unittests/cli-utils-selftests.c
2851         * unittests/cli-utils-selftests.c: New file.
2852
2853 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2854
2855         * NEWS: Mention new commands. Mention change to 'thread apply'.
2856
2857 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2858
2859         * thread.c (thr_try_catch_cmd): New function.
2860         (thread_apply_all_command): Handle qcs flags.
2861         (thread_apply_command): Handle qcs flags.
2862         (taas_command): New function.
2863         (tfaas_command): New function.
2864         (_initialize_thread): Update to setup the new commands 'taas
2865         and 'tfaas'. Change doc string for 'thread apply'.
2866
2867 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2868
2869         * stack.c: (trailing_outermost_frame): New function, mostly
2870         extracted from backtrace_command_1.
2871         (leading_innermost_frame): New function.
2872         (backtrace_command_1): Update to call trailing_outermost_frame.
2873         (frame_apply_command_count): New function.
2874         (frame_apply_level_command): New function.
2875         (frame_apply_all_command): New function.
2876         (frame_apply_command): New function.
2877         (faas_command): New function.
2878         (frame_cmd_list): New variable.
2879         (_initialize_stack): Update to setup the new commands 'frame apply'
2880         and 'faas'.
2881
2882 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2883
2884         * cli-utils.c (number_or_range_parser::get_number): Only handle
2885         numbers or convenience var as numbers.
2886         (parse_flags): New function.
2887         (parse_flags_qcs): New function.
2888         (number_or_range_parser::finished): Ensure parsing end is detected
2889         before end of string.
2890         * cli-utils.h (parse_flags): New function.
2891         (parse_flags_qcs): New function.
2892         (number_or_range_parser): Remove m_finished bool.
2893         (number_or_range_parser::skip_range): Set m_in_range to false.
2894
2895 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2896
2897         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2898         on Windows.
2899
2900 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2901             Jan Kratochvil  <jan.kratochvil@redhat.com>
2902             Paul Fertser  <fercerpav@gmail.com>
2903             Tsutomu Seki  <sekiriki@gmail.com>
2904             Pedro Alves  <palves@redhat.com>
2905
2906         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2907         'unittests/parse-connection-spec-selftests.c'.
2908         (COMMON_SFILES): Add 'common/netstuff.c'.
2909         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2910         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2911         * common/netstuff.c: New file.
2912         * common/netstuff.h: New file.
2913         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2914         (wait_for_connect): Update comment.  New parameter
2915         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2916         Use 'sock' directly instead of 'scb->fd'.
2917         (try_connect): New function, with code from 'net_open'.
2918         (net_open): Rewrite main loop to deal with multiple
2919         sockets/addresses.  Handle IPv6-style hostnames; implement
2920         support for IPv6 connections.
2921         * unittests/parse-connection-spec-selftests.c: New file.
2922
2923 2018-07-11  Pedro Alves  <palves@redhat.com>
2924
2925         PR gdb/23377
2926         * remote.c (remote_target::remote_detach_pid): Call
2927         set_current_process.
2928
2929 2018-07-11  Pedro Alves  <palves@redhat.com>
2930
2931         * h8300-tdep.c (h8300_gdbarch_init): Remove
2932         set_gdbarch_ecoff_reg_to_regnum calls.
2933
2934 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2935
2936         PR c++/23373
2937         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2938         offsets/sizes for static members of a class/struct.
2939
2940 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2941
2942         * target-descriptions.c (tdesc_register_bitsize): Rename.
2943         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2944         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2945         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2946
2947 2018-07-10  Tom Tromey  <tom@tromey.com>
2948
2949         * breakpoint.c (moribund_locations): Now static and a
2950         std::vector.
2951         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2952         (build_bpstat_chain, update_global_location_list)
2953         (breakpoint_retire_moribund): Update.
2954         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2955         VEC.
2956
2957 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2958
2959         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2960         (riscv_register_reggroup_p): Use new function, remove unneeded
2961         parenthesis.
2962         (riscv_push_dummy_call): Extend assert to compare against xlen or
2963         flen based on register type.
2964
2965 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2966
2967         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2968
2969 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2970
2971         * remote.c (show_hardware_watchpoint_limit): New function.
2972         (show_hardware_watchpoint_length_limit): New function.
2973         (show_hardware_breakpoint_limit): New function.
2974         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2975         where appropriate, update help text.
2976
2977 2018-07-09  Tom Tromey  <tom@tromey.com>
2978
2979         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2980         (CLIBS): Don't mention NAT_CLIBS.
2981
2982 2018-07-09  Tom Tromey  <tom@tromey.com>
2983
2984         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2985         (LIBGDB_OBS, clean mostlyclean): Update.
2986         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2987
2988 2018-07-09  Tom Tromey  <tom@tromey.com>
2989
2990         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2991         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2992         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2993
2994 2018-07-09  Tom Tromey  <tom@tromey.com>
2995
2996         * Makefile.in (ALLDEPFILES): Remove exec.c.
2997         (COMMON_OBS): Remove exec.o.
2998         (COMMON_SFILES): Add exec.c.
2999
3000 2018-07-09  Tom Tromey  <tom@tromey.com>
3001
3002         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3003
3004 2018-07-09  Tom Tromey  <tom@tromey.com>
3005
3006         * Makefile.in (clean mostlyclean): Remove stamp-version.
3007         (version.c): Depend on stamp-version.
3008         (stamp-version): New rule, from version.c rule.
3009
3010 2018-07-09  Tom Tromey  <tom@tromey.com>
3011
3012         * Makefile.in (init.c): Depend on stamp-init.
3013         (stamp-init): New rule, from init.c rule.
3014         (clean mostlyclean): Remove stamp-init.
3015
3016 2018-07-09  Tom Tromey  <tom@tromey.com>
3017
3018         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3019         SUBDIR_GCC_COMPILE_SRCS.
3020
3021 2018-07-09  Tom Tromey  <tom@tromey.com>
3022
3023         * Makefile.in (init.c): Remove some unused sed rules.
3024
3025 2018-07-09  Tom Tromey  <tom@tromey.com>
3026
3027         * Makefile.in (TSOBS): Remove.
3028         (INIT_FILES): Update.
3029         (LIBGDB_OBS): Update.
3030         (COMMON_SFILES): Add inflow.c.
3031         (SFILES): Remove inflow.c.
3032
3033 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3034
3035         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3036
3037 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3038
3039         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3040         get_saveloc_name, is_signal_frame_name, step_name,
3041         init_remote_name, create_addr_space_name,
3042         destroy_addr_space_name, search_unwind_table_name,
3043         find_dyn_list_name): Constify.
3044
3045 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3046
3047         * darwin-nat.c (darwin_pthread_kill): New function.
3048         (darwin_resume_thread): Use darwin_pthread_kill.
3049
3050 2018-07-05  Tom de Vries  <tdevries@suse.de>
3051
3052         * macroexp.c (macro_buffer) <operator=>: New member function.
3053
3054 2018-07-04  Tom Tromey  <tom@tromey.com>
3055
3056         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3057
3058 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3059
3060         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3061         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3062         * maint.c: Likewise.
3063         * top.c: Likewise.
3064
3065 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3066
3067         * NEWS: Create a new section for the next release branch.
3068         Rename the section of the current branch, now that it has
3069         been cut.
3070
3071 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3072
3073         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3074         * version.in: Bump version to 8.2.50.DATE-git.
3075
3076 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3077             Pedro Alves  <palves@redhat.com>
3078
3079         * linux-nat.c (linux_init_ptrace): Rename to ...
3080         (linux_init_ptrace_procfs): ... this.  Call
3081         linux_proc_init_warnings.
3082         (linux_nat_target::post_attach)
3083         (linux_nat_target::post_startup_inferior): Adjust.
3084         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3085         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3086
3087 2018-07-04  Tom de Vries  <tdevries@suse.de>
3088
3089         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3090         check ...
3091         (read_comp_unit_head): ... here.
3092
3093 2018-07-03  Tom Tromey  <tom@tromey.com>
3094
3095         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3096         (stop_tracing, tstatus_command)
3097         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3098         (print_one_static_tracepoint_marker): Update.
3099         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3100         std::vector.
3101         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3102         VEC.
3103         (all_tracepoints, static_tracepoints_here): Return std::vector.
3104
3105 2018-07-03  Tom Tromey  <tom@tromey.com>
3106
3107         * common/ptid.c (ptid_equal): Remove.
3108         * common/ptid.h (ptid_equal): Don't declare.
3109         * ada-tasks.c: Update.
3110         * breakpoint.c: Update.
3111         * common/agent.c: Update.
3112         * corelow.c: Update.
3113         * darwin-nat-info.c: Update.
3114         * darwin-nat.c: Update.
3115         * dcache.c: Update.
3116         * dtrace-probe.c: Update.
3117         * dummy-frame.c: Update.
3118         * fbsd-nat.c: Update.
3119         * frame.c: Update.
3120         * gdbthread.h: Update.
3121         * gnu-nat.c: Update.
3122         * go32-nat.c: Update.
3123         * inf-loop.c: Update.
3124         * inf-ptrace.c: Update.
3125         * infcall.c: Update.
3126         * infcmd.c: Update.
3127         * inflow.c: Update.
3128         * infrun.c: Update.
3129         * linux-fork.c: Update.
3130         * linux-nat.c: Update.
3131         * linux-thread-db.c: Update.
3132         * mi/mi-cmd-var.c: Update.
3133         * mi/mi-interp.c: Update.
3134         * mi/mi-main.c: Update.
3135         * nto-procfs.c: Update.
3136         * ppc-linux-tdep.c: Update.
3137         * procfs.c: Update.
3138         * python/py-inferior.c: Update.
3139         * python/py-record-btrace.c: Update.
3140         * python/py-record.c: Update.
3141         * ravenscar-thread.c: Update.
3142         * regcache.c: Update.
3143         * remote-sim.c: Update.
3144         * remote.c: Update.
3145         * sol-thread.c: Update.
3146         * solib.c: Update.
3147         * target.c: Update.
3148         * tui/tui-stack.c: Update.
3149         * varobj.c: Update.
3150         * windows-nat.c: Update.
3151         * windows-tdep.c: Update.
3152
3153 2018-07-03  Tom Tromey  <tom@tromey.com>
3154
3155         * common/ptid.c (ptid_match): Remove.
3156         * common/ptid.h (ptid_match): Don't declare.
3157         * fbsd-nat.c: Update.
3158         * infcmd.c: Update.
3159         * infrun.c: Update.
3160         * linux-nat.c: Update.
3161         * record-btrace.c: Update.
3162         * regcache.c: Update.
3163         * remote.c: Update.
3164
3165 2018-07-03  Tom Tromey  <tom@tromey.com>
3166
3167         * common/ptid.c (ptid_tid_p): Remove.
3168         * common/ptid.h (ptid_tid_p): Don't declare.
3169         * sol-thread.c: Update.
3170
3171 2018-07-03  Tom Tromey  <tom@tromey.com>
3172
3173         * common/ptid.c (ptid_lwp_p): Remove.
3174         * common/ptid.h (ptid_lwp_p): Don't declare.
3175         * fbsd-nat.c: Update.
3176         * linux-nat.c: Update.
3177         * nat/linux-procfs.c: Update.
3178         * nat/x86-linux-dregs.c: Update.
3179         * sol-thread.c: Update.
3180
3181 2018-07-03  Tom Tromey  <tom@tromey.com>
3182
3183         * common/ptid.c (ptid_is_pid): Remove.
3184         * common/ptid.h (ptid_is_pid): Don't declare.
3185         * infrun.c: Update.
3186         * linux-nat.c: Update.
3187         * mi/mi-interp.c: Update.
3188         * remote.c: Update.
3189         * thread.c: Update.
3190
3191 2018-07-03  Tom Tromey  <tom@tromey.com>
3192
3193         * common/ptid.c (ptid_get_tid): Remove.
3194         * common/ptid.h (ptid_get_tid): Don't declare.
3195         * ada-tasks.c: Update.
3196         * aix-thread.c: Update.
3197         * bsd-uthread.c: Update.
3198         * darwin-nat.c: Update.
3199         * fbsd-nat.c: Update.
3200         * i386-darwin-nat.c: Update.
3201         * infrun.c: Update.
3202         * linux-tdep.c: Update.
3203         * nto-procfs.c: Update.
3204         * ppc-ravenscar-thread.c: Update.
3205         * python/py-infthread.c: Update.
3206         * ravenscar-thread.c: Update.
3207         * sol-thread.c: Update.
3208         * sparc-ravenscar-thread.c: Update.
3209         * windows-nat.c: Update.
3210
3211 2018-07-03  Tom Tromey  <tom@tromey.com>
3212
3213         * common/ptid.c (ptid_get_lwp): Remove.
3214         * common/ptid.h (ptid_get_lwp): Don't declare.
3215         * aarch64-linux-nat.c: Update.
3216         * ada-tasks.c: Update.
3217         * aix-thread.c: Update.
3218         * amd64-linux-nat.c: Update.
3219         * arm-linux-nat.c: Update.
3220         * corelow.c: Update.
3221         * fbsd-nat.c: Update.
3222         * fbsd-tdep.c: Update.
3223         * gnu-nat.c: Update.
3224         * i386-cygwin-tdep.c: Update.
3225         * i386-gnu-nat.c: Update.
3226         * i386-linux-nat.c: Update.
3227         * ia64-linux-nat.c: Update.
3228         * inf-ptrace.c: Update.
3229         * infrun.c: Update.
3230         * linux-fork.c: Update.
3231         * linux-nat.c: Update.
3232         * linux-tdep.c: Update.
3233         * linux-thread-db.c: Update.
3234         * mips-linux-nat.c: Update.
3235         * nat/aarch64-linux-hw-point.c: Update.
3236         * nat/aarch64-linux.c: Update.
3237         * nat/linux-btrace.c: Update.
3238         * nat/linux-osdata.c: Update.
3239         * nat/linux-procfs.c: Update.
3240         * nat/x86-linux-dregs.c: Update.
3241         * obsd-nat.c: Update.
3242         * ppc-fbsd-nat.c: Update.
3243         * ppc-linux-nat.c: Update.
3244         * procfs.c: Update.
3245         * python/py-infthread.c: Update.
3246         * ravenscar-thread.c: Update.
3247         * remote.c: Update.
3248         * s390-linux-nat.c: Update.
3249         * sol-thread.c: Update.
3250         * sol2-tdep.c: Update.
3251         * spu-linux-nat.c: Update.
3252         * x86-linux-nat.c: Update.
3253         * xtensa-linux-nat.c: Update.
3254
3255 2018-07-03  Tom Tromey  <tom@tromey.com>
3256
3257         * common/ptid.c (ptid_get_pid): Remove.
3258         * common/ptid.h (ptid_get_pid): Don't declare.
3259         * aarch64-linux-nat.c: Update.
3260         * ada-lang.c: Update.
3261         * aix-thread.c: Update.
3262         * alpha-bsd-nat.c: Update.
3263         * amd64-fbsd-nat.c: Update.
3264         * amd64-linux-nat.c: Update.
3265         * arm-linux-nat.c: Update.
3266         * arm-nbsd-nat.c: Update.
3267         * auxv.c: Update.
3268         * break-catch-syscall.c: Update.
3269         * breakpoint.c: Update.
3270         * bsd-uthread.c: Update.
3271         * corelow.c: Update.
3272         * ctf.c: Update.
3273         * darwin-nat.c: Update.
3274         * fbsd-nat.c: Update.
3275         * fbsd-tdep.c: Update.
3276         * gcore.c: Update.
3277         * gnu-nat.c: Update.
3278         * hppa-nbsd-nat.c: Update.
3279         * hppa-obsd-nat.c: Update.
3280         * i386-fbsd-nat.c: Update.
3281         * ia64-linux-nat.c: Update.
3282         * inf-ptrace.c: Update.
3283         * infcmd.c: Update.
3284         * inferior.c: Update.
3285         * inferior.h: Update.
3286         * inflow.c: Update.
3287         * infrun.c: Update.
3288         * linux-fork.c: Update.
3289         * linux-nat.c: Update.
3290         * linux-tdep.c: Update.
3291         * linux-thread-db.c: Update.
3292         * m68k-bsd-nat.c: Update.
3293         * mi/mi-interp.c: Update.
3294         * mi/mi-main.c: Update.
3295         * mips-linux-nat.c: Update.
3296         * mips-nbsd-nat.c: Update.
3297         * mips64-obsd-nat.c: Update.
3298         * nat/aarch64-linux-hw-point.c: Update.
3299         * nat/aarch64-linux.c: Update.
3300         * nat/linux-btrace.c: Update.
3301         * nat/linux-osdata.c: Update.
3302         * nat/linux-procfs.c: Update.
3303         * nat/x86-linux-dregs.c: Update.
3304         * nto-procfs.c: Update.
3305         * obsd-nat.c: Update.
3306         * ppc-linux-nat.c: Update.
3307         * ppc-nbsd-nat.c: Update.
3308         * ppc-obsd-nat.c: Update.
3309         * proc-service.c: Update.
3310         * procfs.c: Update.
3311         * python/py-inferior.c: Update.
3312         * python/py-infthread.c: Update.
3313         * ravenscar-thread.c: Update.
3314         * record.c: Update.
3315         * remote-sim.c: Update.
3316         * remote.c: Update.
3317         * rs6000-nat.c: Update.
3318         * s390-linux-nat.c: Update.
3319         * sh-nbsd-nat.c: Update.
3320         * sol-thread.c: Update.
3321         * sparc-nat.c: Update.
3322         * sparc64-tdep.c: Update.
3323         * spu-linux-nat.c: Update.
3324         * spu-tdep.c: Update.
3325         * target-debug.h: Update.
3326         * target.c: Update.
3327         * thread.c: Update.
3328         * tid-parse.c: Update.
3329         * tracefile-tfile.c: Update.
3330         * vax-bsd-nat.c: Update.
3331         * windows-nat.c: Update.
3332         * x86-linux-nat.c: Update.
3333         * x86-nat.c: Update.
3334
3335 2018-07-03  Tom Tromey  <tom@tromey.com>
3336
3337         * common/ptid.c (pid_to_ptid): Remove.
3338         * common/ptid.h (pid_to_ptid): Don't declare.
3339         * aix-thread.c: Update.
3340         * arm-linux-nat.c: Update.
3341         * common/ptid.c: Update.
3342         * common/ptid.h: Update.
3343         * corelow.c: Update.
3344         * ctf.c: Update.
3345         * darwin-nat.c: Update.
3346         * fbsd-nat.c: Update.
3347         * fork-child.c: Update.
3348         * gnu-nat.c: Update.
3349         * go32-nat.c: Update.
3350         * inf-ptrace.c: Update.
3351         * infcmd.c: Update.
3352         * inferior.c: Update.
3353         * infrun.c: Update.
3354         * linux-fork.c: Update.
3355         * linux-nat.c: Update.
3356         * nat/aarch64-linux-hw-point.c: Update.
3357         * nat/fork-inferior.c: Update.
3358         * nat/x86-linux-dregs.c: Update.
3359         * nto-procfs.c: Update.
3360         * obsd-nat.c: Update.
3361         * procfs.c: Update.
3362         * progspace.c: Update.
3363         * remote.c: Update.
3364         * rs6000-nat.c: Update.
3365         * s390-linux-nat.c: Update.
3366         * sol-thread.c: Update.
3367         * spu-linux-nat.c: Update.
3368         * target.c: Update.
3369         * top.c: Update.
3370         * tracefile-tfile.c: Update.
3371         * windows-nat.c: Update.
3372
3373 2018-07-03  Tom Tromey  <tom@tromey.com>
3374
3375         * common/ptid.h (ptid_build): Don't declare.
3376         * common/ptid.c (ptid_build): Remove.
3377         * aix-thread.c: Update.
3378         * bsd-kvm.c: Update.
3379         * bsd-uthread.c: Update.
3380         * common/agent.c: Update.
3381         * common/ptid.c: Update.
3382         * common/ptid.h: Update.
3383         * corelow.c: Update.
3384         * darwin-nat.c: Update.
3385         * fbsd-nat.c: Update.
3386         * gnu-nat.c: Update.
3387         * linux-fork.c: Update.
3388         * linux-nat.c: Update.
3389         * linux-thread-db.c: Update.
3390         * nat/linux-osdata.c: Update.
3391         * nat/linux-procfs.c: Update.
3392         * nto-procfs.c: Update.
3393         * obsd-nat.c: Update.
3394         * proc-service.c: Update.
3395         * procfs.c: Update.
3396         * ravenscar-thread.c: Update.
3397         * remote-sim.c: Update.
3398         * remote.c: Update.
3399         * sol-thread.c: Update.
3400         * target.c: Update.
3401         * windows-nat.c: Update.
3402
3403 2018-07-03  Tom Tromey  <tom@tromey.com>
3404
3405         * infrun.c (follow_exec): Use exit_inferior_silent.
3406         * inferior.c (exit_inferior_num_silent): Remove.
3407         * inferior.h (exit_inferior_num_silent): Don't declare.
3408
3409 2018-07-03  Tom Tromey  <tom@tromey.com>
3410
3411         PR cli/23340:
3412         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3413         inferior_ptid on error.
3414
3415 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3416             Simon Marchi  <simon.marchi@polymtl.ca>
3417
3418         PR tdep/8282
3419         * disasm.h (gdb_disassembler): Add
3420         `m_disassembler_options_holder'. member
3421         * disasm.c (get_all_disassembler_options): New function.
3422         (gdb_disassembler::gdb_disassembler): Use it.
3423         (gdb_buffered_insn_length_init_dis): Likewise.
3424         (gdb_buffered_insn_length): Adjust accordingly.
3425         (set_disassembler_options): Handle options with arguments.
3426         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3427         line if showing options with descriptions.
3428         (disassembler_options_completer): Adapt to using the
3429         `disasm_options_and_args_t' structure.
3430         * mips-tdep.c (mips_disassembler_options): New variable.
3431         (mips_disassembler_options_o32): Likewise.
3432         (mips_disassembler_options_n32): Likewise.
3433         (mips_disassembler_options_n64): Likewise.
3434         (gdb_print_insn_mips): Don't set `disassembler_options'.
3435         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3436         functions.
3437         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3438         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3439         `gdbarch_disassembler_options_implicit' and
3440         `gdbarch_valid_disassembler_options'.
3441         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3442         `disasm_options_and_args_t' structure.
3443         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3444         method.
3445         (valid_disassembler_options): Switch from `disasm_options_t' to
3446         the `disasm_options_and_args_t' structure.
3447         * NEWS: Document `set disassembler-options' support for the MIPS
3448         target.
3449         * gdbarch.h: Regenerate.
3450         * gdbarch.c: Regenerate.
3451
3452 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3453
3454         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3455
3456 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3457
3458         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3459         parameter in call to amd64_target_description.
3460         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3461         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3462         (amd64fbsd_init_abi): Likewise.
3463         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3464         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3465         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3466         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3467
3468 2018-06-29  Pedro Alves  <palves@redhat.com>
3469
3470         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3471         "segments" parameter.
3472         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3473         (_initialize_amd64_tdep): Update call to
3474         amd64_create_target_description.
3475         (amd64_target_description): Add "segments" parameter.  Adjust
3476         the implementation to use it.
3477         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3478         call to amd64_create_target_description.
3479         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3480         * gdb/arch/amd64.h (amd64_create_target_description): Add
3481         "segments" register.
3482         * gdb/arch/amd64.c (amd64_create_target_description): Add
3483         "segments" parameter.  Call create_feature_i386_64bit_segments
3484         only if SEGMENTS is true.
3485         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3486         call to amd64_create_target_description.
3487
3488 2018-06-29  Pedro Alves  <palves@redhat.com>
3489
3490         * thread.c (thread_target_id_str): New, factored out from ...
3491         (print_thread_info_1): ... here.  Use it to compute the max
3492         "Target Id" column width.
3493
3494 2018-06-29  Pedro Alves  <palves@redhat.com>
3495
3496         * remote.c (remote_target::extra_thread_info): Delete
3497         'display_buf' and 'n' locals.  from the cache, regardless of
3498         packet mechanims is in use.  Use cache for qThreadExtra and qP
3499         methods too.
3500
3501 2018-06-29  Pedro Alves  <palves@redhat.com>
3502
3503         * blockframe.c (find_pc_sect_containing_function): New function.
3504         * breakpoint.c (print_breakpoint_location): Don't call
3505         find_pc_sect_function.
3506         * linespec.c (create_sals_line_offset): Record the location's
3507         symbol in the sal.
3508         * linespec.c (convert_address_location_to_sals): Fill in sal's
3509         symbol with find_pc_sect_containing_function.
3510         * symtab.c (find_function_start_sal): Rename to ...
3511         (find_function_start_sal_1): ... this.
3512         (find_function_start_sal): Reimplement as wrapper around
3513         find_function_start_sal_1, and use
3514         find_pc_sect_containing_function to fill in the sal's symbol.
3515         (find_function_start_sal(symbol*, bool)): Adjust.
3516         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3517         comments.
3518         (find_pc_sect_containing_function): Declare.
3519
3520 2018-06-29  Pedro Alves  <palves@redhat.com>
3521
3522         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3523         true if the the location has no symbol.
3524
3525 2018-06-28  Tom Tromey  <tom@tromey.com>
3526
3527         * NEWS: Mention --enable-codesign.
3528         * silent-rules.mk (ECHO_SIGN): New variable.
3529         * configure.ac: Add --enable-codesign.
3530         * configure: Rebuild.
3531         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3532         (gdb$(EXEEXT)): Optionally invoke codesign.
3533
3534 2018-06-28  Pedro Alves  <palves@redhat.com>
3535
3536         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3537         comments.
3538         (switch_to_thread_no_regs): Adjust comment.
3539         * infcmd.c (stop_pc): Delete.
3540         (post_create_inferior, info_program_command): Replace references
3541         to stop_pc with references to thread_info->suspend.stop_pc.
3542         * inferior.h (stop_pc): Delete declaration.
3543         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3544         (handle_inferior_event_1, handle_signal_stop)
3545         (process_event_stop_test, keep_going_stepped_thread)
3546         (handle_step_into_function, handle_step_into_function_backward)
3547         (print_stop_location): Replace references to stop_pc with
3548         references to thread_info->suspend.stop_pc.
3549         (struct infcall_suspend_state) <stop_pc>: Delete field.
3550         (save_infcall_suspend_state, restore_infcall_suspend_state):
3551         Remove references to inf_stat->stop_pc.
3552         * linux-fork.c (fork_load_infrun_state): Likewise.
3553         * record-btrace.c (record_btrace_set_replay): Likewise.
3554         * record-full.c (record_full_goto_entry): Likewise.
3555         * remote.c (print_one_stopped_thread): Likewise.
3556         * target.c (target_resume): Extend comment.
3557         * thread.c (set_executing_thread): New.
3558         (set_executing): Use it.
3559         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3560         Remove references to stop_pc.
3561
3562 2018-06-28  Pedro Alves  <palves@redhat.com>
3563
3564         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3565         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3566
3567 2018-06-28  Tom Tromey  <tom@tromey.com>
3568
3569         * coffread.c (coff_symfile_finish): Update.
3570         * xcoffread.c (xcoff_symfile_finish): Update.
3571         * elfread.c (elf_symfile_finish): Update.
3572         * symfile.h (dwarf2_free_objfile): Don't declare.
3573         * dwarf2read.c (_initialize_dwarf2_read): Use
3574         register_objfile_data_with_cleanup.
3575         (dwarf2_free_objfile): Now static.  Change signature.
3576
3577 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3578
3579         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3580         option "-o" to add-symbol-file-load to add an offset to each
3581         section's load address.
3582         * symfile.c (set_objfile_default_section_offset): New function.
3583
3584 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3585
3586         * symfile.c (add_symbol_file_command): Make sure that sections
3587         with the same name are sorted in the same order.
3588
3589 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3590
3591         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3592         require the second argument.  If omitted, load sections at the
3593         addresses specified in the file.
3594
3595 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3596
3597         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3598         (_initialize_symfile): Add option "-o" to symbol-file to add an
3599         offset to each section of the symbol file.
3600
3601 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3602
3603         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3604
3605 2018-06-27  Tom Tromey  <tom@tromey.com>
3606
3607         * stack.c (_initialize_stack): Update "func" help text.
3608
3609 2018-06-27  Tom Tromey  <tom@tromey.com>
3610
3611         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3612         std::vector.
3613         (unwind_infopy_str, pyuw_create_unwind_info)
3614         (unwind_infopy_add_saved_register, pyuw_sniffer)
3615         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3616         Update.
3617         (struct saved_reg): Add constructor.
3618         <value>: Now a gdbpy_ref<>.
3619
3620 2018-06-27  Tom Tromey  <tom@tromey.com>
3621
3622         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3623
3624 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3625
3626         * gdb-gdb.py.in: Format using autopep8.
3627
3628 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3629
3630         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3631         (type_lookup_function): Recognize CORE_ADDR values.
3632
3633 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3634
3635         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3636         print tag_name.
3637
3638 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3639
3640         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3641         <__lt__>: Add.
3642
3643 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3644
3645         * gdb-gdb.py: Move to...
3646         * gdb-gdb.py.in: ... here.
3647         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3648         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3649         dependencies.
3650         (distclean): Remove gdb-gdb.py when cleaning.
3651         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3652         * configure: Re-generate.
3653
3654 2018-06-27  Pedro Alves  <palves@redhat.com>
3655
3656         * proc-service.c (get_ps_regcache): New.
3657         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3658         (ps_lsetfpregs): Use it.
3659
3660 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3661
3662         PR gdb/21695
3663         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3664         (dwarf_decode_lines_1): Adjust.
3665
3666 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3667
3668         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3669         override.
3670         <info_proc>: Likewise.
3671
3672 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3673
3674         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3675         to windows_fetch_one_register, and only handle the case of
3676         fetching one register.  Move the code that reloads the context
3677         and iterates over all registers if R is negative to...
3678         (windows_nat_target::fetch_registers): ... here.
3679         (do_windows_store_inferior_registers): Rename to
3680         windows_store_one_register, and only handle the case of storing
3681         one register.  Move the code that handles the case where r is
3682         negative to...
3683         (windows_nat_target::store_registers) ... here.
3684
3685 2018-06-26  Tom Tromey  <tom@tromey.com>
3686
3687         PR rust/22574:
3688         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3689         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3690         Update.
3691         (rust_internal_print_type): Add podata parameter.
3692         (rust_print_type): Update.
3693
3694 2018-06-26  Tom Tromey  <tom@tromey.com>
3695
3696         * typeprint.h (struct print_offset_data) <update, finish,
3697         maybe_print_hole>: New methods.
3698         <indentation>: New constant.
3699         * typeprint.c (print_offset_data::indentation): Define.
3700         (print_offset_data::maybe_print_hole, print_offset_data::update)
3701         (print_offset_data::finish): Move from c-typeprint.c and rename.
3702         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3703         (print_spaces_filtered_with_print_options): Update.
3704         (c_print_type_union_field_offset, maybe_print_hole)
3705         (c_print_type_struct_field_offset): Move to typeprint.c and
3706         rename.
3707         (c_type_print_base_struct_union): Update.
3708
3709 2018-06-25  Pedro Alves  <palves@redhat.com>
3710
3711         * gdbthread.h (thread_info_ref, delete_thread)
3712         (delete_thread_silent, first_thread_of_inferior)
3713         (any_thread_of_inferior, switch_to_thread)
3714         (enable_thread_stack_temporaries)
3715         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3716         (get_last_thread_stack_temporary)
3717         (value_in_thread_stack_temporaries, can_access_registers_thread):
3718         Spell out "struct thread_info" instead of just "thread_info".
3719         * inferior.h (notice_new_inferior): Likewise.
3720
3721 2018-06-25  Pedro Alves  <palves@redhat.com>
3722
3723         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3724         pass thread_info pointer to delete_thread.
3725         (windows_nat_target::detach): Pass inferior pointer to
3726         detach_inferior.
3727         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3728         delete_thread.
3729         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3730         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3731         and pass a thread_info pointer to delete_thread.
3732         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3733         pass thread_info pointer to delete_thread.
3734         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3735         delete_thread_silent call.
3736         * procfs.c (procfs_target::detach): Pass inferior pointer to
3737         detach_inferior.
3738         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3739         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3740         delete_thread_silent call.
3741         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3742         pass thread_info pointer to delete_thread.
3743         (windows_nat_target::detach): Pass inferior pointer to
3744         delete_inferior.
3745
3746 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3747
3748         * regcache.c (readable_regcache::read_part): Fix asserts.
3749         (reg_buffer::raw_collect_part): New function.
3750         (regcache::write_part): Fix asserts.
3751         (reg_buffer::raw_supply_part): New function.
3752         (regcache::transfer_regset_register): New helper function.
3753         (regcache::transfer_regset): Call new functions.
3754         (regcache_supply_regset): Use gdb_byte*.
3755         (regcache::supply_regset): Likewise.
3756         (regcache_collect_regset): Likewise.
3757         (regcache::collect_regset): Likewise.
3758         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3759         (reg_buffer::raw_supply_part): Likewise.
3760         (regcache::transfer_regset_register): Likewise.
3761         (regcache::transfer_regset): Use gdb_byte*.
3762
3763 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3764
3765         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3766
3767 2018-06-21  Pedro Alves  <palves@redhat.com>
3768
3769         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3770         instead of a ptid_t.  All callers adjusted.
3771         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3772         adjusted.
3773         (print_ada_task_info, display_current_task_id, task_command_1):
3774         Adjust.
3775         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3776         inferior_thread.
3777         (breakpoint_kind): Adjust.
3778         (remove_breakpoints_pid): Rename to ...
3779         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3780         pointer.  All callers adjusted.
3781         (bpstat_clear_actions): Use inferior_thread.
3782         (get_bpstat_thread): New.
3783         (bpstat_do_actions): Use it.
3784         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3785         to take a thread_info pointer.  All callers adjusted.
3786         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3787         (breakpoint_re_set_thread): Use inferior_thread.
3788         * breakpoint.h (struct inferior): Forward declare.
3789         (bpstat_stop_status): Update.
3790         (remove_breakpoints_pid): Delete.
3791         (remove_breakpoints_inf): New.
3792         * bsd-uthread.c (bsd_uthread_target::wait)
3793         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3794         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3795         (maint_btrace_packet_history_cmd)
3796         (maint_btrace_clear_packet_history_cmd): Adjust.
3797         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3798         inferior_thread.
3799         * cli/cli-interp.c: Include "inferior.h".
3800         * common/refcounted-object.h (struct
3801         refcounted_object_ref_policy): New.
3802         * compile/compile-object-load.c: Include gdbthread.h.
3803         (store_regs): Use inferior_thread.
3804         * corelow.c (core_target::close): Use current_inferior.
3805         (core_target_open): Adjust to use first_thread_of_inferior and use
3806         the current inferior.
3807         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3808         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3809         <thread>: ... this new field.  All references adjusted.
3810         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3811         Take a thread_info pointer instead of a ptid_t.
3812         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3813         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3814         thread_info pointer instead of a ptid_t.
3815         * elfread.c: Include "inferior.h".
3816         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3817         Use inferior_thread.
3818         * eval.c (evaluate_subexp): Likewise.
3819         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3820         inferior_thread.
3821         * gdb_proc_service.h (struct thread_info): Forward declare.
3822         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3823         <thread>: ... this new field.  All references adjusted.
3824         * gdbarch.h, gdbarch.c: Regenerate.
3825         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3826         'thread' parameter.  All implementations and callers adjusted.
3827         * gdbthread.h (thread_info) <set_running>: New method.
3828         (delete_thread, delete_thread_silent): Take a thread_info pointer
3829         instead of a ptid.
3830         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3831         (first_thread_of_process): Delete, replaced by ...
3832         (first_thread_of_inferior): ... this new function.  All callers
3833         adjusted.
3834         (any_live_thread_of_process): Delete, replaced by ...
3835         (any_live_thread_of_inferior): ... this new function.  All callers
3836         adjusted.
3837         (switch_to_thread, switch_to_no_thread): Declare.
3838         (is_executing): Delete.
3839         (enable_thread_stack_temporaries): Update comment.
3840         <enable_thread_stack_temporaries>: Take a thread_info pointer
3841         instead of a ptid_t.  Incref the thread.
3842         <~enable_thread_stack_temporaries>: Decref the thread.
3843         <m_ptid>: Delete
3844         <m_thr>: New.
3845         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3846         (get_last_thread_stack_temporary)
3847         (value_in_thread_stack_temporaries, can_access_registers_thread):
3848         Take a thread_info pointer instead of a ptid_t.  All callers
3849         adjusted.
3850         * infcall.c (get_call_return_value): Use inferior_thread.
3851         (run_inferior_call): Work with thread pointers instead of ptid_t.
3852         (call_function_by_hand_dummy): Work with thread pointers instead
3853         of ptid_t.  Use thread_info_ref.
3854         * infcmd.c (proceed_thread_callback): Access thread's state
3855         directly.
3856         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3857         access thread's state directly.
3858         (continue_command): Use inferior_thread.
3859         (info_program_command): Use find_thread_ptid and access thread
3860         state directly.
3861         (proceed_after_attach_callback): Use thread state directly.
3862         (notice_new_inferior): Take a thread_info pointer instead of a
3863         ptid_t.  All callers adjusted.
3864         (exit_inferior): Take an inferior pointer instead of a pid.  All
3865         callers adjusted.
3866         (exit_inferior_silent): New.
3867         (detach_inferior): Delete.
3868         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3869         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3870         (detach_inferior_command, kill_inferior_command): Use
3871         find_inferior_id instead of valid_gdb_inferior_id and
3872         gdb_inferior_id_to_pid.
3873         (inferior_command): Use inferior and thread pointers.
3874         * inferior.h (struct thread_info): Forward declare.
3875         (notice_new_inferior): Take a thread_info pointer instead of a
3876         ptid_t.  All callers adjusted.
3877         (detach_inferior): Delete declaration.
3878         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3879         instead of a pid.  All callers adjusted.
3880         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3881         (valid_gdb_inferior_id): Delete.
3882         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3883         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3884         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3885         ...
3886         <inf>: ... this new field.
3887         <step_ptid>: Delete, replaced by ...
3888         <step_thread>: ... this new field.
3889         (get_displaced_stepping_state): Take an inferior pointer instead
3890         of a pid.  All callers adjusted.
3891         (displaced_step_in_progress_any_inferior): Adjust.
3892         (displaced_step_in_progress_thread): Take a thread pointer instead
3893         of a ptid_t.  All callers adjusted.
3894         (displaced_step_in_progress, add_displaced_stepping_state): Take
3895         an inferior pointer instead of a pid.  All callers adjusted.
3896         (get_displaced_step_closure_by_addr): Adjust.
3897         (remove_displaced_stepping_state): Take an inferior pointer
3898         instead of a pid.  All callers adjusted.
3899         (displaced_step_prepare_throw, displaced_step_prepare)
3900         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3901         All callers adjusted.
3902         (start_step_over): Adjust.
3903         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3904         displaced step queue.
3905         (do_target_resume): Adjust.
3906         (fetch_inferior_event): Use inferior_thread.
3907         (context_switch, get_inferior_stop_soon): Take an
3908         execution_control_state pointer instead of a ptid_t.  All callers
3909         adjusted.
3910         (switch_to_thread_cleanup): Delete.
3911         (stop_all_threads): Use scoped_restore_current_thread.
3912         * inline-frame.c: Include "gdbthread.h".
3913         (inline_state) <inline_state>: Take a thread pointer instead of a
3914         ptid_t.  All callers adjusted.
3915         <ptid>: Delete, replaced by ...
3916         <thread>: ... this new field.
3917         (find_inline_frame_state): Take a thread pointer instead of a
3918         ptid_t.  All callers adjusted.
3919         (skip_inline_frames, step_into_inline_frame)
3920         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3921         pointer instead of a ptid_t.  All callers adjusted.
3922         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3923         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3924         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3925         pointers directly.
3926         * linux-nat.c (get_detach_signal): Likewise.
3927         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3928         (thread_db_notice_clone): Adjust.
3929         (thread_db_find_new_threads_silently)
3930         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3931         a thread pointer instead of a ptid_t.  All callers adjusted.
3932         * mi/mi-cmd-var.c: Include "inferior.h".
3933         (mi_cmd_var_update_iter): Update to use thread pointers.
3934         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3935         inferior directly.
3936         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3937         out to ...
3938         (mi_output_running): ... this new function.
3939         (mi_on_resume_1): Adjust to use it.
3940         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3941         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3942         directly.
3943         (interrupt_thread_callback): : Adjust to use thread and inferior
3944         pointers.
3945         * proc-service.c: Include "gdbthread.h".
3946         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3947         * progspace-and-thread.c: Include "inferior.h".
3948         * progspace.c: Include "inferior.h".
3949         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3950         hold a reference to an inferior_object.
3951         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3952         inferior_thread.
3953         * python/py-inferior.c (struct inferior_object): Give the type a
3954         tag name instead of a typedef.
3955         (python_on_normal_stop): No need to check if the current thread is
3956         listed.
3957         (inferior_to_inferior_object): Change return type to
3958         inferior_object.  All callers adjusted.
3959         (find_thread_object): Delete, bits factored out to ...
3960         (thread_to_thread_object): ... this new function.
3961         * python/py-infthread.c (create_thread_object): Use
3962         inferior_to_inferior_object.
3963         (thpy_is_stopped): Use thread pointer directly.
3964         (gdbpy_selected_thread): Use inferior_thread.
3965         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3966         field, replaced with ...
3967         <thread>: ... this new field.  All users adjusted.
3968         (btpy_insn_or_gap_new): Drop const.
3969         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3970         callers adjusted.
3971         * python/py-record.c: Include "gdbthread.h".
3972         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3973         a ptid_t.  All callers adjusted.
3974         (gdbpy_current_recording): Use inferior_thread.
3975         * python/py-record.h (recpy_record_object) <ptid>: Delete
3976         field, replaced with ...
3977         <thread>: ... this new field.  All users adjusted.
3978         (recpy_element_object) <ptid>: Delete
3979         field, replaced with ...
3980         <thread>: ... this new field.  All users adjusted.
3981         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3982         a ptid_t.  All callers adjusted.
3983         * python/py-threadevent.c: Include "gdbthread.h".
3984         (get_event_thread): Use thread_to_thread_object.
3985         * python/python-internal.h (struct inferior_object): Forward
3986         declare.
3987         (find_thread_object, find_inferior_object): Delete declarations.
3988         (thread_to_thread_object, inferior_to_inferior_object): New
3989         declarations.
3990         * record-btrace.c: Include "inferior.h".
3991         (require_btrace_thread): Use inferior_thread.
3992         (record_btrace_frame_sniffer)
3993         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3994         (get_thread_current_frame): Use scoped_restore_current_thread and
3995         switch_to_thread.
3996         (get_thread_current_frame): Use thread pointer directly.
3997         (record_btrace_replay_at_breakpoint): Use thread's inferior
3998         pointer directly.
3999         * record-full.c: Include "inferior.h".
4000         * regcache.c: Include "gdbthread.h".
4001         (get_thread_arch_regcache): Use the inferior's address space
4002         directly.
4003         (get_thread_regcache, registers_changed_thread): New.
4004         * regcache.h (get_thread_regcache(thread_info *thread)): New
4005         overload.
4006         (registers_changed_thread): New.
4007         (remote_target) <remote_detach_1>: Swap order of parameters.
4008         (remote_add_thread): <remote_add_thread>: Return the new thread.
4009         (get_remote_thread_info(ptid_t)): New overload.
4010         (remote_target::remote_notice_new_inferior): Use thread pointers
4011         directly.
4012         (remote_target::process_initial_stop_replies): Use
4013         thread_info::set_running.
4014         (remote_target::remote_detach_1, remote_target::detach)
4015         (extended_remote_target::detach): Adjust.
4016         * stack.c (frame_show_address): Use inferior_thread.
4017         * target-debug.h (target_debug_print_thread_info_pp): New.
4018         * target-delegates.c: Regenerate.
4019         * target.c (default_thread_address_space): Delete.
4020         (memory_xfer_partial_1): Use current_inferior.
4021         (target_detach): Use current_inferior.
4022         (target_thread_address_space): Delete.
4023         (generic_mourn_inferior): Use current_inferior.
4024         * target.h (struct target_ops) <thread_address_space>: Delete.
4025         (target_thread_address_space): Delete.
4026         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4027         pointers directly.
4028         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4029         thread pointer instead of a ptid_t.  Adjust all callers.
4030         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4031         (first_thread_of_process): Delete, replaced by ...
4032         (first_thread_of_inferior): ... this new function.  All callers
4033         adjusted.
4034         (any_thread_of_process): Rename to ...
4035         (any_thread_of_inferior): ... this, and take an inferior pointer.
4036         (any_live_thread_of_process): Rename to ...
4037         (any_live_thread_of_inferior): ... this, and take an inferior
4038         pointer.
4039         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4040         (value_in_thread_stack_temporaries)
4041         (get_last_thread_stack_temporary): Take a thread pointer instead
4042         of a ptid_t.  Adjust all callers.
4043         (thread_info::set_running): New.
4044         (validate_registers_access): Use inferior_thread.
4045         (can_access_registers_ptid): Rename to ...
4046         (can_access_registers_thread): ... this, and take a thread
4047         pointer.
4048         (print_thread_info_1): Adjust to compare thread pointers instead
4049         of ptids.
4050         (switch_to_no_thread, switch_to_thread): Make extern.
4051         (scoped_restore_current_thread::~scoped_restore_current_thread):
4052         Use m_thread pointer directly.
4053         (scoped_restore_current_thread::scoped_restore_current_thread):
4054         Use inferior_thread.
4055         (thread_command): Use thread pointer directly.
4056         (thread_num_make_value_helper): Use inferior_thread.
4057         * top.c (execute_command): Use inferior_thread.
4058         * tui/tui-interp.c: Include "inferior.h".
4059         * varobj.c (varobj_create): Use inferior_thread.
4060         (value_of_root_1): Use find_thread_global_id instead of
4061         global_thread_id_to_ptid.
4062
4063 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4064
4065         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4066         possible.
4067         (regcache::write_part): Likewise.
4068         (readable_regcache::cooked_read_part): Update comment.
4069         (readable_regcache::cooked_write_part): Likewise.
4070         * regcache.h: (readable_regcache::read_part): Likewise.
4071         (regcache::write_part): Likewise.
4072
4073 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4074             Dirk Schubert  <dirk.schubert@arm.com>
4075
4076         * aarch64-linux-nat.c (post_attach): New.
4077         (aarch64_linux_nat_target::post_attach): Override post_attach to
4078         record the number of hardware debug registers.
4079
4080 2018-06-20  Tom Tromey  <tom@tromey.com>
4081
4082         * python/py-param.c (add_setshow_generic): Make parameters const.
4083         (parmpy_init): Update.
4084
4085 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4086
4087         * regcache.h (regcache_cooked_read_ftype): Rename to...
4088         (register_read_ftype): ...this, change type to function_view.
4089         (class reg_buffer) <save>: Remove src parameter.
4090         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4091         parameter non-const in first overload.  Remove src parameter in
4092         second overload.
4093         * regcache.c (do_cooked_read): Remove.
4094         (readonly_detached_regcache::readonly_detached_regcache): Make
4095         parameter non-const, adjust call to other constructor.
4096         (reg_buffer::save): Remove src parameter.
4097         * frame.c (do_frame_register_read): Remove.
4098         (frame_save_as_regcache): Use lambda function.
4099         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4100         parameter to ppu2spu_data *.
4101         (ppu2spu_sniffer): Use lambda function.
4102
4103 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4104
4105         * record-full.c (record_full_target::insert_breakpoint): Remove
4106         "struct" keyword, add const.
4107
4108 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4109
4110         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4111         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4112         * configure.ac: Remove AC_PREREQ, add missing quoting.
4113         * gnulib/configure.ac: Modernize usage of
4114         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4115         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4116         (AUTOMAKE_VERSION): Bump to 1.15.1.
4117         * configure: Re-generate.
4118         * config.in: Re-generate.
4119         * aclocal.m4: Re-generate.
4120         * gnulib/aclocal.m4: Re-generate.
4121         * gnulib/config.in: Re-generate.
4122         * gnulib/configure: Re-generate.
4123         * gnulib/import/Makefile.in: Re-generate.
4124
4125 2018-06-19  Pedro Alves  <palves@redhat.com>
4126
4127         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4128         (lookup_minimal_symbol_by_pc_section): ... here with
4129         gdb_assert_not_reached added.
4130
4131 2018-06-19  Pedro Alves  <palves@redhat.com>
4132
4133         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4134         parameter with a block parameter.  Compare location's block symbol
4135         with the frame's block instead of addresses.
4136         (skip_inline_frames): Pass the current block instead of the
4137         frame's address.  Break out as soon as we determine the frame
4138         should not be skipped.
4139
4140 2018-06-18  Tom Tromey  <tom@tromey.com>
4141
4142         * solib-aix.c (solib_aix_get_section_offsets): Return
4143         unique_xmalloc_ptr.
4144         (solib_aix_solib_create_inferior_hook): Update.
4145
4146 2018-06-18  Tom Tromey  <tom@tromey.com>
4147
4148         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4149
4150 2018-06-18  Tom Tromey  <tom@tromey.com>
4151
4152         * solib-frv.c (frv_relocate_main_executable): Use
4153         unique_xmalloc_ptr.
4154         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4155         unique_xmalloc_ptr.
4156
4157 2018-06-18  Tom Tromey  <tom@tromey.com>
4158
4159         * objfiles.h (inhibit_section_map_updates): Update.
4160         (resume_section_map_updates, resume_section_map_updates_cleanup):
4161         Remove.
4162         * solib-svr4.c (svr4_handle_solib_event): Update.
4163         * objfiles.c (inhibit_section_map_updates): Return
4164         scoped_restore_tmpl<int>.
4165         (resume_section_map_updates, resume_section_map_updates_cleanup):
4166         Remove.
4167
4168 2018-06-18  Tom Tromey  <tom@tromey.com>
4169
4170         * valprint.h (read_string): Update.
4171         * valprint.c (read_string): Change type of "buffer".
4172         (val_print_string): Update.
4173         * python/py-value.c (valpy_string): Update.
4174         * language.h (struct language_defn) <la_get_string>: Change
4175         type of "buffer".
4176         (default_get_string, c_get_string): Update.
4177         * language.c (default_get_string): Change type of "buffer".
4178         * guile/scm-value.c (gdbscm_value_to_string): Update.
4179         * c-lang.c (c_get_string): Change type of "buffer".
4180
4181 2018-06-18  Tom Tromey  <tom@tromey.com>
4182
4183         * ser-mingw.c (struct pipe_state_destroyer): New.
4184         (pipe_state_up): New typedef.
4185         (cleanup_pipe_state): Remove.
4186         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4187
4188 2018-06-18  Tom Tromey  <tom@tromey.com>
4189
4190         * rust-lang.h (rust_yyerror): Don't declare.
4191         * rust-lang.c (rust_language_defn): Update.
4192         * rust-exp.y (yyerror): Now static.
4193         * parse.c (parse_exp_in_context_1): Update.
4194         * p-lang.h (p_yyerror): Don't declare.
4195         * p-lang.c (p_language_defn): Update.
4196         * p-exp.y (yyerror): Now static.
4197         * opencl-lang.c (opencl_language_defn): Update.
4198         * objc-lang.c (objc_language_defn): Update.
4199         * m2-lang.h (m2_yyerror): Don't declare.
4200         * m2-lang.c (m2_language_defn): Update.
4201         * m2-exp.y (yyerror): Now static.
4202         * language.h (struct language_defn) <la_error>: Remove.
4203         * language.c (unk_lang_error): Remove.
4204         (unknown_language_defn, auto_language_defn): Remove.
4205         * go-lang.h (go_yyerror): Don't declare.
4206         * go-lang.c (go_language_defn): Update.
4207         * go-exp.y (yyerror): Now static.
4208         * f-lang.h (f_yyerror): Don't declare.
4209         * f-lang.c (f_language_defn): Update.
4210         * f-exp.y (yyerror): Now static.
4211         * d-lang.h (d_yyerror): Don't declare.
4212         * d-lang.c (d_language_defn): Update.
4213         * d-exp.y (yyerror): Now static.
4214         * c-lang.h (c_yyerror): Don't declare.
4215         * c-lang.c (c_language_defn, cplus_language_defn)
4216         (asm_language_defn, minimal_language_defn): Update.
4217         * c-exp.y (yyerror): Now static.
4218         * ada-lang.h (ada_yyerror): Don't declare.
4219         * ada-lang.c (ada_language_defn): Update.
4220         * ada-exp.y (yyerror): Now static.
4221
4222 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4223
4224         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4225         (store_sveregs_to_thread): Likewise.
4226         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4227         (aarch64_linux_store_inferior_registers): Likewise.
4228         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4229         function.
4230         (aarch64_sve_regs_copy_to_regcache): Likewise.
4231         (aarch64_sve_regs_copy_from_regcache): Likewise.
4232         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4233         declaration.
4234         (aarch64_sve_regs_copy_to_regcache): Likewise.
4235         (aarch64_sve_regs_copy_from_regcache): Likewise.
4236         (sve_context): Structure from Linux headers.
4237         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4238         (SVE_SIG_ZREG_SIZE): Likewise.
4239         (SVE_SIG_PREG_SIZE): Likewise.
4240         (SVE_SIG_FFR_SIZE): Likewise.
4241         (SVE_SIG_REGS_OFFSET): Likewise.
4242         (SVE_SIG_ZREGS_OFFSET): Likewise.
4243         (SVE_SIG_ZREG_OFFSET): Likewise.
4244         (SVE_SIG_ZREGS_SIZE): Likewise.
4245         (SVE_SIG_PREGS_OFFSET): Likewise.
4246         (SVE_SIG_PREG_OFFSET): Likewise.
4247         (SVE_SIG_PREGS_SIZE): Likewise.
4248         (SVE_SIG_FFR_OFFSET): Likewise.
4249         (SVE_SIG_REGS_SIZE): Likewise.
4250         (SVE_SIG_CONTEXT_SIZE): Likewise.
4251         (SVE_PT_REGS_MASK): Likewise.
4252         (SVE_PT_REGS_FPSIMD): Likewise.
4253         (SVE_PT_REGS_SVE): Likewise.
4254         (SVE_PT_VL_INHERIT): Likewise.
4255         (SVE_PT_VL_ONEXEC): Likewise.
4256         (SVE_PT_REGS_OFFSET): Likewise.
4257         (SVE_PT_FPSIMD_OFFSET): Likewise.
4258         (SVE_PT_FPSIMD_SIZE): Likewise.
4259         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4260         (SVE_PT_SVE_PREG_SIZE): Likewise.
4261         (SVE_PT_SVE_FFR_SIZE): Likewise.
4262         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4263         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4264         (__SVE_SIG_TO_PT): Likewise.
4265         (SVE_PT_SVE_OFFSET): Likewise.
4266         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4267         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4268         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4269         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4270         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4271         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4272         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4273         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4274         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4275         (SVE_PT_SVE_SIZE): Likewise.
4276         (SVE_PT_SIZE): Likewise.
4277         (HAS_SVE_STATE): New define.
4278
4279 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4280
4281         * nat/aarch64-sve-linux-sigcontext.h: New file.
4282         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4283         new files.
4284         (SVE_VQ_MIN): Likewise.
4285         (SVE_VQ_MAX): Likewise.
4286         (SVE_VL_MIN): Likewise.
4287         (SVE_VL_MAX): Likewise.
4288         (SVE_NUM_ZREGS): Likewise.
4289         (SVE_NUM_PREGS): Likewise.
4290         (sve_vl_valid): Likewise.
4291         (struct user_sve_header): Likewise.
4292
4293 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4294             Richard Bunt <Richard.Bunt@arm.com>
4295
4296         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4297         was requested by GDB.
4298
4299 2018-06-15  Tom de Vries  <tdevries@suse.de>
4300
4301         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4302
4303 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4304
4305         * gnulib/update-gnulib.sh: Print expected versions of
4306         autoconf/aclocal.
4307
4308 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4309
4310         * arch-utils.c (default_type_align): Use type_length_units.
4311         * gdbtypes.c (type_align): Use type_length_units.
4312
4313 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4314
4315         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4316         of 'define' command.
4317
4318 2018-06-14  Tom de Vries  <tdevries@suse.de>
4319
4320         PR cli/22573
4321         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4322         get_no_prettyformat_print_options.
4323
4324 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4325
4326         * sparc-nat.h: Include target.h.
4327         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4328         <fetch_registers>: Remove this argument in function call.
4329         <store_registers>: Remove this argument in function call, remove
4330         extra semicolon.
4331         <low_forget_process>: Call sparc64_forget_process instead of
4332         sparc_forget_process.
4333
4334 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4335
4336         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4337         (procfs_target::make_corefile_notes): Adjust to new
4338         target_read_alloc return type.
4339
4340 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4341             Stephen Roberts  <stephen.roberts@arm.com>
4342
4343         PR gdb/22882
4344         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4345         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4346         Move should_notify_stop local into more inner scope.
4347
4348 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4349             Stephen Roberts  <stephen.roberts@arm.com>
4350
4351         PR gdb/22882
4352         * infrun.c (resume_1): Add call to mark_async_event_handler.
4353
4354 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4355
4356         * infrun.c (do_target_wait): Change old version of $pc printed.
4357
4358 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4359
4360         * dwarf2read.c (read_index_from_section): Rename to...
4361         (read_gdb_index_from_section): ... this, update all callers.
4362         (dwarf2_read_index): Rename to...
4363         (dwarf2_read_gdb_index): ... this, update all callers.
4364
4365 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4366
4367         * gdb/hppa-linux-nat.c
4368         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4369         hppa_linux_nat_target::fetch_registers.
4370
4371 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4372
4373         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4374         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4375         (AARCH64_DWARF_SVE_FFR): Likewise.
4376         (AARCH64_DWARF_SVE_P0): Likewise.
4377         (AARCH64_DWARF_SVE_Z0): Likewise.
4378
4379 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4380
4381         * common/common-regcache.h (raw_compare): New function.
4382         * regcache.c (regcache::raw_compare): Likewise.
4383         * regcache.h (regcache::raw_compare): New declaration.
4384
4385 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4386
4387         * common/common-regcache.h (reg_buffer_common): New structure.
4388         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4389         (reg_buffer::raw_supply): Likewise.
4390         (reg_buffer::raw_supply_integer): Likewise.
4391         (reg_buffer::raw_supply_zeroed): Likewise.
4392         (reg_buffer::raw_collect): Likewise.
4393         (reg_buffer::raw_collect_integer): Likewise.
4394         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4395         (reg_buffer::raw_supply): Likewise.
4396         (reg_buffer::raw_supply_integer): Likewise.
4397         (reg_buffer::raw_supply_zeroed): Likewise.
4398         (reg_buffer::raw_collect): Likewise.
4399         (reg_buffer::raw_collect_integer): Likewise.
4400
4401 2018-06-10  Tom Tromey  <tom@tromey.com>
4402
4403         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4404         (class remote_state) <stop_reply_queue>: Now std::vector.
4405         (remote_state::~remote_state)
4406         (remote_target::stop_reply_queue_length): Update.
4407         (struct queue_iter_param, remove_child_of_pending_fork)
4408         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4409         (check_pending_event_prevents_wildcard_vcont_callback)
4410         (remove_stop_reply_for_inferior)
4411         (remove_stop_reply_of_remote_state)
4412         (remote_notif_remove_once_on_match)
4413         (stop_reply_match_ptid_and_ws)
4414         (remote_kill_child_of_pending_fork): Remove.
4415         (remote_target::remove_new_fork_children)
4416         (remote_target::check_pending_events_prevent_wildcard_vcont)
4417         (remote_target::discard_pending_stop_replies)
4418         (remote_target::discard_pending_stop_replies_in_queue)
4419         (remote_target::remote_notif_remove_queued_reply)
4420         (remote_target::queued_stop_reply)
4421         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4422         (remote_target::wait, remote_target::kill_new_fork_children)
4423         (remote_target::async): Update.
4424
4425 2018-06-10  Tom Tromey  <tom@tromey.com>
4426
4427         * record-full.c (record_full_arch_list_cleanups): Remove.
4428         (record_full_message): Use try/catch.
4429         (record_full_wait_cleanups): Remove.
4430         (record_full_wait_1): Use try/catch.
4431         (record_full_restore): Likewise.
4432
4433 2018-06-10  Tom Tromey  <tom@tromey.com>
4434
4435         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4436         declare VEC.  Add constructor.
4437         <in_target_beneath>: Now bool.
4438         (record_full_breakpoints): Now a std::vector, static.
4439         (record_full_sync_record_breakpoints)
4440         (record_full_init_record_breakpoints)
4441         (record_full_target::insert_breakpoint)
4442         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4443
4444 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4445
4446         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4447         * serial.c (serial_interface_lookup): Remove struct keyword.
4448
4449 2018-06-10  Tom Tromey  <tom@tromey.com>
4450
4451         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4452         method.
4453         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4454         a method.
4455         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4456         method.
4457         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4458         "beneath" as a method.
4459         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4460         Use "beneath" as a method.
4461
4462 2018-06-10  Tom Tromey  <tom@tromey.com>
4463
4464         * tracefile.c (struct trace_file_writer_deleter): New.
4465         <operator()>: Rename from trace_file_writer_xfree.
4466         (trace_file_writer_up): New typedef.
4467         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4468
4469 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4470
4471         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4472         <m_registers, m_register_status>: Change type to
4473         std::unique_ptr.
4474         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4475         XCNEWVEC.
4476
4477 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4478
4479         * common/common-regcache.h (enum register_status): Add
4480         underlying type "signed char".
4481         * regcache.h (reg_buffer) <m_register_status>: Change type to
4482         register_status *.
4483         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4484         register_status instead of signed char.
4485         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4486         (reg_buffer::get_register_status): Remove cast.
4487         (readable_regcache::raw_read): Remove cast.
4488         (readable_regcache::cooked_read): Remove cast.
4489
4490 2018-06-09  Tom Tromey  <tom@tromey.com>
4491
4492         * source.c (reverse_search_command, forward_search_command): Use
4493         scoped_fd.
4494
4495 2018-06-09  Tom Tromey  <tom@tromey.com>
4496
4497         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4498         (serial_ops_list): Now static, std::vector.
4499         (serial_interface_lookup, serial_add_interface): Update.
4500
4501 2018-06-09  Tom Tromey  <tom@tromey.com>
4502
4503         * dwarf2read.c (process_cu_includes): Update.
4504         (process_full_comp_unit): Update.
4505         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4506         std::vector.
4507
4508 2018-06-08  Paul Koning  <paul_koning@dell.com>
4509
4510         PR gdb/23252
4511
4512         * python/python.c (do_start_initialization):
4513         Avoid call to internal Python API.
4514         (init__gdb_module): New function.
4515
4516 2018-06-08  Gary Benson <gbenson@redhat.com>
4517
4518         * linux-thread-db.c (valprint.h): New include.
4519         (struct check_thread_db_info): New structure.
4520         (check_thread_db_on_load, tdb_testinfo): New static globals.
4521         (check_thread_db, check_thread_db_callback): New functions.
4522         (try_thread_db_load_1): Run integrity checks if requested.
4523         (maintenance_check_libthread_db): New function.
4524         (_initialize_thread_db): Register "maint check libthread-db"
4525         and "maint set/show check-libthread-db".
4526         * NEWS: Mention the above new commands.
4527
4528 2018-06-08  Tom Tromey  <tom@tromey.com>
4529
4530         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4531         now a method.
4532
4533 2018-06-08  Tom Tromey  <tom@tromey.com>
4534
4535         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4536
4537 2018-06-08  Tom Tromey  <tom@tromey.com>
4538
4539         * common/btrace-common.h (struct btrace_data): Add constructor,
4540         destructor, move assignment operator.
4541         <empty, clear, fini>: New methods.
4542         <format>: Initialize.
4543         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4544         (btrace_data_empty): Don't declare.
4545         * common/btrace-common.c (btrace_data_init): Remove.
4546         (btrace_data::fini): Rename from btrace_data_fini.
4547         (btrace_data::empty): Rename from btrace_data_empty.
4548         (btrace_data::clear): Rename from btrace_data_clear.  Return
4549         bool.
4550         * btrace.h (make_cleanup_btrace_data): Don't declare.
4551         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4552         (parse_xml_btrace): Update.
4553         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4554         (maint_btrace_clear_packet_history_cmd): Update.
4555
4556 2018-06-07  Pedro Alves  <palves@redhat.com>
4557
4558         * target.h (target_ops) <beneath>: Now a method.  All references
4559         updated.
4560         (class target_stack): New.
4561         * target.c (g_target_stack): New.
4562         (g_current_top_target): Delete.
4563         (current_top_target): Get the top target out of g_target_stack.
4564         (target_stack::push, target_stack::unpush): New.
4565         (push_target, unpush_target): Reimplement.
4566         (target_is_pushed): Reimplement in terms of g_target_stack.
4567         (target_ops::beneath, target_stack::find_beneath): New.
4568
4569 2018-06-07  Pedro Alves  <palves@redhat.com>
4570
4571         * target.h (find_target_beneath): Delete declaration.
4572         * target.c (find_target_beneath): Delete definition.
4573         * aix-thread.c: All callers of find_target_beneath adjusted to
4574         call target_ops::beneath instead.
4575         * bsd-uthread.c: Likewise.
4576         * linux-thread-db.c: Likewise.
4577         * ravenscar-thread.c: Likewise.
4578         * sol-thread.c: Likewise.
4579         * spu-multiarch.c: Likewise.
4580
4581 2018-06-07  Pedro Alves  <palves@redhat.com>
4582
4583         * target.h (target_ops) <beneath>: Now a method.  All references
4584         updated.
4585         (target_ops) <m_beneath>: New.
4586         * target.c (target_ops::beneath): New.
4587         * corelow.c: Adjust all references to target_ops::beneath.
4588         * linux-thread-db.c: Likewise.
4589         * make-target-delegates: Likewise.
4590         * record-btrace.c: Likewise.
4591         * record-full.c: Likewise.
4592         * remote.c: Likewise.
4593         * target.c: Likewise.
4594         * target-delegates.c: Regenerate.
4595
4596 2018-06-07  Pedro Alves  <palves@redhat.com>
4597
4598         * target.h (target_stack): Delete.
4599         (current_top_target): Declare function.
4600         * target.c (target_stack): Delete.
4601         (g_current_top_target): New.
4602         (current_top_target): New function.
4603         * auxv.c: Use current_top_target instead of target_stack
4604         throughout.
4605         * avr-tdep.c: Likewise.
4606         * breakpoint.c: Likewise.
4607         * corefile.c: Likewise.
4608         * elfread.c: Likewise.
4609         * eval.c: Likewise.
4610         * exceptions.c: Likewise.
4611         * frame.c: Likewise.
4612         * gdbarch-selftests.c: Likewise.
4613         * gnu-v3-abi.c: Likewise.
4614         * ia64-tdep.c: Likewise.
4615         * ia64-vms-tdep.c: Likewise.
4616         * infcall.c: Likewise.
4617         * infcmd.c: Likewise.
4618         * infrun.c: Likewise.
4619         * linespec.c: Likewise.
4620         * linux-tdep.c: Likewise.
4621         * minsyms.c: Likewise.
4622         * ppc-linux-nat.c: Likewise.
4623         * ppc-linux-tdep.c: Likewise.
4624         * procfs.c: Likewise.
4625         * regcache.c: Likewise.
4626         * remote.c: Likewise.
4627         * rs6000-tdep.c: Likewise.
4628         * s390-linux-nat.c: Likewise.
4629         * s390-tdep.c: Likewise.
4630         * solib-aix.c: Likewise.
4631         * solib-darwin.c: Likewise.
4632         * solib-dsbt.c: Likewise.
4633         * solib-spu.c: Likewise.
4634         * solib-svr4.c: Likewise.
4635         * solib-target.c: Likewise.
4636         * sparc-tdep.c: Likewise.
4637         * sparc64-tdep.c: Likewise.
4638         * spu-tdep.c: Likewise.
4639         * symfile.c: Likewise.
4640         * symtab.c: Likewise.
4641         * target-descriptions.c: Likewise.
4642         * target-memory.c: Likewise.
4643         * target.c: Likewise.
4644         * target.h: Likewise.
4645         * tracefile-tfile.c: Likewise.
4646         * tracepoint.c: Likewise.
4647         * valops.c: Likewise.
4648         * valprint.c: Likewise.
4649         * value.c: Likewise.
4650         * windows-tdep.c: Likewise.
4651         * mi/mi-main.c: Likewise.
4652
4653 2018-06-07  Tom Tromey  <tom@tromey.com>
4654
4655         * valprint.h (build_address_symbolic): Declare.
4656         * printcmd.c (print_address_symbolic): Update.
4657         (build_address_symbolic): Change "name" and "filename" to
4658         std::string.
4659         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4660         Update.
4661         * defs.h (build_address_symbolic): Remove declaration.
4662
4663 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4664
4665         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4666         (aarch64_vnv_type): Add function.
4667         (aarch64_pseudo_register_name): Add V regs for SVE.
4668         (aarch64_pseudo_register_type): Likewise.
4669         (aarch64_pseudo_register_reggroup_p): Likewise.
4670         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4671         (aarch64_pseudo_read_value): Add V regs for SVE.
4672         (aarch64_pseudo_write_2): Use V0 offset for SVE
4673         (aarch64_pseudo_write): Add V regs for SVE.
4674         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4675
4676 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4677
4678         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4679         (sve_vl_from_vq): Likewise.
4680
4681 2018-06-05  Tom Tromey  <tom@tromey.com>
4682
4683         * cli/cli-cmds.c (show_version): Update.
4684         * top.c (print_gdb_version): Add "interactive" parameter.
4685         Update.
4686         * main.c (captured_main_1): Update.
4687         * top.h (print_gdb_version): Add "interactive" parameter and a
4688         comment.
4689
4690 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4691
4692         * common/enum-flags.h: Add trailing semicolon to example in
4693         comment.
4694
4695 2018-06-05  Tom Tromey  <tom@tromey.com>
4696
4697         PR cli/12326:
4698         * NEWS: Add entry about pager.
4699         * utils.c (pagination_disabled_for_command): New global.
4700         (prompt_for_continue): Allow "c" response to prompt.
4701         (reinitialize_more_filter): Clear
4702         pagination_disabled_for_command.
4703         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4704
4705 2018-06-04  Tom Tromey  <tom@tromey.com>
4706
4707         * ada-lang.h (ada_lookup_symbol_list): Update.
4708         * ada-lang.c (resolve_subexp): Update.
4709         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4710         parameter.
4711         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4712         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4713         results parameter to std::vector.
4714         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4715         Update.
4716         * ada-exp.y (block_lookup): Update.
4717         (select_possible_type_sym): Change type of syms.  Remove nsyms
4718         parameter.
4719         (write_var_or_type, write_name_assoc): Update.
4720
4721 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4722
4723         * windows-nat.c (windows_nat_target::xfer_partial): Return
4724         TARGET_XFER_E_IO if we need to delegate to the target beneath
4725         but BENEATH is NULL.
4726
4727 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4728
4729         * Makefile.in (config.status): Add configure.nat as a
4730         dependency.
4731
4732 2018-06-04  Tom Tromey  <tom@tromey.com>
4733
4734         * cp-name-parser.y (cpname_state): Add method declarations.
4735         (HANDLE_QUAL): Update.
4736         (cpname_state::d_grab, cpname_state::fill_comp)
4737         (cpname_state::make_operator, cpname_state::make_dtor)
4738         (cpname_state::make_builtin_type, cpname_state::make_name)
4739         (cpname_state::d_qualify, cpname_state::d_int_type)
4740         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4741         (%union): Move earlier.
4742
4743 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4744
4745         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4746
4747 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4748
4749         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4750         (aarch64_pseudo_write_1): Likewise.
4751         (aarch64_pseudo_read_value): Use helper.
4752         (aarch64_pseudo_write): Likewise.
4753
4754 2018-06-04  Pedro Alves  <palves@redhat.com>
4755
4756         * darwin-nat.c (darwin_ops): Delete.
4757         (darwin_attach_pid): Use get_native_target.
4758
4759 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4760
4761         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4762         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4763
4764 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4765
4766         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4767         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4768         (aarch64_gdbarch_init): Check for SVE.
4769         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4770
4771 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4772
4773         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4774         * aarch64-tdep.h (aarch64_read_description): Likewise.
4775         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4776         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4777         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4778         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4779         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4780
4781 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4782
4783         * value.c (value_fetch_lazy_bitfield): New.
4784         (value_fetch_lazy_memory): New.
4785         (value_fetch_lazy_register): New.
4786         (value_fetch_lazy): Factor out to smaller functions.
4787
4788 2018-06-01  Tom Tromey  <tom@tromey.com>
4789
4790         * cp-name-parser.y (backslashable, represented): Now const.
4791
4792 2018-06-01  Tom Tromey  <tom@tromey.com>
4793
4794         * cp-name-parser.y: Include parser-defs.h.
4795         (parser_fprintf): Remove declaration.
4796
4797 2018-06-01  Tom Tromey  <tom@tromey.com>
4798
4799         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4800         %parse-param.
4801         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4802         (global_result): Remove globals.
4803         (struct cpname_state): New.
4804         (yyparse): Don't declare.
4805         (yylex, yyerror): Move declarations after %union.
4806         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4807         (make_name): Add state parameter.
4808         Update all callers.
4809         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4810         parameter.
4811         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4812         Update.
4813         (yylex): Add lvalp, state parameters.
4814         (yyerror): Add state parameter.
4815         (cp_demangled_name_to_comp): Update.
4816
4817 2018-06-01  Tom Tromey  <tom@tromey.com>
4818
4819         * cp-name-parser.y (parser_fprintf): Declare.
4820         (GDB_YY_REMAP_PREFIX): Define.
4821         Include yy-remap.h.  Don't redefine yy* identifiers.
4822
4823 2018-06-01  Tom Tromey  <tom@tromey.com>
4824
4825         * python/py-type.c (typy_legacy_template_argument): Update.
4826         * cp-support.h (cp_demangled_name_to_comp): Update.
4827         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4828         parameter to be a "std::string *".
4829         (main): Update.
4830
4831 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4832
4833         * ada-lex.l: Include "diagnostics.h" instead of
4834         "common/diagnostics.h".
4835         * unittests/environ-selftests.c: Likewise.
4836         * common/diagnostics.h: Moved to ../include.
4837
4838 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4839
4840         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4841         to language_mode_manual while calling breakpoint_re_set_one.
4842
4843 2018-06-01  Tom Tromey  <tom@tromey.com>
4844
4845         * valops.c (value_cast_structs, destructor_name_p): Update.
4846         * symtab.c (gdb_mangle_name): Update.
4847         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4848         Update.
4849         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4850         (pascal_object_print_value_fields, pascal_object_print_value):
4851         Update.
4852         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4853         * linespec.c (find_methods): Update.
4854         * gdbtypes.h (type_name_no_tag): Remove.
4855         (type_name_or_error): Rename from type_name_no_tag_or_error.
4856         * gdbtypes.c (type_name_no_tag): Remove.
4857         (type_name_or_error): Rename from type_name_no_tag_or_error.
4858         (lookup_struct_elt_type, check_typedef): Update.
4859         * expprint.c (print_subexp_standard): Update.
4860         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4861         * d-namespace.c (d_lookup_nested_symbol): Update.
4862         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4863         (cp_print_class_member): Update.
4864         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4865         * completer.c (add_struct_fields): Update.
4866         * c-typeprint.c (cp_type_print_derivation_info)
4867         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4868         Update.
4869         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4870         (ada_prefer_type, ada_is_exception_sym): Update.
4871
4872 2018-06-01  Tom Tromey  <tom@tromey.com>
4873
4874         * valops.c (enum_constant_from_type, value_namespace_elt)
4875         (value_maybe_namespace_elt): Update.
4876         * valarith.c (find_size_for_pointer_math): Update.
4877         * target-descriptions.c (make_gdb_type): Update.
4878         * symmisc.c (print_symbol): Update.
4879         * stabsread.c (define_symbol, read_type)
4880         (complain_about_struct_wipeout, add_undefined_type)
4881         (cleanup_undefined_types_1): Update.
4882         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4883         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4884         (rust_internal_print_type, rust_composite_type)
4885         (rust_evaluate_funcall, rust_evaluate_subexp)
4886         (rust_inclusive_range_type_p): Update.
4887         * python/py-type.c (typy_get_tag): Update.
4888         * p-typeprint.c (pascal_type_print_base): Update.
4889         * mdebugread.c (parse_symbol, parse_type): Update.
4890         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4891         Update.
4892         * guile/scm-type.c (gdbscm_type_tag): Update.
4893         * go-lang.c (sixg_string_p): Update.
4894         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4895         Update.
4896         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4897         (TYPE_TAG_NAME): Remove.
4898         * gdbtypes.c (type_name_no_tag): Simplify.
4899         (check_typedef, check_types_equal, recursive_dump_type)
4900         (copy_type_recursive, arch_composite_type): Update.
4901         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4902         in summary mode when needed.
4903         * eval.c (evaluate_funcall): Update.
4904         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4905         (process_structure_scope, read_enumeration_type)
4906         (read_namespace_type, read_module_type, determine_prefix): Update.
4907         * cp-support.c (inspect_type): Update.
4908         * coffread.c (process_coff_symbol, decode_base_type): Update.
4909         * c-varobj.c (c_is_path_expr_parent): Update.
4910         * c-typeprint.c (c_type_print_base_struct_union): Update.
4911         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4912         summary when using C language.
4913         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4914         (gen_maybe_namespace_elt): Update.
4915         * ada-lang.c (ada_type_name): Simplify.
4916         (empty_record, ada_template_to_fixed_record_type_1)
4917         (template_to_static_fixed_type)
4918         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4919
4920 2018-06-01  Tom Tromey  <tom@tromey.com>
4921
4922         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4923         c_print_type.
4924         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4925         (c_print_type): Update.
4926         (c_print_type): New overload.
4927         (c_type_print_varspec_prefix, c_type_print_args)
4928         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4929         (c_type_print_base_struct_union, c_type_print_base_1)
4930         (cp_type_print_method_args): Add "language" parameter.
4931         (c_type_print_base): Update.
4932         * c-lang.h (c_print_type): Add new overload.
4933
4934 2018-06-01  Tom Tromey  <tom@tromey.com>
4935
4936         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4937         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4938
4939 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4940
4941         * aarch64-tdep.c (aarch64_sve_register_names): New const
4942         var.
4943         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4944         (AARCH64_SVE_Z_REGS_NUM): New define.
4945         (AARCH64_SVE_P_REGS_NUM): Likewise.
4946         (AARCH64_SVE_NUM_REGS): Likewise.
4947
4948 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4949
4950         * nat/linux-ptrace.h [__alpha__]
4951         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4952         definitions.
4953
4954 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4955
4956         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4957         the endianness selected.
4958         * NEWS: Document `set endian auto' mode operation update.
4959
4960 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4961
4962         * Makefile.in: Add new header.
4963         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4964         (sve_vl_from_vg): Likewise.
4965         (sve_vq_from_vl): Likewise.
4966         (sve_vl_from_vq): Likewise.
4967         (sve_vq_from_vg): Likewise.
4968         (sve_vg_from_vq): Likewise.
4969         * configure.nat: Add new c file.
4970         * nat/aarch64-sve-linux-ptrace.c: New file.
4971         * nat/aarch64-sve-linux-ptrace.h: New file.
4972
4973 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4974
4975         * aarch64-linux-nat.c (aarch64_linux_read_description):
4976         Add parmeter zero.
4977         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4978         Likewise.
4979         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4980         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4981         (aarch64_gdbarch_init): Add parmeter zero.
4982         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4983         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4984         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4985         parmeter.
4986         * doc/gdb.texinfo: Describe SVE feature
4987         * features/aarch64-sve.c: New file.
4988
4989 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4990
4991         PR gdb/23210
4992         * gdbarch.sh (significant_addr_bit): Default to zero when
4993         not set by target architecture.
4994         * gdbarch.c: Re-generated.
4995         * utils.c (address_significant): Update.
4996
4997 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4998
4999         * stack.c (func_command): Remove trailing newline in call to error.
5000
5001 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5002
5003         * regcache.h (regcache_raw_collect): Remove, update callers to
5004         use regcache::raw_collect.
5005         * regcache.c (regcache_raw_collect): Remove.
5006
5007 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5008
5009         * regcache.h (regcache_raw_supply): Remove, update callers to
5010         use detached_regcache::raw_supply.
5011         * regcache.c (regcache_raw_supply): Remove.
5012
5013 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5014
5015         * regcache.h (regcache_cooked_write_part): Remove, update
5016         callers to use regcache::cooked_write_part.
5017         * regcache.c (regcache_cooked_write_part): Remove.
5018
5019 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5020
5021         * regcache.h (regcache_cooked_read_part): Remove, update callers
5022         to use readable_regcache::cooked_read_part.
5023         * regcache.c (regcache_cooked_read_part): Remove.
5024
5025 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5026
5027         * regcache.h (regcache_cooked_read_value): Remove, update
5028         callers to use readable_regcache::cooked_read_value.
5029         * regcache.c (regcache_cooked_read_value): Remove.
5030
5031 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5032
5033         * regcache.h (regcache_cooked_write): Remove, update callers to
5034         use regcache::cooked_write.
5035         * regcache.c (regcache_cooked_write): Remove.
5036
5037 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5038
5039         * regcache.h (regcache_invalidate): Remove, update callers to
5040         use detached_regcache::invalidate instead.
5041         * regcache.c (regcache_invalidate): Remove.
5042
5043 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5044
5045         * regcache.h (regcache_raw_write_part): Remove, update callers
5046         to use regcache::raw_write_part instead.
5047         * regcache.c (regcache_raw_write_part): Remove.
5048
5049 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5050
5051         * regcache.h (regcache_raw_read_part): Remove, update callers to
5052         use readable_regcache::raw_read_part instead.
5053         * regcache.c (regcache_raw_read_part): Remove.
5054
5055 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5056
5057         * regcache.h (regcache_cooked_read): Remove, update callers to
5058         use readable_regcache::cooked_read instead.
5059         * regcache.c (regcache_cooked_read): Remove.
5060
5061 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5062
5063         * regcache.h (regcache_raw_write): Remove, update callers to use
5064         regcache::raw_write instead.
5065         * regcache.c (regcache_raw_write): Remove.
5066
5067 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5068
5069         * regcache.h (regcache_raw_read): Remove, update callers to use
5070         readable_regcache::raw_read instead.
5071         * regcache.c (regcache_raw_read): Remove.
5072
5073 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5074
5075         * regcache.h (regcache_raw_update): Remove, update callers to
5076         use readable_regcache::raw_update instead.
5077         * regcache.c (regcache_raw_update): Remove.
5078
5079 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5080
5081         * regcache.h (regcache_register_status): Remove, update callers
5082         to use reg_buffer::get_register_status directly instead.
5083         * regcache.c (regcache_register_status): Remove.
5084
5085 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5086
5087         * regcache.h (regcache_get_ptid): Remove, update all callers to
5088         call regcache::ptid instead.
5089         * regcache.c (regcache_get_ptid): Remove.
5090
5091 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5092
5093         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5094
5095 2018-05-30  Pedro Alves  <palves@redhat.com>
5096
5097         * common/common-exceptions.h (exception_rethrow): Use
5098         ATTRIBUTE_NORETURN.
5099
5100 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5101
5102         * breakpoint.c (print_solib_event, check_status_catch_solib):
5103         Remove struct keyword in range-based for loops.
5104         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5105         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5106         Likewise.
5107         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5108         Likewise.
5109         * symfile.c (addr_info_make_relative): Likewise.
5110         * thread.c (value_in_thread_stack_temporaries): Likewise.
5111
5112 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5113
5114         PR gdb/16841
5115         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5116         aggregate type to get its real type before accessing it.
5117
5118 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5119
5120         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5121         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5122         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5123         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5124         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5125         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5126         * printcmd.c (info_address_command): Likewise.
5127
5128 2018-05-29  Tom Tromey  <tom@tromey.com>
5129
5130         * windows-nat.c (handle_exception): Update fall-through comment.
5131
5132 2018-05-29  Tom Tromey  <tom@tromey.com>
5133
5134         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5135         (struct program_space) <added_solibs>: Now a std::vector.
5136         * breakpoint.c (print_solib_event): Update.
5137         (check_status_catch_solib): Update.
5138         * progspace.c (clear_program_space_solib_cache): Update.
5139         * solib.c (update_solib_list): Update.
5140
5141 2018-05-29  Tom Tromey  <tom@tromey.com>
5142
5143         * python/py-type.c (typy_richcompare): Update.
5144         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5145         * gdbtypes.h (types_deeply_equal): Return bool.
5146         (types_equal): Likewise.
5147         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5148         declare VEC.
5149         (check_types_equal): Change worklist to std::vector.  Return
5150         bool.
5151         (struct type_equality_entry): Add constructor.
5152         (compare_maybe_null_strings): Return bool.
5153         (check_types_worklist): Return bool.  Change worklist to
5154         std::vector.
5155         (types_deeply_equal): Use std::vector.
5156         (types_equal): Return bool.
5157         (compare_maybe_null_strings): Simplify.
5158
5159 2018-05-29  Tom Tromey  <tom@tromey.com>
5160
5161         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5162
5163 2018-05-29  Tom Tromey  <tom@tromey.com>
5164
5165         * objc-lang.h: Don't include cp-support.h.
5166         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5167         declare VEC.
5168
5169 2018-05-27  Tom Tromey  <tom@tromey.com>
5170
5171         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5172
5173 2018-05-25  Tom Tromey  <tom@tromey.com>
5174
5175         * value.c (value::location): Initialize.
5176
5177 2018-05-25  Tom Tromey  <tom@tromey.com>
5178
5179         * dbxread.c (init_bincl_list): Remove.
5180         (bincl_list): Now a std::vector.
5181         (bincls_allocated, next_bincl): Remove.
5182         (free_bincl_list, do_free_bincl_list_cleanup)
5183         (make_cleanup_free_bincl_list): Remove.
5184         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5185         unique_xmalloc_ptr.
5186         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5187         (struct header_file_location): Add constructor.
5188         (add_bincl_to_list): Remove.
5189
5190 2018-05-25  Tom Tromey  <tom@tromey.com>
5191
5192         * tui/tui.c (tui_enable): Update.
5193         * mi/mi-interp.c (mi_interp::init): Update.
5194         * interps.h (class interp) <name>: New method.
5195         <m_name>: Rename from name.
5196         (~scoped_restore_interp): Update.
5197         * interps.c (interp::interp): Update.
5198         (interp_add, interp_set, interp_lookup_existing)
5199         (current_interp_named_p): Update.
5200
5201 2018-05-25  Tom Tromey  <tom@tromey.com>
5202
5203         * interps.c (interp_name): Remove.
5204         * mi/mi-interp.c (mi_interp::init): Update.
5205         * interps.h (interp_name): Remove.
5206         (~scoped_restore_interp): Update.
5207         * tui/tui.c (tui_enable): Update.
5208
5209 2018-05-25  Tom Tromey  <tom@tromey.com>
5210
5211         * utils.c (fputs_maybe_filtered): Update.
5212         * linespec.c (decode_line_full): Update.
5213         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5214         (mi_print_breakpoint_for_event, mi_solib_loaded)
5215         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5216         (mi_user_selected_context_changed): Update.
5217         * mi/mi-main.c (mi_execute_command): Update.
5218         * cli/cli-script.c (execute_control_command): Update.
5219         * python/python.c (execute_gdb_command): Update.
5220         * solib.c (info_sharedlibrary_command): Update.
5221         * interps.c (interp_ui_out): Remove.
5222         * interps.h (interp_ui_out): Remove.
5223
5224 2018-05-25  Tom Tromey  <tom@tromey.com>
5225
5226         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5227         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5228         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5229
5230 2018-05-25  Tom Tromey  <tom@tromey.com>
5231
5232         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5233         * interps.c (interp_exec): Use scoped_restore.
5234
5235 2018-05-25  Tom Tromey  <tom@tromey.com>
5236
5237         * remote.c (remote_target::remote_file_get): Use
5238         gdb::byte_vector.
5239         (remote_target::remote_file_put): Likewise.
5240
5241 2018-05-25  Tom Tromey  <tom@tromey.com>
5242
5243         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5244         a std::string.
5245         (get_pe_section_index, add_pe_exported_sym): Update.
5246         (read_pe_exported_syms): Use gdb::def_vector.
5247
5248 2018-05-25  Tom Tromey  <tom@tromey.com>
5249
5250         * frame.c (remove_prev_frame): Remove.
5251         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5252
5253 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5254
5255         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5256         Remove prototypes.
5257         * mips-linux-nat.c (supply_fpregset): Always call
5258         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5259         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5260         `mips_fill_fpregset'.
5261         * mips-linux-tdep.c (mips_supply_fpregset)
5262         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5263         (mips_fill_fpregset_wrapper): Remove functions.
5264         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5265         (mips_linux_fpregset): Remove variable.
5266         (mips_linux_iterate_over_regset_sections): Use
5267         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5268         (mips_linux_o32_sigframe_init): Remove comment.
5269
5270 2018-05-25  Pedro Alves  <palves@redhat.com>
5271
5272         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5273         (struct readahead_cache, struct packet_reg, struct
5274         remote_arch_state, class remote_state): Move higher up in the
5275         file.
5276         (remote_target::m_remote_state): Now an object instead of a pointer.
5277         (remote_target::get_remote_state): Adjust.
5278
5279 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5280
5281         * stack.c (select_and_print_frame): Delete.
5282         (struct function_bounds): Move struct within function.
5283         (func_command): Most content moved into new function
5284         find_frame_for_function, use new function, print result, add
5285         function comment.
5286         (find_frame_for_function): New function, now returns a result.
5287
5288 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5289
5290         * stack.c (iterate_over_block_arg_vars): Fix comment.
5291         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5292
5293 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5294
5295         PR gdb/23203
5296         * frame.c
5297         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5298         Define.
5299         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5300         Define.
5301         * frame.h (class scoped_restore_selected_frame): New class.
5302         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5303         of any exception, use scoped_restore_selected_frame to restore the
5304         frame instead.
5305
5306 2018-05-24  Pedro Alves  <palves@redhat.com>
5307
5308         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5309         override.
5310
5311 2018-05-23  Tom Tromey  <tom@tromey.com>
5312
5313         * complaints.c (struct complaints): Remove.
5314         (symfile_complaint_book): Remove.
5315         (series): New global.
5316         (complaint_internal): Update.
5317         (clear_complaints): Update.
5318
5319 2018-05-23  Tom Tromey  <tom@tromey.com>
5320
5321         * complaints.c (counters): New global.
5322         (struct complain): Remove.
5323         (struct complaints) <root>: Remove.
5324         (complaint_sentinel): Remove.
5325         (symfile_complaint_book): Update.
5326         (find_complaint) Remove.
5327         (complaint_internal, clear_complaints): Update.
5328
5329 2018-05-23  Tom Tromey  <tom@tromey.com>
5330
5331         * complaints.c (struct complain) <file, line>: Remove.
5332         (find_complaint): Remove file, line parameters.
5333         (complaint_internal): Update.
5334
5335 2018-05-23  Tom Tromey  <tom@tromey.com>
5336
5337         * complaints.c (vcomplaint): Remove.
5338         (complaint_internal) Merge in contents of vcomplaint.
5339
5340 2018-05-23  Tom Tromey  <tom@tromey.com>
5341
5342         * complaints.c (struct complaints) <explanation>: Remove.
5343         (symfile_explanations): Remove.
5344         (symfile_complaint_book): Update.
5345         (vcomplaint): Update.
5346         (struct explanation): Remove.
5347
5348 2018-05-23  Tom Tromey  <tom@tromey.com>
5349
5350         * complaints.c (symfile_complaints): Remove.
5351         (complaint_internal): Remove "complaints" parameter.
5352         (clear_complaints, vcomplaint): Remove "c" parameter.
5353         (get_complaints): Remove.
5354         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5355         (dwarf2_debug_line_missing_file_complaint)
5356         (dwarf2_debug_line_missing_end_sequence_complaint)
5357         (dwarf2_complex_location_expr_complaint)
5358         (dwarf2_const_value_length_mismatch_complaint)
5359         (dwarf2_section_buffer_overflow_complaint)
5360         (dwarf2_macro_malformed_definition_complaint)
5361         (dwarf2_invalid_attrib_class_complaint)
5362         (create_addrmap_from_index, dw2_symtab_iter_next)
5363         (dw2_expand_marked_cus)
5364         (dw2_debug_names_iterator::find_vec_in_debug_names)
5365         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5366         (create_debug_type_hash_table, init_cutu_and_read_dies)
5367         (partial_die_parent_scope, add_partial_enumeration)
5368         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5369         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5370         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5371         (create_cus_hash_table, create_dwp_hash_table)
5372         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5373         (dwarf2_rnglists_process, dwarf2_ranges_process)
5374         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5375         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5376         (handle_struct_member_die, process_structure_scope)
5377         (read_array_type, read_common_block, read_module_type)
5378         (read_tag_pointer_type, read_typedef, read_base_type)
5379         (read_subrange_type, load_partial_dies, partial_die_info::read)
5380         (partial_die_info::read, partial_die_info::read)
5381         (partial_die_info::read, read_checked_initial_length_and_offset)
5382         (dwarf2_string_attr, read_formatted_entries)
5383         (dwarf_decode_line_header)
5384         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5385         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5386         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5387         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5388         (get_signatured_type, get_DW_AT_signature_type)
5389         (decode_locdesc, file_file_name, consume_improper_spaces)
5390         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5391         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5392         (dwarf2_symbol_mark_computed, set_die_type)
5393         (read_attribute_value): Update.
5394         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5395         Update.
5396         * dbxread.c (unknown_symtype_complaint)
5397         (lbrac_mismatch_complaint, repeated_header_complaint)
5398         (set_namestring, function_outside_compilation_unit_complaint)
5399         (read_dbx_symtab, process_one_symbol): Update.
5400         * gdbtypes.c (stub_noname_complaint): Update.
5401         * windows-nat.c (handle_unload_dll): Update.
5402         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5403         (decode_base_type): Update.
5404         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5405         (eb_complaint, record_include_begin, record_include_end)
5406         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5407         (process_xcoff_symbol, read_symbol)
5408         (function_outside_compilation_unit_complaint)
5409         (scan_xcoff_symtab): Update.
5410         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5411         * buildsym.c (finish_block_internal, make_blockvector)
5412         (end_symtab_get_static_block, augment_type_symtab): Update.
5413         * dtrace-probe.c (dtrace_process_dof)
5414         (dtrace_static_probe_ops::get_probes): Update.
5415         * complaints.h (struct complaint): Don't declare.
5416         (symfile_complaints): Remove.
5417         (complaint_internal): Remove "complaints" parameter.
5418         (complaint): Likewise.
5419         (clear_complaints): Likewise.
5420         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5421         (reread_symbols): Update.
5422         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5423         (dwarf2_frame_cache, decode_frame_entry): Update.
5424         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5425         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5426         (info_selectors_command): Update.
5427         * macrotab.c (macro_include, check_for_redefinition)
5428         (macro_undef): Update.
5429         * objfiles.c (filter_overlapping_sections): Update.
5430         * stabsread.c (invalid_cpp_abbrev_complaint)
5431         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5432         (define_symbol, error_type, read_type, rs6000_builtin_type)
5433         (stabs_method_name_from_physname, read_member_functions)
5434         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5435         (attach_fields_to_type, complain_about_struct_wipeout)
5436         (read_range_type, read_args, common_block_start)
5437         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5438         Update.
5439         * mdebugread.c (index_complaint, unknown_ext_complaint)
5440         (basic_type_complaint, bad_tag_guess_complaint)
5441         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5442         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5443         (parse_procedure, parse_lines)
5444         (function_outside_compilation_unit_complaint)
5445         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5446         (bad_tag_guess_complaint, reg_value_complaint): Update.
5447         * cp-support.c (demangled_name_complaint): Update.
5448         * macroscope.c (sal_macro_scope): Update.
5449         * dwarf-index-write.c (class debug_names): Update.
5450
5451 2018-05-23  Tom Tromey  <tom@tromey.com>
5452
5453         * complaints.c (clear_complaints): Remove "noisy" parameter.
5454         * complaints.h (clear_complaints): Update.
5455         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5456         (reread_symbols): Update.
5457
5458 2018-05-23  Tom Tromey  <tom@tromey.com>
5459
5460         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5461         SUBSEQUENT_MESSAGE.
5462         (vcomplaint, clear_complaints): Update.
5463         (symfile_explanations): Remove some messages.
5464
5465 2018-05-23  Tom Tromey  <tom@tromey.com>
5466
5467         * complaints.c (internal_complaint): Remove.
5468         * complaints.h (internal_complaint): Remove.
5469
5470 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5471
5472         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5473
5474 2018-05-22  Pedro Alves  <palves@redhat.com>
5475
5476         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5477         (remote_fileio_badfd, remote_fileio_return_errno)
5478         (remote_fileio_return_success, remote_fileio_func_open)
5479         (remote_fileio_func_open, remote_fileio_func_close)
5480         (remote_fileio_func_read, remote_fileio_func_write)
5481         (remote_fileio_func_lseek, remote_fileio_func_rename)
5482         (remote_fileio_func_unlink, remote_fileio_func_stat)
5483         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5484         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5485         remote_target parameter.
5486         (remote_fio_func_map) <func>: Add remote_target parameter.
5487         (do_remote_fileio_request, remote_fileio_request):
5488         * remote-fileio.h (remote_fileio_request):
5489         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5490         remote_target parameter.
5491         (remote_notif_process, handle_notification): Adjust to pass down
5492         the remote.
5493         (remote_notif_state_allocate): Add remote_target parameter.  Save
5494         it.
5495         * remote-notif.h (struct remote_target): Forward declare.
5496         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5497         remote_target parameter.
5498         (struct remote_notif_state) <remote>: New field.
5499         (remote_notif_ack, remote_notif_parse): Add remote_target
5500         parameter.
5501         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5502         remote_target parameter.
5503         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5504         (threads_listing_context, rmt_thread_action, protocol_feature)
5505         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5506         (packet_result, struct threads_listing_context, remote_state):
5507         Move definitions and declarations higher up.
5508         (remote_target) <~remote_target>: Declare.
5509         (remote_download_command_source, remote_file_put, remote_file_get)
5510         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5511         (remote_hostio_pread_vFile, remote_hostio_send_command)
5512         (remote_hostio_set_filesystem, remote_hostio_open)
5513         (remote_hostio_close, remote_hostio_unlink, remote_state)
5514         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5515         (get_memory_write_packet_size, get_memory_read_packet_size)
5516         (append_pending_thread_resumptions, remote_detach_1)
5517         (append_resumption, remote_resume_with_vcont)
5518         (add_current_inferior_and_thread, wait_ns, wait_as)
5519         (process_stop_reply, remote_notice_new_inferior)
5520         (process_initial_stop_replies, remote_add_thread)
5521         (btrace_sync_conf, remote_btrace_maybe_reopen)
5522         (remove_new_fork_children, kill_new_fork_children)
5523         (discard_pending_stop_replies, stop_reply_queue_length)
5524         (check_pending_events_prevent_wildcard_vcont)
5525         (discard_pending_stop_replies_in_queue, stop_reply)
5526         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5527         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5528         (remote_interrupt_as, remote_interrupt_ns)
5529         (remote_get_noisy_reply, remote_query_attached)
5530         (remote_add_inferior, remote_current_thread, get_current_thread)
5531         (set_thread, set_general_thread, set_continue_thread)
5532         (set_general_process, write_ptid)
5533         (remote_unpack_thread_info_response, remote_get_threadinfo)
5534         (parse_threadlist_response, remote_get_threadlist)
5535         (remote_threadlist_iterator, remote_get_threads_with_ql)
5536         (remote_get_threads_with_qxfer)
5537         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5538         (get_offsets, remote_check_symbols, remote_supported_packet)
5539         (remote_query_supported, remote_packet_size)
5540         (remote_serial_quit_handler, remote_detach_pid)
5541         (remote_vcont_probe, remote_resume_with_hc)
5542         (send_interrupt_sequence, interrupt_query)
5543         (remote_notif_get_pending_events, fetch_register_using_p)
5544         (send_g_packet, process_g_packet, fetch_registers_using_g)
5545         (store_register_using_P, store_registers_using_G)
5546         (set_remote_traceframe, check_binary_download)
5547         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5548         (remote_xfer_live_readonly_partial, remote_read_bytes)
5549         (remote_send_printf, remote_flash_write, readchar)
5550         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5551         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5552         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5553         (extended_remote_disable_randomization, extended_remote_run)
5554         (send_environment_packet, extended_remote_environment_support)
5555         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5556         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5557         (packet_command): Now methods of ...
5558         (remote_target): ... this class.
5559         (m_remote_state) <remote_target>: New field.
5560         (struct remote_state) <stop_reply_queue,
5561         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5562         fields.
5563         (remote_state::remote_state): Allocate stop_reply_queue.
5564         (remote_state): Delete global.
5565         (get_remote_state_raw): Delete.
5566         (remote_target::get_remote_state): Allocate m_remote_state on
5567         demand.
5568         (get_current_remote_target): New.
5569         (remote_ops, extended_remote_ops): Delete.
5570         (wait_forever_enabled_p, remote_async_inferior_event_token):
5571         Delete, moved to struct remote_state.
5572         (remote_target::close): Delete self.  Destruction bits split to
5573         ...
5574         (remote_target::~remote_target): ... this.
5575         (show_memory_packet_size): Adjust to use
5576         get_current_remote_target.
5577         (struct protocol_feature) <func>: Add remote_target parameter.
5578         All callers adjusted.
5579         (curr_quit_handler_target): New.
5580         (remote_serial_quit_handler): Reimplement.
5581         (remote_target::open_1): Adjust to use get_current_remote_target.
5582         Heap-allocate remote_target/extended_remote_target instances.
5583         (vcont_builder::vcont_builder): Add remote_target parameter, and
5584         save it in m_remote.  All callers adjusted.
5585         (vcont_builder::m_remote): New field.
5586         (vcont_builder::restart, vcont_builder::flush)
5587         (vcont_builder::push_action): Use it.
5588         (remote_target::commit_resume): Use it.
5589         (struct queue_iter_param) <remote>: New field.
5590         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5591         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5592         (check_pending_event_prevents_wildcard_vcont_callback)
5593         (remote_target::check_pending_events_prevent_wildcard_vcont)
5594         (remote_target::discard_pending_stop_replies)
5595         (remote_target::discard_pending_stop_replies_in_queue)
5596         (remote_target::remote_notif_remove_queued_reply): Fill in
5597         'remote' field.
5598         (remote_notif_get_pending_events): New.
5599         (remote_target::readchar, remote_target::remote_serial_write):
5600         Save/restore curr_quit_handler_target.
5601         (putpkt): New.
5602         (kill_new_fork_children): Fill in 'remote' field.
5603         (packet_command): Use get_current_remote_target, defer to
5604         remote_target method of same name.
5605         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5606         parameter, and save it in m_remote.  All callers adjusted.
5607         (scoped_remote_fd::release): Use m_remote.
5608         (scoped_remote_fd::m_remote): New field.
5609         (remote_file_put, remote_file_get, remote_file_delete): Use
5610         get_current_remote_target, defer to remote_target method of same
5611         name.
5612         (remote_btrace_reset): Add remote_state paremeter.  Update all
5613         callers.
5614         (remote_async_inferior_event_handler). Pass down 'data'.
5615         (remote_new_objfile): Use get_current_remote_target.
5616         (remote_target::vcont_r_supported): New.
5617         (set_range_stepping): Use get_current_remote_target and
5618         remote_target::vcont_r_supported.
5619         (_initialize_remote): Don't allocate 'remote_state' and
5620         'stop_reply_queue' globals.
5621         * remote.h (struct remote_target): Forward declare.
5622         (getpkt, putpkt, remote_notif_get_pending_events): Add
5623         'remote_target' parameter.
5624
5625 2018-05-22  Pedro Alves  <palves@redhat.com>
5626
5627         * remote.c (vcont_builder): Now a class.  Make all data members
5628         private.
5629         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5630         Declare methods.
5631         (vcont_builder_restart): Rename to ...
5632         (vcont_builder::restart): ... this.
5633         (vcont_builder_flush): Rename to ...
5634         (vcont_builder::flush): ... this.
5635         (vcont_builder_push_action): Rename to ...
5636         (vcont_builder::push_action): ... this.
5637         (remote_target::commit_resume): Adjust.
5638
5639 2018-05-22  Pedro Alves  <palves@redhat.com>
5640
5641         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5642         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5643         (get_fixed_memory_packet_size): New.
5644         (get_memory_packet_size): Use it.
5645         (set_memory_packet_size): Don't override the config size with
5646         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5647         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5648         Don't refer to get_memory_packet_size if not connected to a remote
5649         target.  Show "(default)" if configured size is 0.
5650
5651 2018-05-22  Pedro Alves  <palves@redhat.com>
5652
5653         * remote.c (remote_target::mourn_inferior): Move
5654         discard_pending_stop_replies call here from ...
5655         (_initialize_remote): ... here.
5656
5657 2018-05-22  Pedro Alves  <palves@redhat.com>
5658
5659         * remote.c (compare_section_command): Remove set_general_process
5660         call.
5661
5662 2018-05-22  Pedro Alves  <palves@redhat.com>
5663
5664         * remote.c (struct packet_reg, struct remote_arch_state):
5665         Move higher up in the file.
5666         (remote_state) <m_arch_states>: Store remote_arch_state values
5667         instead of remote_arch_state pointers.
5668         (remote_state::get_remote_arch_state): Adjust.
5669
5670 2018-05-22  Pedro Alves  <palves@redhat.com>
5671
5672         * remote.c: Include <unordered_map>.
5673         (remote_state): Now a class.
5674         (remote_state) <get_remote_arch_state>: Declare method.
5675         <get_remote_arch_state>: New field.
5676         (remote_arch_state) <remote_arch_state>: Declare ctor.
5677         <regs>: Now a unique_ptr.
5678         (remote_gdbarch_data_handle): Delete.
5679         (get_remote_arch_state): Delete.
5680         (remote_state::get_remote_arch_state): New.
5681         (get_remote_state): Adjust to call remote_state's
5682         get_remote_arch_state method.
5683         (init_remote_state): Delete, bits factored out to ...
5684         (remote_arch_state::remote_arch_state): ... this new method.
5685         (get_remote_packet_size, get_memory_packet_size)
5686         (process_g_packet, remote_target::fetch_registers)
5687         (remote_target::prepare_to_store, store_registers_using_G)
5688         (remote_target::store_registers, remote_target::get_trace_status):
5689         Adjust to call remote_state's method.
5690         (_initialize_remote): Remove reference to
5691         remote_gdbarch_data_handle.
5692
5693 2018-05-22  Pedro Alves  <palves@redhat.com>
5694
5695         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5696         pread>: New method declarations.
5697         (remote_target::open_1): Adjust.
5698         (readahead_cache_invalidate): Rename to ...
5699         (readahead_cache::invalidate): ... this, and adjust to be a class
5700         method.
5701         (readahead_cache_invalidate_fd): Rename to ...
5702         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5703         class method.
5704         (remote_hostio_pwrite): Adjust.
5705         (remote_hostio_pread_from_cache): Rename to ...
5706         (readahead_cache::pread): ... this, and adjust to be a class
5707         method.
5708         (remote_hostio_close): Adjust.
5709
5710 2018-05-22  Pedro Alves  <palves@redhat.com>
5711
5712         * remote.c (remote_hostio_close_cleanup): Delete.
5713         (class scoped_remote_fd): New.
5714         (remote_file_put, remote_file_get): Use it.
5715
5716 2018-05-22  Pedro Alves  <palves@redhat.com>
5717
5718         (struct vCont_action_support): Use bool and initialize all fields.
5719         (struct readahead_cache): Initialize all fields.
5720         (remote_state): Use bool and initialize all fields.
5721         (remote_state::remote_state, remote_state::~remote_state): New.
5722         (new_remote_state): Delete.
5723         (_initialize_remote): Use new to allocate remote_state.
5724
5725 2018-05-22  Pedro Alves  <palves@redhat.com>
5726             張俊芝  <zjz@zjz.name>
5727
5728         PR gdb/22973
5729         * c-exp.y: Include "c-support.h".
5730         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5731         of tolower.  Use c_ident_is_alpha to scan names.
5732         * c-lang.c: Include "c-support.h".
5733         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5734         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5735         * c-support.h: New file, with bits factored out from ...
5736         * cp-name-parser.y: ... this file.
5737         Include "c-support.h".
5738         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5739         c-support.h and renamed.
5740         (symbol_end, yylex): Adjust.
5741
5742 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5743
5744         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5745         parameter type to CORE_ADDR.
5746         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5747         parameter type in declaration to CORE_ADDR.
5748         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5749         target_auxv_search to get AT_HWCAP and use the result to get the
5750         target description.
5751         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5752         to CORE_ADDR. Remove the cast of the return value to unsigned
5753         long. Fix error predicate of target_auxv_search.
5754         (ppc_linux_nat_target::read_description): Change the type of the
5755         hwcap variable to CORE_ADDR.
5756
5757 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5758
5759         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5760         if the size of fpscr is larger than 32 bits.
5761
5762 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5763
5764         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5765         (ppc32_linux_vsxregmap): New global.
5766         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5767         regcache_supply_regset, and regcache_collect_regset.
5768         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5769         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5770         (fetch_vsx_register, store_vsx_register): Remove.
5771         (fetch_vsx_registers): Add regno parameter. Get regset using
5772         ppc_linux_vsxregset. Use regset to supply registers.
5773         (store_vsx_registers): Add regno parameter. Get regset using
5774         ppc_linux_vsxregset. Use regset to collect registers.
5775         (fetch_register): Call fetch_vsx_registers instead of
5776         fetch_vsx_register.
5777         (store_register): Call store_vsx_registers instead of
5778         store_vsx_register.
5779         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5780         new regno parameter.
5781         (store_ppc_registers): Call store_vsx_registers with -1 for the
5782         new regno parameter.
5783         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5784         (ppc_collect_vsxregset): Remove.
5785
5786 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5787
5788         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5789         offset fields.
5790         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5791         for vector register offset fields.
5792         (ppc64_fbsd_reg_offsets): Likewise.
5793         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5794         to vector register offset fields.
5795         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5796         to vector register offset fields.
5797         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5798         vector register offset fields.
5799         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5800         initializers for vector register offset fields.
5801         (rs6000_aix64_reg_offsets): Likewise.
5802         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5803         (ppc_supply_vrregset): Remove.
5804         (ppc_collect_vrregset): Remove.
5805         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5806         (ppc_linux_vrregset) : New function.
5807         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5808         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5809         (ppc32_linux_vrregset): Remove.
5810         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5811         and use result instead of ppc32_linux_vrregset.
5812         (ppc32_linux_reg_offsets): Remove initializers for vector register
5813         offset fields.
5814         (ppc64_linux_reg_offsets): Likewise.
5815         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5816         * ppc-linux-nat.c: Include regset.h.
5817         (gdb_vrregset_t): Adjust comment to account for little-endian
5818         mode.
5819         (supply_vrregset, fill_vrregset): Remove.
5820         (fetch_altivec_register, store_altivec_register): Remove.
5821         (fetch_altivec_registers): Add regno parameter. Get regset using
5822         ppc_linux_vrregset. Use regset to supply registers.
5823         (store_altivec_registers): Add regno parameter. Get regset using
5824         ppc_linux_vrregset. Use regset to collect registers.
5825         (fetch_register): Call fetch_altivec_registers instead of
5826         fetch_altivec_register.
5827         (store_register): Call store_altivec_registers instead of
5828         store_altivec_register.
5829         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5830         the new regno parameter.
5831         (store_ppc_registers): Call store_altivec_registers with -1 for
5832         the new regno parameter.
5833
5834 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5835
5836         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5837         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5838         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5839         (gdb_vrregset_t): Change array type size to
5840         PPC_LINUX_SIZEOF_VRREGSET.
5841         (gdb_vsxregset_t): Change array type size to
5842         PPC_LINUX_SIZEOF_VSXREGSET.
5843         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5844         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5845         PPC_LINUX_SIZEOF_VSXREGSET.
5846
5847 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5848
5849         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5850         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5851         nat/ppc-linux.c.
5852         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5853         ppc_linux_target_wordsize with tid.
5854         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5855         wordsize with tid.
5856         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5857         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5858         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5859         tid parameter. Remove static specifier.
5860         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5861         (ppc_linux_target_wordsize): New declaration.
5862
5863 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5864
5865         * arch/ppc-linux-common.c: New file.
5866         * arch/ppc-linux-common.h: New file.
5867         * arch/ppc-linux-tdesc.h: New file.
5868         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5869         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5870         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5871         arch/ppc-linux-tdesc.h.
5872         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5873         arch/ppc-linux-tdesc.h.
5874         (ppc_linux_nat_target::read_description): Remove target
5875         description matching code. Fill a ppc_linux_features struct and
5876         call ppc_linux_match_description with it. Move comment about ISA
5877         2.05 to ppc-linux-common.c.
5878         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5879         arch/ppc-linux-tdesc.h.
5880         (ppc_linux_core_read_description): Remove target description
5881         matching code. Fill a ppc_linux_features struct and call
5882         ppc_linux_match_description with it.
5883         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5884         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5885         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5886         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5887         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5888         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5889         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5890         (tdesc_powerpc_e500l): Remove.
5891
5892 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5893
5894         * ada-lang.c (catch_assert_command): Pass empty string instead
5895         of NULL for excep_string argument.
5896
5897 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5898
5899         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5900         the width of the requested register exceeds the width of the
5901         `ptrace' data type.
5902
5903 2018-05-21  Tom Tromey  <tom@tromey.com>
5904
5905         * printcmd.c (output_command): Remove.
5906         (output_command_const): Rename to output_command.
5907         * valprint.h (output_command): Rename from output_command_const.
5908         * tracepoint.c (trace_dump_actions): Call output_command.
5909
5910 2018-05-21  Tom Tromey  <tom@tromey.com>
5911
5912         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5913         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5914         * ada-lang.h (create_ada_exception_catchpoint): Update.
5915         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5916         std::string.
5917         (create_excep_cond_exprs, ~ada_catchpoint)
5918         (should_stop_exception, print_one_exception)
5919         (print_mention_exception, print_recreate_exception): Update.
5920         (ada_get_next_arg): Remove.
5921         (catch_ada_exception_command_split): Use std::string.  Change type
5922         of "excep_string", "cond_string".
5923         (catch_ada_exception_command): Update.
5924         (create_ada_exception_catchpoint): Change type of excep_string.
5925         (ada_exception_sal): Remove excep_string parameter.
5926         (~ada_catchpoint): Remove.
5927
5928 2018-05-21  Tom Tromey  <tom@tromey.com>
5929
5930         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5931         cleanup.
5932
5933 2018-05-21  Tom Tromey  <tom@tromey.com>
5934
5935         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5936         Return unique_xmalloc_ptr.
5937         (print_it_exception): Update.
5938
5939 2018-05-21  Tom Tromey  <tom@tromey.com>
5940
5941         * tracepoint.c (trace_dump_actions): Use std::string.
5942
5943 2018-05-21  Tom Tromey  <tom@tromey.com>
5944
5945         * symfile.c (reread_symbols): Use std::string for original_name.
5946
5947 2018-05-21  Tom Tromey  <tom@tromey.com>
5948
5949         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5950         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5951         constructor.
5952
5953 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5954
5955         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5956         instance to...
5957         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5958         * objfiles.c (get_objfile_bfd_data): Allocate
5959         objfile_per_bfd_storage with obstack_new when allocating on
5960         obstack.
5961
5962 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5963
5964         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5965         OBSTACK_ZALLOC.
5966         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5967         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5968         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5969         (add_pending): Likewise.
5970         (parse_symbol): Likewise.
5971         (parse_partial_symbols): Likewise.
5972         (psymtab_to_symtab_1): Likewise.
5973         (new_psymtab): Likewise.
5974         (elfmdebug_build_psymtabs): Likewise.
5975         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5976         * objfiles.c (get_objfile_bfd_data): Likewise.
5977         (objfile_register_static_link): Likewise.
5978         * psymtab.c (allocate_psymtab): Likewise.
5979         * stabsread.c (read_member_functions): Likewise.
5980         * xcoffread.c (xcoff_end_psymtab): Likewise.
5981
5982 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5983
5984         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5985         compiler supports std::is_trivially_constructible.
5986         * common/poison.h: Include obstack.h.
5987         (IsMallocable): Define to is_trivially_constructible if the
5988         compiler supports it, define to true_type otherwise.
5989         (xobnew): New.
5990         (XOBNEW): Redefine.
5991         (xobnewvec): New.
5992         (XOBNEWVEC): Redefine.
5993         * gdb_obstack.h (obstack_zalloc): New.
5994         (OBSTACK_ZALLOC): Redefine.
5995         (obstack_calloc): New.
5996         (OBSTACK_CALLOC): Redefine.
5997         (obstack_new): New.
5998         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5999         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6000         gdbarch.c.
6001         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6002         obstack_calloc/obstack_zalloc.
6003         (gdbarch_obstack_zalloc): Remove.
6004         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6005
6006 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6007
6008         * stack.c (backtrace_command_1): Remove useless variable int i.
6009
6010 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6011
6012         * stack.c (print_frame_info): Fix comment.
6013
6014 2018-05-18  Tom Tromey  <tom@tromey.com>
6015
6016         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6017         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6018         (~dwarf2_per_objfile): Update
6019         (dwarf2_get_dwz_file): Use new.
6020         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6021         unique_ptr.
6022
6023 2018-05-18  Tom Tromey  <tom@tromey.com>
6024
6025         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6026         unique_ptr.
6027         * dwarf2read.c (struct dwp_file): Add constructor and
6028         initializers.
6029         (open_and_init_dwp_file): Return a unique_ptr.
6030         (dwarf2_per_objfile, create_dwp_hash_table)
6031         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6032         (lookup_dwo_unit_in_dwp): Update.
6033         (open_and_init_dwp_file, get_dwp_file): Update.
6034
6035 2018-05-18  Tom Tromey  <tom@tromey.com>
6036
6037         * dwarf2read.c (dwarf2_per_objfile): Update.
6038         (struct mapped_index): Add initializers.
6039         (dwarf2_read_index): Use new.
6040         (dw2_symtab_iter_init): Update.
6041         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6042         unique_ptr.
6043
6044 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6045
6046         * dwarf2read.c (mapped_index) <total_size>: Remove.
6047
6048 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6049
6050         * unittests/format_pieces-selftests.c (test_format_specifier):
6051         Add ARI comments.
6052
6053 2018-05-18  Tom Tromey  <tom@tromey.com>
6054
6055         * c-typeprint.c (maybe_print_hole): New function.
6056         (c_print_type_struct_field_offset): Update.
6057         (c_type_print_base_struct_union): Call maybe_print_hole.
6058
6059 2018-05-17  Keith Seitz  <keiths@redhat.com>
6060
6061         * breakpoint.c (build_bpstat_chain): New function, moved from
6062         bpstat_stop_status.
6063         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6064         If no stop chain is passed, call build_bpstat_chain to build it.
6065         * breakpoint.h (build_bpstat_chain): Declare.
6066         (bpstat_stop_status): Move documentation here from breakpoint.c.
6067         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6068         build the stop chain and pass it to skip_inline_frames.
6069         Pass this stop chain to bpstat_stop_status.
6070         * inline-frame.c: Include breakpoint.h.
6071         (stopped_by_user_bp_inline_frame): New function.
6072         (skip_inline_frames): Add parameter `stop_chain'.
6073         Move documention to inline-frame.h.
6074         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6075         whether the frame should be elided.
6076         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6077         Add moved documentation and update for new parameter.
6078
6079 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6080
6081         PR cli/14975
6082         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6083         unittests/format_pieces-selftests.c.
6084         * common/format.h (format_piece) <operator==>: New.
6085         (format_pieces) <operator[]>: Remove.
6086         * common/format.c (format_pieces::format_pieces): Handle \e.
6087         * unittests/format_pieces-selftests.c: New.
6088
6089 2018-05-17  Tom Tromey  <tom@tromey.com>
6090
6091         PR symtab/23010:
6092         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6093         (dw2_instantiate_symtab): Add skip_partial parameter.
6094         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6095         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6096         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6097         (dw2_expand_symtabs_matching_one)
6098         (dw2_find_pc_sect_compunit_symtab)
6099         (dw2_debug_names_lookup_symbol)
6100         (dw2_debug_names_expand_symtabs_for_function): Update.
6101         (init_cutu_and_read_dies): Add skip_partial parameter.
6102         (process_psymtab_comp_unit, build_type_psymtabs_1)
6103         (process_skeletonless_type_unit, load_partial_comp_unit)
6104         (psymtab_to_symtab_1): Update.
6105         (load_full_comp_unit): Add skip_partial parameter.
6106         (process_imported_unit_die, dwarf2_read_addr_index)
6107         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6108         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6109         (read_signatured_type): Update.
6110
6111 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6112
6113         * value.c (release_value): Remove unused variable.
6114         (record_latest_value): Likewise.
6115         (access_value_history): Likewise.
6116         (preserve_values): Likewise.
6117
6118 2018-05-17  Tom Tromey  <tom@tromey.com>
6119
6120         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6121         Initialize.
6122
6123 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6124
6125         PR gdb/22286
6126         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6127         Also handle registers whose width is not a multiple of
6128         PTRACE_TYPE_RET.
6129         (linux_nat_trad_target::store_register): Likewise.
6130
6131 2018-05-16  Tom Tromey  <tom@tromey.com>
6132
6133         * gdbcore.h (core_bfd): Redefine.
6134         * corelow.c (core_target::close): Update.
6135         (core_target_open): Update.
6136         * progspace.h (struct program_space) <cbfd>: Now a
6137         gdb_bfd_ref_ptr.
6138
6139 2018-05-16  Tom Tromey  <tom@tromey.com>
6140
6141         PR cli/19551:
6142         * symfile-add-flags.h (enum symfile_add_flags)
6143         <SYMFILE_NOT_FILENAME>: New constant.
6144         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6145         objfile name from BFD.
6146         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6147         * minidebug.c (find_separate_debug_file_in_section): Put
6148         ".gnu_debugdata" into BFD's file name.
6149
6150 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6151
6152         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6153         Remove.
6154
6155 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6156
6157         PR binutils/21446
6158         * aarch64-tdep.c (aarch64_analyze_prologue,
6159         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6160         Indicate not interested in errors.
6161
6162 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6163
6164         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6165         Supply the MIPS_ZERO_REGNUM register.
6166
6167 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6168
6169         * mips-tdep.c (mask_address_var): Make variable static.
6170
6171 2018-05-14  Tom Tromey  <tom@tromey.com>
6172
6173         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6174
6175 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6176
6177         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6178         FXSAVE_ADDR for the mxcsr register.
6179
6180 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6181
6182         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6183
6184 2018-05-11  Pedro Alves  <palves@redhat.com>
6185
6186         * corelow.c (core_target) <core_target>: No longer inline.
6187         Initialize m_core_gdbarch, m_core_vec and build the section table
6188         here.
6189         <~core_target>: New.
6190         <core_gdbarch, get_core_register_section>: New methods.
6191         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6192         factored out from ...
6193         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6194         (core_ops): Delete.
6195         (sniff_core_bfd): Add gdbarch parameter.
6196         (core_close): Delete, merged into ...
6197         (core_target::close): ... here.  Delete self.
6198         (core_close_cleanup): Delete.
6199         (core_target_open): Allocate a core_target on the heap.  Use a
6200         unique_ptr instead of a cleanup.  Bits moved into the core_target
6201         ctor.  Adjust to use core_target methods instead of globals.
6202         (get_core_register_section): Rename to ...
6203         (core_target::get_core_register_section): ... this and adjust.
6204         (struct get_core_registers_cb_data): New.
6205         (get_core_registers_cb): Use it.  Use bool.
6206         (core_target::fetch_registers, core_target::files_info)
6207         (core_target::xfer_partial, core_target::read_description)
6208         (core_target::pid_to, core_target::thread_name): Adjust to
6209         reference class fields instead of globals.
6210         * target.h (struct target_ops_deleter, target_ops_up): New.
6211
6212 2018-05-11  Pedro Alves  <palves@redhat.com>
6213
6214         * corefile.c (core_file_command): Move to corelow.c.
6215         * corelow.c (the_core_target): Delete.
6216         (core_file_command): Moved from corefile.c.  Check exec_bfd
6217         instead of the_core_target.  Use target_detach instead of calling
6218         into the_core_target directly.
6219         (maybe_say_no_core_file_now): New.
6220         (core_target::detach): Use it.
6221         (_initialize_corelow): Remove references to the_core_target.
6222         * gdbcore.h (the_core_target): Delete.
6223
6224 2018-05-11  Tom Tromey  <tromey@redhat.com>
6225             Pedro Alves  <palves@redhat.com>
6226
6227         * corefile.c (core_bfd): Remove.
6228         * gdbcore.h (core_bfd): Now a macro.
6229         * progspace.h (struct program_space) <cbfd>: New field.
6230
6231 2018-05-11  Tom Tromey  <tom@tromey.com>
6232
6233         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6234         gdb::def_vector.
6235
6236 2018-05-10  Tom Tromey  <tom@tromey.com>
6237
6238         * configure: Rebuild.
6239         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6240
6241 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6242
6243         PR server/23158:
6244         * regformats/regdat.sh: Adjust script, following the addition
6245         of the new expedite_regs parameter to init_target_desc.
6246
6247 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6248     
6249         PR gdb/23127
6250         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6251         set_gdbarch_significant_addr_bit.
6252         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6253         set_gdbarch_significant_addr_bit.
6254         * utils.c (address_significant): Update to sign extend addr.
6255
6256 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6257
6258         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6259         (xtensa_linux_init_abi): Limit tdep->num_regs by
6260         tdep->num_nopriv_regs.
6261         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6262         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6263         not initialized.
6264
6265 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6266
6267         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6268
6269 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6270
6271         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6272         (I387_MXCSR_INIT_VAL): New constant.
6273         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6274         buffer if it was supplied by the inferior.
6275         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6276         (i387_xsave_get_clear_bv): New function.
6277         (i387_supply_xsave): Only read x87 control registers from the
6278         xsave buffer if the feature is enabled, and the state will have
6279         been written, otherwise, provide a suitable default.
6280         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6281         including x87 control registers.  Update control registers if they
6282         have changed from the default value, and mark features as enabled
6283         as required.
6284         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6285
6286 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6287
6288         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6289
6290 2018-05-07  Tom Tromey  <tom@tromey.com>
6291
6292         * configure: Rebuild.
6293         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6294
6295 2018-05-07  Tom Tromey  <tom@tromey.com>
6296
6297         PR tdep/20362:
6298         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6299         bit.  Use correct value for VDIV.
6300
6301 2018-05-04  Tom Tromey  <tom@tromey.com>
6302
6303         * configure: Rebuild.
6304         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6305
6306 2018-05-04  Tom Tromey  <tom@tromey.com>
6307
6308         * linux-record.c (record_linux_system_call) <case
6309         RECORD_SYS_RECVFROM>: Add "break".
6310
6311 2018-05-04  Tom Tromey  <tom@tromey.com>
6312
6313         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6314         Add missing "break".
6315         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6316         Add missing "break".
6317
6318 2018-05-04  Tom Tromey  <tom@tromey.com>
6319
6320         * rs6000-tdep.c (ppc_process_record_op4)
6321         (ppc_process_record_op63): Add fall-through comment.
6322
6323 2018-05-04  Tom Tromey  <tom@tromey.com>
6324
6325         * i386-tdep.c (i386_process_record): Add fall-through comment.
6326
6327 2018-05-04  Tom Tromey  <tom@tromey.com>
6328
6329         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6330         comment.
6331
6332 2018-05-04  Tom Tromey  <tom@tromey.com>
6333
6334         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6335         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6336         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6337         comment.
6338         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6339         comment.
6340         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6341         comment.
6342
6343 2018-05-04  Tom Tromey  <tom@tromey.com>
6344
6345         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6346
6347 2018-05-04  Tom Tromey  <tom@tromey.com>
6348
6349         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6350         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6351         * symfile.c (section_is_mapped): Fix fall-through comment.
6352         * stabsread.c (define_symbol, read_member_functions): Fix
6353         fall-through comment.
6354         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6355         comment.
6356         * remote.c (remote_wait_as): Fix fall-through comment.
6357         * p-exp.y (yylex): Fix fall-through comment.
6358         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6359         comment.
6360         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6361         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6362         * jv-exp.y (yylex): Fix fall-through comment.
6363         * go-exp.y (lex_one_token): Fix fall-through comment.
6364         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6365         fall-through comment.
6366         * f-exp.y (yylex): Fix fall-through comment.
6367         * dwarf2read.c (process_die): Fix fall-through comments.
6368         * dbxread.c (process_one_symbol): Fix fall-through comment.
6369         * d-exp.y (lex_one_token): Fix fall-through comment.
6370         * cp-name-parser.y (yylex): Fix fall-through comment.
6371         * coffread.c (coff_symtab_read): Fix fall-through comment.
6372         * c-exp.y (lex_one_token): Fix fall-through comment.
6373         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6374         comment.
6375         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6376         comment.
6377
6378 2018-05-04  Tom Tromey  <tom@tromey.com>
6379
6380         PR python/22730:
6381         * NEWS: Mention gdb.execute change.
6382         * gdbcmd.h (execute_control_command): Don't declare.
6383         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6384         execute_control_commands, execute_control_commands_to_string.
6385         * cli/cli-script.h (execute_control_commands)
6386         (execute_control_commands_to_string): Declare.
6387         (execute_control_command): Add from_tty parameter.
6388         * cli/cli-script.c (execute_control_commands)
6389         (execute_control_commands_to_string): New functions.
6390         (execute_user_command): Use execute_control_commands.
6391         (execute_control_command_1): Add "from_tty" parameter.  Update.
6392         (execute_control_command): Likewise.
6393
6394 2018-05-04  Tom Tromey  <tom@tromey.com>
6395
6396         PR python/22731:
6397         * NEWS: Mention that breakpoint commands are writable.
6398         * python/py-breakpoint.c (bppy_set_commands): New function.
6399         (breakpoint_object_getset) <"commands">: Use it.
6400
6401 2018-05-04  Tom Tromey  <tom@tromey.com>
6402
6403         * tracepoint.c (actions_command): Update.
6404         * mi/mi-cmd-break.c (mi_command_line_array)
6405         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6406         (mi_read_next_line): Remove.
6407         (mi_cmd_break_commands): Update.
6408         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6409         function_view.
6410         * cli/cli-script.c (get_command_line): Update.
6411         (process_next_line): Use function_view.  Constify.
6412         (recurse_read_control_structure, read_command_lines)
6413         (read_command_lines_1): Change argument types to function_view.
6414         (do_define_command, document_command): Update.
6415         * breakpoint.h (check_tracepoint_command): Don't declare.
6416         * breakpoint.c (check_tracepoint_command): Remove.
6417         (commands_command_1, create_tracepoint_from_upload): Update.
6418
6419 2018-05-04  Tom Tromey  <tom@tromey.com>
6420
6421         PR gdb/11750:
6422         * cli/cli-script.h (enum command_control_type) <define_control>:
6423         New constant.
6424         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6425         (build_command_line, execute_control_command_1)
6426         (process_next_line): Likewise.
6427         (do_define_command): New function, extracted from define_command.
6428         (define_command): Use it.
6429
6430 2018-05-04  Tom Tromey  <tom@tromey.com>
6431
6432         * tracepoint.c (actions_command): Update.
6433         * cli/cli-script.h (read_command_lines): Update.
6434         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6435         (MAX_TMPBUF): Remove define.
6436         (define_command): Use string_printf.
6437         (document_command): Likewise.
6438         * breakpoint.c (commands_command_1): Update.
6439
6440 2018-05-04  Tom Tromey  <tom@tromey.com>
6441
6442         * top.c (execute_command): Update.
6443         * cli/cli-script.h (print_command_lines): Now varargs.
6444         * cli/cli-script.c (print_command_lines): Now varargs.
6445         (execute_control_command_1) <case while_control, case if_control>:
6446         Update.
6447
6448 2018-05-04  Tom Tromey  <tom@tromey.com>
6449
6450         * tracepoint.c (all_tracepoint_actions): Rename from
6451         all_tracepoint_actions_and_cleanup.  Change return type.
6452         (actions_command, encode_actions_1, encode_actions)
6453         (trace_dump_actions, tdump_command): Update.
6454         * remote.c (remote_download_command_source): Update.
6455         * python/python.c (gdbpy_eval_from_control_command)
6456         (python_command, python_interactive_command): Update.
6457         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6458         * guile/guile.c (guile_command)
6459         (gdbscm_eval_from_control_command, guile_command): Update.
6460         * compile/compile.c (compile_code_command)
6461         (compile_print_command, compile_to_object): Update.
6462         * cli/cli-script.h (struct command_lines_deleter): New.
6463         (counted_command_line): New typedef.
6464         (struct command_line): Add constructor, destructor.
6465         <body_list>: Remove.
6466         <body_list_0, body_list_1>: New members.
6467         (command_line_up): Remove typedef.
6468         (read_command_lines, read_command_lines_1, get_command_line):
6469         Update.
6470         (copy_command_lines): Don't declare.
6471         * cli/cli-script.c (build_command_line): Use "new".
6472         (get_command_line): Return counted_command_line.
6473         (print_command_lines, execute_user_command)
6474         (execute_control_command_1, while_command, if_command): Update.
6475         (realloc_body_list): Remove.
6476         (process_next_line, recurse_read_control_structure): Update.
6477         (read_command_lines, read_command_lines_1): Return counted_command_line.
6478         (free_command_lines): Use "delete".
6479         (copy_command_lines): Remove.
6480         (define_command, document_command, show_user_1): Update.
6481         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6482         a counted_command_line.
6483         * breakpoint.h (counted_command_line): Remove typedef.
6484         (breakpoint_set_commands): Update.
6485         * breakpoint.c (check_no_tracepoint_commands)
6486         (validate_commands_for_breakpoint): Update.
6487         (breakpoint_set_commands): Change commands to be a
6488         counted_command_line.
6489         (commands_command_1, update_dprintf_command_list)
6490         (create_tracepoint_from_upload): Update.
6491
6492 2018-05-04  Tom Tromey  <tom@tromey.com>
6493
6494         * cli/cli-decode.h (cmd_list_element): New constructor.
6495         (~cmd_list_element): New destructor.
6496         (struct cmd_list_element): Add initializers.
6497         * cli/cli-decode.c (do_add_cmd): Use "new".
6498         (delete_cmd): Use "delete".
6499
6500 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6501             Pedro Alves <palves@redhat.com>
6502
6503         PR breakpoints/19806 and support for PR external/20207.
6504         * NEWS: Mention Aarch64 watchpoint improvements.
6505         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6506         watchpoints and PR external/20207 watchpoints.
6507         * nat/aarch64-linux-hw-point.c
6508         (kernel_supports_any_contiguous_range): New.
6509         (aarch64_watchpoint_offset): New.
6510         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6511         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6512         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6513         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6514         next_addr_orig_p.  Support PR external/20207 watchpoints.
6515         (aarch64_downgrade_regs): New.
6516         (aarch64_dr_state_insert_one_point): New parameters offset and
6517         addr_orig.
6518         (aarch64_dr_state_remove_one_point): Likewise.
6519         (aarch64_handle_breakpoint): Update caller.
6520         (aarch64_handle_aligned_watchpoint): Likewise.
6521         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6522         aligned_offset.
6523         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6524         aarch64_downgrade_regs.
6525         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6526         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6527         (DR_CONTROL_MASK): ... this.
6528         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6529         (unsigned int aarch64_watchpoint_offset): New prototype.
6530         (aarch64_linux_set_debug_regs): Remove const from state.
6531         * utils.c (align_up, align_down): Move to ...
6532         * common/common-utils.c (align_up, align_down): ... here.
6533         * utils.h (align_up, align_down): Move to ...
6534         * common/common-utils.h (align_up, align_down): ... here.
6535
6536 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6537
6538         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6539         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6540         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6541         Re-implement to match the ABI as summarized in GCC's
6542         gcc/config/sparc/sparc.c.  All callers updated.
6543         (sparc32_store_arguments): Remove assertion.
6544
6545 2018-05-04  Tom Tromey  <tom@tromey.com>
6546
6547         * printcmd.c: Don't include tui.h.
6548         (decode_format): Use skip_spaces.
6549
6550 2018-05-04  Tom Tromey  <tom@tromey.com>
6551
6552         PR gdb/22619:
6553         * printcmd.c (last_count): New global.
6554         (x_command): Use saved count when repeating.
6555
6556 2018-05-04  Tom Tromey  <tom@tromey.com>
6557
6558         * nto-procfs.c (do_closedir_cleanup): Remove.
6559         (procfs_pidlist): Use gdb_dir_up.
6560         * procfs.c (do_closedir_cleanup): Remove.
6561         (proc_update_threads): Use gdb_dir_up.
6562         * common/filestuff.h (struct gdb_dir_deleter): New.
6563         (gdb_dir_up): New typedef.
6564
6565 2018-05-04  Tom Tromey  <tom@tromey.com>
6566
6567         * ada-lang.c (print_mention_exception): Use std::string.
6568
6569 2018-05-04  Tom Tromey  <tom@tromey.com>
6570
6571         * ada-lang.c (create_excep_cond_exprs): Update.
6572         (ada_exception_catchpoint_cond_string): Use std::string.
6573
6574 2018-05-04  Tom Tromey  <tom@tromey.com>
6575
6576         * ada-lang.c (xget_renaming_scope): Return std::string.
6577         (old_renaming_is_invisible): Update.
6578
6579 2018-05-04  Tom Tromey  <tom@tromey.com>
6580
6581         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6582         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6583
6584 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6585
6586         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6587
6588 2018-05-04  Tom Tromey  <tom@tromey.com>
6589
6590         * remote.c (remote_query_supported_append): Change type.
6591         (remote_check_symbols): Update.
6592
6593 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6594
6595         PR gdb/11420
6596         * configure.ac: Prepend libpython.
6597         * python/python-config.py: Likewise.
6598         * configure: Regenerate.
6599
6600 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6601
6602         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6603
6604 2018-05-03  Pedro Alves  <palves@redhat.com>
6605
6606         * s390-linux-nat.c
6607         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6608         override.  Write 'true' instead of '1'.
6609         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6610         declaration.
6611
6612 2018-05-02  Pedro Alves  <palves@redhat.com>
6613
6614         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6615         add_inf_child_target.
6616         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6617         add_inf_child_target.
6618         * aix-thread.c (aix_thread_target_info): New.
6619         (aix_thread_target) <shortname, longname, doc>: Delete.
6620         <info>: New.
6621         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6622         add_inf_child_target.
6623         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6624         add_inf_child_target.
6625         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6626         add_inf_child_target.
6627         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6628         add_inf_child_target.
6629         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6630         add_inf_child_target.
6631         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6632         add_inf_child_target.
6633         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6634         add_inf_child_target.
6635         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6636         add_inf_child_target.
6637         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6638         add_inf_child_target.
6639         * bfd-target.c (target_bfd_target_info): New.
6640         (target_bfd) <shortname, longname, doc>: Delete.
6641         <info>: New.
6642         * bsd-kvm.c (bsd_kvm_target_info): New.
6643         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6644         <info>: New.
6645         (bsd_kvm_target::open): Rename to ...
6646         (bsd_kvm_target_open): ... this.  Adjust.
6647         * bsd-uthread.c (bsd_uthread_target_info): New.
6648         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6649         <info>: New.
6650         * corefile.c (core_file_command): Adjust.
6651         * corelow.c (core_target_info): New.
6652         (core_target) <shortname, longname, doc>: Delete.
6653         <info>: New.
6654         (core_target::open): Rename to ...
6655         (core_target_open): ... this.  Adjust.
6656         * ctf.c (ctf_target_info): New.
6657         (ctf_target) <shortname, longname, doc>: Delete.
6658         <info>: New.
6659         (ctf_target::open): Rename to ...
6660         (ctf_target_open): ... this.
6661         (_initialize_ctf): Adjust.
6662         * exec.c (exec_target_info): New.
6663         (exec_target) <shortname, longname, doc>: Delete.
6664         <info>: New.
6665         (exec_target::open): Rename to ...
6666         (exec_target_open): ... this.
6667         * gdbcore.h (core_target_open): Declare.
6668         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6669         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6670         add_inf_child_target.
6671         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6672         add_inf_child_target.
6673         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6674         add_inf_child_target.
6675         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6676         add_inf_child_target.
6677         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6678         add_inf_child_target.
6679         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6680         add_inf_child_target.
6681         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6682         add_inf_child_target.
6683         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6684         add_inf_child_target.
6685         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6686         add_inf_child_target.
6687         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6688         add_inf_child_target.
6689         * inf-child.c (inf_child_target_info): New.
6690         (inf_child_target::info): New.
6691         (inf_child_open_target): Remove 'target' parameter.  Use
6692         get_native_target instead.
6693         (inf_child_target::open): Delete.
6694         (add_inf_child_target): New.
6695         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6696         Delete.
6697         <info>: New.
6698         (add_inf_child_target): Declare.
6699         (inf_child_open_target): Declare.
6700         * linux-thread-db.c (thread_db_target_info): New.
6701         (thread_db_target) <shortname, longname, doc>: Delete.
6702         <info>: New.
6703         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6704         add_inf_child_target.
6705         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6706         add_inf_child_target.
6707         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6708         add_inf_child_target.
6709         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6710         add_inf_child_target.
6711         * make-target-delegates (print_class): Adjust.
6712         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6713         add_inf_child_target.
6714         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6715         add_inf_child_target.
6716         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6717         add_inf_child_target.
6718         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6719         add_inf_child_target.
6720         * nto-procfs.c (nto_native_target_info): New.
6721         (nto_procfs_target_native) <shortname, longname, doc>:
6722         Delete.
6723         <info>: New.
6724         (nto_procfs_target_info): New.
6725         (nto_procfs_target_procfs) <shortname, longname, doc>:
6726         Delete.
6727         <info>: New.
6728         (init_procfs_targets): Adjust.
6729         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6730         add_inf_child_target.
6731         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6732         add_inf_child_target.
6733         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6734         add_inf_child_target.
6735         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6736         add_inf_child_target.
6737         * ravenscar-thread.c (ravenscar_target_info): New.
6738         (ravenscar_thread_target) <shortname, longname, doc>:
6739         Delete.
6740         <info>: New.
6741         * record-btrace.c (record_btrace_target_info):
6742         (record_btrace_target) <shortname, longname, doc>: Delete.
6743         <info>: New.
6744         (record_btrace_target::open): Rename to ...
6745         (record_btrace_target_open): ... this.  Adjust.
6746         * record-full.c (record_longname, record_doc): New.
6747         (record_full_base_target) <shortname, longname, doc>: Delete.
6748         <info>: New.
6749         (record_full_target_info): New.
6750         (record_full_target): <shortname>: Delete.
6751         <info>: New.
6752         (record_full_core_open_1, record_full_open_1): Update comments.
6753         (record_full_base_target::open): Rename to ...
6754         (record_full_open): ... this.
6755         (cmd_record_full_restore): Update.
6756         (_initialize_record_full): Update.
6757         * remote-sim.c (remote_sim_target_info): New.
6758         (gdbsim_target) <shortname, longname, doc>: Delete.
6759         <info>: New.
6760         (gdbsim_target::open): Rename to ...
6761         (gdbsim_target_open): ... this.
6762         (_initialize_remote_sim): Adjust.
6763         * remote.c (remote_doc): New.
6764         (remote_target_info): New.
6765         (remote_target) <shortname, longname, doc>: Delete.
6766         <info>: New.
6767         (extended_remote_target_info): New.
6768         (extended_remote_target) <shortname, longname, doc>: Delete.
6769         <info>: New.
6770         (remote_target::open_1): Make static.  Adjust.
6771         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6772         * s390-linux-nat.c (_initialize_s390_nat): Use
6773         add_inf_child_target.
6774         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6775         add_inf_child_target.
6776         * sol-thread.c (thread_db_target_info): New.
6777         (sol_thread_target) <shortname, longname, doc>: Delete.
6778         <info>: New.
6779         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6780         add_inf_child_target.
6781         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6782         add_inf_child_target.
6783         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6784         add_inf_child_target.
6785         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6786         add_inf_child_target.
6787         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6788         add_inf_child_target.
6789         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6790         add_inf_child_target.
6791         * spu-linux-nat.c (_initialize_spu_nat): Use
6792         add_inf_child_target.
6793         * spu-multiarch.c (spu_multiarch_target_info): New.
6794         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6795         <info>: New.
6796         * target-delegates.c: Regenerate.
6797         * target.c: Include <unordered_map>.
6798         (target_ops_p): Delete.
6799         (DEF_VEC_P(target_ops_p)): Delete.
6800         (target_factories): New.
6801         (test_target_info): New.
6802         (test_target_ops::info): New.
6803         (open_target): Adjust to use target_factories.
6804         (add_target_with_completer): Rename to ...
6805         (add_target): ... this.  Change prototype.  Register target_info
6806         and open callback in target_factories.  Register target_info in
6807         command context instead of target_ops.
6808         (add_target): Delete old implementation.
6809         (add_deprecated_target_alias): Change prototype.  Adjust.
6810         (the_native_target): New.
6811         (set_native_target, get_native_target): New.
6812         (find_default_run_target): Use the_native_target.
6813         (find_attach_target, find_run_target): Simplify.
6814         (target_ops::open): Delete.
6815         (dummy_target_info): New.
6816         (dummy_target::shortname, dummy_target::longname)
6817         (dummy_target::doc): Delete.
6818         (dummy_target::info): New.
6819         (debug_target::shortname, debug_target::longname)
6820         (debug_target::doc): Delete.
6821         (debug_target::info): New.
6822         * target.h (struct target_info): New.
6823         (target_ops::~target_ops): Add comment.
6824         (target_ops::info): New.
6825         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6826         longer virtual.  Implement in terms of target_info.
6827         (set_native_target, get_native_target): Declare.
6828         (target_open_ftype): New.
6829         (add_target, add_target_with_completer)
6830         (add_deprecated_target_alias): Change prototype.
6831         (test_target) <shortname, longname, doc>: Delete.
6832         <info>: New.
6833         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6834         add_inf_child_target.
6835         * tracefile-tfile.c (tfile_target_info): New.
6836         (tfile_target) <shortname, longname, doc>: Delete.
6837         <info>: New.
6838         (tfile_target::open): Rename to ...
6839         (tfile_target_open): ... this.
6840         (_initialize_tracefile_tfile): Adjust.
6841         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6842         add_inf_child_target.
6843         * windows-nat.c (_initialize_windows_nat): Use
6844         add_inf_child_target.
6845         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6846         add_inf_child_target.
6847
6848 2018-05-02  Pedro Alves  <palves@redhat.com>
6849
6850         * linux-nat.h (linux_nat_target) <low_new_thread,
6851         low_delete_thread, low_new_fork, low_forget_process,
6852         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6853         New virtual methods.
6854         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6855         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6856         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6857         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6858         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6859         Delete.
6860         * linux-fork.c (delete_fork): Adjust to call low method.
6861         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6862         (linux_nat_new_fork, linux_nat_forget_process_hook)
6863         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6864         (linux_nat_status_is_event):
6865         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6866         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6867         to call low method.
6868         (sigtrap_is_event): Rename to ...
6869         (linux_nat_target::low_status_is_event): ... this.
6870         (linux_nat_set_status_is_event): Delete.
6871         (save_stop_reason, linux_nat_wait_1)
6872         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6873         low methods.
6874         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6875         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6876         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6877         (linux_nat_set_prepare_to_resume): Delete.
6878         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6879         low virtual methods.
6880         * amd64-linux-nat.c: Likewise.
6881         * arm-linux-nat.c: Likewise.
6882         * i386-linux-nat.c: Likewise.
6883         * ia64-linux-nat.c: Likewise.
6884         * mips-linux-nat.c: Likewise.
6885         * ppc-linux-nat.c: Likewise.
6886         * s390-linux-nat.c: Likewise.
6887         * sparc64-linux-nat.c: Likewise.
6888         * x86-linux-nat.c: Likewise.
6889         * x86-linux-nat.h: Include "nat/x86-linux.h".
6890         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6891         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6892         Override methods.
6893
6894 2018-05-02  Pedro Alves  <palves@redhat.com>
6895
6896         * target.h (target_ops)
6897         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6898         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6899         stopped_by_watchpoint, have_continuable_watchpoint,
6900         stopped_data_address, watchpoint_addr_within_range,
6901         can_accel_watchpoint_condition, can_run, thread_alive,
6902         has_all_memory, has_memory, has_stack, has_registers,
6903         has_execution, can_async_p, is_async_p, supports_non_stop,
6904         always_non_stop_p, can_execute_reverse, supports_multi_process,
6905         supports_enable_disable_tracepoint,
6906         supports_disable_randomization, supports_string_tracing,
6907         supports_evaluation_of_breakpoint_conditions,
6908         can_run_breakpoint_commands, filesystem_is_local,
6909         can_download_tracepoint, get_trace_state_variable_value,
6910         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6911         record_is_replaying, record_will_replay,
6912         augmented_libraries_svr4_read>: Adjust to return bool.
6913         * aarch64-linux-nat.c: All implementations adjusted.
6914         * aix-thread.c: All implementations adjusted.
6915         * arm-linux-nat.c: All implementations adjusted.
6916         * breakpoint.c: All implementations adjusted.
6917         * bsd-kvm.c: All implementations adjusted.
6918         * bsd-uthread.c: All implementations adjusted.
6919         * corelow.c: All implementations adjusted.
6920         * ctf.c: All implementations adjusted.
6921         * darwin-nat.c: All implementations adjusted.
6922         * darwin-nat.h: All implementations adjusted.
6923         * exec.c: All implementations adjusted.
6924         * fbsd-nat.c: All implementations adjusted.
6925         * fbsd-nat.h: All implementations adjusted.
6926         * gnu-nat.c: All implementations adjusted.
6927         * gnu-nat.h: All implementations adjusted.
6928         * go32-nat.c: All implementations adjusted.
6929         * ia64-linux-nat.c: All implementations adjusted.
6930         * inf-child.c: All implementations adjusted.
6931         * inf-child.h: All implementations adjusted.
6932         * inf-ptrace.c: All implementations adjusted.
6933         * inf-ptrace.h: All implementations adjusted.
6934         * linux-nat.c: All implementations adjusted.
6935         * linux-nat.h: All implementations adjusted.
6936         * mips-linux-nat.c: All implementations adjusted.
6937         * nto-procfs.c: All implementations adjusted.
6938         * ppc-linux-nat.c: All implementations adjusted.
6939         * procfs.c: All implementations adjusted.
6940         * ravenscar-thread.c: All implementations adjusted.
6941         * record-btrace.c: All implementations adjusted.
6942         * record-full.c: All implementations adjusted.
6943         * remote-sim.c: All implementations adjusted.
6944         * remote.c: All implementations adjusted.
6945         * s390-linux-nat.c: All implementations adjusted.
6946         * sol-thread.c: All implementations adjusted.
6947         * spu-multiarch.c: All implementations adjusted.
6948         * target-delegates.c: All implementations adjusted.
6949         * target.c: All implementations adjusted.
6950         * target.h: All implementations adjusted.
6951         * tracefile-tfile.c: All implementations adjusted.
6952         * tracefile.c: All implementations adjusted.
6953         * tracefile.h: All implementations adjusted.
6954         * windows-nat.c: All implementations adjusted.
6955         * x86-linux-nat.h: All implementations adjusted.
6956         * x86-nat.h: All implementations adjusted.
6957
6958 2018-05-02  Pedro Alves  <palves@redhat.com>
6959
6960         * make-target-delegates (scan_target_h): Don't trim lines here.
6961         Replace sequences of tabs and/or whitespace with a single
6962         whitespace.
6963         (top level, parsing methods): Trim each line before processing it
6964         here.
6965
6966 2018-05-02  Pedro Alves  <palves@redhat.com>
6967             John Baldwin  <jhb@freebsd.org>
6968
6969         * target.h (enum strata) <debug_stratum>: New.
6970         (struct target_ops) <all delegation methods>: Replace by C++
6971         virtual methods, and drop "to_" prefix.  All references updated
6972         throughout.
6973         <to_shortname, to_longname, to_doc, to_data,
6974         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6975         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6976         virtual methods.  All references updated throughout.
6977         <can_attach, supports_terminal_ours, can_create_inferior,
6978         get_thread_control_capabilities, attach_no_wait>: New
6979         virtual methods.
6980         <insert_breakpoint, remove_breakpoint>: Now
6981         TARGET_DEFAULT_NORETURN methods.
6982         <info_proc>: Now returns bool.
6983         <to_magic>: Delete.
6984         (OPS_MAGIC): Delete.
6985         (current_target): Delete.  All references replaced by references
6986         to ...
6987         (target_stack): ... this.  New.
6988         (target_shortname, target_longname): Adjust.
6989         (target_can_run): Now a function declaration.
6990         (default_child_has_all_memory, default_child_has_memory)
6991         (default_child_has_stack, default_child_has_registers)
6992         (default_child_has_execution): Remove target_ops parameter.
6993         (complete_target_initialization): Delete.
6994         (memory_breakpoint_target): New template class.
6995         (test_target_ops): Refactor as a C++ class with virtual methods.
6996         * make-target-delegates (NAME_PART): Tighten.
6997         (POINTER_PART, CP_SYMBOL): New.
6998         (SIMPLE_RETURN_PART): Reimplement.
6999         (VEC_RETURN_PART): Expect less.
7000         (RETURN_PART, VIRTUAL_PART): New.
7001         (METHOD): Adjust to C++ virtual methods.
7002         (scan_target_h): Remove reference to C99.
7003         (dname): Output "target_ops::" prefix.
7004         (write_function_header): Adjust to output a C++ class method.
7005         (write_declaration): New.
7006         (write_delegator): Adjust to output a C++ class method.
7007         (tdname): Output "dummy_target::" prefix.
7008         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7009         method.
7010         (tdefault_names, debug_names): Delete.
7011         (return_types, tdefaults, styles, argtypes_array): New.
7012         (top level): All methods are delegators.
7013         (print_class): New.
7014         (top level): Print dummy_target and debug_target classes.
7015         * target-delegates.c: Regenerate.
7016         * target-debug.h (target_debug_print_enum_info_proc_what)
7017         (target_debug_print_thread_control_capabilities)
7018         (target_debug_print_thread_info_p): New.
7019         * target.c (dummy_target): Delete.
7020         (the_dummy_target, the_debug_target): New.
7021         (target_stack): Now extern.
7022         (set_targetdebug): Push/unpush debug target.
7023         (default_child_has_all_memory, default_child_has_memory)
7024         (default_child_has_stack, default_child_has_registers)
7025         (default_child_has_execution): Remove target_ops parameter.
7026         (complete_target_initialization): Delete.
7027         (add_target_with_completer): No longer call
7028         complete_target_initialization.
7029         (target_supports_terminal_ours): Use regular delegation.
7030         (update_current_target): Delete.
7031         (push_target): No longer check magic number.  Don't call
7032         update_current_target.
7033         (unpush_target): Don't call update_current_target.
7034         (target_is_pushed): No longer check magic number.
7035         (target_require_runnable): Skip for all stratums over
7036         process_stratum.
7037         (target_ops::info_proc): New.
7038         (target_info_proc): Use find_target_at and
7039         find_default_run_target.
7040         (target_supports_disable_randomization): Use regular delegation.
7041         (target_get_osdata): Use find_target_at.
7042         (target_ops::open, target_ops::close, target_ops::can_attach)
7043         (target_ops::attach, target_ops::can_create_inferior)
7044         (target_ops::create_inferior, target_ops::can_run)
7045         (target_can_run): New.
7046         (default_fileio_target): Use regular delegation.
7047         (target_ops::fileio_open, target_ops::fileio_pwrite)
7048         (target_ops::fileio_pread, target_ops::fileio_fstat)
7049         (target_ops::fileio_close, target_ops::fileio_unlink)
7050         (target_ops::fileio_readlink): New.
7051         (target_fileio_open_1, target_fileio_unlink)
7052         (target_fileio_readlink): Always call the target method.  Handle
7053         FILEIO_ENOSYS.
7054         (return_zero, return_zero_has_execution): Delete.
7055         (init_dummy_target): Delete.
7056         (dummy_target::dummy_target, dummy_target::shortname)
7057         (dummy_target::longname, dummy_target::doc)
7058         (debug_target::debug_target, debug_target::shortname)
7059         (debug_target::longname, debug_target::doc): New.
7060         (target_supports_delete_record): Use regular delegation.
7061         (setup_target_debug): Delete.
7062         (maintenance_print_target_stack): Skip debug_stratum.
7063         (initialize_targets): Instantiate the_dummy_target and
7064         the_debug_target.
7065         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7066         use target_stack.
7067         (target_auxv_search, fprint_target_auxv): Adjust.
7068         (info_auxv_command): Adjust to use target_stack.
7069         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7070         * exceptions.c (print_flush): Handle a NULL target_stack.
7071         * regcache.c (target_ops_no_register): Refactor as class with
7072         virtual methods.
7073
7074         * exec.c (exec_target): New class.
7075         (exec_ops): Now an exec_target.
7076         (exec_open, exec_close_1, exec_get_section_table)
7077         (exec_xfer_partial, exec_files_info, exec_has_memory)
7078         (exec_make_note_section): Refactor as exec_target methods.
7079         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7080         Delete.
7081         (exec_target::find_memory_regions): New.
7082         (_initialize_exec): Don't call init_exec_ops.
7083         * gdbcore.h (exec_file_clear): Delete.
7084
7085         * corefile.c (core_target): Delete.
7086         (core_file_command): Adjust.
7087         * corelow.c (core_target): New class.
7088         (the_core_target): New.
7089         (core_close): Remove target_ops parameter.
7090         (core_close_cleanup): Adjust.
7091         (core_target::close): New.
7092         (core_open, core_detach, get_core_registers, core_files_info)
7093         (core_xfer_partial, core_thread_alive, core_read_description)
7094         (core_pid_to_str, core_thread_name, core_has_memory)
7095         (core_has_stack, core_has_registers, core_info_proc): Rework as
7096         core_target methods.
7097         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7098         (_initialize_corelow): Initialize the_core_target.
7099         * gdbcore.h (core_target): Delete.
7100         (the_core_target): New.
7101
7102         * ctf.c: (ctf_target): New class.
7103         (ctf_ops): Now a ctf_target.
7104         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7105         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7106         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7107         methods.
7108         (init_ctf_ops): Delete.
7109         (_initialize_ctf): Don't call it.
7110         * tracefile-tfile.c (tfile_target): New class.
7111         (tfile_ops): Now a tfile_target.
7112         (tfile_open, tfile_close, tfile_files_info)
7113         (tfile_get_tracepoint_status, tfile_trace_find)
7114         (tfile_fetch_registers, tfile_xfer_partial)
7115         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7116         Refactor as tfile_target methods.
7117         (tfile_xfer_partial_features): Remove target_ops parameter.
7118         (init_tfile_ops): Delete.
7119         (_initialize_tracefile_tfile): Don't call it.
7120         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7121         (tracefile_has_stack, tracefile_has_registers)
7122         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7123         tracefile_target methods.
7124         (init_tracefile_ops): Delete.
7125         (tracefile_target::tracefile_target): New.
7126         * tracefile.h: Include "target.h".
7127         (tracefile_target): New class.
7128         (init_tracefile_ops): Delete.
7129
7130         * spu-multiarch.c (spu_multiarch_target): New class.
7131         (spu_ops): Now a spu_multiarch_target.
7132         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7133         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7134         (spu_search_memory, spu_mourn_inferior): Refactor as
7135         spu_multiarch_target methods.
7136         (init_spu_ops): Delete.
7137         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7138         complete_target_initialization.
7139
7140         * ravenscar-thread.c (ravenscar_thread_target): New class.
7141         (ravenscar_ops): Now a ravenscar_thread_target.
7142         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7143         (ravenscar_thread_alive, ravenscar_pid_to_str)
7144         (ravenscar_fetch_registers, ravenscar_store_registers)
7145         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7146         (ravenscar_stopped_by_hw_breakpoint)
7147         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7148         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7149         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7150         methods.
7151         (init_ravenscar_thread_ops): Delete.
7152         (_initialize_ravenscar): Remove references to
7153         init_ravenscar_thread_ops and complete_target_initialization.
7154
7155         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7156         (bsd_uthread_target): New class.
7157         (bsd_uthread_ops): Now a bsd_uthread_target.
7158         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7159         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7160         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7161         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7162         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7163         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7164         (bsd_uthread_target): Delete function.
7165         (_initialize_bsd_uthread): Remove reference to
7166         complete_target_initialization.
7167
7168         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7169         (target_bfd): ... this new class.
7170         (target_bfd_xfer_partial, target_bfd_get_section_table)
7171         (target_bfd_close): Refactor as target_bfd methods.
7172         (target_bfd::~target_bfd): New.
7173         (target_bfd_reopen): Adjust.
7174         (target_bfd::close): New.
7175
7176         * record-btrace.c (record_btrace_target): New class.
7177         (record_btrace_ops): Now a record_btrace_target.
7178         (record_btrace_open, record_btrace_stop_recording)
7179         (record_btrace_disconnect, record_btrace_close)
7180         (record_btrace_async, record_btrace_info)
7181         (record_btrace_insn_history, record_btrace_insn_history_range)
7182         (record_btrace_insn_history_from, record_btrace_call_history)
7183         (record_btrace_call_history_range)
7184         (record_btrace_call_history_from, record_btrace_record_method)
7185         (record_btrace_is_replaying, record_btrace_will_replay)
7186         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7187         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7188         (record_btrace_store_registers, record_btrace_prepare_to_store)
7189         (record_btrace_to_get_unwinder)
7190         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7191         (record_btrace_commit_resume, record_btrace_wait)
7192         (record_btrace_stop, record_btrace_can_execute_reverse)
7193         (record_btrace_stopped_by_sw_breakpoint)
7194         (record_btrace_supports_stopped_by_sw_breakpoint)
7195         (record_btrace_stopped_by_hw_breakpoint)
7196         (record_btrace_supports_stopped_by_hw_breakpoint)
7197         (record_btrace_update_thread_list, record_btrace_thread_alive)
7198         (record_btrace_goto_begin, record_btrace_goto_end)
7199         (record_btrace_goto, record_btrace_stop_replaying_all)
7200         (record_btrace_execution_direction)
7201         (record_btrace_prepare_to_generate_core)
7202         (record_btrace_done_generating_core): Refactor as
7203         record_btrace_target methods.
7204         (init_record_btrace_ops): Delete.
7205         (_initialize_record_btrace): Remove reference to
7206         init_record_btrace_ops.
7207         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7208         the execution_direction global.
7209         (record_full_base_target, record_full_target)
7210         (record_full_core_target): New classes.
7211         (record_full_ops): Now a record_full_target.
7212         (record_full_core_ops): Now a record_full_core_target.
7213         (record_full_target::detach, record_full_target::disconnect)
7214         (record_full_core_target::disconnect)
7215         (record_full_target::mourn_inferior, record_full_target::kill):
7216         New.
7217         (record_full_open, record_full_close, record_full_async): Refactor
7218         as methods of the record_full_base_target class.
7219         (record_full_resume, record_full_commit_resume): Refactor
7220         as methods of the record_full_target class.
7221         (record_full_wait, record_full_stopped_by_watchpoint)
7222         (record_full_stopped_data_address)
7223         (record_full_stopped_by_sw_breakpoint)
7224         (record_full_supports_stopped_by_sw_breakpoint)
7225         (record_full_stopped_by_hw_breakpoint)
7226         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7227         methods of the record_full_base_target class.
7228         (record_full_store_registers, record_full_xfer_partial)
7229         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7230         Refactor as methods of the record_full_target class.
7231         (record_full_can_execute_reverse, record_full_get_bookmark)
7232         (record_full_goto_bookmark, record_full_execution_direction)
7233         (record_full_record_method, record_full_info, record_full_delete)
7234         (record_full_is_replaying, record_full_will_replay)
7235         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7236         (record_full_stop_replaying): Refactor as methods of the
7237         record_full_base_target class.
7238         (record_full_core_resume, record_full_core_kill)
7239         (record_full_core_fetch_registers)
7240         (record_full_core_prepare_to_store)
7241         (record_full_core_store_registers, record_full_core_xfer_partial)
7242         (record_full_core_insert_breakpoint)
7243         (record_full_core_remove_breakpoint)
7244         (record_full_core_has_execution): Refactor
7245         as methods of the record_full_core_target class.
7246         (record_full_base_target::supports_delete_record): New.
7247         (init_record_full_ops): Delete.
7248         (init_record_full_core_ops): Delete.
7249         (record_full_save): Refactor as method of the
7250         record_full_base_target class.
7251         (_initialize_record_full): Remove references to
7252         init_record_full_ops and init_record_full_core_ops.
7253
7254         * remote.c (remote_target, extended_remote_target): New classes.
7255         (remote_ops): Now a remote_target.
7256         (extended_remote_ops): Now an extended_remote_target.
7257         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7258         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7259         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7260         (remote_pass_signals, remote_set_syscall_catchpoint)
7261         (remote_program_signals, )
7262         (remote_thread_always_alive): Remove target_ops parameter.
7263         (remote_thread_alive, remote_thread_name)
7264         (remote_update_thread_list, remote_threads_extra_info)
7265         (remote_static_tracepoint_marker_at)
7266         (remote_static_tracepoint_markers_by_strid)
7267         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7268         (remote_open): Refactor as methods of remote_target.
7269         (extended_remote_open, extended_remote_detach)
7270         (extended_remote_attach, extended_remote_post_attach):
7271         (extended_remote_supports_disable_randomization)
7272         (extended_remote_create_inferior): : Refactor as method of
7273         extended_remote_target.
7274         (remote_set_permissions, remote_open_1, remote_detach)
7275         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7276         (remote_resume, remote_commit_resume, remote_stop)
7277         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7278         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7279         (remote_prepare_to_store, remote_store_registers)
7280         (remote_flash_erase, remote_flash_done, remote_files_info)
7281         (remote_kill, remote_mourn, remote_insert_breakpoint)
7282         (remote_remove_breakpoint, remote_insert_watchpoint)
7283         (remote_watchpoint_addr_within_range)
7284         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7285         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7286         (remote_supports_stopped_by_sw_breakpoint)
7287         (remote_stopped_by_hw_breakpoint)
7288         (remote_supports_stopped_by_hw_breakpoint)
7289         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7290         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7291         (remote_verify_memory): Refactor as methods of remote_target.
7292         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7293         parameter.
7294         (remote_xfer_partial, remote_get_memory_xfer_limit)
7295         (remote_search_memory, remote_rcmd, remote_memory_map)
7296         (remote_pid_to_str, remote_get_thread_local_address)
7297         (remote_get_tib_address, remote_read_description): Refactor as
7298         methods of remote_target.
7299         (remote_target::fileio_open, remote_target::fileio_pwrite)
7300         (remote_target::fileio_pread, remote_target::fileio_close): New.
7301         (remote_hostio_readlink, remote_hostio_fstat)
7302         (remote_filesystem_is_local, remote_can_execute_reverse)
7303         (remote_supports_non_stop, remote_supports_disable_randomization)
7304         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7305         (remote_supports_enable_disable_tracepoint)
7306         (remote_supports_string_tracing)
7307         (remote_can_run_breakpoint_commands, remote_trace_init)
7308         (remote_download_tracepoint, remote_can_download_tracepoint)
7309         (remote_download_trace_state_variable, remote_enable_tracepoint)
7310         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7311         (remote_trace_start, remote_get_trace_status)
7312         (remote_get_tracepoint_status, remote_trace_stop)
7313         (remote_trace_find, remote_get_trace_state_variable_value)
7314         (remote_save_trace_data, remote_get_raw_trace_data)
7315         (remote_set_disconnected_tracing, remote_core_of_thread)
7316         (remote_set_circular_trace_buffer, remote_traceframe_info)
7317         (remote_get_min_fast_tracepoint_insn_len)
7318         (remote_set_trace_buffer_size, remote_set_trace_notes)
7319         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7320         (remote_disable_btrace, remote_teardown_btrace)
7321         (remote_read_btrace, remote_btrace_conf)
7322         (remote_augmented_libraries_svr4_read, remote_load)
7323         (remote_pid_to_exec_file, remote_can_do_single_step)
7324         (remote_execution_direction, remote_thread_handle_to_thread_info):
7325         Refactor as methods of remote_target.
7326         (init_remote_ops, init_extended_remote_ops): Delete.
7327         (remote_can_async_p, remote_is_async_p, remote_async)
7328         (remote_thread_events, remote_upload_tracepoints)
7329         (remote_upload_trace_state_variables): Refactor as methods of
7330         remote_target.
7331         (_initialize_remote): Remove references to init_remote_ops and
7332         init_extended_remote_ops.
7333
7334         * remote-sim.c (gdbsim_target): New class.
7335         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7336         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7337         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7338         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7339         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7340         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7341         Refactor as methods of gdbsim_target.
7342         (gdbsim_ops): Now a gdbsim_target.
7343         (init_gdbsim_ops): Delete.
7344         (gdbsim_cntrl_c): Adjust.
7345         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7346
7347         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7348         (the_amd64_linux_nat_target): New.
7349         (amd64_linux_fetch_inferior_registers)
7350         (amd64_linux_store_inferior_registers): Refactor as methods of
7351         amd64_linux_nat_target.
7352         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7353         * i386-linux-nat.c: Don't include "linux-nat.h".
7354         (i386_linux_nat_target): New class.
7355         (the_i386_linux_nat_target): New.
7356         (i386_linux_fetch_inferior_registers)
7357         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7358         as methods of i386_linux_nat_target.
7359         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7360         * inf-child.c (inf_child_ops): Delete.
7361         (inf_child_fetch_inferior_registers)
7362         (inf_child_store_inferior_registers): Delete.
7363         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7364         methods of inf_child_target.
7365         (inf_child_target::supports_terminal_ours)
7366         (inf_child_target::terminal_init)
7367         (inf_child_target::terminal_inferior)
7368         (inf_child_target::terminal_ours_for_output)
7369         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7370         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7371         New.
7372         (inf_child_open, inf_child_disconnect, inf_child_close)
7373         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7374         (inf_child_post_startup_inferior, inf_child_can_run)
7375         (inf_child_pid_to_exec_file): Refactor as methods of
7376         inf_child_target.
7377         (inf_child_follow_fork): Delete.
7378         (inf_child_target::can_create_inferior)
7379         (inf_child_target::can_attach): New.
7380         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7381         (inf_child_target::has_stack, inf_child_target::has_registers)
7382         (inf_child_target::has_execution): New.
7383         (inf_child_fileio_open, inf_child_fileio_pwrite)
7384         (inf_child_fileio_pread, inf_child_fileio_fstat)
7385         (inf_child_fileio_close, inf_child_fileio_unlink)
7386         (inf_child_fileio_readlink, inf_child_use_agent)
7387         (inf_child_can_use_agent): Refactor as methods of
7388         inf_child_target.
7389         (return_zero, inf_child_target): Delete.
7390         (inf_child_target::inf_child_target): New.
7391         * inf-child.h: Include "target.h".
7392         (inf_child_target): Delete function prototype.
7393         (inf_child_target): New class.
7394         (inf_child_open_target, inf_child_mourn_inferior)
7395         (inf_child_maybe_unpush_target): Delete.
7396         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7397         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7398         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7399         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7400         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7401         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7402         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7403         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7404         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7405         methods of inf_ptrace_target.
7406         (inf_ptrace_target): Delete function.
7407         * inf-ptrace.h: Include "inf-child.h".
7408         (inf_ptrace_target): Delete function declaration.
7409         (inf_ptrace_target): New class.
7410         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7411         * linux-nat.c (linux_target): New.
7412         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7413         (linux_nat_target::~linux_nat_target): New.
7414         (linux_child_post_attach, linux_child_post_startup_inferior)
7415         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7416         (linux_child_remove_fork_catchpoint)
7417         (linux_child_insert_vfork_catchpoint)
7418         (linux_child_remove_vfork_catchpoint)
7419         (linux_child_insert_exec_catchpoint)
7420         (linux_child_remove_exec_catchpoint)
7421         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7422         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7423         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7424         (linux_nat_stopped_data_address)
7425         (linux_nat_stopped_by_sw_breakpoint)
7426         (linux_nat_supports_stopped_by_sw_breakpoint)
7427         (linux_nat_stopped_by_hw_breakpoint)
7428         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7429         (linux_nat_kill, linux_nat_mourn_inferior)
7430         (linux_nat_xfer_partial, linux_nat_thread_alive)
7431         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7432         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7433         (linux_child_static_tracepoint_markers_by_strid)
7434         (linux_nat_is_async_p, linux_nat_can_async_p)
7435         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7436         (linux_nat_supports_multi_process)
7437         (linux_nat_supports_disable_randomization, linux_nat_async)
7438         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7439         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7440         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7441         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7442         methods of linux_nat_target.
7443         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7444         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7445         parameter.
7446         (check_stopped_by_watchpoint): Adjust.
7447         (linux_xfer_partial): Delete.
7448         (linux_target_install_ops, linux_target, linux_nat_add_target):
7449         Delete.
7450         (linux_nat_target::linux_nat_target): New.
7451         * linux-nat.h: Include "inf-ptrace.h".
7452         (linux_nat_target): New.
7453         (linux_target, linux_target_install_ops, linux_nat_add_target):
7454         Delete function declarations.
7455         (linux_target): Declare global.
7456         * linux-thread-db.c (thread_db_target): New.
7457         (thread_db_target::thread_db_target): New.
7458         (thread_db_ops): Delete.
7459         (the_thread_db_target): New.
7460         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7461         (thread_db_update_thread_list, thread_db_pid_to_str)
7462         (thread_db_extra_thread_info)
7463         (thread_db_thread_handle_to_thread_info)
7464         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7465         (thread_db_resume): Refactor as methods of thread_db_target.
7466         (init_thread_db_ops): Delete.
7467         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7468         * x86-linux-nat.c: Don't include "linux-nat.h".
7469         (super_post_startup_inferior): Delete.
7470         (x86_linux_nat_target::~x86_linux_nat_target): New.
7471         (x86_linux_child_post_startup_inferior)
7472         (x86_linux_read_description, x86_linux_enable_btrace)
7473         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7474         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7475         methods of x86_linux_nat_target.
7476         (x86_linux_create_target): Delete.  Bits folded ...
7477         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7478         pointer.
7479         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7480         (x86_linux_nat_target): New class.
7481         (x86_linux_create_target): Delete.
7482         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7483         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7484         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7485         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7486         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7487         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7488         make extern.
7489         (x86_use_watchpoints): Delete.
7490         * x86-nat.h: Include "breakpoint.h" and "target.h".
7491         (x86_use_watchpoints): Delete.
7492         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7493         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7494         (x86_insert_watchpoint, x86_remove_watchpoint)
7495         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7496         (x86_stopped_by_hw_breakpoint): New declarations.
7497         (x86_nat_target): New template class.
7498
7499         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7500         (the_ppc_linux_nat_target): New.
7501         (ppc_linux_fetch_inferior_registers)
7502         (ppc_linux_can_use_hw_breakpoint)
7503         (ppc_linux_region_ok_for_hw_watchpoint)
7504         (ppc_linux_ranged_break_num_registers)
7505         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7506         (ppc_linux_insert_mask_watchpoint)
7507         (ppc_linux_remove_mask_watchpoint)
7508         (ppc_linux_can_accel_watchpoint_condition)
7509         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7510         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7511         (ppc_linux_watchpoint_addr_within_range)
7512         (ppc_linux_masked_watch_num_registers)
7513         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7514         (ppc_linux_read_description): Refactor as methods of
7515         ppc_linux_nat_target.
7516         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7517
7518         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7519         (procfs_target): New class.
7520         (the_procfs_target): New.
7521         (procfs_target): Delete function.
7522         (procfs_auxv_parse, procfs_attach, procfs_detach)
7523         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7524         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7525         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7526         (procfs_create_inferior, procfs_update_thread_list)
7527         (procfs_thread_alive, procfs_pid_to_str)
7528         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7529         (procfs_stopped_data_address, procfs_insert_watchpoint)
7530         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7531         (proc_find_memory_regions, procfs_info_proc)
7532         (procfs_make_note_section): Refactor as methods of procfs_target.
7533         (_initialize_procfs): Adjust.
7534         * sol-thread.c (sol_thread_target): New class.
7535         (sol_thread_ops): Now a sol_thread_target.
7536         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7537         (sol_thread_fetch_registers, sol_thread_store_registers)
7538         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7539         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7540         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7541         (init_sol_thread_ops): Delete.
7542         (_initialize_sol_thread): Adjust.  Remove references to
7543         init_sol_thread_ops and complete_target_initialization.
7544
7545         * windows-nat.c (windows_nat_target): New class.
7546         (windows_fetch_inferior_registers)
7547         (windows_store_inferior_registers, windows_resume, windows_wait)
7548         (windows_attach, windows_detach, windows_pid_to_exec_file)
7549         (windows_files_info, windows_create_inferior)
7550         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7551         (windows_close, windows_pid_to_str, windows_xfer_partial)
7552         (windows_get_tib_address, windows_get_ada_task_ptid)
7553         (windows_thread_name, windows_thread_alive): Refactor as
7554         windows_nat_target methods.
7555         (do_initial_windows_stuff): Adjust.
7556         (windows_target): Delete function.
7557         (_initialize_windows_nat): Adjust.
7558
7559         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7560         (darwin_mourn_inferior, darwin_kill_inferior)
7561         (darwin_create_inferior, darwin_attach, darwin_detach)
7562         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7563         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7564         (darwin_supports_multi_process): Refactor as darwin_nat_target
7565         methods.
7566         (darwin_resume_to, darwin_files_info): Delete.
7567         (_initialize_darwin_inferior): Rename to ...
7568         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7569         * darwin-nat.h: Include "inf-child.h".
7570         (darwin_nat_target): New class.
7571         (darwin_complete_target): Delete.
7572         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7573         (darwin_target): New.
7574         (i386_darwin_fetch_inferior_registers)
7575         (i386_darwin_store_inferior_registers): Refactor as methods of
7576         darwin_nat_target.
7577         (darwin_complete_target): Delete, with ...
7578         (_initialize_i386_darwin_nat): ... bits factored out here.
7579
7580         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7581         (the_alpha_linux_nat_target): New.
7582         (alpha_linux_register_u_offset): Refactor as
7583         alpha_linux_nat_target method.
7584         (_initialize_alpha_linux_nat): Adjust.
7585         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7586         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7587         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7588         methods of linux_nat_trad_target.
7589         (linux_trad_target): Delete.
7590         * linux-nat-trad.h (linux_trad_target): Delete function.
7591         (linux_nat_trad_target): New class.
7592         * mips-linux-nat.c (mips_linux_nat_target): New class.
7593         (super_fetch_registers, super_store_registers, super_close):
7594         Delete.
7595         (the_mips_linux_nat_target): New.
7596         (mips64_linux_regsets_fetch_registers)
7597         (mips64_linux_regsets_store_registers)
7598         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7599         (mips_linux_register_u_offset, mips_linux_read_description)
7600         (mips_linux_can_use_hw_breakpoint)
7601         (mips_linux_stopped_by_watchpoint)
7602         (mips_linux_stopped_data_address)
7603         (mips_linux_region_ok_for_hw_watchpoint)
7604         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7605         (mips_linux_close): Refactor as methods of mips_linux_nat.
7606         (_initialize_mips_linux_nat): Adjust to C++ification.
7607
7608         * aix-thread.c (aix_thread_target): New class.
7609         (aix_thread_ops): Now an aix_thread_target.
7610         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7611         (aix_thread_fetch_registers, aix_thread_store_registers)
7612         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7613         (aix_thread_thread_alive, aix_thread_pid_to_str)
7614         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7615         Refactor as methods of aix_thread_target.
7616         (init_aix_thread_ops): Delete.
7617         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7618         and complete_target_initialization.
7619         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7620         (rs6000_nat_target): New class.
7621         (the_rs6000_nat_target): New.
7622         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7623         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7624         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7625         (super_create_inferior): Delete.
7626         (_initialize_rs6000_nat): Adjust to C++ification.
7627
7628         * arm-linux-nat.c (arm_linux_nat_target): New class.
7629         (the_arm_linux_nat_target): New.
7630         (arm_linux_fetch_inferior_registers)
7631         (arm_linux_store_inferior_registers, arm_linux_read_description)
7632         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7633         (arm_linux_remove_hw_breakpoint)
7634         (arm_linux_region_ok_for_hw_watchpoint)
7635         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7636         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7637         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7638         arm_linux_nat_target.
7639         (_initialize_arm_linux_nat): Adjust to C++ification.
7640
7641         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7642         (the_aarch64_linux_nat_target): New.
7643         (aarch64_linux_fetch_inferior_registers)
7644         (aarch64_linux_store_inferior_registers)
7645         (aarch64_linux_child_post_startup_inferior)
7646         (aarch64_linux_read_description)
7647         (aarch64_linux_can_use_hw_breakpoint)
7648         (aarch64_linux_insert_hw_breakpoint)
7649         (aarch64_linux_remove_hw_breakpoint)
7650         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7651         (aarch64_linux_region_ok_for_hw_watchpoint)
7652         (aarch64_linux_stopped_data_address)
7653         (aarch64_linux_stopped_by_watchpoint)
7654         (aarch64_linux_watchpoint_addr_within_range)
7655         (aarch64_linux_can_do_single_step): Refactor as methods of
7656         aarch64_linux_nat_target.
7657         (super_post_startup_inferior): Delete.
7658         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7659
7660         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7661         (the_hppa_linux_nat_target): New.
7662         (hppa_linux_fetch_inferior_registers)
7663         (hppa_linux_store_inferior_registers): Refactor as methods of
7664         hppa_linux_nat_target.
7665         (_initialize_hppa_linux_nat): Adjust to C++ification.
7666
7667         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7668         (the_ia64_linux_nat_target): New.
7669         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7670         (ia64_linux_stopped_data_address)
7671         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7672         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7673         ia64_linux_nat_target methods.
7674         (super_xfer_partial): Delete.
7675         (_initialize_ia64_linux_nat): Adjust to C++ification.
7676
7677         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7678         (the_m32r_linux_nat_target): New.
7679         (m32r_linux_fetch_inferior_registers)
7680         (m32r_linux_store_inferior_registers): Refactor as
7681         m32r_linux_nat_target methods.
7682         (_initialize_m32r_linux_nat): Adjust to C++ification.
7683
7684         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7685         (the_m68k_linux_nat_target): New.
7686         (m68k_linux_fetch_inferior_registers)
7687         (m68k_linux_store_inferior_registers): Refactor as
7688         m68k_linux_nat_target methods.
7689         (_initialize_m68k_linux_nat): Adjust to C++ification.
7690
7691         * s390-linux-nat.c (s390_linux_nat_target): New class.
7692         (the_s390_linux_nat_target): New.
7693         (s390_linux_fetch_inferior_registers)
7694         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7695         (s390_insert_watchpoint, s390_remove_watchpoint)
7696         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7697         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7698         (s390_auxv_parse, s390_read_description): Refactor as methods of
7699         s390_linux_nat_target.
7700         (_initialize_s390_nat): Adjust to C++ification.
7701
7702         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7703         (the_sparc_linux_nat_target): New.
7704         (_initialize_sparc_linux_nat): Adjust to C++ification.
7705         * sparc-nat.c (sparc_fetch_inferior_registers)
7706         (sparc_store_inferior_registers): Remove target_ops parameter.
7707         * sparc-nat.h (sparc_fetch_inferior_registers)
7708         (sparc_store_inferior_registers): Remove target_ops parameter.
7709         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7710         (the_sparc64_linux_nat_target): New.
7711         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7712
7713         * spu-linux-nat.c (spu_linux_nat_target): New class.
7714         (the_spu_linux_nat_target): New.
7715         (spu_child_post_startup_inferior, spu_child_post_attach)
7716         (spu_child_wait, spu_fetch_inferior_registers)
7717         (spu_store_inferior_registers, spu_xfer_partial)
7718         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7719         methods.
7720         (_initialize_spu_nat): Adjust to C++ification.
7721
7722         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7723         (the_tilegx_linux_nat_target): New.
7724         (fetch_inferior_registers, store_inferior_registers):
7725         Refactor as methods.
7726         (_initialize_tile_linux_nat): Adjust to C++ification.
7727
7728         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7729         (the_xtensa_linux_nat_target): New.
7730         (xtensa_linux_fetch_inferior_registers)
7731         (xtensa_linux_store_inferior_registers): Refactor as
7732         xtensa_linux_nat_target methods.
7733         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7734
7735         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7736         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7737         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7738         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7739         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7740         (fbsd_stopped_by_sw_breakpoint)
7741         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7742         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7743         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7744         (fbsd_post_startup_inferior, fbsd_post_attach)
7745         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7746         (fbsd_set_syscall_catchpoint)
7747         (super_xfer_partial, super_resume, super_wait)
7748         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7749         (fbsd_handle_debug_trap): Remove target_ops parameter.
7750         (fbsd_nat_add_target): Delete.
7751         * fbsd-nat.h: Include "inf-ptrace.h".
7752         (fbsd_nat_add_target): Delete.
7753         (USE_SIGTRAP_SIGINFO): Define.
7754         (fbsd_nat_target): New class.
7755
7756         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7757         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7758         (amd64bsd_target): Delete.
7759         * amd64-bsd-nat.h: New file.
7760         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7761         "x86-bsd-nat.h".
7762         (amd64_fbsd_nat_target): New class.
7763         (the_amd64_fbsd_nat_target): New.
7764         (amd64fbsd_read_description): Refactor as method of
7765         amd64_fbsd_nat_target.
7766         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7767         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7768         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7769         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7770         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7771         (i386bsd_target): Delete.
7772         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7773         (i386bsd_fetch_inferior_registers)
7774         (i386bsd_store_inferior_registers): Declare.
7775         (i386_bsd_nat_target): New class.
7776         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7777         (the_i386_fbsd_nat_target): New.
7778         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7779         i386_fbsd_nat_target methods.
7780         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7781         (_initialize_i386fbsd_nat): Adjust to C++ification.
7782         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7783         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7784         (_initialize_x86_bsd_nat): Adjust to C++ification.
7785         * x86-bsd-nat.h: Include "x86-nat.h".
7786         (x86bsd_target): Delete declaration.
7787         (x86bsd_nat_target): New class.
7788
7789         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7790         (the_aarch64_fbsd_nat_target): New.
7791         (aarch64_fbsd_fetch_inferior_registers)
7792         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7793         aarch64_fbsd_nat_target.
7794         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7795         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7796         (the_alpha_bsd_nat_target): New.
7797         (alphabsd_fetch_inferior_registers)
7798         (alphabsd_store_inferior_registers): Refactor as
7799         alpha_bsd_nat_target methods.
7800         (_initialize_alphabsd_nat): Refactor as methods of
7801         alpha_bsd_nat_target.
7802         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7803         (the_amd64_nbsd_nat_target): New.
7804         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7805         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7806         (the_amd64_obsd_nat_target): New.
7807         (_initialize_amd64obsd_nat): Adjust to C++ification.
7808         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7809         (the_arm_fbsd_nat_target): New.
7810         (arm_fbsd_fetch_inferior_registers)
7811         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7812         (_initialize_arm_fbsd_nat): Refactor as methods of
7813         arm_fbsd_nat_target.
7814         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7815         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7816         (the_arm_netbsd_nat_target): New.
7817         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7818         arm_netbsd_nat_target.
7819         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7820         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7821         (the_hppa_nbsd_nat_target): New.
7822         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7823         hppa_nbsd_nat_target methods.
7824         (_initialize_hppanbsd_nat): Adjust to C++ification.
7825         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7826         (the_hppa_obsd_nat_target): New.
7827         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7828         methods of hppa_obsd_nat_target.
7829         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7830         add_target.
7831         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7832         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7833         add_target.
7834         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7835         (_initialize_i386obsd_nat): Use add_target.
7836         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7837         (the_m68k_bsd_nat_target): New.
7838         (m68kbsd_fetch_inferior_registers)
7839         (m68kbsd_store_inferior_registers): Refactor as methods of
7840         m68k_bsd_nat_target.
7841         (_initialize_m68kbsd_nat): Adjust to C++ification.
7842         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7843         (the_mips_fbsd_nat_target): New.
7844         (mips_fbsd_fetch_inferior_registers)
7845         (mips_fbsd_store_inferior_registers): Refactor as methods of
7846         mips_fbsd_nat_target.
7847         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7848         add_target.
7849         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7850         (the_mips_nbsd_nat_target): New.
7851         (mipsnbsd_fetch_inferior_registers)
7852         (mipsnbsd_store_inferior_registers): Refactor as methods of
7853         mips_nbsd_nat_target.
7854         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7855         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7856         (the_mips64_obsd_nat_target): New.
7857         (mips64obsd_fetch_inferior_registers)
7858         (mips64obsd_store_inferior_registers): Refactor as methods of
7859         mips64_obsd_nat_target.
7860         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7861         add_target.
7862         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7863         nbsd_nat_target.
7864         * nbsd-nat.h: Include "inf-ptrace.h".
7865         (nbsd_nat_target): New class.
7866         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7867         (obsd_wait): Refactor as methods of obsd_nat_target.
7868         (obsd_add_target): Delete.
7869         * obsd-nat.h: Include "inf-ptrace.h".
7870         (obsd_nat_target): New class.
7871         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7872         (the_ppc_fbsd_nat_target): New.
7873         (ppcfbsd_fetch_inferior_registers)
7874         (ppcfbsd_store_inferior_registers): Refactor as methods of
7875         ppc_fbsd_nat_target.
7876         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7877         add_target.
7878         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7879         (the_ppc_nbsd_nat_target): New.
7880         (ppcnbsd_fetch_inferior_registers)
7881         (ppcnbsd_store_inferior_registers): Refactor as methods of
7882         ppc_nbsd_nat_target.
7883         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7884         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7885         (the_ppc_obsd_nat_target): New.
7886         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7887         methods of ppc_obsd_nat_target.
7888         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7889         add_target.
7890         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7891         (the_sh_nbsd_nat_target): New.
7892         (shnbsd_fetch_inferior_registers)
7893         (shnbsd_store_inferior_registers): Refactor as methods of
7894         sh_nbsd_nat_target.
7895         (_initialize_shnbsd_nat): Adjust to C++ification.
7896         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7897         (inf_ptrace_xfer_partial): Delete.
7898         (sparc_xfer_partial, sparc_target): Delete.
7899         * sparc-nat.h (sparc_fetch_inferior_registers)
7900         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7901         (sparc_target): Delete function declaration.
7902         (sparc_target): New template class.
7903         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7904         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7905         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7906         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7907         add_target.
7908         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7909         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7910         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7911         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7912         add_target.
7913         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7914         (the_vax_bsd_nat_target): New.
7915         (vaxbsd_fetch_inferior_registers)
7916         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7917         methods.
7918         (_initialize_vaxbsd_nat): Adjust to C++ification.
7919
7920         * bsd-kvm.c (bsd_kvm_target): New class.
7921         (bsd_kvm_ops): Now a bsd_kvm_target.
7922         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7923         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7924         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7925         bsd_kvm_target.
7926         (bsd_kvm_return_one): Delete.
7927         (bsd_kvm_add_target): Adjust to C++ification.
7928
7929         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7930         (nto_procfs_target_procfs): New classes.
7931         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7932         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7933         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7934         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7935         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7936         (procfs_remove_hw_breakpoint, procfs_resume)
7937         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7938         (procfs_kill_inferior, procfs_store_registers)
7939         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7940         as methods of nto_procfs_target.
7941         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7942         (nto_native_ops): Delete.
7943         (procfs_open, procfs_native_open): Delete.
7944         (nto_native_ops): Now an nto_procfs_target_native.
7945         (init_procfs_targets): Adjust to C++ification.
7946         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7947         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7948         Refactor as methods of nto_procfs_target.
7949
7950         * go32-nat.c (go32_nat_target): New class.
7951         (the_go32_nat_target): New.
7952         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7953         (go32_store_registers, go32_xfer_partial, go32_files_info)
7954         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7955         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7956         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7957         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7958         (go32_target): Delete.
7959         (_initialize_go32_nat): Adjust to C++ification.
7960
7961         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7962         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7963         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7964         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7965         gnu_nat_target.
7966         (gnu_target): Delete.
7967         * gnu-nat.h (gnu_target): Delete.
7968         (gnu_nat_target): New class.
7969         * i386-gnu-nat.c (gnu_base_target): New.
7970         (i386_gnu_nat_target): New class.
7971         (the_i386_gnu_nat_target): New.
7972         (_initialize_i386gnu_nat): Adjust to C++ification.
7973
7974 2018-05-02  Pedro Alves  <palves@redhat.com>
7975
7976         * bfd-target.c (target_bfd_xclose): Rename to ...
7977         (target_bfd_close): ... this.
7978         (target_bfd_reopen): Adjust.
7979         * target.c (target_close): Remove references to to_xclose.
7980         * target.h (target_ops::to_xclose): Delete.
7981         (target_ops::to_close): Update comments.
7982
7983 2018-05-02  Pedro Alves  <palves@redhat.com>
7984
7985         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7986         "linux-nat.h".
7987         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7988         * inf-ptrace.c (inf_ptrace_register_u_offset)
7989         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7990         (inf_ptrace_store_register, inf_ptrace_store_registers)
7991         (inf_ptrace_trad_target): Move to ...
7992         * linux-nat-trad.c: ... this new file.
7993         * linux-nat-trad.h: New file.
7994         * linux-nat.c (linux_target_install_ops): Make extern.
7995         (linux_trad_target): Delete.
7996         * linux-nat.h (linux_trad_target): Delete declaration.
7997         (linux_target_install_ops): Declare.
7998         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7999         "linux-nat.h".
8000
8001 2018-05-02  Pedro Alves  <palves@redhat.com>
8002
8003         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8004         procfs_target/add_target here.
8005         * procfs.c (procfs_target): Make static.
8006         (_initialize_procfs): Call add_target here.
8007         * procfs.h (struct target_ops): Remove forward declaration.
8008         (procfs_target): Remove declaration.
8009         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8010
8011 2018-05-02  Pedro Alves  <palves@redhat.com>
8012
8013         * procfs.c (procfs_stopped_by_watchpoint)
8014         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8015         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8016         Forward declare.
8017         (procfs_use_watchpoints): Delete, move contents...
8018         (procfs_target): ... here.
8019         * procfs.h (procfs_use_watchpoints): Delete declaration.
8020         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8021         procfs_use_watchpoints.
8022         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8023         procfs_use_watchpoints.
8024
8025 2018-05-02  Tom Tromey  <tom@tromey.com>
8026
8027         PR python/20084:
8028         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8029         and var_zuinteger_unlimited.
8030         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8031         and PARAM_ZUINTEGER_UNLIMITED.
8032         (set_parameter_value): Handle var_zuinteger and
8033         var_zuinteger_unlimited.
8034         (add_setshow_generic): Likewise.
8035         (parmpy_init): Likewise.
8036
8037 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8038
8039         PR rust/23124
8040         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8041         pointer is not null before dereferencing it.
8042
8043 2018-04-30  Tom Tromey  <tom@tromey.com>
8044
8045         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8046         is_mi_like_p.
8047
8048 2018-04-30  Tom Tromey  <tom@tromey.com>
8049
8050         * breakpoint.c (mention): Remove use of is_mi_like_p.
8051         (print_mention_ranged_breakpoint): Likewise.
8052         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8053         of is_mi_like_p.
8054
8055 2018-04-30  Tom Tromey  <tom@tromey.com>
8056
8057         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8058
8059 2018-04-30  Tom Tromey  <tom@tromey.com>
8060
8061         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8062         (info_spu_event_command): Remove some uses of is_mi_like_p.
8063
8064 2018-04-30  Tom Tromey  <tom@tromey.com>
8065
8066         * python/py-framefilter.c (py_print_single_arg)
8067         (enumerate_locals, py_print_args, py_print_frame): Remove some
8068         uses of is_mi_like_p.
8069
8070 2018-04-30  Tom Tromey  <tom@tromey.com>
8071
8072         * ui-out.c: Update.
8073         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8074         * ui-out.h (ui_out::is_mi_like_p): Now const.
8075         (ui_out::do_is_mi_like_p): Now const.
8076         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8077
8078 2018-04-30  Tom Tromey  <tom@tromey.com>
8079
8080         * varobj.c (varobj_set_visualizer): Use new_reference.
8081         * python/python.c (gdbpy_decode_line): Use new_reference.
8082         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8083         new_reference.
8084
8085 2018-04-30  Tom Tromey  <tom@tromey.com>
8086
8087         * varobj.c (install_new_value): Use new_reference.
8088         * value.h (value_incref): Return void.  Swap intro comment with
8089         value_decref.
8090         * value.c (set_value_parent): Use new_reference.
8091         (value_incref): Return void.  Update intro comment.
8092         (release_value): Use new_reference.
8093         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8094
8095 2018-04-30  Tom Tromey  <tom@tromey.com>
8096
8097         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8098         * gdb_bfd.h (new_bfd_ref): Remove.
8099         (gdb_bfd_open): Update comment.
8100         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8101         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8102         (gdb_bfd_fdopenr): Use new_reference.
8103         * exec.c (exec_file_attach): Use new_reference.
8104
8105 2018-04-30  Tom Tromey  <tom@tromey.com>
8106
8107         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8108         method.
8109
8110 2018-04-30  Tom Tromey  <tom@tromey.com>
8111
8112         * jit.c (jit_read_code_entry): Use type_align.
8113         * i386-tdep.c (i386_gdbarch_init): Don't call
8114         set_gdbarch_long_long_align_bit.
8115         * gdbarch.sh: Remove long_long_align_bit.
8116         * gdbarch.c, gdbarch.h: Rebuild.
8117         * arc-tdep.c (arc_type_align): New function.
8118         (arc_gdbarch_init): Use arc_type_align.  Don't call
8119         set_gdbarch_long_long_align_bit.
8120
8121 2018-04-30  Tom Tromey  <tom@tromey.com>
8122
8123         * rust-lang.c (rust_type_alignment): Remove.
8124         (rust_composite_type): Use type_align.
8125
8126 2018-04-30  Tom Tromey  <tom@tromey.com>
8127
8128         * NEWS: Mention Type.align.
8129         * python/py-type.c (typy_get_alignof): New function.
8130         (type_object_getset): Add "alignof".
8131
8132 2018-04-30  Tom Tromey  <tom@tromey.com>
8133
8134         PR exp/17095:
8135         * NEWS: Update.
8136         * std-operator.def (UNOP_ALIGNOF): New operator.
8137         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8138         New.
8139         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8140         * c-lang.c (c_op_print_tab): Add alignof.
8141         * c-exp.y (ALIGNOF): New token.
8142         (exp): Add "ALIGNOF" production.
8143         (ident_tokens): Add _Alignof and alignof.
8144
8145 2018-04-30  Tom Tromey  <tom@tromey.com>
8146
8147         * i386-tdep.c (i386_type_align): New function.
8148         (i386_gdbarch_init): Update.
8149         * gdbarch.sh (type_align): New method.
8150         * gdbarch.c, gdbarch.h: Rebuild.
8151         * arch-utils.h (default_type_align): Declare.
8152         * arch-utils.c (default_type_align): New function.
8153         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8154         (struct type) <align_log2>: New field.
8155         <instance_flags>: Now a bitfield.
8156         (TYPE_RAW_ALIGN): New macro.
8157         (type_align, type_raw_align, set_type_align): Declare.
8158         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8159         functions.
8160         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8161         (get_alignment, maybe_set_alignment): New functions.
8162         (read_structure_type, read_enumeration_type, read_array_type)
8163         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8164         (read_subrange_type, read_base_type): Set type alignment.
8165
8166 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8167
8168         * dwarf2read.c (read_index_from_section): Use bool.
8169
8170 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8171
8172         PR gdb/22950
8173         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8174         with #ifdef.
8175
8176 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8177
8178         PR build/22873
8179         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8180         last step, and do it atomically.
8181
8182 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8183
8184         * compile/compile-c-types.c (convert_int, convert_float):
8185         Update for C FE v1.
8186
8187 2018-04-27  Tom Tromey  <tom@tromey.com>
8188
8189         PR rust/22545:
8190         * rust-lang.c (rust_inclusive_range_type_p): New function.
8191         (rust_range): Handle inclusive ranges.
8192         (rust_compute_range): Likewise.
8193         * rust-exp.y (struct rust_op) <inclusive>: New field.
8194         (DOTDOTEQ): New constant.
8195         (range_expr): Add "..=" productions.
8196         (operator_tokens): Add "..=" token.
8197         (ast_range): Add "inclusive" parameter.
8198         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8199         ranges.
8200         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8201         bounds values.
8202         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8203         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8204         Update comments.
8205         * expprint.c (print_subexp_standard): Handle new bounds values.
8206         (dump_subexp_body_standard): Likewise.
8207
8208 2018-04-27  Tom Tromey  <tom@tromey.com>
8209
8210         * configure: Rebuild.
8211         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8212         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8213         "OVERRIDE".
8214         (class symbol_needs_eval_context): Likewise.
8215         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8216         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8217         "virtual".
8218         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8219         "override".
8220         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8221         * aarch64-tdep.c (instruction_reader::read): Use "override".
8222         (instruction_reader_test::read): Likewise.
8223         * arm-tdep.c (instruction_reader::read): Use "override".
8224         (instruction_reader_thumb::read): Likewise.
8225
8226 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8227
8228         PR remote/9665
8229         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8230         instead of remote_send.
8231         (remote_send): Remove.
8232
8233 2018-04-26  Pedro Alves  <palves@redhat.com>
8234
8235         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8236         find_function_start_sal instead of find_pc_line.
8237
8238 2018-04-26  Pedro Alves  <palves@redhat.com>
8239
8240         * breakpoint.c (set_breakpoint_location_function): Handle
8241         mst_data_gnu_ifunc.
8242         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8243         * elfread.c (elf_symtab_read): Give data symbols with
8244         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8245         (elf_rel_plt_read): Update comment.
8246         * linespec.c (convert_linespec_to_sals): Handle
8247         mst_data_gnu_ifunc.
8248         (minsym_found): Handle mst_data_gnu_ifunc.
8249         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8250         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8251         * parse.c (find_minsym_type_and_address): Handle
8252         mst_data_gnu_ifunc.
8253         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8254         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8255         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8256         comment.
8257         <mst_data_gnu_ifunc>: New enumerator.
8258
8259 2018-04-26  Pedro Alves  <palves@redhat.com>
8260
8261         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8262         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8263         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8264         Handle it.
8265         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8266         (lookup_minimal_symbol_by_pc): Adjust.
8267         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8268         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8269         * minsyms.h (lookup_msym_prefer): New enum.
8270         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8271         parameter by a lookup_msym_prefer parameter.
8272
8273 2018-04-26  Pedro Alves  <palves@redhat.com>
8274
8275         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8276         ends in "@plt" instead of looking at the symbol's section.
8277
8278 2018-04-26  Pedro Alves  <palves@redhat.com>
8279
8280         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8281         all references.
8282         (find_pc_partial_function_gnu_ifunc): Rename to ...
8283         (find_pc_partial_function): ... this, and remove references to
8284         'is_gnu_ifunc_p'.
8285         (find_pc_partial_function): Delete old implementation.
8286         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8287
8288 2018-04-26  Pedro Alves  <palves@redhat.com>
8289
8290         * linespec.c (struct bound_minimal_symbol_search_key): New.
8291         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8292         skip first line if we found a GNU ifunc minimal symbol by name.
8293         (compare_msymbols): Change parameters to work with a destructured
8294         lhs minsym.
8295         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8296         functions.
8297
8298 2018-04-26  Pedro Alves  <palves@redhat.com>
8299
8300         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8301         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8302         address/name.
8303         (add_location_to_breakpoint): Store the minsym and the objfile in
8304         the breakpoint location.
8305         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8306         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8307         Record the minsym in the sal.
8308         * symtab.h (symtab_and_line) <msymbol>: New field.
8309
8310 2018-04-26  Pedro Alves  <palves@redhat.com>
8311
8312         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8313         unless we actually resolved the ifunc.
8314
8315 2018-04-26  Pedro Alves  <palves@redhat.com>
8316
8317         * c-exp.y (variable production): Prefer ifunc minsyms over
8318         regular function symbols.
8319         * symtab.c (find_gnu_ifunc): New function.
8320         * minsyms.h (lookup_msym_prefer): New enum.
8321         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8322         parameter by a lookup_msym_prefer parameter.
8323         * symtab.h (find_gnu_ifunc): New declaration.
8324
8325 2018-04-26  Pedro Alves  <palves@redhat.com>
8326
8327         * blockframe.c (find_gnu_ifunc_target_type): New function.
8328         (find_function_type): New.
8329         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8330         return a value with a memory address.
8331         (eval_call): For calls to GNU ifunc functions, try to find the
8332         type of the target function from the type that the resolver
8333         returns.
8334         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8335         symbols.
8336         * infcall.c (find_function_return_type): Delete.
8337         (find_function_addr): Add 'function_type' parameter.  For calls to
8338         GNU ifunc functions, try to find the type of the target function
8339         from the type that the resolver returns, and return it via
8340         FUNCTION_TYPE.
8341         (call_function_by_hand_dummy): Adjust to use the function type
8342         returned by find_function_addr.
8343         (find_function_addr): Add 'function_type' parameter and move
8344         description here.
8345         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8346         declarations.
8347
8348 2018-04-26  Pedro Alves  <palves@redhat.com>
8349
8350         * c-exp.y (variable production): Skip finding an alias for ifunc
8351         symbols.
8352
8353 2018-04-26  Pedro Alves  <palves@redhat.com>
8354
8355         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8356
8357 2018-04-25  Pedro Alves  <palves@redhat.com>
8358
8359         * infcmd.c (kill_command): Print the pid as string, not the whole
8360         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8361         message.
8362         * remote.c (remote_detach_1): Print the pid as string, not the
8363         whole thread's ptid.
8364
8365 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8366             Sergio Durigan Junior  <sergiodj@redhat.com>
8367             Pedro Alves  <palves@redhat.com>
8368
8369         * infcmd.c (kill_command): Print message when inferior has
8370         been killed.
8371         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8372         '1'.
8373         (add_inferior): Improve message printed when
8374         'print_inferior_events' is on.
8375         (exit_inferior): Remove message printed when
8376         'print_inferior_events' is on.
8377         (detach_inferior): Improve message printed when
8378         'print_inferior_events' is on.
8379         (initialize_inferiors): Use 'add_inferior_silent' to set
8380         'current_inferior_'.
8381         * inferior.h (print_inferior_events): Declare here as
8382         'extern'.
8383         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8384         '[Detaching...]' messages when 'print_inferior_events' is on.
8385         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8386         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8387         'Detaching after fork from child...', replace it by '... from
8388         parent...'.
8389         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8390         prefix/suffix when printing 'Detaching...' messages.  Print
8391         them when 'print_inferior_events' is on.
8392         * remote.c (remote_detach_1): Print message when detaching
8393         from inferior and '!is_fork_parent'.
8394
8395 2018-04-24  Tom Tromey  <tom@tromey.com>
8396
8397         * cli-out.h: Reindent.
8398
8399 2018-04-24  Tom Tromey  <tom@tromey.com>
8400
8401         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8402         (cli_ui_out::do_field_string): Use fputs_filtered.
8403         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8404
8405 2018-04-23  Tom Tromey  <tom@tromey.com>
8406
8407         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8408         gdb::unique_xmalloc_ptr.
8409
8410 2018-04-23  Tom Tromey  <tom@tromey.com>
8411
8412         * configure: Rebuild.
8413
8414 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8415
8416         PR gdb/23095
8417         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8418         prepare_for_testing.  Set normal_bp to r_debug_state if target
8419         is bsd.
8420
8421 2018-04-21  Pedro Alves  <palves@redhat.com>
8422             Rajendra SY  <rajendra.sy@gmail.com>
8423
8424         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8425         * remote.c (extended_remote_attach): In all-stop mode, mark the
8426         thread as executing.
8427
8428 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8429
8430         * thread.c (thread_apply_all_command): Fix comment.
8431         (thread_command): Fix comment.
8432
8433 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8434
8435         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8436         parameter.
8437         * features/aarch64-core.c (create_feature_aarch64_core):
8438         Regenerate.
8439         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8440         Likewise.
8441         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8442         Likewise.
8443         * features/i386/32bit-avx512.c
8444         (create_feature_i386_32bit_avx512): Likewise.
8445         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8446         Likewise.
8447         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8448         Likewise.
8449         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8450         Likewise.
8451         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8452         Likewise.
8453         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8454         Likewise.
8455         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8456         Likewise.
8457         * features/i386/64bit-avx512.c
8458         (create_feature_i386_64bit_avx512): Likewise.
8459         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8460         Likewise.
8461         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8462         Likewise.
8463         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8464         Likewise.
8465         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8466         Likewise.
8467         * features/i386/64bit-segments.c
8468         (create_feature_i386_64bit_segments): Likewise.
8469         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8470         Likewise.
8471         * features/i386/x32-core.c
8472         (create_feature_i386_x32_core): Likewise.
8473         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8474         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8475         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8476         * target-descriptions.c: In generated code, don't pass xml
8477         filename.
8478
8479 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8480
8481         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8482         (print_xml_feature::visit_post): Likewise.
8483         (print_xml_feature::visit): Likewise.
8484         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8485         (print_xml_feature): Add new class.
8486         * regformats/regdat.sh: Null xmltarget on feature targets.
8487         * target-descriptions.c (struct target_desc): Add xmltarget.
8488         (maintenance_check_tdesc_xml_convert): Add unittest function.
8489         (tdesc_get_features_xml): Add function to get xml.
8490         (maintenance_check_xml_descriptions): Test xml generation.
8491         * xml-tdesc.c (string_read_description_xml): Add function.
8492         * xml-tdesc.h (string_read_description_xml): Add declaration.
8493
8494 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8495
8496         * features/Makefile: Add feature marker to targets with new style
8497         target descriptions.
8498         * regformats/aarch64.dat: Regenerate.
8499         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8500         * regformats/i386/amd64-avx-linux.dat: Likewise.
8501         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8502         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8503         * regformats/i386/amd64-linux.dat: Likewise.
8504         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8505         * regformats/i386/amd64.dat: Likewise.
8506         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8507         * regformats/i386/i386-avx-linux.dat: Likewise.
8508         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8509         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8510         * regformats/i386/i386-linux.dat: Likewise.
8511         * regformats/i386/i386-mmx-linux.dat: Likewise.
8512         * regformats/i386/i386-mpx-linux.dat: Likewise.
8513         * regformats/i386/i386.dat: Likewise.
8514         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8515         * regformats/i386/x32-avx-linux.dat: Likewise.
8516         * regformats/i386/x32-linux.dat: Likewise.
8517         * regformats/tic6x-c62x-linux.dat: Likewise.
8518         * regformats/tic6x-c64x-linux.dat: Likewise.
8519         * regformats/tic6x-c64xp-linux.dat: Likewise.
8520         * regformats/regdat.sh: Parse feature marker.
8521
8522 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8523
8524         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8525         (tdesc_osabi_name): Likewise.
8526         * target-descriptions.c (tdesc_architecture_name): Add new
8527         function.
8528         (tdesc_osabi_name): Likewise.
8529
8530 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8531
8532         * common/tdesc.c (tdesc_predefined_type): Move to here.
8533         (tdesc_named_type): Likewise.
8534         (tdesc_create_vector): Likewise.
8535         (tdesc_create_struct): Likewise.
8536         (tdesc_set_struct_size): Likewise.
8537         (tdesc_create_union): Likewise.
8538         (tdesc_create_flags): Likewise.
8539         (tdesc_create_enum): Likewise.
8540         (tdesc_add_field): Likewise.
8541         (tdesc_add_typed_bitfield): Likewise.
8542         (tdesc_add_bitfield): Likewise.
8543         (tdesc_add_flag): Likewise.
8544         (tdesc_add_enum_value): Likewise.
8545         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8546         (struct tdesc_type_vector): Likewise.
8547         (struct tdesc_type_field): Likewise.
8548         (struct tdesc_type_with_fields): Likewise.
8549         (tdesc_create_enum): Add declaration.
8550         (tdesc_add_typed_bitfield): Likewise.
8551         (tdesc_add_enum_value): Likewise.
8552         * target-descriptions.c (tdesc_type_field): Move from here.
8553         (tdesc_type_builtin): Likewise.
8554         (tdesc_type_vector): Likewise.
8555         (tdesc_type_with_fields): Likewise.
8556         (tdesc_predefined_types): Likewise.
8557         (tdesc_named_type): Likewise.
8558         (tdesc_create_vector): Likewise.
8559         (tdesc_create_struct): Likewise.
8560         (tdesc_set_struct_size): Likewise.
8561         (tdesc_create_union): Likewise.
8562         (tdesc_create_flags): Likewise.
8563         (tdesc_create_enum): Likewise.
8564         (tdesc_add_field): Likewise.
8565         (tdesc_add_typed_bitfield): Likewise.
8566         (tdesc_add_bitfield): Likewise.
8567         (tdesc_add_flag): Likewise.
8568         (tdesc_add_enum_value): Likewise.
8569         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8570         (tdesc_add_typed_bitfield): Likewise.
8571         (tdesc_add_enum_value): Likewise.
8572
8573 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8574
8575         * common/tdesc.c (tdesc_feature::accept): Move to here.
8576         (tdesc_feature::operator==): Likewise.
8577         (tdesc_create_reg): Likewise.
8578         * common/tdesc.h (tdesc_type_kind): Likewise.
8579         (struct tdesc_type): Likewise.
8580         (struct tdesc_feature): Likewise.
8581         * regformats/regdat.sh: Create a feature.
8582         * target-descriptions.c (tdesc_type_kind): Move from here.
8583         (tdesc_type): Likewise.
8584         (tdesc_type_up): Likewise.
8585         (tdesc_feature): Likewise.
8586         (tdesc_create_reg): Likewise.
8587
8588 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8589
8590         * Makefile.in: Add arch/tdesc.c
8591         * common/tdesc.c: New file.
8592         * common/tdesc.h (tdesc_element_visitor): Move to here.
8593         (tdesc_element): Likewise.
8594         (tdesc_reg): Likewise.
8595         (tdesc_reg_up): Likewise.
8596         * regformats/regdef.h (reg): Add offset to constructors.
8597         * target-descriptions.c (tdesc_element_visitor): Move from here.
8598         (tdesc_element): Likewise.
8599         (tdesc_reg): Likewise.
8600         (tdesc_reg_up): Likewise.
8601
8602 2018-04-17  Tom Tromey  <tom@tromey.com>
8603
8604         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8605         discriminant field.
8606
8607 2018-04-17  Tom Tromey  <tom@tromey.com>
8608
8609         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8610
8611 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8612
8613         * symtab.c (print_symbol_info): Skip printing filename and line
8614         number when `last' is NULL.
8615         (symtab_symbol_info): Use empty string instead of NULL for first
8616         invocation of print_symbol_info.
8617         (rbreak_command): Pass NULL to `last' parameter of
8618         print_symbol_info.
8619
8620 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8621
8622         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8623         instead of nullptr.
8624
8625 2018-04-16  Pedro Alves  <palves@redhat.com>
8626
8627         * MAINTAINERS (sh): Remove.
8628         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8629         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8630         (ALLDEPFILES): Remove sh64-tdep.c.
8631         * NEWS: Mentions that support for SH-5/SH64 is removed.
8632         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8633         (sh*-*-openbsd*): Ditto.
8634         (sh64-*-elf*): Remove.
8635         (sh*): Remove.
8636         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8637         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8638         * sh-tdep.c: No longer include "sh64-tdep.h".
8639         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8640         * sh64-tdep.c, sh64-tdep.h: Remove files.
8641
8642 2018-04-16  Pedro Alves  <palves@redhat.com>
8643
8644         * MAINTAINERS: Remove m88k.
8645         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8646         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8647         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8648         * NEWS: Mention that support for m88k was removed.
8649         * configure.host (m88*-*-*): Remove support.
8650         * configure.nat (m88k-*-*): Remove support.
8651         * configure.tgt (m88*-*-openbsd*): Remove.
8652         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8653
8654 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8655
8656         * configure.tgt (x86_tobjs): New variable.
8657         (amd64_tobjs, i386_tobjs): Use it.
8658
8659 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8660
8661         * symtab.c (print_symbol_info): Precede the symbol definition by
8662         the line number when available.
8663         * NEWS: Advertise this enhancement.
8664
8665 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8666
8667         * NEWS (New options): announce set/show record btrace cpu.
8668         * btrace.c: Include record-btrace.h.
8669         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8670         the vendor is unknown.
8671         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8672         Maybe overwrite the btrace configuration's cpu.
8673         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8674         (btrace_fetch): Add cpu parameter.  Update callers.
8675         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8676         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8677         errata workarounds if the vendor is unknown.
8678         * python/py-record-btrace.c: Include record-btrace.h.
8679         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8680         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8681         * record-btrace.c (record_btrace_cpu_state_kind): New.
8682         (record_btrace_cpu): New.
8683         (set_record_btrace_cpu_cmdlist): New.
8684         (record_btrace_get_cpu): New.
8685         (require_btrace_thread, record_btrace_info)
8686         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8687         (cmd_set_record_btrace_cpu_none): New.
8688         (cmd_set_record_btrace_cpu_auto): New.
8689         (cmd_set_record_btrace_cpu): New.
8690         (cmd_show_record_btrace_cpu): New.
8691         (_initialize_record_btrace): Initialize set/show record btrace cpu
8692         commands.
8693         * record-btrace.h (record_btrace_get_cpu): New.
8694
8695 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8696
8697         * record.c (set_record_command): Fix typo in message.
8698
8699 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8700
8701         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8702
8703 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8704
8705         * infrun.c (process_event_stop_test): Call
8706         gdbarch_in_indirect_branch_thunk.
8707         * gdbarch.sh (in_indirect_branch_thunk): New.
8708         * gdbarch.c: Regenerated.
8709         * gdbarch.h: Regenerated.
8710         * x86-tdep.h: New.
8711         * x86-tdep.c: New.
8712         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8713         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8714         (ALLDEPFILES): Add x86-tdep.c.
8715         * arch-utils.h (default_in_indirect_branch_thunk): New.
8716         * arch-utils.c (default_in_indirect_branch_thunk): New.
8717         * i386-tdep: Include x86-tdep.h.
8718         (i386_in_indirect_branch_thunk): New.
8719         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8720         function.
8721         * amd64-tdep: Include x86-tdep.h.
8722         (amd64_in_indirect_branch_thunk): New.
8723         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8724
8725 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8726
8727         PR gdb/23053
8728         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8729         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8730         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8731         regression.
8732
8733 2018-04-12  Tom Tromey  <tom@tromey.com>
8734
8735         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8736         (rust_evaluate_subexp): Likewise.
8737
8738 2018-04-12  Pedro Alves  <palves@redhat.com>
8739
8740         * procfs.c (procfs_detach): Make forward declaration's prototype
8741         match definition's protototype.
8742         (proc_get_LDT_entry): Remove stale do_cleanups call.
8743
8744 2018-04-12  Pedro Alves  <palves@redhat.com>
8745
8746         * target.h (target_ops::to_has_exited): Delete.
8747         (target_has_exited): Delete.
8748         * target-delegates.c: Regenerate.
8749
8750 2018-04-11  Pedro Alves  <palves@redhat.com>
8751
8752         * target.c (fileio_fh_t::t): Add comment.
8753         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8754         (target_fileio_close): Handle a NULL target.
8755         (invalidate_fileio_fh): New.
8756         (target_close): Call it.
8757         * remote.c (remote_hostio_send_command): No longer check whether
8758         remote_desc is open.
8759
8760 2018-04-11  Pedro Alves  <palves@redhat.com>
8761
8762         * target.c (fileio_fh_t): Make it a named struct instead of a
8763         typedef.
8764         (fileio_fh_t::is_closed): New method.
8765         (DEF_VEC_O (fileio_fh_t)): Remove.
8766         (fileio_fhandles): Now a std::vector.
8767         (is_closed_fileio_fh): Delete.
8768         (acquire_fileio_fd): Adjust.  Rename parameters.
8769         (release_fileio_fd): Adjust.
8770         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8771         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8772         (target_fileio_close): Adjust.
8773
8774 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8775
8776         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8777         index.
8778
8779 2018-04-10  Pedro Alves  <palves@redhat.com>
8780
8781         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8782         (scoped_finish_thread_state): New class.
8783         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8784         cleanup.
8785         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8786         (fetch_inferior_event, normal_stop): Likewise.
8787         * thread.c (finish_thread_state_cleanup): Delete.
8788
8789 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8790             Pedro Alves  <palves@redhat.com>
8791
8792         * value.c: Include "selftest.h" and "common/array-view.h".
8793         (struct range) <operator ==>: New.
8794         (test_ranges_contain): New.
8795         (check_ranges_vector): New.
8796         (test_insert_into_bit_range_vector): New.
8797         (_initialize_values): Register selftests.
8798         * common/array-view.h (operator==, operator!=): New.
8799
8800 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8801
8802         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8803         an iterator.
8804         * inline-frame.c: Include <algorithm>.
8805         (struct inline_state): Add constructor.
8806         (inline_state_s): Remove.
8807         (DEF_VEC_O(inline_state_s)): Remove.
8808         (inline_states): Change type to std::vector.
8809         (find_inline_frame_state): Adjust to std::vector.
8810         (allocate_inline_frame_state): Remove.
8811         (clear_inline_frame_state): Adjust to std::vector.
8812         (skip_inline_frames): Adjust to std::vector.
8813
8814 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8815
8816         * tracepoint.h (struct trace_state_variable): Add constructor.
8817         <name>: Change type to std::string.
8818         * tracepoint.c (tsv_s): Remove.
8819         (DEF_VEC_O(tsv_s)): Remove.
8820         (tvariables): Change to std::vector.
8821         (create_trace_state_variable): Adjust to std::vector.
8822         (find_trace_state_variable): Likewise.
8823         (find_trace_state_variable_by_number): Likewise.
8824         (delete_trace_state_variable): Likewise.
8825         (trace_variable_command): Adjust to std::string.
8826         (delete_trace_variable_command): Likewise.
8827         (tvariables_info_1): Adjust to std::vector.
8828         (save_trace_state_variables): Likewise.
8829         (start_tracing): Likewise.
8830         (merge_uploaded_trace_state_variables): Adjust to std::vector
8831         and std::string.
8832         * target.h (struct target_ops)
8833         <to_download_trace_state_variable>: Pass reference to
8834         trace_state_variable.
8835         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8836         * target-delegates.c: Re-generate.
8837         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8838         (mi_tsv_deleted): Likewise.
8839         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8840         * remote.c (remote_download_trace_state_variable): Change
8841         pointer to reference and adjust.
8842         * make-target-delegates (parse_argtypes): Handle references.
8843         (write_function_header): Likewise.
8844         (munge_type): Likewise.
8845
8846 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8847
8848         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8849         string_view-selftests.c.
8850         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8851         testsuite.
8852         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8853         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8854         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8855         * unittests/basic_string_view/element_access/char/1.cc:
8856         Likewise.
8857         * unittests/basic_string_view/element_access/char/empty.cc:
8858         Likewise.
8859         * unittests/basic_string_view/element_access/char/front_back.cc:
8860         Likewise.
8861         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8862         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8863         Likewise.
8864         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8865         Likewise.
8866         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8867         Likewise.
8868         * unittests/basic_string_view/operations/compare/char/1.cc:
8869         Likewise.
8870         * unittests/basic_string_view/operations/compare/char/13650.cc:
8871         Likewise.
8872         * unittests/basic_string_view/operations/copy/char/1.cc:
8873         Likewise.
8874         * unittests/basic_string_view/operations/data/char/1.cc:
8875         Likewise.
8876         * unittests/basic_string_view/operations/find/char/1.cc:
8877         Likewise.
8878         * unittests/basic_string_view/operations/find/char/2.cc:
8879         Likewise.
8880         * unittests/basic_string_view/operations/find/char/3.cc:
8881         Likewise.
8882         * unittests/basic_string_view/operations/find/char/4.cc:
8883         Likewise.
8884         * unittests/basic_string_view/operations/rfind/char/1.cc:
8885         Likewise.
8886         * unittests/basic_string_view/operations/rfind/char/2.cc:
8887         Likewise.
8888         * unittests/basic_string_view/operations/rfind/char/3.cc:
8889         Likewise.
8890         * unittests/basic_string_view/operations/substr/char/1.cc:
8891         Likewise.
8892         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8893         * unittests/string_view-selftests.c: New file.
8894
8895 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8896
8897         * unittests/basic_string_view/capacity/1.cc: New file.
8898         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8899         * unittests/basic_string_view/cons/char/1.cc: New file.
8900         * unittests/basic_string_view/cons/char/2.cc: New file.
8901         * unittests/basic_string_view/cons/char/3.cc: New file.
8902         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8903         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8904         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8905         * unittests/basic_string_view/element_access/char/1.cc: New file.
8906         * unittests/basic_string_view/element_access/char/2.cc: New file.
8907         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8908         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8909         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8910         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8911         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8912         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8913         * unittests/basic_string_view/include.cc: New file.
8914         * unittests/basic_string_view/inserters/char/1.cc: New file.
8915         * unittests/basic_string_view/inserters/char/2.cc: New file.
8916         * unittests/basic_string_view/inserters/char/3.cc: New file.
8917         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8918         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8919         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8920         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8921         * unittests/basic_string_view/literals/types.cc: New file.
8922         * unittests/basic_string_view/literals/values.cc: New file.
8923         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8924         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8925         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8926         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8927         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8928         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8929         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8930         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8931         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8932         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8933         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8934         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8935         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8936         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8937         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8938         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8939         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8940         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8941         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8942         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8943         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8944         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8945         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8946         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8947         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8948         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8949         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8950         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8951         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8952         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8953         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8954         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8955         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8956         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8957         * unittests/basic_string_view/operators/char/2.cc: New file.
8958         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8959         * unittests/basic_string_view/range_access/char/1.cc: New file.
8960         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8961         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8962         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8963         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8964         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8965         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8966         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8967         * unittests/basic_string_view/typedefs.cc: New file.
8968         * unittests/basic_string_view/types/1.cc: New file.
8969
8970 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8971
8972         * common/gdb_string_view.h: Remove libstdc++ implementation
8973         details, adjust to gdb reality.
8974         * common/gdb_string_view.tcc: Likewise.
8975         * cli/cli-script.c (struct string_view): Remove.
8976         (user_args) <m_args>: Change element type to gdb::string_view.
8977         (user_args::insert_args): Adjust.
8978
8979 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8980
8981         * common/gdb_string_view.h: New file.
8982         * common/gdb_string_view.tcc: New file.
8983
8984 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8985
8986         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8987         * configure: Re-generate.
8988
8989 2018-04-09  Pedro Alves  <palves@redhat.com>
8990
8991         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8992         (set_target_gdbarch): Call
8993         gdb::observers::architecture_changed.notify instead of
8994         observer_notify_architecture_changed.
8995
8996 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8997
8998         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8999         (do_restore_current_traceframe_cleanup): Remove.
9000         (restore_current_traceframe_cleanup_dtor): Remove.
9001         (make_cleanup_restore_current_traceframe): Remove.
9002         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9003         New.
9004         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9005         * infrun.c (fetch_inferior_event): Use
9006         scoped_restore_current_traceframe.
9007
9008 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9009
9010         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9011         Remove.
9012         <n_allocated_type_units>: Remove.
9013         <all_type_units>: Change to std::vector.
9014         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9015         to std::vector change.
9016         (dwarf2_per_objfile::get_cutu): Likewise.
9017         (dwarf2_per_objfile::get_tu): Likewise.
9018         (create_signatured_type_table_from_index): Likewise.
9019         (create_signatured_type_table_from_debug_names): Likewise.
9020         (dw2_symtab_iter_next): Likewise.
9021         (dw2_print_stats): Likewise.
9022         (dw2_expand_all_symtabs): Likewise.
9023         (dw2_expand_marked_cus): Likewise.
9024         (dw2_debug_names_iterator::next): Likewise.
9025         (dwarf2_initialize_objfile): Likewise.
9026         (add_signatured_type_cu_to_table): Likewise.
9027         (create_all_type_units): Likewise.
9028         (add_type_unit): Likewise.
9029         (struct tu_abbrev_offset): Add constructor.
9030         (build_type_psymtabs_1): Adjust to std::vector change.
9031         (print_tu_stats): Likewise.
9032         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9033         (write_debug_names): Likewise.
9034
9035 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9036
9037         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9038         Make an std::vector.
9039         <n_comp_units>: Remove.
9040         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9041         to std::vector change.
9042         (dwarf2_per_objfile::get_cutu): Likewise.
9043         (dwarf2_per_objfile::get_cu): Likewise.
9044         (create_cus_from_index): Likewise.
9045         (create_addrmap_from_index): Likewise.
9046         (create_addrmap_from_aranges): Likewise.
9047         (dwarf2_read_index): Likewise.
9048         (dw2_find_last_source_symtab): Likewise.
9049         (dw2_map_symtabs_matching_filename): Likewise.
9050         (dw2_symtab_iter_next): Likewise.
9051         (dw2_print_stats): Likewise.
9052         (dw2_expand_all_symtabs): Likewise.
9053         (dw2_expand_symtabs_with_fullname): Likewise.
9054         (dw2_expand_marked_cus): Likewise.
9055         (dw2_map_symbol_filenames): Likewise.
9056         (create_cus_from_debug_names): Likewise.
9057         (dwarf2_read_debug_names): Likewise.
9058         (dw2_debug_names_iterator::next): Likewise.
9059         (dwarf2_initialize_objfile): Likewise.
9060         (set_partial_user): Likewise.
9061         (dwarf2_build_psymtabs_hard): Likewise.
9062         (read_comp_units_from_section): Remove arguments, adjust to
9063         std::vector change.
9064         (create_all_comp_units): Adjust to std::vector and
9065         read_comp_units_from_section changes.
9066         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9067         change.
9068         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9069         (psyms_seen_size): Likewise.
9070         (write_gdbindex): Likewise.
9071         (write_debug_names): Likewise.
9072
9073 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9074
9075         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9076         with dwarf2_per_objfile.
9077         (create_cus_from_index): Likewise.
9078         (create_signatured_type_table_from_index): Likewise.
9079         (dwarf2_read_index): Likewise.
9080         (dwarf2_initialize_objfile): Likewise.
9081         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9082         per_cu rather than get_dwarf2_per_objfile.
9083
9084 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9085
9086         * dwarf2read.h (struct signatured_type): Forward declare.
9087         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9088         New methods.
9089         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9090         (dw2_get_cutu): ...this.
9091         (dwarf2_per_objfile::get_cu): Rename from...
9092         (dw2_get_cu): ...this.
9093         (dwarf2_per_objfile::get_tu): New.
9094         (create_addrmap_from_index): Adjust.
9095         (create_addrmap_from_aranges): Adjust.
9096         (dw2_find_last_source_symtab): Adjust.
9097         (dw2_map_symtabs_matching_filename): Adjust.
9098         (dw2_symtab_iter_next): Adjust.
9099         (dw2_print_stats): Adjust.
9100         (dw2_expand_all_symtabs): Adjust.
9101         (dw2_expand_symtabs_with_fullname): Adjust.
9102         (dw2_expand_marked_cus): Adjust.
9103         (dw_expand_symtabs_matching_file_matcher): Adjust.
9104         (dw2_map_symbol_filenames): Adjust.
9105         (dw2_debug_names_iterator::next): Adjust.
9106         (dwarf2_initialize_objfile): Adjust.
9107         (set_partial_user): Adjust.
9108         (dwarf2_build_psymtabs_hard): Adjust.
9109
9110 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9111
9112         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9113         Remove unused variables.
9114         (dw2_map_symtabs_matching_filename): Likewise.
9115         (dwarf2_record_block_ranges): Likewise.
9116         (dwarf2_read_addr_index): Likewise.
9117         (follow_die_offset): Likewise.
9118
9119 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9120
9121         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9122         to symbol_file_add_main.
9123
9124 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9125
9126         PR mi/22299
9127         * mi/mi-console.c (do_fputc_async_safe): New.
9128         (mi_console_file::write_async_safe): New.
9129         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9130         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9131         New.
9132         * ui-file.c (ui_file::putstrn): Adjust call to
9133         fputstrn_unfiltered.
9134         * utils.c (printchar): Replace do_fputs and do_fprintf
9135         parameters by do_fputc.
9136         (fputstr_filtered): Adjust call to printchar.
9137         (fputstr_unfiltered): Likewise.
9138         (fputstrn_filtered): Likewise.
9139         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9140         printchar.
9141         * utils.h (do_fputc_ftype): New typedef.
9142         (fputstrn_unfiltered): Add do_fputc parameter.
9143
9144 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9145
9146         * regformats/i386/i386-avx.dat: Remove.
9147
9148 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9149
9150         PR gdb/22979
9151         * amd64-tdep.c (amd64_none_init_abi): New function.
9152         (amd64_x32_none_init_abi): New function.
9153         (_initialize_amd64_tdep): Register handlers for x86-64 and
9154         x64_32 with GDB_OSABI_NONE.
9155         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9156         GDB_OSABI_NONE osabi.
9157
9158 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9159
9160         PR gdb/22980
9161         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9162         GDB_OSABI_NONE.
9163         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9164         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9165
9166 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9167
9168         * common/byte-vector.h (char_vector): New type.
9169         * target.h (target_read_alloc): Return
9170         gdb::optional<byte_vector>.
9171         (target_read_stralloc): Return gdb::optional<char_vector>.
9172         (target_get_osdata): Return gdb::optional<char_vector>.
9173         * target.c (target_read_alloc_1): Templatize.  Replacement
9174         manual memory management with vector.
9175         (target_read_alloc): Change return type, adjust.
9176         (target_read_stralloc): Change return type, adjust.
9177         (target_get_osdata): Change return type, adjust.
9178         * auxv.c (struct auxv_info) <length>: Remove.
9179         <data>: Change type to gdb::optional<byte_vector>.
9180         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9181         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9182         (target_auxv_search): Adjust.
9183         (fprint_target_auxv): Adjust.
9184         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9185         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9186         (linux_make_corefile_notes): Adjust.
9187         * osdata.c (get_osdata): Adjust.
9188         * remote.c (remote_get_threads_with_qxfer): Adjust.
9189         (remote_memory_map): Adjust.
9190         (remote_traceframe_info): Adjust.
9191         (btrace_read_config): Adjust.
9192         (remote_read_btrace): Adjust.
9193         (remote_pid_to_exec_file): Adjust.
9194         * solib-aix.c (solib_aix_get_library_list): Adjust.
9195         * solib-dsbt.c (decode_loadmap): Don't free buf.
9196         (dsbt_get_initial_loadmaps): Adjust.
9197         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9198         * solib-target.c (solib_target_current_sos): Adjust.
9199         * tracepoint.c (sdata_make_value): Adjust.
9200         * xml-support.c (xinclude_start_include): Adjust.
9201         (xml_fetch_content_from_file): Adjust.
9202         * xml-support.h (xml_fetch_another): Change return type.
9203         (xml_fetch_content_from_file): Change return type.
9204         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9205         * xml-tdesc.c (file_read_description_xml): Adjust.
9206         (fetch_available_features_from_target): Change return type.
9207         (target_fetch_description_xml): Adjust.
9208         (target_read_description_xml): Adjust.
9209
9210 2018-04-06  Tom Tromey  <tom@tromey.com>
9211
9212         * value.c (~value): Update.
9213         (struct value) <contents>: Now unique_xmalloc_ptr.
9214         (value_contents_bits_eq, allocate_value_contents)
9215         (value_contents_raw, value_contents_all_raw)
9216         (value_contents_for_printing, value_contents_for_printing_const)
9217         (set_value_enclosing_type): Update.
9218
9219 2018-04-06  Tom Tromey  <tom@tromey.com>
9220
9221         * value.c (range_s): Remove typedef, VEC.
9222         (struct range): Add operator<.
9223         (range_lessthan): Remove.
9224         (ranges_contain): Change type.
9225         (~value): Update.
9226         (struct value) <unavailable, optimized_out>: Now std::vector.
9227         (value_entirely_available)
9228         (value_entirely_covered_by_range_vector)
9229         (value_entirely_unavailable, value_entirely_optimized_out):
9230         Update.
9231         (insert_into_bit_range_vector): Change argument type.
9232         (find_first_range_overlap): Likewise.
9233         (struct ranges_and_idx, value_contents_bits_eq)
9234         (require_not_optimized_out, require_available): Update.
9235         (ranges_copy_adjusted): Change argument types.
9236         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9237
9238 2018-04-06  Tom Tromey  <tom@tromey.com>
9239
9240         * value.c (~value): Update.
9241         (struct value) <parent>: Now a value_ref_ptr.
9242         (value_parent, set_value_parent, value_address, value_copy):
9243         Update.
9244
9245 2018-04-06  Tom Tromey  <tom@tromey.com>
9246
9247         * value.c (struct value): Add constructor, destructor, and member
9248         initializers.
9249         (allocate_value_lazy, value_decref): Update.
9250
9251 2018-04-06  Tom Tromey  <tom@tromey.com>
9252
9253         * value.c (struct value) <released, next>: Remove.
9254         (all_values): Now a std::vector.
9255         (allocate_value_lazy): Update.
9256         (value_next): Remove.
9257         (value_mark, value_free_to_mark, release_value)
9258         (value_release_to_mark): Update.
9259
9260 2018-04-06  Tom Tromey  <tom@tromey.com>
9261
9262         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9263         (free_value_chain): Remove.
9264         * value.c (free_value_chain): Remove.
9265         (value_release_to_mark): Return a std::vector.
9266         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9267         std::vector.
9268         (check_condition): Update.
9269         * eval.c (fetch_subexp_value): Change "val_chain" to a
9270         std::vector.
9271         * breakpoint.c (update_watchpoint): Update.
9272         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9273
9274 2018-04-06  Tom Tromey  <tom@tromey.com>
9275
9276         * value.h (free_all_values): Remove.
9277         * value.c (free_all_values): Remove.
9278
9279 2018-04-06  Tom Tromey  <tom@tromey.com>
9280
9281         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9282         (value_history_chain, value_history_count): Remove.
9283         (value_history): New global.
9284         (record_latest_value, access_value_history, show_values)
9285         (preserve_values): Update.
9286
9287 2018-04-06  Tom Tromey  <tom@tromey.com>
9288
9289         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9290         * varobj.c (varobj_set_display_format, varobj_set_value)
9291         (install_default_visualizer, construct_visualizer)
9292         (install_new_value, ~varobj, varobj_get_value_type)
9293         (my_value_of_variable, varobj_editable_p): Update.
9294         * c-varobj.c (c_describe_child, c_value_of_variable)
9295         (cplus_number_of_children, cplus_describe_child): Update.
9296         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9297         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9298         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9299
9300 2018-04-06  Tom Tromey  <tom@tromey.com>
9301
9302         * printcmd.c (last_examine_address): Change type to
9303         value_ref_ptr.
9304         (do_examine, x_command): Update.
9305
9306 2018-04-06  Tom Tromey  <tom@tromey.com>
9307
9308         * value.c (release_value): Update.
9309         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9310         (struct bpstats) <val>: Now a value_ref_ptr.
9311         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9312         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9313         (~watchpoint, print_it_watchpoint, watch_command_1)
9314         (invalidate_bp_value_on_memory_change): Update.
9315
9316 2018-04-06  Tom Tromey  <tom@tromey.com>
9317
9318         * varobj.c (varobj_clear_saved_item)
9319         (update_dynamic_varobj_children, install_new_value, ~varobj):
9320         Update.
9321         * value.h (value_incref): Move declaration earlier.
9322         (value_decref): Rename from value_free.
9323         (struct value_ref_policy): New.
9324         (value_ref_ptr): New typedef.
9325         (struct value_deleter): Remove.
9326         (gdb_value_up): Remove typedef.
9327         (release_value): Change return type.
9328         (release_value_or_incref): Remove.
9329         * value.c (set_value_parent): Update.
9330         (value_incref): Change return type.
9331         (value_decref): Rename from value_free.
9332         (value_free_to_mark, free_all_values, free_value_chain): Update.
9333         (release_value): Return value_ref_ptr.
9334         (release_value_or_incref): Remove.
9335         (record_latest_value, set_internalvar, clear_internalvar):
9336         Update.
9337         * stack.c (info_frame_command): Don't call value_free.
9338         * python/py-value.c (valpy_dealloc, valpy_new)
9339         (value_to_value_object): Update.
9340         * printcmd.c (do_examine): Update.
9341         * opencl-lang.c (lval_func_free_closure): Update.
9342         * mi/mi-main.c (register_changed_p): Don't call value_free.
9343         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9344         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9345         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9346         value_free.
9347         * guile/scm-value.c (vlscm_free_value_smob)
9348         (vlscm_scm_from_value): Update.
9349         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9350         (frame_unwind_register_unsigned, get_frame_register_bytes)
9351         (put_frame_register_bytes): Don't call value_free.
9352         * findvar.c (address_from_register): Don't call value_free.
9353         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9354         * dwarf2loc.c (entry_data_value_free_closure)
9355         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9356         (dwarf2_evaluate_loc_desc_full): Update.
9357         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9358         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9359         (~watchpoint, watch_command_1)
9360         (invalidate_bp_value_on_memory_change): Update.
9361         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9362
9363 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9364
9365         PR gdb/23022
9366         * warning.m4: Add -Wno-error=deprecated-register.
9367         * configure: Re-generate.
9368
9369 2018-04-05  Tom Tromey  <tom@tromey.com>
9370
9371         * linespec.h: Remove include of "vec.h".
9372
9373 2018-04-05  Tom Tromey  <tom@tromey.com>
9374
9375         * linespec.c (typep): Remove typedef.
9376         (find_methods, find_superclass_methods): Take a std::vector.
9377         (find_method): Use std::vector.
9378
9379 2018-04-05  Tom Tromey  <tom@tromey.com>
9380
9381         * utils.c (compare_strings): Remove.
9382         * utils.h (compare_strings): Remove.
9383         * objc-lang.h (find_imps): Update.
9384         * objc-lang.c (find_methods): Take a std::vector.
9385         (uniquify_strings, find_imps): Likewise.
9386         * linespec.c (find_methods): Take a std::vector.
9387         (decode_objc): Use std::vector.
9388         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9389         a std::vector.
9390         (find_method, find_function_symbols): Use std::vector.
9391
9392 2018-04-05  Tom Tromey  <tom@tromey.com>
9393
9394         * completer.c (completion_tracker::completion_tracker): Remove
9395         cast.
9396         (completion_tracker::discard_completions): Likewise.
9397         * breakpoint.c (ambiguous_names_p): Remove cast.
9398         * ada-lang.c (_initialize_ada_language): Remove cast.
9399         * utils.h (streq): Update.
9400         (streq_hash): Add new declaration.
9401         * utils.c (streq): Return bool.
9402         (streq_hash): New function.
9403
9404 2018-04-05  Tom Tromey  <tom@tromey.com>
9405
9406         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9407         Remove a string copy.
9408
9409 2018-04-05  Tom Tromey  <tom@tromey.com>
9410
9411         * linespec.c (filter_results): Use std::vector.
9412         (decode_line_2, decode_line_full): Update.
9413
9414 2018-04-05  Tom Tromey  <tom@tromey.com>
9415
9416         * linespec.c (canonical_to_fullform): Return std::string.
9417         (filter_results): Update.
9418         (struct decode_line_2_item): Add constructor.
9419         <fullform, displayform>: Now std::string.
9420         (decode_line_2_compare_items): Now a std::sort comparator.
9421         (decode_line_2): Update.
9422
9423 2018-04-05  Tom Tromey  <tom@tromey.com>
9424
9425         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9426         (unexpected_linespec_error): Update.
9427         (linespec_parse_basic, parse_linespec): Update.
9428
9429 2018-04-05  Tom Tromey  <tom@tromey.com>
9430
9431         * linespec.c (linespec_parse_basic): Reindent.
9432
9433 2018-04-05  Tom Tromey  <tom@tromey.com>
9434
9435         * minsyms.h (iterate_over_minimal_symbols): Update.
9436         * minsyms.c (iterate_over_minimal_symbols): Take a
9437         gdb::function_view.
9438         * linespec.c (struct collect_minsyms): Remove.
9439         (compare_msyms): Now a std::sort comparator.
9440         (add_minsym): Add parameters.
9441         (search_minsyms_for_name): Update.  Use std::vector.
9442
9443 2018-04-03  Tom Tromey  <tom@tromey.com>
9444
9445         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9446         gdb::byte_vector.
9447
9448 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9449
9450         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9451
9452 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9453
9454         PR gdb/16959
9455         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9456         printing static type.
9457
9458 2018-04-01  Tom Tromey  <tom@tromey.com>
9459
9460         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9461         (rs6000_xfer_shared_libraries): Update.
9462
9463 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9464
9465         * common/gdb_vecs.h (char_ptr): Remove.
9466         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9467
9468 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9469
9470         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9471         with std::vector.
9472         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9473
9474 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9475
9476         * tracepoint.h (struct uploaded_tp): Initialize fields.
9477         <actions, step_actions, cmd_strings>: Change type to
9478         std::vector<char *>.
9479         * tracepoint.c (get_uploaded_tp): Allocate with new.
9480         (free_uploaded_tps): Free with delete.
9481         (parse_tracepoint_definition): Adjust to std::vector change.
9482         * breakpoint.c (read_uploaded_action): Likewise.
9483         (create_tracepoint_from_upload): Likewise.
9484         * ctf.c (ctf_write_uploaded_tp): Likewise.
9485         (SET_ARRAY_FIELD): Likewise.
9486         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9487
9488 2018-03-30  Tom Tromey  <tom@tromey.com>
9489
9490         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9491         std::unique_ptr.
9492         (svr4_keep_data_in_core): Update.
9493         (svr4_read_so_list): Update.
9494
9495 2018-03-30  Tom Tromey  <tom@tromey.com>
9496
9497         * windows-nat.c (handle_output_debug_string, handle_exception):
9498         Update.
9499         * target.h (target_read_string): Update.
9500         * target.c (target_read_string): Change "string" to
9501         unique_xmalloc_ptr.
9502         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9503         Update.
9504         * solib-frv.c (frv_current_sos): Update.
9505         * solib-dsbt.c (dsbt_current_sos): Update.
9506         * solib-darwin.c (darwin_current_sos): Update.
9507         * linux-thread-db.c (inferior_has_bug): Update.
9508         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9509         Update.  Remove alloca.
9510         * ada-lang.c (ada_main_name): Update.
9511
9512 2018-03-30  Tom Tromey  <tom@tromey.com>
9513
9514         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9515         (struct dwo_file_deleter): New.
9516         (dwo_file_up): New typedef.
9517         (open_and_init_dwo_file): Use dwo_file_up.
9518         (free_dwo_file_cleanup): Remove.
9519
9520 2018-03-30  Tom Tromey  <tom@tromey.com>
9521
9522         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9523         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9524
9525 2018-03-30  Tom Tromey  <tom@tromey.com>
9526
9527         * dwarf2read.c (class free_cached_comp_units): New class.
9528         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9529         (free_cached_comp_units): Remove function.
9530
9531 2018-03-30  Tom Tromey  <tom@tromey.com>
9532
9533         * utils.h (make_cleanup_unpush_target): Remove.
9534         * inf-ptrace.c (struct target_unpusher): New.
9535         (target_unpush_up) New typedef.
9536         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9537         target_unpush_up.
9538         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9539
9540 2018-03-27  Tom Tromey  <tom@tromey.com>
9541
9542         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9543
9544 2018-03-27  Pedro Alves  <palves@redhat.com>
9545             Tom Tromey  <tom@tromey.com>
9546
9547         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9548         destructor.  Now a class.
9549         (gdb_readline_wrapper_cleanup): Remove function.
9550         (gdb_readline_wrapper): Remove cleanups.
9551
9552 2018-03-27  Tom Tromey  <tom@tromey.com>
9553
9554         * typeprint.h (struct type_print_options) <local_typedefs,
9555         global_typedefs>: Remove "struct" keyword.
9556         (class typedef_hash_table): New class.
9557         (recursively_update_typedef_hash, add_template_parameters)
9558         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9559         (find_typedef_in_hash): Don't declare.
9560         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9561         (typedef_hash_table::recursively_update): Rename from
9562         recursively_update_typedef_hash.  Now a member.
9563         (typedef_hash_table::add_template_parameters): Rename from
9564         add_template_parameters.  Now a member.
9565         (typedef_hash_table::typedef_hash_table): Now a constructor;
9566         rename from create_typedef_hash.
9567         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9568         rename from free_typedef_hash.
9569         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9570         (do_free_global_table): Remove.
9571         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9572         from copy_type_recursive.
9573         (create_global_typedef_table): Remove.
9574         (typedef_hash_table::find_global_typedef): Now a member of
9575         typedef_hash_table.
9576         (typedef_hash_table::find_typedef): Rename from
9577         find_typedef_in_hash; now a member.
9578         (whatis_exp): Update.
9579         * extension.h (struct ext_lang_type_printers): Add constructor and
9580         destructor.
9581         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9582         declare.
9583         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9584         Now a constructor; rename from start_ext_lang_type_printers.
9585         (ext_lang_type_printers): Now a destructor; rename from
9586         free_ext_lang_type_printers.
9587         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9588         Update.
9589         (c_type_print_base_struct_union): Update.  Remove cleanups.
9590
9591 2018-03-27  Tom Tromey  <tom@tromey.com>
9592
9593         * dwarf-index-write.c: Include <cmath>.
9594
9595 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9596
9597         * NEWS: Add entry describing new "set|show varsize-limit" command.
9598         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9599         command.
9600         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9601         "set variable".
9602
9603 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9604
9605         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9606         dwarf-index-write.c
9607         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9608         * dwarf-index-common.c: New file.
9609         * dwarf-index-common.h: New file.
9610         * dwarf-index-write.c: New file.
9611         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9612         (struct dwarf2_section_info): Move from here.
9613         (dwarf2_section_info_def): Likewise.
9614         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9615         (offset_type): Likewise.
9616         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9617         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9618         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9619         (byte_swap): Likewise.
9620         (MAYBE_SWAP): Likewise.
9621         (dwarf2_per_cu_ptr): Likewise.
9622         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9623         (struct tu_stats): Likewise.
9624         (struct dwarf2_per_objfile): Likewise.
9625         (struct dwarf2_per_cu_data): Likewise.
9626         (struct signatured_type): Likewise.
9627         (sig_type_ptr): Likewise.
9628         (DEF_VEC_P (sig_type_ptr)): Likewise.
9629         (INDEX4_SUFFIX): Likewise.
9630         (INDEX5_SUFFIX): Likewise.
9631         (DEBUG_STR_SUFFIX): Likewise.
9632         (dwarf2_read_section): Make non-static.
9633         (mapped_index_string_hash): Move from here.
9634         (dwarf5_djb_hash): Likewise.
9635         (file_write): Likewise.
9636         (class data_buf): Likewise.
9637         (struct symtab_index_entry): Likewise.
9638         (struct mapped_symtab): Likewise.
9639         (find_slot): Likewise.
9640         (hash_expand): Likewise.
9641         (add_index_entry): Likewise.
9642         (uniquify_cu_indices): Likewise.
9643         (class c_str_view): Likewise.
9644         (class c_str_view_hasher): Likewise.
9645         (class vector_hasher): Likewise.
9646         (write_hash_table): Likewise.
9647         (psym_index_map): Likewise.
9648         (struct addrmap_index_data): Likewise.
9649         (add_address_entry): Likewise.
9650         (add_address_entry_worker): Likewise.
9651         (write_address_map): Likewise.
9652         (symbol_kind): Likewise.
9653         (write_psymbols): Likewise.
9654         (struct signatured_type_index_data): Likewise.
9655         (write_one_signatured_type): Likewise.
9656         (recursively_count_psymbols): Likewise.
9657         (recursively_write_psymbols): Likewise.
9658         (class debug_names): Likewise.
9659         (check_dwarf64_offsets): Likewise.
9660         (psyms_seen_size): Likewise.
9661         (write_gdbindex): Likewise.
9662         (write_debug_names): Likewise.
9663         (assert_file_size): Likewise.
9664         (write_psymtabs_to_index): Likewise.
9665         (save_gdb_index_command): Likewise.
9666         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9667         command.
9668         * dwarf2read.h: New file.
9669
9670 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9671
9672         PR gdb/22670
9673         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9674         symbol name if the CU's language stores symbol names in linkage
9675         format.
9676         * language.h (struct language_defn)
9677         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9678         all instances of this struct.
9679
9680 2018-03-26  Tom Tromey  <tom@tromey.com>
9681
9682         * stack.c (backtrace_command_1): Remove verbose code.
9683
9684 2018-03-26  Tom Tromey  <tom@tromey.com>
9685
9686         * python/py-framefilter.c (py_print_type): Don't catch
9687         exceptions.  Return void.
9688         (py_print_value): Likewise.
9689         (py_print_single_arg): Likewise.
9690         (enumerate_args): Don't catch exceptions.
9691         (py_print_args): Likewise.
9692         (py_print_frame): Likewise.
9693         (gdbpy_apply_frame_filter): Catch exceptions here.
9694
9695 2018-03-26  Tom Tromey  <tom@tromey.com>
9696
9697         * stack.c (_initialize_stack): Remove trailing newlines from help
9698         text.  Add "Usage" line to "backtrace" help.
9699
9700 2018-03-26  Tom Tromey  <tom@tromey.com>
9701
9702         PR python/16486:
9703         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9704
9705 2018-03-26  Tom Tromey  <tom@tromey.com>
9706
9707         * python/py-framefilter.c (py_print_single_arg): Return
9708         EXT_LANG_BT_ERROR from catch.
9709
9710 2018-03-26  Tom Tromey  <tom@tromey.com>
9711
9712         PR backtrace/15584:
9713         * stack.c (backtrace_command_1): Move some code into no-filters
9714         "if".
9715
9716 2018-03-26  Tom Tromey  <tom@tromey.com>
9717
9718         * python/py-framefilter.c (throw_quit_or_print_exception): New
9719         function.
9720         (gdbpy_apply_frame_filter): Use it.
9721
9722 2018-03-26  Tom Tromey  <tom@tromey.com>
9723
9724         PR cli/17716:
9725         * python/py-framefilter.c (py_print_type, py_print_value)
9726         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9727         RETURN_MASK_ERROR.
9728
9729 2018-03-26  Tom Tromey  <tom@tromey.com>
9730
9731         * python/py-framefilter.c (enumerate_args): Use
9732         gdb::unique_xmalloc_ptr.
9733
9734 2018-03-26  Tom Tromey  <tom@tromey.com>
9735
9736         * python/py-framefilter.c (py_print_frame): Return
9737         EXT_LANG_BT_OK.
9738         (gdbpy_apply_frame_filter): Update comment.
9739         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9740         Remove.
9741         <EXT_LANG_BT_NO_FILTERS>: Change value.
9742
9743 2018-03-26  Tom Tromey  <tom@tromey.com>
9744
9745         PR backtrace/15582:
9746         * stack.c (backtrace_command): Parse "hide" argument.
9747         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9748         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9749         constant.
9750
9751 2018-03-26  Tom Tromey  <tom@tromey.com>
9752
9753         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9754         add "flags".
9755         (backtrace_command): Remove "fulltrace", add "flags".
9756
9757 2018-03-26  Tom Tromey  <tom@tromey.com>
9758
9759         * stack.c (backtrace_command): Rewrite command line parsing.
9760
9761 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9762
9763         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9764
9765 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9766
9767         * filename-seen-cache.h: Add include guard.
9768
9769 2018-03-26  Keith Seitz  <keiths@redhat.com>
9770
9771         * symfile.c (place_section): Remove "struct" from section_addr_info
9772         in comment.
9773         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9774         "struct" keyword from section_addr_info.
9775
9776 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9777
9778         * regformats/regdef.h (reg): Add constructors.
9779
9780 2018-03-25  Pedro Alves  <palves@redhat.com>
9781
9782         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9783         if then/else bodies in var_func_name extraction.
9784
9785 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9786
9787         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9788         lookup_minimal_symbol() to find symbol entry.
9789         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9790
9791 2018-03-23  Keith Seitz  <keiths@redhat.com>
9792
9793         PR c++/22968
9794         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9795         nested type definitions for C++, too.
9796
9797 2018-03-23  Tom Tromey  <tom@tromey.com>
9798
9799         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9800         a typedef.
9801         (macho_register_oso): Remove.
9802         (macho_symtab_read): Take a std::vector.
9803         (oso_el_compare_name): Now a std::sort comparator.
9804         (macho_symfile_read_all_oso): Take a std::vector.
9805         (macho_symfile_read): Use std::vector.  Remove cleanups.
9806
9807 2018-03-22  Tom Tromey  <tom@tromey.com>
9808
9809         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9810         (record_full_goto_bookmark): Use std::string.
9811
9812 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9813
9814         PR tdep/18295
9815         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9816         a single mask.
9817
9818 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9819
9820         * rs6000-tdep.c (store_insn_p): New function.
9821         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9822         and cr_reg to their unshifted values. Use store_insn_p to
9823         match LR saves using either R1 or fdata->alloca_reg. Use
9824         store_insn_p to match CR saves. Set alloca_reg_offset
9825         when alloca_reg and framep are set. Remove lr_reg shift
9826         when assigning to fdata->lr_register.
9827
9828 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9829
9830         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9831         command line args instead of emitting a warning.
9832
9833 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9834
9835         * tracepoint.h (struct static_tracepoint_marker): Initialize
9836         fields, define default constructor, move constructor and move
9837         assignment, disable the rest.
9838         <str_id, extra>: Make std::string.
9839         (release_static_tracepoint_marker): Remove.
9840         (free_current_marker): Remove.
9841         * tracepoint.c (free_current_marker): Remove.
9842         (parse_static_tracepoint_marker_definition): Adjust to
9843         std::string, use new hex2str overload.
9844         (release_static_tracepoint_marker): Remove.
9845         (print_one_static_tracepoint_marker): Get marker by reference
9846         and adjust to std::string.
9847         (info_static_tracepoint_markers_command): Adjust to std::vector
9848         changes
9849         * target.h (static_tracepoint_marker_p): Remove typedef.
9850         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9851         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9852         bool.
9853         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9854         * target-debug.h
9855         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9856         (target_debug_print_std_vector_static_tracepoint_marker): New.
9857         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9858         to...
9859         (target_debug_print_static_tracepoint_marker_p): ... this.
9860         * target-delegates.c: Re-generate.
9861         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9862         Make std::string.
9863         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9864         (decode_static_tracepoint_spec): Adjust to std::vector.
9865         (tracepoint_print_one_detail): Adjust to std::string.
9866         (strace_marker_decode_location): Adjust to std::string.
9867         (update_static_tracepoint): Adjust to std::string, remove call
9868         to release_static_tracepoint_marker.
9869         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9870         Adjust to std::vector.
9871         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9872         (remote_static_tracepoint_markers_by_strid): Adjust to
9873         std::vector.
9874         * common/rsp-low.h (hex2str): New overload with explicit count
9875         of bytes.
9876         * common/rsp-low.c (hex2str): New overload with explicit count
9877         of bytes.
9878         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9879         (_initialize_rsp_low_selftests): Add test_hex2str test.
9880         * unittests/tracepoint-selftests.c
9881         (test_parse_static_tracepoint_marker_definition): Adjust to
9882         std::string.
9883
9884 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9885
9886         * tracepoint.c (parse_static_tracepoint_marker_definition):
9887         Consider case where the definition is followed by more
9888         definitions.
9889         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9890         tracepoint-selftests.c.
9891         * unittests/tracepoint-selftests.c: New.
9892
9893 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9894
9895         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9896         Carvalho.
9897
9898 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9899
9900         * symtab.c (find_pc_sect_line): fixed indentation.
9901
9902 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9903
9904         * symtab.c (find_pc_sect_line): now uses binary search.
9905
9906 2018-03-19  Tom Tromey  <tom@tromey.com>
9907
9908         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9909         "IDENT" production.
9910
9911 2018-03-19  Pedro Alves  <palves@redhat.com>
9912             Tom Tromey  <tom@tromey.com>
9913
9914         * unittests/observable-selftests.c: New file.
9915         * common/observable.h: New file.
9916         * observable.h: New file.
9917         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9918         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9919         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9920         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9921         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9922         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9923         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9924         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9925         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9926         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9927         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9928         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9929         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9930         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9931         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9932         tui/tui-interp.c, valops.c: Update all users.
9933         * tui/tui-hooks.c (tui_bp_created_observer)
9934         (tui_bp_deleted_observer, tui_bp_modified_observer)
9935         (tui_inferior_exit_observer, tui_before_prompt_observer)
9936         (tui_normal_stop_observer, tui_register_changed_observer):
9937         Remove.
9938         (tui_observers_token): New global.
9939         (attach_or_detach, tui_attach_detach_observers): New functions.
9940         (tui_install_hooks, tui_remove_hooks): Use
9941         tui_attach_detach_observers.
9942         * record-btrace.c (record_btrace_thread_observer): Remove.
9943         (record_btrace_thread_observer_token): New global.
9944         * observer.sh: Remove.
9945         * observer.c: Rename to observable.c.
9946         * observable.c (namespace gdb_observers): Define new objects.
9947         (observer_debug): Move into gdb_observers namespace.
9948         (struct observer, struct observer_list, xalloc_observer_list_node)
9949         (xfree_observer_list_node, generic_observer_attach)
9950         (generic_observer_detach, generic_observer_notify): Remove.
9951         (_initialize_observer): Update.
9952         Don't include observer.inc.
9953         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9954         (clean mostlyclean): Likewise.
9955         (observer.h, observer.inc): Remove targets.
9956         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9957         (COMMON_SFILES): Use observable.c, not observer.c.
9958         * .gitignore: Remove observer.h.
9959
9960 2018-03-18  Tom Tromey  <tom@tromey.com>
9961
9962         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9963         gdb::def_vector.
9964         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9965
9966 2018-03-17  Tom Tromey  <tom@tromey.com>
9967
9968         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9969
9970 2018-03-17  Tom Tromey  <tom@tromey.com>
9971
9972         * target.c (class scoped_target_fd): New.
9973         (target_fileio_close_cleanup): Remove.
9974         (target_fileio_read_alloc_1): Use scoped_target_fd.
9975
9976 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9977
9978         * silent-rules.mk: New.
9979         * Makefile.in: Include silent-rules.mk
9980         (srcdir, VPATH, top_srcdir): Move up.
9981         (COMPILE): Add ECHO_CXX.
9982         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9983         (init.c): Add ECHO_INIT_C.
9984         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9985         (version.c): Add ECHO_GEN.
9986         (printcmd.o): Add ECHO_CXX.
9987         (target-float.o): Add ECHO_CXX.
9988         (ada-exp.o): Add ECHO_CXX.
9989         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9990         (insight$(EXEEXT)): Add ECHO_CXXLD.
9991         * gnulib/configure.ac: Add AM_SILENT_RULES.
9992         * gnulib/aclocal.m4: Re-generate.
9993         * gnulib/configure: Re-generate.
9994         * gnulib/import/Makefile.in: Re-generate.
9995
9996 2018-03-16  Tom Tromey  <tom@tromey.com>
9997
9998         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9999         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10000         * utils.c (do_free_section_addr_info)
10001         (make_cleanup_free_section_addr_info): Remove.
10002         * symfile.h (struct other_sections): Add constructor.
10003         (struct section_addr_info): Remove.
10004         (section_addr_info): New typedef.
10005         (struct sym_fns) <sym_offsets>: Change type of parameter.
10006         (build_section_addr_info_from_objfile)
10007         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10008         (default_symfile_offsets, symbol_file_add)
10009         (symbol_file_add_from_bfd)
10010         (build_section_addr_info_from_section_table): Update.
10011         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10012         * symfile.c (alloc_section_addr_info): Remove.
10013         (build_section_addr_info_from_section_table): Change return type.
10014         Update.
10015         (build_section_addr_info_from_bfd)
10016         (build_section_addr_info_from_objfile): Likewise.
10017         (free_section_addr_info): Remove.
10018         (relative_addr_info_to_section_offsets): Change type of "addrs".
10019         (addrs_section_compar): Now a std::sort comparator.
10020         (addrs_section_sort): Change return type.
10021         (addr_info_make_relative): Change type of "addrs".  Update.
10022         (default_symfile_offsets, syms_from_objfile_1)
10023         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10024         (symbol_file_add_separate): Update.
10025         (symbol_file_add): Change type of "addrs".  Update.
10026         (add_symbol_file_command): Update.  Remove cleanups.
10027         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10028         cleanups.
10029         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10030         * solib.c (solib_read_symbols): Update.
10031         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10032         * machoread.c (macho_symfile_offsets): Update.
10033         * jit.c (jit_bfd_try_read_symtab): Update.
10034
10035 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10036
10037         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10038         unittests/utils-selftests.c.
10039         * unittests/utils-selftests.c: New file.
10040
10041 2018-03-14  Tom Tromey  <tom@tromey.com>
10042
10043         PR cli/14977:
10044         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10045         for NULL.
10046
10047 2018-03-14  Tom Tromey  <tom@tromey.com>
10048
10049         PR cli/19918:
10050         * printcmd.c (printf_pointer): Allow "-" in format.
10051
10052 2018-03-14  Tom Tromey  <tom@tromey.com>
10053
10054         * printcmd.c (_initialize_printcmd): Add usage to printf.
10055
10056 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10057
10058         * MAINTAINERS: Update my email address.
10059
10060 2018-03-13  Tom Tromey  <tom@tromey.com>
10061
10062         * machoread.c (macho_check_dsym): Change filenamep to a
10063         std::string*.
10064         (macho_symfile_read): Update.
10065         * symfile.c (load_command): Use std::string.
10066
10067 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10068
10069         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10070         to error message string.
10071         (riscv_register_name): Use xsnprintf instead of sprintf.
10072         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10073         internal_error.
10074         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10075         error.
10076         (riscv_push_dummy_call): Likewise.
10077
10078 2018-03-12  Tom Tromey  <tom@tromey.com>
10079
10080         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10081         Use gdb::byte_vector.
10082         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10083
10084 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10085
10086         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10087         parameter type to readable_regcache.
10088         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10089         the declaration.
10090
10091 2018-03-11  Tom Tromey  <tom@tromey.com>
10092
10093         * dwarf2read.c (struct nextfield): Add initializers.
10094         (struct nextfnfield): Remove.
10095         (struct fnfieldlist): Add initializers.  Remove "length" and
10096         "head", use std::vector.
10097         (struct decl_field_list): Remove.
10098         (struct field_info): Add initializers.
10099         <fields, baseclasses>: Now std::vector.
10100         <nbaseclasses, nfnfields, typedef_field_list_count,
10101         nested_types_list_count>: Remove.
10102         (dwarf2_add_field, dwarf2_add_type_defn)
10103         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10104         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10105         (process_structure_scope): Update.
10106
10107 2018-03-11  Tom Tromey  <tom@tromey.com>
10108
10109         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10110         for use by std::sort.
10111         (build_type_psymtabs_1): Use std::vector.
10112
10113 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10114
10115         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10116         and LIBMPFR in the printed configuration.
10117
10118 2018-03-08  Tom Tromey  <tom@tromey.com>
10119
10120         * source.c (get_filename_and_charpos): Use scoped_fd.
10121         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10122         (procfs_pidlist): Likewise.
10123         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10124         (iterate_over_mappings): Likewise.
10125
10126 2018-03-08  Tom Tromey  <tom@tromey.com>
10127
10128         * infcall.c (struct call_return_meta_info)
10129         <stack_temporaries_enabled>: Remove.
10130         (get_call_return_value, call_function_by_hand_dummy): Update.
10131         * thread.c (disable_thread_stack_temporaries): Remove.
10132         (enable_thread_stack_temporaries): Remove.
10133         (thread_stack_temporaries_enabled_p): Return bool.
10134         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10135         (get_last_thread_stack_temporary): Update.
10136         * eval.c (evaluate_subexp): Update.
10137         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10138         class, not a function.
10139         (value_ptr, value_vec): Remove typedefs.
10140         (class thread_info) <stack_temporaries_enabled>: Now bool.
10141         <stack_temporaries>: Now a std::vector.
10142         (thread_stack_temporaries_enabled_p)
10143         (value_in_thread_stack_temporaries): Return bool.
10144
10145 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10146
10147         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10148         (getpkt_or_notif_sane_1): Likewise.
10149
10150 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10151
10152         * build-id.c (build_id_to_debug_bfd): Use std::string.
10153
10154 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10155
10156         * build-id.c (find_separate_debug_file_by_buildid): Return
10157         std::string.
10158         * build-id.h (find_separate_debug_file_by_buildid): Return
10159         std::string.
10160         * coffread.c (coff_symfile_read): Adjust to std::string.
10161         * elfread.c (elf_symfile_read): Adjust to std::string.
10162         * symfile.c (separate_debug_file_exists): Change parameter to
10163         std::string.
10164         (find_separate_debug_file): Return std::string.
10165         (find_separate_debug_file_by_debuglink): Return std::string.
10166         * symfile.h (find_separate_debug_file_by_debuglink): Return
10167         std::string.
10168
10169 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10170
10171         * common/xml-utils.c (xml_escape_text): Move code to...
10172         (xml_escape_text_append): ... this new function.
10173         * common/xml-utils.h (xml_escape_text_append): New declaration.
10174         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10175         New function.
10176         (_initialize_xml_utils): register test_xml_escape_text_append as
10177         a selftest.
10178
10179 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10180
10181         * defs.h: Remove MAX_REGISTER_SIZE.
10182         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10183         asserts.
10184         * python/py-unwind.c (pyuw_sniffer): Likewise.
10185
10186 2018-03-07  Tom Tromey  <tom@tromey.com>
10187
10188         * linux-tdep.c (linux_info_proc): Update.
10189         * target.h (struct target_ops) <to_fileio_readlink>: Return
10190         optional<string>.
10191         (target_fileio_readlink): Return optional<string>.
10192         * remote.c (remote_hostio_readlink): Return optional<string>.
10193         * inf-child.c (inf_child_fileio_readlink): Return
10194         optional<string>.
10195         * target.c (target_fileio_readlink): Return optional<string>.
10196
10197 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10198
10199         * regcache.c (cooked_read_test): Add riscv to the list of
10200         architectures that have a save_reggroup.
10201
10202 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10203
10204         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10205         value is not a dynamic class object.
10206
10207 2018-03-06  Tom Tromey  <tom@tromey.com>
10208
10209         * rust-exp.y: Formatting fixes.
10210
10211 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10212
10213         * riscv-tdep.c (riscv_register_name): Remove target description
10214         support.
10215         (riscv_gdbarch_init): Remove target description check.
10216
10217 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10218
10219         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10220         comment.
10221         * riscv-tdep.h: Likewise.
10222
10223 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10224
10225         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10226         (riscv_pseudo_register_write): Delete.
10227         (riscv_gdbarch_init): Remove all use of pseudo registers.
10228
10229 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10230
10231         * record-btrace.c (btrace_print_lines): Replace cleanup
10232         parameter with RAII equivalents.
10233         (btrace_insn_history): Replace cleanup with RAII equivalents.
10234         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10235         make_cleanup_ui_out_tuple_begin_end): Remove.
10236         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10237         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10238         make_cleanup_ui_out_list_begin_end): Remove.
10239
10240 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10241
10242         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10243         parameter types to std::vector.  Use bool.
10244         (record_btrace_wait): Replace VEC(tp_t) with
10245         std::vector<thread_info *>.
10246         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10247
10248 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10249
10250         * record-btrace.c (record_btrace_disable_callback): Remove.
10251         (struct scoped_btrace_disable): New.
10252         (record_btrace_open): Use scoped_btrace_disable.
10253
10254 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10255
10256         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10257         reading values from registers.
10258
10259 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10260
10261         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10262         where appropriate.
10263
10264 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10265
10266         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10267         change parameter type.  Use GDB's print functions, and use
10268         core_addr_to_string where appropriate.
10269         (riscv_push_dummy_call): Use core_addr_to_string where
10270         appropriate, update call to riscv_print_arg_location, and reindent
10271         a few lines.
10272         (riscv_return_value): Update call to riscv_print_arg_location.
10273
10274 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10275             Tim Newsome <tim@sifive.com>
10276             Albert Ou <a0u@eecs.berkeley.edu>
10277             Darius Rad <darius@bluespec.com>
10278
10279         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10280         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10281         (ALLDEPFILES): Add riscv-tdep.c
10282         * configure.tgt: Add riscv support.
10283         * riscv-tdep.c: New file.
10284         * riscv-tdep.h: New file.
10285         * NEWS: Mention new target.
10286         * MAINTAINERS: Add entry for riscv.
10287
10288 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10289
10290         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10291         fields within aggregates.
10292
10293 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10294
10295         * record-btrace.c (btrace_print_lines): Change type of flags to
10296         gdb_disassembly_flags.
10297
10298 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10299
10300         * fbsd-nat.c: Include "inf-ptrace.h".
10301         (USE_SIGTRAP_SIGINFO): Conditionally define.
10302         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10303         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10304         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10305         function.
10306         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10307         Likewise.
10308         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10309         Likewise.
10310         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10311         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10312         "supports_stopped_by_hw_breakpoint" target methods.
10313
10314 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10315
10316         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10317         * fbsd-nat.c (debug_fbsd_nat): New variable.
10318         (show_fbsd_nat_debug): New function.
10319         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10320         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10321
10322 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10323
10324         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10325         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10326         prototype.
10327         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10328         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10329         method.
10330
10331 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10332
10333         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10334         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10335
10336 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10337
10338         * charset.c (struct charset_vector): New.
10339         (charsets): Change type to charset_vector.
10340         (find_charset_names): Adjust.
10341         (add_one): Adjust.
10342         (_initialize_charset): Adjust.
10343
10344 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10345
10346         * progspace.h (struct program_space) <deleted_solibs>: Change
10347         type to std::vector<std::string>.
10348         * progspace.c (clear_program_space_solib_cache): Adjust.
10349         * breakpoint.c (print_solib_event): Adjust.
10350         (check_status_catch_solib): Adjust.
10351         * solib.c (update_solib_list): Adjust.
10352         * ui-out.h (class ui_out) <field_string>: New overload.
10353         * ui-out.c (ui_out::field_string): New overload.
10354
10355 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10356
10357         * progspace.h (struct program_space): Add constructor and
10358         destructor, initialize fields.
10359         (add_program_space): Remove.
10360         * progspace.c (add_program_space): Rename to...
10361         (program_space::program_space): ... this.
10362         (release_program_space): Rename to...
10363         (program_space::~program_space): ... this.
10364         (delete_program_space): Use delete to delete program_space.
10365         (initialize_progspace): Use new to allocate program_space.
10366         * inferior.c (add_inferior_with_spaces): Likewise.
10367         (clone_inferior_command): Likewise.
10368         * infrun.c (follow_fork_inferior): Likewise.
10369         (handle_vfork_child_exec_or_exit): Likewise.
10370
10371 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10372
10373         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10374         (delim_string_to_char_ptr_vec): Return std::vector of
10375         gdb::unique_xmalloc_ptr.
10376         (dirnames_to_char_ptr_vec_append): Take std::vector of
10377         gdb::unique_xmalloc_ptr.
10378         (dirnames_to_char_ptr_vec): Return std::vector of
10379         gdb::unique_xmalloc_ptr.
10380         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10381         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10382         (delim_string_to_char_ptr_vec): Return an std::vector of
10383         gdb::unique_xmalloc_ptr, adjust the code.
10384         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10385         gdb::unique_xmalloc_ptr, adjust the code.
10386         (dirnames_to_char_ptr_vec): Return an std::vector of
10387         gdb::unique_xmalloc_ptr, adjust the code.
10388         * auto-load.c (auto_load_safe_path_vec): Change type to
10389         std::vector of gdb::unique_xmalloc_ptr.
10390         (auto_load_expand_dir_vars): Return an std::vector of
10391         gdb::unique_xmalloc_ptr, adjust the code.
10392         (auto_load_safe_path_vec_update): Adjust.
10393         (filename_is_in_auto_load_safe_path_vec): Adjust.
10394         (auto_load_objfile_script_1): Adjust.
10395         * build-id.c (build_id_to_debug_bfd): Adjust.
10396         * linux-thread-db.c (thread_db_load_search): Adjust.
10397         * source.c (add_path): Adjust.
10398         (openp): Adjust.
10399         * symfile.c (find_separate_debug_file): Adjust.
10400         * utils.c (do_free_char_ptr_vec): Remove.
10401         (make_cleanup_free_char_ptr_vec): Remove.
10402
10403 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10404
10405         PR gdb/22907
10406         * common/pathstuff.c: Conditionally include "<windows.h>".
10407
10408 2018-03-01  Georg Sauthoff  <mail@georg.so>
10409
10410         PR gdb/22888
10411         * gcore.in: Quote variables and switch interpreter to bash.
10412
10413 2018-03-01  Tom Tromey  <tom@tromey.com>
10414
10415         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10416         assertion.  Add assertion for discriminant_index.
10417         (quirk_rust_enum): Use correct base type name in univariant case.
10418
10419 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10420
10421         * record.c (get_call_history_modifiers): Return a
10422         record_print_flags.
10423         (cmd_record_call_history): Adjust.
10424         * record-btrace.c (record_btrace_call_history): Adjust.
10425         (record_btrace_call_history_range): Adjust.
10426         (record_btrace_call_history_from): Adjust.
10427         * target-debug.h (target_debug_print_record_print_flags): New.
10428         * target-delegates.c: Re-generate.
10429         * target.c (target_call_history): Change flags type.
10430         (target_call_history_from): Likewise.
10431         (target_call_history_range): Likewise.
10432         * target.h (struct target_ops) <target_call_history>: Likewise.
10433         (target_call_history_from): Likewise.
10434         (target_call_history_range): Likewise.
10435
10436 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10437             Simon Marchi  <simon.marchi@polymtl.ca>
10438
10439         * common/common-utils.c: Include "sys/stat.h".
10440         (is_regular_file): Move here from "source.c"; change return
10441         type to "bool".
10442         * common/common-utils.h (is_regular_file): New prototype.
10443         * common/pathstuff.c (contains_dir_separator): New function.
10444         * common/pathstuff.h (contains_dir_separator): New prototype.
10445         * source.c: Don't include "sys/stat.h".
10446         (is_regular_file): Move to "common/common-utils.c".
10447
10448 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10449
10450         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10451         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10452         * auto-load.c: Include "common/pathstuff.h".
10453         * common/common-def.h (current_directory): Move here.
10454         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10455         function.
10456         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10457         prototype.
10458         * common/pathstuff.c: New file.
10459         * common/pathstuff.h: New file.
10460         * compile/compile.c: Include "common/pathstuff.h".
10461         * defs.h (current_directory): Move to "common/common-defs.h".
10462         * dwarf2read.c: Include "common/pathstuff.h".
10463         * exec.c: Likewise.
10464         * guile/scm-safe-call.c: Likewise.
10465         * linux-thread-db.c: Likewise.
10466         * main.c: Likewise.
10467         * nto-tdep.c: Likewise.
10468         * objfiles.c: Likewise.
10469         * source.c: Likewise.
10470         * symtab.c: Likewise.
10471         * utils.c: Include "common/pathstuff.h".
10472         (gdb_realpath): Move to "common/pathstuff.c".
10473         (gdb_realpath_keepfile): Likewise.
10474         (gdb_abspath): Likewise.
10475         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10476         (gdb_realpath_keepfile): Likewise.
10477         (gdb_abspath): Likewise.
10478
10479 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10480
10481         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10482         wildcard process pid for super_resume for kernels with a
10483         specific bug.
10484
10485 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10486
10487         * compile/compile.c (get_args): Add additional comments
10488         explaining function.
10489
10490 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10491             Tom Tromey  <tom@tromey.com>
10492
10493         * target.h (memory_write_request_s): Remove typedef.  Don't define
10494         VEC.
10495         (target_write_memory_blocks): Change argument to std::vector.
10496         (struct memory_write_request): Add constructor.
10497         * target-memory.c (compare_block_starting_address): Return bool.
10498         Change argument types.
10499         (claim_memory): Change arguments to use std::vector.
10500         (split_regular_and_flash_blocks, blocks_to_erase)
10501         (compute_garbled_blocks): Likewise.
10502         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10503         (target_write_memory_blocks): Change argument to std::vector.
10504         * symfile.c (struct load_section_data): Add constructor and
10505         destructor.  Use std::vector for "requests".
10506         (struct load_progress_data): Add initializers.
10507         (load_section_callback): Update.  Use "new".
10508         (clear_memory_write_data): Remove.
10509         (generic_load): Update.
10510
10511 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10512
10513         * arch/aarch64.h: Use common/tdesc.h.
10514
10515 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10516
10517         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10518         architecture with a 64-bit ABI.
10519
10520 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10521
10522         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10523         ahead of target description loading.
10524
10525 2018-02-26  Tom Tromey  <tom@tromey.com>
10526
10527         * stack.c (backtrace_command_1): Update.
10528         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10529         of "flags".
10530         * python/py-framefilter.c (py_print_frame)
10531         (gdbpy_apply_frame_filter): Change type of "flags".
10532         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10533         of "flags".
10534         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10535         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10536         * extension.h (enum frame_filter_flag): Rename from
10537         frame_filter_flags.
10538         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10539         (apply_ext_lang_frame_filter): Change type of "flags".
10540         * extension.c (apply_ext_lang_frame_filter): Change type of
10541         "flags".
10542         * extension-priv.h (struct extension_language_ops)
10543         <apply_frame_filter>: Change type of "flags".
10544
10545 2018-02-26  Tom Tromey  <tom@tromey.com>
10546
10547         PR python/16497:
10548         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10549         off-by-one in py_end computation.
10550         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10551         PRINT_MORE_FRAMES.
10552         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10553         constant.
10554
10555 2018-02-26  Tom Tromey  <tom@tromey.com>
10556
10557         * dwarf2read.c (struct variant_field): New.
10558         (struct nextfield) <variant>: New field.
10559         (dwarf2_add_field): Handle DW_TAG_variant_part.
10560         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10561         discriminated union.
10562         (read_structure_type): Handle DW_TAG_variant_part.
10563         (handle_struct_member_die): New function, extracted from
10564         process_structure_scope.  Handle DW_TAG_variant.
10565         (process_structure_scope): Handle discriminated unions.  Call
10566         handle_struct_member_die.
10567
10568 2018-02-26  Tom Tromey  <tom@tromey.com>
10569
10570         * rust-lang.h (rust_last_path_segment): Declare.
10571         * rust-lang.c (rust_last_path_segment): Now public.  Change
10572         contract.
10573         (struct disr_info): Remove.
10574         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10575         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10576         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10577         (rust_enum_p, rust_enum_variant): New function.
10578         (rust_underscore_fields): Remove "offset" parameter.
10579         (rust_print_enum): New function.
10580         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10581         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10582         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10583         enums.
10584         (rust_internal_print_type): New function, from rust_print_type.
10585         Remove enum code.
10586         (rust_print_type): Call rust_internal_print_type.
10587         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10588         Update enum handling.
10589         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10590         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10591         (rust_union_quirks): New functions.
10592         (process_full_comp_unit, process_full_type_unit): Call
10593         rust_union_quirks.
10594         (process_structure_scope): Update rust_unions if necessary.
10595
10596 2018-02-26  Tom Tromey  <tom@tromey.com>
10597
10598         * value.h (value_union_variant): Declare.
10599         * valops.c (value_union_variant): New function.
10600         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10601         (struct discriminant_info): New.
10602         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10603         enumerator.
10604         (struct main_type) <flag_discriminated_union>: New field.
10605
10606 2018-02-26  Tom Tromey  <tom@tromey.com>
10607
10608         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10609         unittests/unpack-selftests.c.
10610         * unittests/unpack-selftests.c: New file.
10611         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10612
10613 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10614
10615         * dwarf2read.c (struct partial_die_info) <read>: New method.
10616         (read_partial_die): Remove the declaration.
10617         (load_partial_dies): Update.
10618         (partial_die_info::partial_die_info):
10619         (read_partial_die): Change it to partial_die_info::read.
10620
10621 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10622
10623         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10624         (fixup_partial_die): Remove declaration.
10625         (scan_partial_symbols): Update.
10626         (partial_die_parent_scope): Likewise.
10627         (partial_die_full_name): Likewise.
10628         (fixup_partial_die): Change it to partial_die_info::fixup.
10629
10630 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10631
10632         * dwarf2read.c (read_partial_die): Update the declaration.
10633         (load_partial_dies): Caller update.
10634         (read_partial_die): Remove one argument abbrev_len.
10635
10636 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10637
10638         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10639         assignment operator.
10640         (load_partial_dies): Use ctor and copy ctor.
10641         (read_partial_die): Update.
10642         (dwarf2_cu::find_partial_die): Use ctor.
10643
10644 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10645
10646         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10647         (find_partial_die_in_comp_unit): Change it to
10648         dwarf2_cu::find_partial_die.
10649         (find_partial_die): Update.
10650
10651 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10652
10653         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10654         is NULL.
10655
10656 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10657
10658         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10659
10660 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10661
10662         * arch/amd64.h: Use common/tdesc.h.
10663         * arch/i386.c: Likewise.
10664         * arch/i386.h: Likewise.
10665         * arch/tic6x.c: Likewise.
10666         * arch/tdesc.h: Move file from here...
10667         * common/tdesc.h: ...to here.
10668         * features/aarch64-core.c: Regenerate.
10669         * features/aarch64-fpu.c: Regenerate.
10670         * features/i386/32bit-avx.c: Regenerate.
10671         * features/i386/32bit-avx512.c: Regenerate.
10672         * features/i386/32bit-core.c: Regenerate.
10673         * features/i386/32bit-linux.c: Regenerate.
10674         * features/i386/32bit-mpx.c: Regenerate.
10675         * features/i386/32bit-pkeys.c: Regenerate.
10676         * features/i386/32bit-sse.c: Regenerate.
10677         * features/i386/64bit-avx.c: Regenerate.
10678         * features/i386/64bit-avx512.c: Regenerate.
10679         * features/i386/64bit-core.c: Regenerate.
10680         * features/i386/64bit-linux.c: Regenerate.
10681         * features/i386/64bit-mpx.c: Regenerate.
10682         * features/i386/64bit-pkeys.c: Regenerate.
10683         * features/i386/64bit-segments.c: Regenerate.
10684         * features/i386/64bit-sse.c: Regenerate.
10685         * features/i386/x32-core.c: Regenerate.
10686         * features/tic6x-c6xp.c: Regenerate.
10687         * features/tic6x-core.c: Regenerate.
10688         * features/tic6x-gp.c: Regenerate.
10689         * target-descriptions.c: Use common/tdesc.h.
10690         * target-descriptions.h: Likewise.
10691
10692 2018-02-24  Tom Tromey  <tom@tromey.com>
10693
10694         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10695         (try_thread_db_load_from_dir, thread_db_load_search): Use
10696         std::string.
10697         (info_auto_load_libthread_db_compare): Return bool.  Change
10698         argument types.
10699         (info_auto_load_libthread_db): Use std::vector, std::string.
10700         Remove cleanups.
10701
10702 2018-02-24  Tom Tromey  <tom@tromey.com>
10703
10704         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10705         std::string.
10706         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10707         std::string*.
10708         * gdbarch.c: Rebuild.
10709         * gdbarch.h: Rebuild.
10710         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10711         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10712         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10713         std::string*.
10714
10715 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10716
10717         * gdbtypes.h (sect_offset): Change type to uint64_t.
10718         (sect_offset_str): New function.
10719         * dwarf2read.c (create_addrmap_from_aranges): Use
10720         sect_offset_str.
10721         (error_check_comp_unit_head): Likewise.
10722         (create_debug_type_hash_table): Likewise.
10723         (read_cutu_die_from_dwo): Likewise.
10724         (init_cutu_and_read_dies): Likewise.
10725         (init_cutu_and_read_dies_no_follow): Likewise.
10726         (process_psymtab_comp_unit_reader): Likewise.
10727         (partial_die_parent_scope): Likewise.
10728         (peek_die_abbrev): Likewise.
10729         (process_queue): Likewise.
10730         (dwarf2_physname): Likewise.
10731         (read_namespace_alias): Likewise.
10732         (read_import_statement): Likewise.
10733         (create_dwo_cu_reader): Likewise.
10734         (create_cus_hash_table): Likewise.
10735         (lookup_dwo_cutu): Likewise.
10736         (inherit_abstract_dies): Likewise.
10737         (read_func_scope): Likewise.
10738         (read_call_site_scope): Likewise.
10739         (dwarf2_add_member_fn): Likewise.
10740         (read_common_block): Likewise.
10741         (read_module_type): Likewise.
10742         (read_typedef): Likewise.
10743         (read_subrange_type): Likewise.
10744         (load_partial_dies): Likewise.
10745         (read_partial_die): Likewise.
10746         (find_partial_die): Likewise.
10747         (read_str_index): Likewise.
10748         (dwarf2_string_attr): Likewise.
10749         (build_error_marker_type): Likewise.
10750         (lookup_die_type): Likewise.
10751         (dump_die_shallow): Likewise.
10752         (follow_die_ref): Likewise.
10753         (dwarf2_fetch_die_loc_sect_off): Likewise.
10754         (dwarf2_fetch_constant_bytes): Likewise.
10755         (follow_die_sig): Likewise.
10756         (get_signatured_type): Likewise.
10757         (get_DW_AT_signature_type): Likewise.
10758         (dwarf2_find_containing_comp_unit): Likewise.
10759         (set_die_type): Likewise.
10760
10761 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10762
10763         * arch/aarch64.c: Include "common-defs.h".
10764         * arch/amd64.c: Likewise.
10765         * arch/i386.c: Likewise.
10766
10767 2018-02-21  Tom Tromey  <tom@tromey.com>
10768
10769         * value.h: (extract_field_op): Update.
10770         * eval.c (extract_field_op): Return a const char *.
10771         * expression.h (parse_expression_for_completion): Update.
10772         * completer.c (complete_expression): Update.
10773         (add_struct_fields): Make fieldname const.
10774         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10775         (mark_completion_tag, parse_exp_in_context_1): Update.
10776         (parse_expression_for_completion): Change "name" to
10777         unique_xmalloc_ptr*.
10778
10779 2018-02-21  Tom Tromey  <tom@tromey.com>
10780
10781         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10782
10783 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10784
10785         * avr-tdep.c (avr_read_pc): Change parameter type to
10786         readable_regcache.
10787         * gdbarch.sh (read_pc): Likewise.
10788         * gdbarch.c: Re-generated.
10789         * gdbarch.h: Re-generated.
10790         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10791         readable_regcache.
10792         * ia64-tdep.c (ia64_read_pc): Likewise.
10793         * mips-tdep.c (mips_read_pc): Likewise.
10794         * spu-tdep.c (spu_read_pc): Likewise.
10795
10796 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10797
10798         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10799         * regcache-dump.c: New file.
10800         * regcache.c: Move register_dump to regcache-dump.c.
10801         (maintenance_print_registers): Likewise.
10802         (maintenance_print_raw_registers): Likewise.
10803         (maintenance_print_cooked_registers): Likewise.
10804         (maintenance_print_register_groups): Likewise.
10805         (maintenance_print_remote_registers): Likewise.
10806         (_initialize_regcache): Likewise.
10807         * regcache.h (register_dump): Moved from regcache.c.
10808
10809 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10810
10811         * regcache.c (regcache::regcache): Update.
10812         (regcache::invalidate): Move it to detached_regcache::invalidate.
10813         (get_thread_arch_aspace_regcache): Update.
10814         (regcache::raw_update): Update.
10815         (regcache::cooked_read): Remove some code.
10816         (regcache::cooked_read_value): Likewise.
10817         (regcache::raw_write): Remove assert on m_readonly_p.
10818         (regcache::raw_supply_integer): Move it to
10819         detached_regcache::raw_supply_integer.
10820         (regcache::raw_supply_zeroed): Likewise.
10821         * regcache.h (detached_regcache) <raw_supply_integer>: New
10822         declaration.
10823         <raw_supply_zeroed, invalidate>: Likewise.
10824         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10825         <invalidate>: Likewise.
10826         <m_readonly_p>: Removed.
10827
10828 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10829
10830         * infcmd.c (get_return_value): Let stop_regs point to
10831         get_current_regcache.
10832         * regcache.c (regcache::regcache): Remove.
10833         (register_dump_reg_buffer): New class.
10834         (regcache_print): Adjust.
10835         * regcache.h (regcache): Remove constructors.
10836
10837 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10838
10839         * regcache.c (class register_dump): New class.
10840         (register_dump_regcache, register_dump_none): New class.
10841         (register_dump_remote, register_dump_groups): New class.
10842         (regcache_print): Update.
10843         * regcache.h (regcache_dump_what): Move it to regcache.c.
10844         (regcache) <dump>: Remove.
10845
10846 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10847
10848         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10849          reg_buffer_rw *.
10850         (jit_unwind_reg_set_impl): Call raw_supply.
10851         (jit_frame_sniffer): Use reg_buffer_rw.
10852         * record-full.c (record_full_core_regbuf): Change its type.
10853         (record_full_core_open_1): Use reg_buffer_rw.
10854         (record_full_close): Likewise.
10855         (record_full_core_fetch_registers): Use regcache->raw_supply.
10856         (record_full_core_store_registers): Likewise.
10857         * regcache.c (regcache::get_register_status): Move it to
10858         reg_buffer.
10859         (regcache_raw_set_cached_value): Remove.
10860         (regcache::raw_set_cached_value): Remove.
10861         (regcache::raw_write): Call raw_supply.
10862         (regcache::raw_supply): Move it to reg_buffer_rw.
10863         * regcache.h (regcache_raw_set_cached_value): Remove.
10864         (reg_buffer_rw): New class.
10865
10866 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10867
10868         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10869         readonly_detached_regcache.
10870         (dummy_frame_prev_register): Use regcache->cooked_read.
10871         * frame.c (frame_save_as_regcache): Change return type.
10872         (frame_pop): Update.
10873         * frame.h (frame_save_as_regcache): Update declaration.
10874         * inferior.h (get_infcall_suspend_state_regcache): Update
10875         declaration.
10876         * infrun.c (infcall_suspend_state) <registers>: use
10877         readonly_detached_regcache.
10878         (save_infcall_suspend_state): Don't use regcache_dup.
10879         (get_infcall_suspend_state_regcache): Change return type.
10880         * linux-fork.c (struct fork_info) <savedregs>: Change to
10881         readonly_detached_regcache.
10882         <pc>: New field.
10883         (fork_save_infrun_state): Don't use regcache_dup.
10884         (info_checkpoints_command): Adjust.
10885         * mi/mi-main.c (register_changed_p): Update declaration.
10886         (mi_cmd_data_list_changed_registers): Use
10887         readonly_detached_regcache.
10888         (register_changed_p): Change parameter type to
10889         readonly_detached_regcache.
10890         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10891         readonly_detached_regcache.
10892         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10893         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10894         New.
10895         (regcache::save): Move it to reg_buffer.
10896         (regcache::restore): Change parameter type.
10897         (regcache_dup): Remove.
10898         * regcache.h (reg_buffer) <save>: New method.
10899         (readonly_detached_regcache): New class.
10900         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10901         readonly_detached_regcache.
10902         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10903
10904 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10905
10906         * frame.c (frame_save_as_regcache): Use regcache method save.
10907         (frame_pop): Use regcache method restore.
10908         * infrun.c (restore_infcall_suspend_state): Likewise.
10909         * linux-fork.c (fork_load_infrun_state): Likewise.
10910         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10911         save.
10912         * regcache.c (regcache_save): Remove.
10913         (regcache::restore): More asserts.
10914         (regcache_cpy): Remove.
10915         * regcache.h (regcache_save): Remove the declaration.
10916         (regcache::restore): Move from private to public.
10917         Remove the friend declaration of regcache_cpy.
10918         (regcache_cpy): Remove declaration.
10919
10920 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10921
10922         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10923         parameter type to 'readable_regcache *'.
10924         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10925         * arm-tdep.c (arm_neon_quad_read): Likewise.
10926         (arm_pseudo_read): Likewise.
10927         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10928         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10929         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10930         * gdbarch.c: Re-generated.
10931         * gdbarch.h: Re-generated.
10932         * gdbarch.sh (pseudo_register_read): Change parameter type to
10933         'readable_regcache *'.
10934         (pseudo_register_read_value): Likewise.
10935         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10936         (h8300_pseudo_register_read): Likewise.
10937         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10938         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10939         (i386_pseudo_register_read_into_value): Likewise.
10940         (i386_pseudo_register_read_value): Likewise.
10941         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10942         declaration.
10943         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10944         * m32c-tdep.c (m32c_raw_read): Likewise.
10945         (m32c_read_flg): Likewise.
10946         (m32c_banked_register): Likewise.
10947         (m32c_banked_read): Likewise.
10948         (m32c_sb_read): Likewise.
10949         (m32c_part_read): Likewise.
10950         (m32c_cat_read): Likewise.
10951         (m32c_r3r2r1r0_read): Likewise.
10952         (m32c_pseudo_register_read): Likewise.
10953         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10954         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10955         (mep_pseudo_cr64_read): Likewise.
10956         (mep_pseudo_register_read): Likewise.
10957         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10958         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10959         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10960         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10961         (regcache::cooked_read): Likewise.
10962         (regcache::cooked_read_value): Likewise.
10963         (regcache_cooked_read_signed):
10964         (regcache::cooked_read): Likewise.
10965         * regcache.h (readable_regcache): New class.
10966         (regcache): Inherit readable_regcache.  Move some methods to
10967         readable_regcache.
10968         * rl78-tdep.c (rl78_pseudo_register_read): Change
10969         parameter type to 'readable_regcache *'.
10970         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10971         (e500_pseudo_register_read): Change parameter type to
10972         'readable_regcache *'.
10973         (dfp_pseudo_register_read): Likewise.
10974         (vsx_pseudo_register_read): Likewise.
10975         (efpr_pseudo_register_read): Likewise.
10976         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10977         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10978         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10979         (sh64_pseudo_register_read): Likewise.
10980         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10981         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10982         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10983         (spu_pseudo_register_read): Likewise.
10984         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10985         (xtensa_pseudo_register_read): Likewise.
10986
10987 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10988
10989         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10990         (regcache::arch): Move it to reg_buffer::arch.
10991         (regcache::register_buffer): Likewise.
10992         (regcache::assert_regnum): Likewise.
10993         (regcache::num_raw_registers): Likewise.
10994         * regcache.h (reg_buffer): New class.
10995         (regcache): Inherit reg_buffer.
10996
10997 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10998
10999         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11000         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11001
11002 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11003
11004         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11005
11006 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11007
11008         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11009         (SFILES): Remove common/*.c files.
11010         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11011         * common/common.host: Add common reference.
11012         * configure.ac: Likewise.
11013         * configure: Regenerate.
11014
11015 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11016
11017         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11018         (block_initialize_namespace): Use new.
11019         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11020         (dwarf2_free_objfile): Use delete.
11021         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11022         (copy_type_recursive): Use new.
11023         * gdb_obstack.h (allocate_on_obstack): New.
11024
11025 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11026
11027         PR gdb/22849
11028         * inferior.c (exit_inferior_1): Reset inf->control.
11029
11030 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11031
11032         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11033         declaration.
11034
11035 2018-02-14  Pedro Alves  <palves@redhat.com>
11036
11037         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11038         frame_cleanup_after_sniffer on exception.
11039
11040 2018-02-14  Tom Tromey  <tom@tromey.com>
11041
11042         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11043         const.
11044         (solib_bfd_open): Make pathname const.
11045         * solib.c (solib_bfd_open): Make pathname const.
11046         * solib-spu.c (spu_bfd_fopen): Make name const.
11047         (spu_bfd_open): Make pathname const.
11048         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11049         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11050
11051 2018-02-14  Tom Tromey  <tom@tromey.com>
11052
11053         * symfile.c (symfile_bfd_open): Update.
11054         * source.h (openp, source_full_path_of, find_and_open_source):
11055         Change argument type to unique_xmalloc_ptr.
11056         * source.c (openp): Take a unique_xmalloc_ptr.
11057         (source_full_path_of, find_and_open_source): Likewise.
11058         (open_source_file, symtab_to_fullname): Update.
11059         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11060         unique_xmalloc_ptr.
11061         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11062         (exec_file_find): Update.
11063         * psymtab.c (psymtab_to_fullname): Update.
11064         * nto-tdep.h (nto_find_and_open_solib): Update.
11065         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11066         unique_xmalloc_ptr.
11067         * exec.c (exec_file_attach): Update.
11068         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11069         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11070
11071 2018-02-14  Tom Tromey  <tom@tromey.com>
11072
11073         * solib.c: Include source.h.
11074         * nto-tdep.c: Include source.h.
11075         * mi/mi-cmd-env.c: Include source.h.
11076         * infcmd.c: Include source.h.
11077         * exec.c: Include source.h.
11078         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11079         (add_path, directory_switch, source_path, init_source_path): Move
11080         declarations...
11081         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11082         (add_path, directory_switch, source_path, init_source_path):
11083         ...here.
11084
11085 2018-02-14  Tom Tromey  <tom@tromey.com>
11086
11087         * solist.h (exec_file_find, solib_find): Return
11088         unique_xmalloc_ptr.
11089         (solib_bfd_fopen): Take a const char *.
11090         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11091         (exec_file_find, solib_find): Likewise.
11092         (solib_bfd_fopen): Do not take ownership of "pathname".
11093         (solib_bfd_open): Use unique_xmalloc_ptr.
11094         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11095         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11096         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11097         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11098
11099 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11100
11101         * ada-lang.c (name_match_type_from_name): Remove reference to
11102         ada_name_for_lookup in function's documentation.
11103         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11104
11105 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11106
11107         * defs.h (enum openp_flags): New enum.
11108         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11109         Move to enum openp_flags.
11110         (openp_flags): New enum flags.
11111         (openp): Change parameter type to openp_flags.
11112         * source.c (openp): Change parameter type to openp_flags.
11113         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11114         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11115
11116 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11117
11118         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11119         per-command.
11120
11121 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11122
11123         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11124         into...
11125         (class dwarf2_queue_guard): ...the destructor of this new class.
11126         (dw2_do_instantiate_symtab): Create instance of the new class
11127         dwarf2_queue_guard, remove cleanup.
11128
11129 2018-02-09  Tom Tromey  <tom@tromey.com>
11130
11131         * source.c (find_source_lines): Don't reference past the end of
11132         the vector.
11133
11134 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11135
11136         * remote.c (remote_btrace_maybe_reopen): Change error message.
11137         * btrace.c (btrace_enable): Likewise.
11138         (parse_xml_btrace): Likewise.
11139         (parse_xml_btrace_conf): Likewise.
11140
11141 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11142
11143         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11144         (linux_enable_pt, linux_enable_bts): Call
11145         diagnose_perf_event_open_fail.
11146
11147 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11148
11149         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11150         Remove parameter and change return type.  Update callers.  Move it.
11151         (linux_enable_bts, linux_enable_pt): Improve error message.
11152         (linux_enable_pt): Remove zero buffer size check.
11153         (linux_enable_btrace): Improve error messages.  Remove NULL return
11154         check.
11155
11156 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11157
11158         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11159         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11160         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11161         (linux_supports_pt, linux_supports_btrace): Remove.
11162         (linux_enable_bts): Call cpu_supports_bts.
11163         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11164         * remote.c (remote_supports_btrace): Remove.
11165         (init_remote_ops): Remove remote_supports_btrace.
11166         * target-delegates.c: Regenerated.
11167         * target.c (target_supports_btrace): Remove.
11168         * target.h (target_ops) <to_supports_btrace>: Remove
11169         (target_supports_btrace): Remove.
11170         * x86-linux-nat.c (x86_linux_create_target): Remove
11171         linux_supports_btrace.
11172
11173 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11174
11175         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11176         btrace failed.
11177         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11178         exception and use message in own exception.
11179
11180 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11181
11182         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11183         (perf_event_pt_event_type): Use gdb_file_up.
11184         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11185         scoped_fd, and scoped_mmap.
11186
11187 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11188
11189         * common/scoped_mmap.h: New.
11190         * unittests/scoped_mmap-selftest.c: New.
11191         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11192         unittests/scoped_mmap-selftest.c.
11193
11194 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11195
11196         * common/scoped_fd.h: New.
11197         * unittests/scoped_fd-selftest.c: New.
11198         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11199         unittests/scoped_fd-selftest.c.
11200
11201 2018-02-09  Tom Tromey  <tom@tromey.com>
11202
11203         * auto-load.c (auto_load_section_scripts): Use
11204         gdb::unique_xmalloc_ptr.
11205
11206 2018-02-09  Tom Tromey  <tom@tromey.com>
11207
11208         * auto-load.c (execute_script_contents): Use std::string.
11209
11210 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11211
11212         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11213         Python function, rather than a new command.
11214
11215 2018-02-08  Tom Tromey  <tom@tromey.com>
11216
11217         * solib.c (solib_find_1): Use std::string.
11218         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11219
11220 2018-02-08  Tom Tromey  <tom@tromey.com>
11221
11222         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11223
11224 2018-02-08  Tom Tromey  <tom@tromey.com>
11225
11226         * source.c (find_source_lines): Use gdb::def_vector.
11227
11228 2018-02-08  Tom Tromey  <tom@tromey.com>
11229
11230         * macrocmd.c (struct temporary_macro_definition): New.
11231         (macro_define_command): Use temporary_macro_definition.  Remove
11232         cleanups.
11233         (free_macro_definition_ptr): Remove.
11234
11235 2018-02-08  Tom Tromey  <tom@tromey.com>
11236
11237         * macroexp.c (maybe_expand): Use std::string.
11238
11239 2018-02-08  Tom Tromey  <tom@tromey.com>
11240
11241         * macroexp.c (struct macro_buffer): Add initializers for some
11242         members.
11243         (init_buffer, init_shared_buffer, free_buffer)
11244         (free_buffer_return_text): Remove.
11245         (macro_buffer): New constructors.
11246         (~macro_buffer): New destructor.
11247         (macro_buffer::set_shared): New method.
11248         (macro_buffer::resize_buffer, macro_buffer::appendc)
11249         (macro_buffer::appendmem): Now methods, not free functions.
11250         (set_token, append_tokens_without_splicing, stringify)
11251         (macro_stringify): Update.
11252         (gather_arguments): Change return type.  Remove argc_p argument,
11253         add args_ptr argument.  Use std::vector.
11254         (substitute_args): Remove argc argument.  Accept std::vector.
11255         (expand): Update.  Use std::vector.
11256         (scan, macro_expand, macro_expand_next): Update.
11257
11258 2018-02-08  Tom Tromey  <tom@tromey.com>
11259
11260         * symtab.c (default_collect_symbol_completion_matches_break_on):
11261         Use unique_xmalloc_ptr.
11262         * macroscope.h: (sal_macro_scope, user_macro_scope)
11263         (default_macro_scope): Return unique_xmalloc_ptr.
11264         * macroscope.c (sal_macro_scope, user_macro_scope)
11265         (default_macro_scope): Return unique_xmalloc_ptr.
11266         * macroexp.h (macro_expand, macro_expand_once): Return
11267         unique_xmalloc_ptr.
11268         * macroexp.c (macro_expand, macro_expand_once): Return
11269         unique_xmalloc_ptr.
11270         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11271         (info_macro_command, info_macros_command): Use
11272         unique_xmalloc_ptr.
11273         * compile/compile-c-support.c (write_macro_definitions): Use
11274         unique_xmalloc_ptr.
11275         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11276
11277 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11278
11279         * value.c (value_static_field): Assign field type instead of
11280         containing type when returning an optimized out value.
11281
11282 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11283
11284         * ft32-tdep.c (ft32_read_pc): Remove.
11285         (ft32_write_pc): Remove.
11286         (ft32_gdbarch_init): Update.
11287         * m32r-tdep.c (m32r_read_pc): Remove.
11288         (m32r_gdbarch_init): Update.
11289         * mep-tdep.c (mep_read_pc): Remove.
11290         (mep_gdbarch_init): Update.
11291         * microblaze-tdep.c (microblaze_write_pc): Remove.
11292         (microblaze_gdbarch_init): Update.
11293         * mn10300-tdep.c (mn10300_read_pc): Remove.
11294         (mn10300_write_pc): Remove.
11295         (mn10300_gdbarch_init): Update.
11296         * moxie-tdep.c (moxie_read_pc): Remove.
11297         (moxie_write_pc): Remove.
11298         (moxie_gdbarch_init): Update.
11299
11300 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11301
11302         * expprint.c (print_subexp_standard): Handle
11303         OP_F77_UNDETERMINED_ARGLIST.
11304         (dump_subexp_body_standard): Likewise.
11305
11306 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11307
11308         * target-descriptions.c (tdesc_element_visitor) Add empty
11309         implementations.
11310         (tdesc_type): Move make_gdb_type from here.
11311         (tdesc_type_builtin): Likewise.
11312         (tdesc_type_vector): Likewise.
11313         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11314         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11315         (make_gdb_type_union): Likewise.
11316         (make_gdb_type_flags): Likewise.
11317         (make_gdb_type_enum): Likewise.
11318         (make_gdb_type): New function.
11319         (tdesc_register_type): Use static make_gdb_type.
11320
11321 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11322
11323         * infcmd.c (default_print_one_register_info): Align natural-format
11324         column values consistently one under another.
11325         (pad_to_column): New function.
11326
11327 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11328
11329         * dwarf2read.c (dwarf2_physname): Move commment.
11330
11331 2018-02-01  Leszek Swirski  <leszeks@google.com>
11332
11333         * varobj.c (varobj_formatted_print_options): Allow recursive
11334         pretty printing if pretty printing is enabled.
11335
11336 2018-02-01  Leszek Swirski  <leszeks@google.com>
11337
11338         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11339         names after a structop as a filename.
11340
11341 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11342
11343         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11344         (arm_record_coproc_data_proc): Likewise.
11345
11346 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11347
11348         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11349
11350 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11351
11352         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11353         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11354
11355 2018-01-31  Pedro Alves  <palves@redhat.com>
11356
11357         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11358         * inflow.c (child_terminal_save_inferior): Wrap reference to
11359         tcgetpgrp in HAVE_TERMIOS_H.
11360         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11361         _WIN32.
11362         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11363         always iterate over all inferiors.
11364         (gdbsim_cntrl_c): Adjust.
11365         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11366
11367 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11368
11369         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11370         index type is objfile-owned if the element type is as well.
11371
11372 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11373
11374         GDB 8.1 released.
11375
11376 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11377
11378         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11379         "features/s390x-linux64.c".
11380         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11381         s390_linux32 and s390x_linux64.
11382         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11383         default tdesc.
11384         * s390-tdep.c: Include "features/s390-linux32.c" and
11385         "features/s390x-linux64.c".
11386         (s390_tdesc_valid): Add check for tdesc_has_registers.
11387         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11388         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11389         tdesc_s390x_linux64.
11390         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11391         tdesc_s390x_linux64 to...
11392         * s390-tdep.h: ...here.
11393
11394 2018-01-30  Pedro Alves  <palves@redhat.com>
11395
11396         PR gdb/13211
11397         * config.in, configure: Regenerate.
11398         * configure.ac: Check for getpgid.
11399         * go32-nat.c (go32_pass_ctrlc): New.
11400         (go32_target): Install it.
11401         * inf-child.c (inf_child_target): Install
11402         child_terminal_save_inferior, child_pass_ctrlc and
11403         child_interrupt.
11404         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11405         (inf_ptrace_target): No longer install it.
11406         * infcmd.c (interrupt_target_1): Adjust.
11407         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11408         (child_interrupt): Declare.
11409         (inferior::terminal_state): New.
11410         * inflow.c (struct terminal_info): Update comments.
11411         (inferior_process_group): Delete.
11412         (terminal_is_ours): Delete.
11413         (gdb_tty_state): New.
11414         (child_terminal_init): Adjust.
11415         (is_gdb_terminal, sharing_input_terminal_1)
11416         (sharing_input_terminal): New functions.
11417         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11418         Set the process's actual process group in the foreground if
11419         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11420         mark terminal as the inferior's if not sharing GDB's terminal.
11421         Don't check attach_flag.
11422         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11423         pass down a target_terminal_state.
11424         (child_terminal_save_inferior): New, factored out from ...
11425         (child_terminal_ours_1): ... this.  Handle
11426         target_terminal_state::is_ours_for_output.
11427         (child_interrupt, child_pass_ctrlc): New.
11428         (inflow_inferior_exit): Clear the inferior's terminal_state.
11429         (copy_terminal_info): Copy the inferior's terminal state.
11430         (_initialize_inflow): Remove reference to terminal_is_ours.
11431         * inflow.h (inferior_process_group): Delete.
11432         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11433         * procfs.c (procfs_target): Don't install procfs_interrupt.
11434         (procfs_interrupt): Delete.
11435         * remote.c (remote_serial_quit_handler): Adjust.
11436         (remote_interrupt): Remove ptid parameter.  Adjust.
11437         * target-delegates.c: Regenerate.
11438         * target.c: Include "terminal.h".
11439         (target_terminal::terminal_state): Rename to ...
11440         (target_terminal::m_terminal_state): ... this.
11441         (target_terminal::init): Adjust.
11442         (target_terminal::inferior): Adjust to per-inferior
11443         terminal_state.
11444         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11445         (target_terminal::ours, target_terminal::ours_for_output): Use
11446         target_terminal_is_ours_kind.
11447         (target_interrupt): Remove ptid parameter.  Adjust.
11448         (default_target_pass_ctrlc): Adjust.
11449         * target.h (target_ops::to_terminal_save_inferior): New field.
11450         (target_ops::to_interrupt): Remove ptid_t parameter.
11451         (target_interrupt): Remove ptid_t parameter.  Update comment.
11452         (target_pass_ctrlc): Update comment.
11453         * target/target.h (target_terminal_state): New scoped enum,
11454         factored out of ...
11455         (target_terminal::terminal_state): ... here.
11456         (target_terminal::inferior): Update comments.
11457         (target_terminal::restore_inferior): New.
11458         (target_terminal::is_inferior, target_terminal::is_ours)
11459         (target_terminal::is_ours_for_output): Adjust.
11460         (target_terminal::scoped_restore_terminal_state): Adjust to
11461         rename, and call restore_inferior() instead of inferior().
11462         (target_terminal::scoped_restore_terminal_state::m_state): Change
11463         type.
11464         (target_terminal::terminal_state): Rename to ...
11465         (target_terminal::m_terminal_state): ... this and change type.
11466
11467 2018-01-30  Pedro Alves  <palves@redhat.com>
11468
11469         * linux-nat.c (wait_for_signal): New function.
11470         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11471         directly.
11472         (async_terminal_is_ours)
11473         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11474         (linux_nat_add_target): Don't override
11475         to_terminal_inferior/to_terminal_ours.
11476
11477 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11478
11479         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11480
11481 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11482
11483         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11484         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11485         dwarf2_per_objfile_free here.
11486         (dwarf2_per_objfile_free): Remove.
11487         (_initialize_dwarf2_read): Don't register
11488         dwarf2_per_objfile_free as a registry cleanup.
11489
11490 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11491
11492         Avoid compilation errors in MinGW native builds
11493
11494         The error is triggered by including python-internal.h, and the
11495         error message is:
11496
11497              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11498                       from build-gnulib/import/math.h:27,
11499                       from d:/usr/Python26/include/pyport.h:235,
11500                       from d:/usr/Python26/include/Python.h:58,
11501                       from python/python-internal.h:94,
11502                       from python/py-arch.c:24:
11503              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11504         using ::hypot;
11505                 ^~~~~
11506
11507         This happens because Python headers define 'hypot' to expand t
11508         '_hypot' in the Windows builds.
11509         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11510         'hypoth'.  This avoids a compilation error.
11511
11512 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11513
11514         * MAINTAINERS (Write After Approval): Fix ordering.
11515
11516 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11517
11518         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11519
11520 2018-01-26  Alan Modra  <amodra@gmail.com>
11521
11522         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11523         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11524         Remove nop.  Make const.  Comment.
11525         (powerpc32_plt_stub_so_2): New.
11526         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11527         Correct count.  Update uses.
11528         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11529         Move common code reading PLT entry word.  Correct
11530         powerpc32_plt_stub PLT address calculation.
11531         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11532         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11533         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11534         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11535         (ppc64_standard_linkage8): Likewise.
11536         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11537         Correct insns description.
11538         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11539
11540 2018-01-24  Pedro Alves  <palves@redhat.com>
11541
11542         GCC PR libstdc++/83906
11543         * gdbtypes.c (operator==(const dynamic_prop &,
11544         const dynamic_prop &)): New.
11545         (operator==(const range_bounds &, const range_bounds &)): New.
11546         (check_types_equal): Use them instead of memcmp.
11547         * gdbtypes.h (operator==(const dynamic_prop &,
11548         const dynamic_prop &)): Declare.
11549         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11550         (operator==(const range_bounds &, const range_bounds &)): Declare.
11551         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11552
11553 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11554
11555         * s390-linux-tdep.c (s390_record_address_mask)
11556         (s390_record_calc_disp_common, s390_record_calc_disp)
11557         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11558         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11559         (s390_process_record): Move to s390-tdep.c.
11560         (s390_linux_init_abi_any): Adjust.
11561         * s390-tdep.c (s390_record_address_mask)
11562         (s390_record_calc_disp_common, s390_record_calc_disp)
11563         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11564         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11565         (s390_process_record): Moved from s390-linux-tdep.c
11566         (s390_gdbarch_init): Adjust.
11567
11568 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11569
11570         * s390-linux-nat.c (s390-tdep.h): New include.
11571         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11572         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11573         (ALLDEPFILES): Add s390-tdep.c.
11574         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11575         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11576         * s390-tdep.h: ...this.  New file.
11577         * s390-linux-tdep.c (s390-tdep.h): New include.
11578         (_initialize_s390_tdep): Rename to...
11579         (_initialize_s390_linux_tdep): ...this and adjust.
11580         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11581         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11582         s390-tdep.h.
11583         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11584         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11585         (s390_is_partial_instruction, s390_software_single_step)
11586         (is_non_branch_ril, s390_displaced_step_copy_insn)
11587         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11588         (s390_prologue_data, s390_addr, s390_store, s390_load)
11589         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11590         (s390_register_call_saved, s390_guess_tracepoint_registers)
11591         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11592         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11593         (s390_pseudo_register_name, s390_pseudo_register_type)
11594         (s390_pseudo_register_read, s390_pseudo_register_write)
11595         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11596         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11597         (s390_addr_bits_remove, s390_address_class_type_flags)
11598         (s390_address_class_type_flags_to_name)
11599         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11600         (s390_function_arg_float, s390_function_arg_vector)
11601         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11602         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11603         (s390_frame_align, s390_register_return_value, s390_return_value)
11604         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11605         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11606         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11607         (s390_trad_frame_prev_register, s390_unwind_cache)
11608         (s390_prologue_frame_unwind_cache)
11609         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11610         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11611         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11612         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11613         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11614         (s390_frame_base_address, s390_local_base_address)
11615         (s390_frame_base, s390_gcc_target_options)
11616         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11617         (s390_validate_reg_range, s390_tdesc_valid)
11618         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11619         * s390-tdep.c: ...this.  New file.
11620
11621 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11622
11623         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11624         (s390_process_record, s390_gdbarch_tdep_alloc)
11625         (s390_linux_init_abi_any): Use/set new hook.
11626
11627 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11628
11629         * s390-linux-tdep.c (osabi.h): New include.
11630         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11631         (s390_linux_init_abi_any): New functions.
11632         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11633
11634 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11635
11636         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11637         tdesc_has_registers check
11638
11639 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11640
11641         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11642         (s390_validate_reg_range): New macro.
11643         (s390_gdbarch_init): Adjust.
11644
11645 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11646
11647         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11648         (s390_gdbarch_tdep_alloc): Adjust.
11649         (s390_gdbarch_init): Adjust.
11650
11651 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11652
11653         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11654         <have_tdb>: Change type to bool.
11655         (s390_gdbarch_tdep_alloc): Adjust.
11656         (s390_gdbarch_init): Adjust.
11657
11658 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11659
11660         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11661         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11662         (s390_gdbarch_tdep_alloc): New function.
11663         (s390_gdbarch_init): Allocate tdep at start and use its fields
11664         instead of separate variables.
11665
11666 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11667
11668         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11669         when looking for cached gdbarch and add comment for remaining.
11670
11671 2018-01-22  Pedro Alves  <palves@redhat.com>
11672             Sergio Durigan Junior  <sergiodj@redhat.com>
11673
11674         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11675         case.
11676
11677 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11678
11679         * MAINTAINERS: Update my company e-mail address.
11680
11681 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11682
11683         * regcache.c (cooked_write_test): New function.
11684         (_initialize_regcache): Register the test.
11685
11686 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11687
11688         * ia64-tdep.c (ia64_pseudo_register_read): Call
11689         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11690         * m32c-tdep.c (m32c_cat_read): Likewise.
11691         (m32c_r3r2r1r0_read): Likewise.
11692         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11693         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11694
11695 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11696
11697         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11698         method raw_read instead of regcache_raw_read.
11699         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11700         * arm-tdep.c (arm_neon_quad_read): Likewise.
11701         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11702         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11703         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11704         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11705         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11706         (i386_pseudo_register_read_into_value): Likewise.
11707         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11708         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11709         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11710         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11711         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11712         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11713         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11714         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11715         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11716
11717 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11718
11719         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11720         * configure.tgt: Remove target mt.
11721         * mt-tdep.c: Remove.
11722         * regcache.c (cooked_read_test): Remove the check for mt.
11723
11724 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11725
11726         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11727         instead of gdbarch_pseudo_register_read_value.
11728
11729 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11730
11731         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11732         language is Ada.
11733
11734 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11735
11736         * linespec.c (create_sals_line_offset): Remove code that preserved
11737         the symtab_and_line's line number.
11738
11739 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11740
11741         * varobj.c (varobj_create): Don't set valid_block when creating a
11742         floating varobj.
11743
11744 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11745
11746         * varobj.c (varobj_create): Remove out of date comment.
11747
11748 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11749
11750         PR mi/20395
11751         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11752         updating innermost block.
11753         * parse.c (innermost_block_tracker::update): Take extra type
11754         parameter, and check types match before updating innermost block.
11755         (write_dollar_variable): Update innermost block for registers.
11756         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11757         (innermost_block_tracker::innermost_block_tracker): Initialise
11758         m_types member.
11759         (innermost_block_tracker::reset): Take type parameter.
11760         (innermost_block_tracker::update): Take type parameter, and pass
11761         type through as needed.
11762         (innermost_block_tracker::m_types): New member.
11763         * varobj.c (varobj_create): Pass type when reseting innermost
11764         block.
11765
11766 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11767
11768         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11769         * ada-lang.c (resolve_subexp): Likewise.
11770         * breakpoint.c (set_breakpoint_condition) Likewise.
11771         (watch_command_1) Likewise.
11772         * c-exp.y (variable): Likewise.
11773         * d-exp.y (PrimaryExpression): Likewise.
11774         * f-exp.y (variable): Likewise.
11775         * go-exp.y (variable): Likewise.
11776         * m2-exp.y (variable): Likewise.
11777         * objfiles.c (objfile::~objfile): Likewise.
11778         * p-exp.y (variable): Likewise.
11779         * parse.c (innermost_block): Change type.
11780         * parser-defs.h (class innermost_block_tracker): New.
11781         (innermost_block): Change to innermost_block_tracker.
11782         * printcmd.c (display_command): Switch to innermost_block API.
11783         (do_one_display): Likewise.
11784         * rust-exp.y (do_one_display): Likewise.
11785         * symfile.c (clear_symtab_users): Likewise.
11786         * varobj.c (varobj_create): Switch to innermost_block API, replace
11787         use of innermost_block with block stored on varobj object.
11788
11789 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11790
11791         * expression.h (innermost_block): Remove declaration.
11792         * varobj.c: Add 'parser-defs.h' include.
11793
11794 2018-01-19  Tom Tromey  <tom@tromey.com>
11795
11796         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11797         symbols in the static and global blocks.
11798
11799 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11800
11801         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11802         gdb_ptrace.h, and move including gdb_wait.h ...
11803         * nat/linux-ptrace.h: ... to here.
11804
11805 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11806
11807         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11808         inf_ptrace_detach_success.
11809         (inf_ptrace_detach_success): Add inferior parameter, use it
11810         instead of inferior_ptid, pass it to detach_inferior.
11811         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11812         parameter.
11813         * inferior.c (detach_inferior): Add overload that takes an
11814         inferior object.
11815         * inferior.h (detach_inferior): Likewise.
11816         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11817         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11818         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11819
11820 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11821
11822         * target.h (struct target_ops) <to_detach>: Add inferior
11823         parameter.
11824         (target_detach): Likewise.
11825         * target.c (dispose_inferior): Pass inferior down.
11826         (target_detach): Pass inferior down.  Assert that it is equal to
11827         the current inferior.
11828         * aix-thread.c (aix_thread_detach): Pass inferior down.
11829         * corefile.c (core_file_command): Pass current_inferior() down.
11830         * corelow.c (core_detach): Add inferior parameter.
11831         * darwin-nat.c (darwin_detach): Likewise.
11832         * gnu-nat.c (gnu_detach): Likewise.
11833         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11834         * infcmd.c (detach_command): Pass current_inferior() down to
11835         target_detach.
11836         * infrun.c (follow_fork_inferior): Pass parent_inf to
11837         target_detach.
11838         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11839         target_detach.
11840         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11841         * linux-thread-db.c (thread_db_detach): Likewise.
11842         * nto-procfs.c (procfs_detach): Likewise.
11843         * procfs.c (procfs_detach): Likewise.
11844         * record.c (record_detach): Likewise.
11845         * record.h (struct inferior): Forward-declare.
11846         (record_detach): Add inferior parameter.
11847         * remote-sim.c (gdbsim_detach): Likewise.
11848         * remote.c (remote_detach_1): Likewise.
11849         (remote_detach): Likewise.
11850         (extended_remote_detach): Likewise.
11851         * sol-thread.c (sol_thread_detach): Likewise.
11852         * target-debug.h (target_debug_print_inferior_p): New macro.
11853         * target-delegates.c: Re-generate.
11854         * top.c (kill_or_detach): Pass inferior down to target_detach.
11855         * windows-nat.c (windows_detach): Add inferior parameter.
11856
11857 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11858
11859         * target.h (struct target_ops) <to_detach>: Remove args
11860         parameter.
11861         (target_detach): Likewise.
11862         * target.c (dispose_inferior): Adjust.
11863         (target_detach): Remove args parameter, adjust.
11864         * aix-thread.c (aix_thread_detach): Adjust.
11865         * corefile.c (core_file_command): Adjust.
11866         * corelow.c (core_detach): Adjust.
11867         * darwin-nat.c (darwin_detach): Adjust.
11868         * gnu-nat.c (gnu_detach): Adjust.
11869         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11870         * infcmd.c (detach_command): Adjust
11871         * infrun.c (follow_fork_inferior): Adjust.
11872         (handle_vfork_child_exec_or_exit): Adjust.
11873         * linux-fork.c (linux_fork_detach): Remove args parameter.
11874         * linux-fork.h (linux_fork_detach): Likewise.
11875         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11876         * linux-thread-db.c (thread_db_detach): Likewise.
11877         * nto-procfs.c (procfs_detach): Likewise.
11878         * procfs.c (procfs_detach): Likewise.
11879         (do_detach): Remove signo parameter.
11880         * record.c (record_detach): Remove args parameter.
11881         * record.h (record_detach): Likewise.
11882         * remote-sim.c (gdbsim_detach): Likewise.
11883         * remote.c (remote_detach_1): Likewise.
11884         (remote_detach): Likewise.
11885         (extended_remote_detach): Likewise.
11886         * sol-thread.c (sol_thread_detach): Likewise.
11887         * target-delegates.c: Re-generate.
11888         * top.c (struct qt_args) <args>: Remove field.
11889         (kill_or_detach): Don't pass args.
11890         (quit_force): Don't set args.
11891         * windows-nat.c (windows_detach): Remove args parameter.
11892
11893 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11894
11895         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11896         (arm_linux_init_abi): Install it.
11897
11898 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11899
11900         * osabi.c (gdb_osabi_names): Extend the regexp for
11901         arm-linux-gnueabihf.
11902
11903 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11904
11905         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11906         m_abbrevs.
11907         (abbrev_table::add_abbrev): Update.
11908         (abbrev_table::lookup_abbrev): Update.
11909
11910 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11911
11912         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11913
11914 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11915
11916         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11917         to "std::string".
11918
11919 2018-01-17  Tom Tromey  <tom@tromey.com>
11920
11921         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11922
11923 2018-01-17  Tom Tromey  <tom@tromey.com>
11924
11925         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11926         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11927         (create_array_type_with_stride): Update.
11928         * dwarf2read.c (set_die_type): Update.
11929
11930 2018-01-17  Tom Tromey  <tom@tromey.com>
11931
11932         * dwarf2read.c (delayed_method_info): Remove typedef.
11933         (dwarf2_cu::method_info): Now a std::vector.
11934         (add_to_method_list): Update.
11935         (free_delayed_list): Remove.
11936         (compute_delayed_physnames): Update.
11937         (process_full_comp_unit, process_full_type_unit): Clear the method
11938         list.  Remove cleanups.
11939         (psymtab_include_file_name): Add name_holder parameter.  Use
11940         unique_xmalloc_ptr.
11941         (dwarf_decode_lines): Update.
11942
11943 2018-01-17  Tom Tromey  <tom@tromey.com>
11944             Simon Marchi  <simon.marchi@ericsson.com>
11945
11946         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11947         (dwarf2_per_objfile::free_cached_comp_units)
11948         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11949         (init_cutu_and_read_dies_no_follow): Update.
11950         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11951         (dwarf2_cu::~dwarf2_cu): New.
11952         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11953         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11954
11955 2018-01-17  Tom Tromey  <tom@tromey.com>
11956             Simon Marchi  <simon.marchi@ericsson.com>
11957
11958         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11959         (struct die_reader_specs) <abbrev_table>: New member.
11960         (struct abbrev_table): Add constructor.
11961         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11962         <abbrev_obstack>: Now an auto_obstack.
11963         (abbrev_table_up): New typedef.
11964         (init_cu_die_reader): Add abbrev_table parameter.
11965         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11966         Add result_dwo_abbrev_table.
11967         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11968         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11969         Update.
11970         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11971         parameter.
11972         (skip_children): Update.
11973         (abbrev_table::alloc_abbrev): Rename from
11974         abbrev_table_alloc_abbrev.
11975         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11976         (abbrev_table::lookup_abbrev): Rename from
11977         abbrev_table_lookup_abbrev.
11978         (abbrev_table_read_table): Return abbrev_table_up.
11979         (abbrev_table_free, abbrev_table_free_cleanup)
11980         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11981         (load_partial_dies): Update.
11982
11983 2018-01-17  Tom Tromey  <tom@tromey.com>
11984
11985         * dwarf2read.c (dwarf2_compute_name): Update comment.
11986         (read_func_scope, read_variable): Update.
11987         (new_symbol): Remove.
11988         (new_symbol_full): Rename to new_symbol.
11989
11990 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11991
11992         PR gdb/16577
11993         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11994         a warning instead of throwing an error, set section size to 0 and return
11995         NULL.
11996         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11997
11998 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11999
12000         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12001         std::string.
12002         (linux_ptrace_attach_fail_reason_string): Likewise.
12003         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12004         Likewise.
12005         (linux_ptrace_attach_fail_reason_string): Likewise.
12006         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12007
12008 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12009
12010         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12011
12012 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12013
12014         PR gdb/21559
12015         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12016         checking for fs_base/gs_base fields in struct user_regs_struct.
12017         * configure: Regenerate.
12018
12019 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12020
12021         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12022         function.
12023         (aarch64_linux_init_abi): Install it to gdbarch hook
12024         gcc_target_options.
12025
12026 2018-01-15  Pedro Alves  <palves@redhat.com>
12027
12028         * common/signals-state-save-restore.c
12029         (save_original_signals_state): Fix typos.
12030
12031 2017-01-12  Tom Tromey  <tom@tromey.com>
12032             Sergio Durigan Junior  <sergiodj@redhat.com>
12033
12034         * Makefile.in (install-only): Install gdb-add-index.
12035
12036 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12037
12038         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12039
12040 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12041
12042         * infrun.c (keep_going_pass_signal): Clear step-over info when
12043         insert_breakpoints fails.
12044
12045 2018-01-11  Pedro Alves  <palves@redhat.com>
12046
12047         PR gdb/22583
12048         * infrun.c (resume): Rename to ...
12049         (resume_1): ... this.
12050         (resume): Reimplement as wrapper around resume_1.
12051
12052 2018-01-11  Pedro Alves  <palves@redhat.com>
12053
12054         PR remote/22597
12055         * remote.c (remote_parse_stop_reply): Default to the last-set
12056         general thread instead of to 'magic_null_ptid'.
12057
12058 2018-01-10  Pedro Alves  <palves@redhat.com>
12059
12060         * language.h (language_get_symbol_name_matcher): Rename ...
12061         (get_symbol_name_matcher): ... this.
12062         * language.c (language_get_symbol_name_matcher): Ditto.
12063         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12064         callers adjusted.
12065
12066 2018-01-10  Pedro Alves  <palves@redhat.com>
12067
12068         PR gdb/22670
12069         * dwarf2read.c
12070         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12071         Adjust to use language_get_symbol_name_matcher instead of
12072         language_defn::la_get_symbol_name_matcher.
12073         * language.c (language_get_symbol_name_matcher): If in Ada mode
12074         and the lookup name is a verbatim match, return Ada's matcher.
12075         * language.h (language_get_symbol_name_matcher): Adjust comment.
12076         (ada_lookup_name_info::verbatim_p):: New method.
12077
12078 2018-01-10  Pedro Alves  <palves@redhat.com>
12079
12080         PR gdb/22670
12081         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12082         minsym's language is language_auto or language_cplus, pass down
12083         language_ada instead.
12084         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12085
12086 2018-01-10  Pedro Alves  <palves@redhat.com>
12087
12088         PR gdb/22670
12089         * minsyms.c (linkage_name_str): New function.
12090         (iterate_over_minimal_symbols): Use it.
12091
12092 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12093
12094         * NEWS: Document that 'info proc' now works on FreeBSD.
12095
12096 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12097
12098         * configure.ac: Check for kinfo_getfile in libutil.
12099         * configure: Regenerate.
12100         * config.in: Regenerate.
12101         * fbsd-nat.c: Include "fbsd-tdep.h".
12102         (fbsd_fetch_cmdline): New.
12103         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12104         rather than calling error.
12105         (fbsd_info_proc): New.
12106         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12107         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12108         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12109
12110 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12111
12112         * fbsd-nat.c (struct free_deleter): Remove.
12113         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12114
12115 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12116
12117         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12118         NULL for an empty pathname.
12119
12120 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12121
12122         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12123         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12124         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12125         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12126         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12127         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12128         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12129         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12130         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12131         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12132         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12133         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12134         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12135         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12136         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12137
12138 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12139
12140         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12141         (gnu_xfer_auxv): New function.
12142         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12143         TARGET_OBJECT_AUXV.
12144
12145 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12146             Simon Marchi  <simon.marchi@ericsson.com>
12147
12148         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12149         common/selftest.c.
12150         (COMMON_OBS): Remove selftest.o.
12151         * configure.ac: Append selftest-arch.c and common/selftest.c to
12152         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12153         * configure: Re-generated.
12154         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12155         GDB_SELF_TEST.
12156         (maintenance_info_selftests): Likewise.
12157
12158 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12159
12160         * ada-valprint.c (val_print_packed_array_elements): Use
12161         proper number of elements when printing an array indexed
12162         by an enumeration type.
12163
12164 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12165
12166         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12167         (dw2_get_file_names_reader): Adjust.
12168         (lookup_dwo_signatured_type): Adjust.
12169         (lookup_dwp_signatured_type): Adjust.
12170         (lookup_signatured_type): Adjust.
12171         (create_type_unit_group): Adjust.
12172         (get_type_unit_group): Adjust.
12173         (process_psymtab_comp_unit_reader): Adjust.
12174         (build_type_psymtabs_reader): Adjust.
12175         (scan_partial_symbols): Adjust.
12176         (add_partial_symbol): Adjust.
12177         (add_partial_subprogram): Adjust.
12178         (peek_die_abbrev): Adjust.
12179         (fixup_go_packaging): Adjust.
12180         (process_imported_unit_die): Adjust.
12181         (dwarf2_compute_name): Adjust.
12182         (dwarf2_physname): Adjust.
12183         (read_import_statement): Adjust.
12184         (handle_DW_AT_stmt_list): Adjust.
12185         (read_file_scope): Adjust.
12186         (read_func_scope): Adjust.
12187         (read_lexical_block_scope): Adjust.
12188         (read_call_site_scope): Adjust.
12189         (read_variable): Adjust.
12190         (dwarf2_rnglists_process): Adjust.
12191         (dwarf2_ranges_process): Adjust.
12192         (dwarf2_ranges_read): Adjust.
12193         (dwarf2_get_pc_bounds): Adjust.
12194         (dwarf2_record_block_ranges): Adjust.
12195         (dwarf2_add_field): Adjust.
12196         (dwarf2_add_member_fn): Adjust.
12197         (read_structure_type): Adjust.
12198         (process_structure_scope): Adjust.
12199         (read_enumeration_type): Adjust.
12200         (read_array_type): Adjust.
12201         (mark_common_block_symbol_computed): Adjust.
12202         (read_common_block): Adjust.
12203         (read_namespace_type): Adjust.
12204         (read_namespace): Adjust.
12205         (read_module_type): Adjust.
12206         (read_tag_pointer_type): Adjust.
12207         (read_tag_ptr_to_member_type): Adjust.
12208         (read_tag_string_type): Adjust.
12209         (read_subroutine_type): Adjust.
12210         (read_typedef): Adjust.
12211         (read_base_type): Adjust.
12212         (attr_to_dynamic_prop): Adjust.
12213         (read_subrange_type): Adjust.
12214         (read_unspecified_type): Adjust.
12215         (dwarf2_read_abbrevs): Adjust.
12216         (load_partial_dies): Adjust.
12217         (read_partial_die): Adjust.
12218         (find_partial_die): Adjust.
12219         (guess_partial_die_structure_name): Adjust.
12220         (fixup_partial_die): Adjust.
12221         (read_attribute_value): Adjust.
12222         (read_addr_index): Adjust.
12223         (read_addr_index_from_leb128): Adjust.
12224         (read_str_index): Adjust.
12225         (dwarf2_string_attr): Adjust.
12226         (get_debug_line_section): Adjust.
12227         (dwarf_decode_line_header): Adjust.
12228         (lnp_state_machine::check_line_address): Adjust.
12229         (dwarf_decode_lines_1): Adjust.
12230         (dwarf_decode_lines): Adjust.
12231         (dwarf2_start_symtab): Adjust.
12232         (var_decode_location): Adjust.
12233         (new_symbol_full): Adjust.
12234         (dwarf2_const_value_data): Adjust.
12235         (dwarf2_const_value_attr): Adjust.
12236         (dwarf2_const_value): Adjust.
12237         (die_type): Adjust.
12238         (die_containing_type): Adjust.
12239         (build_error_marker_type): Adjust.
12240         (lookup_die_type): Adjust.
12241         (guess_full_die_structure_name): Adjust.
12242         (anonymous_struct_prefix): Adjust.
12243         (determine_prefix): Adjust.
12244         (dwarf2_name): Adjust.
12245         (follow_die_ref_or_sig): Adjust.
12246         (follow_die_offset): Adjust.
12247         (follow_die_ref): Adjust.
12248         (follow_die_sig_1): Adjust.
12249         (follow_die_sig): Adjust.
12250         (get_signatured_type): Adjust.
12251         (get_DW_AT_signature_type): Adjust.
12252         (decode_locdesc): Adjust.
12253         (dwarf_decode_macros): Adjust.
12254         (cu_debug_loc_section): Adjust.
12255         (fill_in_loclist_baton): Adjust.
12256         (dwarf2_symbol_mark_computed): Adjust.
12257         (init_one_comp_unit): Don't assign
12258         dwarf2_cu::dwarf2_per_objfile.
12259         (set_die_type): Adjust.
12260
12261 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12262
12263         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12264         <dwarf2_per_objfile>: New field.
12265         (dwarf2_per_objfile): Remove global.
12266         (get_dwarf2_per_objfile): New function.
12267         (set_dwarf2_per_objfile): New function.
12268         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12269         dwarf2_per_objfile.
12270         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12271         (read_abbrev_offset): Likewise.
12272         (read_indirect_string): Likewise.
12273         (read_indirect_line_string): Likewise.
12274         (read_indirect_string_at_offset): Likewise.
12275         (read_indirect_string_from_dwz): Likewise.
12276         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12277         dwarf2_per_objfile.
12278         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12279         (create_all_comp_units): Change objfile parameter to
12280         dwarf2_per_objfile.
12281         (create_all_type_units): Likewise.
12282         (process_queue): Add dwarf2_per_objfile parameter.
12283         (read_and_check_comp_unit_head): Likewise.
12284         (lookup_dwo_unit_in_dwp): Likewise.
12285         (get_dwp_file): Likewise.
12286         (process_cu_includes): Likewise.
12287         (struct free_dwo_file_cleanup_data): New struct.
12288         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12289         set_dwarf2_per_objfile.
12290         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12291         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12292         context, adjust calls.
12293         (dw2_instantiate_symtab): Likewise.
12294         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12295         (dw2_get_cu): Likewise.
12296         (create_cu_from_index_list): Change objfile parameter to
12297         dwarf2_per_objfile.
12298         (create_cus_from_index_list): Get dwarf2_per_objfile from
12299         context, adjust calls.
12300         (create_cus_from_index): Likewise.
12301         (create_signatured_type_table_from_index): Change objfile
12302         parameter to dwarf2_per_objfile.
12303         (create_signatured_type_table_from_debug_names): Change objfile
12304         parameter to dwarf2_per_objfile.
12305         (create_addrmap_from_index): Likewise.
12306         (create_addrmap_from_aranges): Likewise.
12307         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12308         (dw2_setup): Remove.
12309         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12310         context.
12311         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12312         get_dwarf2_per_objfile.
12313         (dw2_forget_cached_source_info): Likewise.
12314         (dw2_map_symtabs_matching_filename): Likewise.
12315         (struct dw2_symtab_iterator) <index>: Remove.
12316         <dwarf2_per_objfile>: New field.
12317         (dw2_symtab_iter_init): Replace index parameter with
12318         dwarf2_per_objfile.
12319         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12320         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12321         (dw2_print_stats): Likewise.
12322         (dw2_dump): Likewise.
12323         (dw2_expand_symtabs_for_function): Likewise.
12324         (dw2_expand_all_symtabs): Likewise.
12325         (dw2_expand_symtabs_with_fullname): Likewise.
12326         (dw2_expand_marked_cus): Replace index and objfile parameters
12327         with dwarf2_per_objfile.
12328         (dw_expand_symtabs_matching_file_matcher): Add
12329         dwarf2_per_objfile parameter and adjust calls.
12330         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12331         adjust calls.
12332         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12333         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12334         adjust calls.
12335         (create_cus_from_debug_names_list): Replace objfile parameter
12336         with dwarf2_per_objfile and adjust calls.
12337         (create_cus_from_debug_names): Likewise.
12338         (dwarf2_read_debug_names): Likewise.
12339         (mapped_debug_names::namei_to_name): Adjust call.
12340         (dw2_debug_names_iterator::next): Likewise.
12341         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12342         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12343         (dw2_debug_names_dump): Likewise.
12344         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12345         (dw2_debug_names_expand_symtabs_matching): Likewise.
12346         (dwarf2_initialize_objfile): Likewise.
12347         (dwarf2_build_psymtabs): Likewise.
12348         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12349         this_cu.
12350         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12351         (read_and_check_comp_unit_head): Likewise.
12352         (read_abbrev_offset): Likewise.
12353         (create_debug_type_hash_table): Likewise.
12354         (create_debug_types_hash_table): Likewise.
12355         (create_all_type_units): Replace objfile parameter with
12356         dwarf2_per_objfile.
12357         (add_type_unit): Add dwarf2_per_objfile parameter.
12358         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12359         with dwarf2_per_objfile.
12360         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12361         (lookup_dwp_signatured_type): Likewise.
12362         (lookup_signatured_type): Likewise.
12363         (read_cutu_die_from_dwo): Likewise.
12364         (init_tu_and_read_dwo_dies): Likewise.
12365         (init_cutu_and_read_dies): Likewise.
12366         (init_cutu_and_read_dies_no_follow): Likewise.
12367         (allocate_type_unit_groups_table): Add objfile parameter.
12368         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12369         (get_type_unit_group): Likewise.
12370         (process_psymtab_comp_unit): Update call.
12371         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12372         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12373         (print_tu_stats): Likewise.
12374         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12375         in void* parameter.
12376         (build_type_psymtabs): Change objfile parameter to
12377         dwarf2_per_objfile.
12378         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12379         passed in void* parameter.
12380         (process_skeletonless_type_units): Change objfile parameter to
12381         dwarf2_per_objfile.
12382         (set_partial_user): Likewise.
12383         (dwarf2_build_psymtabs_hard): Likewise.
12384         (read_comp_units_from_section): Likewise.
12385         (create_all_comp_units): Likewise.
12386         (scan_partial_symbols): Update calls.
12387         (add_partial_symbol): Likewise.
12388         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12389         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12390         (process_queue): Add dwarf2_per_objfile parameter.
12391         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12392         (compute_compunit_symtab_includes): Likewise.
12393         (process_cu_includes): Add dwarf2_per_objfile parameter.
12394         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12395         (process_full_type_unit): Likewise.
12396         (process_imported_unit_die): Update call.
12397         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12398         (read_file_scope): Likewise.
12399         (allocate_dwo_file_hash_table): Add objfile parameter.
12400         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12401         (create_cus_hash_table): Likewise.
12402         (create_dwp_hash_table): Likewise.
12403         (create_dwo_unit_in_dwp_v1): Likewise.
12404         (create_dwp_v2_section): Likewise.
12405         (create_dwo_unit_in_dwp_v2): Likewise.
12406         (lookup_dwo_unit_in_dwp): Likewise.
12407         (try_open_dwop_file): Likewise.
12408         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12409         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12410         cleanup to include a reference to dwarf2_per_objfile.
12411         (open_dwp_file): Add dwarf2_per_objfile parameter.
12412         (open_and_init_dwp_file): Likewise.
12413         (get_dwp_file): Likewise.
12414         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12415         (queue_and_load_all_dwo_tus): Update call.
12416         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12417         data.
12418         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12419         (dwarf2_ranges_process): Likewise.
12420         (dwarf2_get_pc_bounds): Likewise.
12421         (mark_common_block_symbol_computed): Likewise.
12422         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12423         (dwarf2_read_abbrevs): Update call.
12424         (read_partial_die): Use dwarf2_per_objfile from cu.
12425         (find_partial_die): Likewise.
12426         (fixup_partial_die): Likewise.
12427         (read_attribute_value): Likewise.
12428         (read_indirect_string_at_offset_from): Add objfile parameter.
12429         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12430         parameter.
12431         (read_indirect_string_from_dwz): Add objfile parameter.
12432         (read_indirect_string): Add objfile parameter.
12433         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12434         (read_addr_index): Use dwarf2_per_objfile from cu.
12435         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12436         call dw2_setup.
12437         (read_str_index): Use dwarf2_per_objfile from cu.
12438         (get_debug_line_section): Likewise.
12439         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12440         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12441         (new_symbol_full): Use dwarf2_per_objfile from cu.
12442         (build_error_marker_type): Likewise.
12443         (lookup_die_type): Likewise.
12444         (determine_prefix): Likewise.
12445         (follow_die_offset): Likewise.
12446         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12447         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12448         (dwarf2_fetch_die_type_sect_off): Likewise.
12449         (dwarf2_get_die_type): Likewise.
12450         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12451         (get_signatured_type): Likewise.
12452         (get_DW_AT_signature_type): Likewise.
12453         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12454         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12455         (cu_debug_loc_section): Likewise.
12456         (fill_in_loclist_baton): Likewise.
12457         (dwarf2_symbol_mark_computed): Likewise.
12458         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12459         dwarf2_per_objfile.
12460         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12461         parameter.
12462         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12463         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12464         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12465         (set_die_type): Use dwarf2_free_objfile from cu.
12466         (get_die_type_at_offset): Likewise.
12467         (dwarf2_per_objfile_free): Don't assign global variable.
12468         (debug_names) <constructor>: Add dwarf2_per_objfile
12469         parameter, update m_debugstrlookup construction.
12470         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12471         parameter.
12472         <m_dwarf2_per_objfile>: New field.
12473         <lookup>: Use m_dwarf2_per_objfile.
12474         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12475         (psyms_seen_size): Likewise.
12476         (write_gdbindex): Replace objfile parameter with
12477         dwarf2_per_objfile.
12478         (write_debug_names): Likewise.
12479         (write_psymtabs_to_index): Likewise.
12480         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12481         calls.
12482
12483 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12484
12485         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12486         <dwarf2_per_objfile>: New field.
12487         (struct dwarf2_per_cu_data) <objfile>: Remove.
12488         <dwarf2_per_objfile>: New field.
12489         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12490         of objfile.
12491         (create_signatured_type_table_from_index): Likewise.
12492         (create_debug_type_hash_table): Likewise.
12493         (fill_in_sig_entry_from_dwo_entry): Likewise.
12494         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12495         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12496         objfile.
12497         (create_partial_symtab): Access objfile through
12498         dwarf2_per_objfile.
12499         (process_psymtab_comp_unit_reader): Likewise.
12500         (read_comp_units_from_section): Likewise.
12501         (scan_partial_symbols): Likewise.
12502         (add_partial_symbol): Likewise.
12503         (add_partial_subprogram): Likewise.
12504         (peek_die_abbrev): Likewise.
12505         (fixup_go_packaging): Likewise.
12506         (process_full_comp_unit): Likewise.
12507         (process_full_type_unit): Likewise.
12508         (process_imported_unit_die): Likewise.
12509         (dwarf2_compute_name): Likewise.
12510         (dwarf2_physname): Likewise.
12511         (read_import_statement): Likewise.
12512         (create_cus_hash_table): Assign dwarf2_physname instead of
12513         objfile.
12514         (read_func_scope): Access objfile through dwarf2_per_objfile.
12515         (read_lexical_block_scope): Likewise.
12516         (read_call_site_scope): Likewise.
12517         (read_variable): Likewise.
12518         (dwarf2_rnglists_process): Likewise.
12519         (dwarf2_ranges_process): Likewise.
12520         (dwarf2_ranges_read): Likewise.
12521         (dwarf2_record_block_ranges): Likewise.
12522         (dwarf2_add_field): Likewise.
12523         (dwarf2_add_member_fn): Likewise.
12524         (read_structure_type): Likewise.
12525         (process_structure_scope): Likewise.
12526         (read_enumeration_type): Likewise.
12527         (read_array_type): Likewise.
12528         (read_common_block): Likewise.
12529         (read_namespace_type): Likewise.
12530         (read_namespace): Likewise.
12531         (read_module_type): Likewise.
12532         (read_tag_pointer_type): Likewise.
12533         (read_tag_ptr_to_member_type): Likewise.
12534         (read_tag_string_type): Likewise.
12535         (read_subroutine_type): Likewise.
12536         (read_typedef): Likewise.
12537         (read_base_type): Likewise.
12538         (attr_to_dynamic_prop): Likewise.
12539         (read_subrange_type): Likewise.
12540         (read_unspecified_type): Likewise.
12541         (load_partial_dies): Likewise.
12542         (read_partial_die): Likewise.
12543         (find_partial_die): Likewise.
12544         (guess_partial_die_structure_name): Likewise.
12545         (fixup_partial_die): Likewise.
12546         (read_attribute_value): Likewise.
12547         (read_addr_index_from_leb128): Likewise.
12548         (dwarf2_read_addr_index): Likewise.
12549         (dwarf2_string_attr): Likewise.
12550         (lnp_state_machine::check_line_address): Likewise.
12551         (dwarf_decode_lines_1): Likewise.
12552         (dwarf_decode_lines): Likewise.
12553         (dwarf2_start_symtab): Likewise.
12554         (var_decode_location): Likewise.
12555         (new_symbol_full): Likewise.
12556         (dwarf2_const_value_data): Likewise.
12557         (dwarf2_const_value_attr): Likewise.
12558         (dwarf2_const_value): Likewise.
12559         (die_type): Likewise.
12560         (die_containing_type): Likewise.
12561         (lookup_die_type): Likewise.
12562         (guess_full_die_structure_name): Likewise.
12563         (anonymous_struct_prefix): Likewise.
12564         (dwarf2_name): Likewise.
12565         (follow_die_ref_or_sig): Likewise.
12566         (follow_die_offset): Likewise.
12567         (follow_die_ref): Likewise.
12568         (dwarf2_fetch_die_loc_sect_off): Likewise.
12569         (dwarf2_fetch_constant_bytes): Likewise.
12570         (dwarf2_fetch_die_type_sect_off): Likewise.
12571         (dwarf2_get_die_type): Likewise.
12572         (follow_die_sig): Likewise.
12573         (decode_locdesc): Likewise.
12574         (dwarf2_per_cu_objfile): Likewise.
12575         (dwarf2_per_cu_text_offset): Likewise.
12576         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12577         objfile.
12578         (set_die_type): Access objfile through
12579         dwarf2_per_objfile.
12580
12581 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12582
12583         * valprint.c (converted_character_d): Remove typedef.
12584         (DEF_VEC_O (converted_character_d)): Remove.
12585         (count_next_character): Use std::vector.
12586         (print_converted_chars_to_obstack): Likewise.
12587         (generic_printstr): Likewise.
12588
12589 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12590
12591         * xml-support.h (struct gdb_xml_value): Add constructor.
12592         <value>: Change type to unique_xmalloc_ptr.
12593         (gdb_xml_value_s): Remove typedef.
12594         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12595         (gdb_xml_element_start_handler): Change parameter type to
12596         std::vector.
12597         (xml_find_attribute): Likewise.
12598         * xml-support.c (xml_find_attribute): Change parameter type to
12599         std::vector and adjust.
12600         (gdb_xml_values_cleanup): Remove.
12601         (gdb_xml_parser::start_element): Adjust to std::vector.
12602         (xinclude_start_include): Change paraeter type to std::vector
12603         and adjust.
12604         * btrace.c (check_xml_btrace_version): Likewise.
12605         (parse_xml_btrace_block): Likewise.
12606         (parse_xml_btrace_pt_config_cpu): Likewise.
12607         (parse_xml_btrace_pt): Likewise.
12608         (parse_xml_btrace_conf_bts): Likewise.
12609         (parse_xml_btrace_conf_pt): Likewise.
12610         * memory-map.c (memory_map_start_memory): Likewise.
12611         (memory_map_start_property): Likewise.
12612         * osdata.c (osdata_start_osdata): Likewise.
12613         (osdata_start_item): Likewise.
12614         (osdata_start_column): Likewise.
12615         * remote.c (start_thread): Likewise.
12616         * solib-aix.c (library_list_start_library): Likewise.
12617         (library_list_start_list): Likewise.
12618         * solib-svr4.c (library_list_start_library): Likewise.
12619         (svr4_library_list_start_list): Likewise.
12620         * solib-target.c (library_list_start_segment): Likewise.
12621         (library_list_start_section): Likewise.
12622         (library_list_start_library): Likewise.
12623         (library_list_start_list): Likewise.
12624         * tracepoint.c (traceframe_info_start_memory): Likewise.
12625         (traceframe_info_start_tvar): Likewise.
12626         * xml-syscall.c (syscall_start_syscall): Likewise.
12627         * xml-tdesc.c (tdesc_start_target): Likewise.
12628         (tdesc_start_feature): Likewise.
12629         (tdesc_start_reg): Likewise.
12630         (tdesc_start_union): Likewise.
12631         (tdesc_start_struct): Likewise.
12632         (tdesc_start_flags): Likewise.
12633         (tdesc_start_enum): Likewise.
12634         (tdesc_start_field): Likewise.
12635         (tdesc_start_enum_value): Likewise.
12636         (tdesc_start_vector): Likewise.
12637
12638 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12639
12640         * extension.h (struct xmethod_worker) <clone>: Remove.
12641         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12642         Remove.
12643         (python_xmethod_worker::clone): Remove.
12644         * valops.c (find_overload_match): Use std::move instead of
12645         clone.
12646
12647 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12648
12649         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12650         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12651         <free_xmethod_worker_data>: Remove.
12652         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12653         <get_xmethod_arg_types>: Remove.
12654         <get_xmethod_result_type>: Remove.
12655         <invoke_xmethod>: Remove.
12656         * extension.c (new_xmethod_worker): Remove.
12657         (clone_xmethod_worker): Remove.
12658         (get_matching_xmethod_workers): Return void, pass std::vector by
12659         pointer.
12660         (get_xmethod_arg_types): Rename to...
12661         (xmethod_worker::get_arg_types): ... this, and adjust.
12662         (get_xmethod_result_type): Rename to...
12663         (xmethod_worker::get_result_type): ... this, and adjust.
12664         (invoke_xmethod): Remove.
12665         (free_xmethod_worker): Remove.
12666         (free_xmethod_worker_vec): Remove.
12667         * extension.h (enum ext_lang_rc): Move here from
12668         extension-priv.h.
12669         (struct xmethod_worker): Add constructor and destructor.
12670         <data>: Remove.
12671         <value>: Remove.
12672         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12673         virtual pure methods.
12674         <get_arg_types, get_result_type>: New methods.
12675         (xmethod_worker_ptr): Remove typedef.
12676         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12677         (xmethod_worker_vec): Remove typedef.
12678         (xmethod_worker_up): New typedef.
12679         (invoke_xmethod): Remove.
12680         (clone_xmethod_worker): Remove.
12681         (free_xmethod_worker): Remove.
12682         (free_xmethod_worker_vec): Remove.
12683         (get_xmethod_arg_types): Remove.
12684         (get_xmethod_result_type): Remove.
12685         * valops.c (find_method_list): Use std::vector, don't use
12686         intermediate vector.
12687         (value_find_oload_method_list): Use std::vector.
12688         (find_overload_match): Use std::vector.
12689         (find_oload_champ): Use std::vector.
12690         * value.c (value_free): Use operator delete.
12691         (value_of_xmethod): Rename to...
12692         (value_from_xmethod): ... this.  Don't assign
12693         xmethod_worker::value, take rvalue-reference.
12694         (result_type_of_xmethod): Adjust.
12695         (call_xmethod): Adjust.
12696         * value.h: Include extension.h.
12697         (struct xmethod_worker): Don't forward-declare.
12698         (value_of_xmethod): Rename to...
12699         (value_from_xmethod): ... this, take rvalue-reference.
12700         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12701         (struct python_xmethod_worker): ... this, add constructor and
12702         destructor.
12703         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12704         (gdbpy_free_xmethod_worker_data): Rename to...
12705         (python_xmethod_worker::~python_xmethod_worker): ... this and
12706         adjust.
12707         (gdbpy_clone_xmethod_worker_data): Rename to...
12708         (python_xmethod_worker::clone): ... this and adjust.
12709         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12710         temporary vector.
12711         (gdbpy_get_xmethod_arg_types): Rename to...
12712         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12713         (gdbpy_get_xmethod_result_type): Rename to...
12714         (python_xmethod_worker::do_get_result_type): ... this and
12715         adjust.
12716         (gdbpy_invoke_xmethod): Rename to...
12717         (python_xmethod_worker::invoke): ... this and adjust.
12718         (new_python_xmethod_worker): Rename to...
12719         (python_xmethod_worker::python_xmethod_worker): ... this and
12720         adjust.
12721         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12722         Remove.
12723         (gdbpy_free_xmethod_worker_data): Remove.
12724         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12725         (gdbpy_get_xmethod_arg_types): Remove.
12726         (gdbpy_get_xmethod_result_type): Remove.
12727         (gdbpy_invoke_xmethod): Remove.
12728         * python/python.c (python_extension_ops): Remove obsolete
12729         callbacks.
12730
12731 2018-01-05  Pedro Alves  <palves@redhat.com>
12732
12733         PR gdb/18653
12734         * common/signals-state-save-restore.c
12735         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12736         find a custom handler preinstalled, instead of internal erroring.
12737         But only warn if !quiet.
12738         * common/signals-state-save-restore.h
12739         (save_original_signals_state): New parameter 'quiet'.
12740         * main.c (captured_main_1): Move save_original_signals_state call
12741         after option handling, and pass QUIET.
12742
12743 2018-01-05  Pedro Alves  <palves@redhat.com>
12744
12745         * spu-tdep.c (spu_catch_start): Pass
12746         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12747
12748 2018-01-05  Pedro Alves  <palves@redhat.com>
12749
12750         PR gdb/22670
12751         * ada-lang.c (literal_symbol_name_matcher): New function.
12752         (ada_get_symbol_name_matcher): Use it for
12753         symbol_name_match_type::SEARCH_NAME.
12754         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12755         it down instead of assuming symbol_name_match_type::FULL.
12756         * block.h (block_lookup_symbol): New parameter 'match_type'.
12757         * c-valprint.c (print_unpacked_pointer): Use
12758         lookup_symbol_search_name instead of lookup_symbol.
12759         * compile/compile-object-load.c (get_out_value_type): Pass down
12760         symbol_name_match_type::SEARCH_NAME.
12761         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12762         symbol_name_match_type::FULL.
12763         * cp-support.c (cp_get_symbol_name_matcher): Handle
12764         symbol_name_match_type::SEARCH_NAME.
12765         * infrun.c (insert_exception_resume_breakpoint): Use
12766         lookup_symbol_search_name.
12767         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12768         * psymtab.c (maintenance_check_psymtabs): Use
12769         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12770         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12771         SYMBOL_SEARCH_NAME.
12772         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12773         if symbol_name_match_type::SEARCH_NAME.
12774         (lookup_symbol_in_language): Pass down
12775         symbol_name_match_type::FULL.
12776         (lookup_symbol_search_name): New.
12777         (lookup_language_this): Pass down
12778         symbol_name_match_type::SEARCH_NAME.
12779         (lookup_symbol_aux, lookup_local_symbol): New parameter
12780         'match_type'.  Pass it down.
12781         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12782         (lookup_symbol_search_name): New declaration.
12783         (lookup_symbol_in_block): New 'match_type' parameter.
12784
12785 2018-01-05  Pedro Alves  <palves@redhat.com>
12786
12787         PR gdb/22670
12788         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12789         ada_lookup_symbol.
12790         (ada_lookup_symbol): Reimplement in terms of
12791         ada_lookup_symbol_list, bits factored out from
12792         ada_lookup_encoded_symbol.
12793
12794 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12795
12796         * ada-exp.y (write_object_renaming): When subscripting an array
12797         using a symbol as the index, pass the block in call to
12798         ada_lookup_encoded_symbol when looking that symbol up.
12799
12800 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12801
12802         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12803         TYPE_INDEX_TYPE.
12804
12805 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12806
12807         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12808         the case where VALUE_LVAL (val0) is not lval_memory.
12809
12810 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12811
12812         * ada-valprint.c (print_optional_low_bound): Handle
12813         character-indexed array printing like boolean-indexed array
12814         printing.
12815
12816 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12817
12818         * NEWS: Create a new section for the next release branch.
12819         Rename the section of the current branch, now that it has
12820         been cut.
12821
12822 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12823
12824         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12825         * version.in: Bump version to 8.1.50.DATE-git.
12826
12827 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12828
12829         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12830         Add field.
12831         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12832         Add field.
12833         (default_exception_support_info) <catch_handlers_sym>: Add field.
12834         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12835         (ada_exception_name_addr_1): Add "catch handlers" handling.
12836         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12837         Update all callers.
12838         (create_excep_cond_exprs) <ex>: Add parameter.
12839         (re_set_exception): Update create_excep_cond_exprs call.
12840         (print_it_exception, print_one_exception, print_mention_exception)
12841         (print_recreate_exception): Add "catch handler" handling.
12842         (allocate_location_catch_handlers, re_set_catch_handlers)
12843         (check_status_catch_handlers, print_it_catch_handlers)
12844         (print_one_catch_handlers, print_mention_catch_handlers)
12845         (print_recreate_catch_handlers): New function.
12846         (catch_handlers_breakpoint_ops): New variable.
12847         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12848         Add parameter.  Add "catch handler" handling.
12849         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12850         Add "catch handler" handling.
12851         (ada_exception_catchpoint_cond_string): Add "catch handler"
12852         handling.
12853         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12854         call.
12855         (catch_ada_handlers_command): New function.
12856         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12857         operations structure.
12858         (_initialize_ada_language): Add "catch handlers" command entry.
12859         * NEWS: Document "catch handlers" feature.
12860
12861 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12862
12863         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12864         account when creating the array type of the slice.
12865         (ada_value_slice): Likewise.
12866
12867 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12868
12869         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12870         New enum value.
12871         (create_array_type_with_stride): Add byte_stride_prop parameter.
12872         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12873         New parameter.  Update all callers in this file.
12874         (array_type_has_dynamic_stride): New function.
12875         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12876         of arrays with dynamic byte strides.
12877         * dwarf2read.c (read_array_type): Add support for dynamic
12878         DW_AT_byte_stride attributes.
12879
12880 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12881
12882         * dwarf2read.c (read_unspecified_type): Treat
12883         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12884
12885 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12886
12887         Update copyright year range in all GDB files.
12888
12889 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12890
12891         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12892         and gdb/testsuite/gdb.base/step-line.c.
12893
12894 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12895
12896         * copyright.py (main): Dump the contents of
12897         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12898         even if BY_HAND is empty.
12899
12900 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12901
12902         * top.c (print_gdb_version): Update Copyright year in version
12903         message.
12904
12905 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12906
12907         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12908
12909 For older changes see ChangeLog-2017.
12910 \f
12911 Local Variables:
12912 mode: change-log
12913 left-margin: 8
12914 fill-column: 74
12915 version-control: never
12916 coding: utf-8
12917 End: