Initialize variable in py_get_event_thread
[external/binutils.git] / gdb / ChangeLog
1 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * python/py-threadevent.c (py_get_event_thread): Initialize
4         pythread.
5
6 2018-08-24  Pedro Alves  <palves@redhat.com>
7
8         * python/py-bpevent.c (create_breakpoint_event_object): Use
9         copy-initialization.
10         * python/py-continueevent.c (emit_continue_event): Use
11         copy-initialization.
12         * python/py-exitedevent.c (create_exited_event_object): Return a
13         gdbpy_ref<>.
14         (emit_exited_event): Use copy-initialization.
15         * python/py-inferior.c (python_new_inferior)
16         (python_inferior_deleted, add_thread_object): Use
17         copy-initialization.
18         * python/py-infevents.c (create_inferior_call_event_object)
19         (create_register_changed_event_object)
20         (create_memory_changed_event_object): Return a gdbpy_ref<>.
21         (emit_inferior_call_event, emit_memory_changed_event)
22         (emit_register_changed_event): Use copy-initialization.
23         * python/py-newobjfileevent.c (create_new_objfile_event_object):
24         Return a gdbpy_ref<>.
25         (emit_new_objfile_event): Use copy-initialization.
26         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
27         (emit_clear_objfiles_event): Use copy-initialization.
28         * python/py-signalevent.c (create_signal_event_object): Use
29         copy-initialization.
30         * python/py-threadevent.c (create_thread_event_object): Use
31         copy-initialization.
32
33 2018-08-24  Pedro Alves  <palves@redhat.com>
34             Simon Marchi  <simon.marchi@ericsson.com>
35
36         PR gdb/23379
37         * python/py-continueevent.c: Include "gdbthread.h".
38         (create_continue_event_object): Add intro comment.  Add 'ptid'
39         parameter.  Use it to find thread to pass to
40         create_thread_event_object.
41         (emit_continue_event): Pass PTID down to
42         create_continue_event_object.
43         * python/py-event.h (py_get_event_thread): Declare.
44         (create_thread_event_object): Remove default from 'thread'
45         parameter.
46         * python/py-stopevent.c (create_stop_event_object): Use
47         py_get_event_thread.
48         * python/py-threadevent.c (get_event_thread): Rename to ...
49         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
50         and use it to find the thread.
51         (create_thread_event_object): Assert that THREAD isn't null.
52         Don't find the event thread here.
53
54 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
55
56         * block.h (blockrange, blockranges): New struct declarations.
57         (struct block): Add new field named `ranges'.
58         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
59         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
60         macros for accessing ranges in struct block.
61         (make_blockranges): New declaration.
62         block.c (make_blockranges): New function.
63         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
64         for block.
65         * symtab.h (find_pc_partial_function): Add new parameter `block'.
66         * blockframe.c (cache_pc_function_block): New static global.
67         (clear_pc_function_cache): Clear cache_pc_function_block.
68         (find_pc_partial_function): Move comment to symtab.h.  Add
69         support for non-contiguous blocks.
70         * cli/cli-cmds.c (block.h): Include.
71         (print_disassembly): Handle printing of non-contiguous blocks.
72         (disassemble_current_function): Likewise.
73         (disassemble_command): Likewise.
74
75         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
76         BLOCK_START.
77         * blockframe.c (get_pc_function_start): Likewise.
78         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
79         (gcc_symbol_address): Likewise.
80         * compile/compile-object-run.c (compile_object_run): Likewise.
81         * compile/compile.c (get_expr_block_and_pc): Likewise.
82         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
83         (func_addr_to_tail_call_list): Likewise.
84         * findvar.c (default_read_var_value): Likewise.
85         * inline-frame.c (inline_frame_this_id): Likewise.
86         (skip-inline_frames): Likewise.
87         * infcmd.c (until_next_command): Likewise.
88         * linespec.c (convert_linespec_to_sals): Likewise.
89         * parse.c (parse_exp_in_context_1): Likewise.
90         * printcmd.c (build_address_symbolic): likewise.
91         (info_address_command): Likewise.
92         symtab.c (find_function_start_sal): Likewise.
93         (skip_prologue_sal): Likewise.
94         (find_function_alias_target): Likewise.
95         (find_gnu_ifunc): Likewise.
96         * stack.c (find_frame_funname): Likewise.
97         * symtab.c (fixup_symbol_section): Likewise.
98         (find_function_start_sal): Likewise.
99         (skip_prologue_sal): Likewsie.
100         (find_function_alias_target): Likewise.
101         (find_gnu_ifunc): Likewise.
102         * tracepoint.c (info_scope_command): Likewise.
103         * value.c (value_fn_field): Likewise.
104
105         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
106         in place of find_pc_partial_function.
107         * blockframe.c (find_function_entry_range_from_pc): New function.
108         * symtab.h (find_function_entry_range_from_pc): Declare and document.
109         * objfiles.c (objfile_relocate1): Relocate start and end addresses
110         for each range in a block.
111
112
113 2018-08-23  Xavier Roirand  <roirand@adacore.com>
114
115         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
116         incrementation.
117
118 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
119
120         * solib-svr4.c (read_program_headers_from_bfd): Return
121         gdb::optional<gdb::byte_vector>.
122         (svr4_exec_displacement): Adjust.
123
124 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
125
126         * solib-svr4.c (read_program_header): Return
127         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
128         (find_program_interpreter): Return
129         gdb::optional<gdb::byte_vector>.
130         (scan_dyntag_auxv): Adjust.
131         (enable_break): Adjust.
132         (svr4_exec_displacement): Adjust.
133
134 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
135
136         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
137         * inf-child.c (inf_child_target::terminal_save_inferior): New.
138
139 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
140
141         * guile/scm-string.c (gdbscm_scm_from_printf): Use
142         string_vprintf.
143         * guile/scm-utils.c (gdbscm_printf): Likewise.
144         * serial.c (serial_printf): Likewise.
145         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
146
147 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
148
149         * stack.c (print_frame): Print frame architecture when printing on
150         an MI output.
151         * NEWS: Mention new "arch" attribute in frame output.
152
153 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
154
155         * arch/aarch64.h (aarch64_regnum): Update comment.
156
157 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
158
159         * NEWS: Add SVE to 8.2 section.
160
161 2018-08-21  Pedro Alves  <palves@redhat.com>
162
163         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
164         out from gdbscm_parse_function_args.
165         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
166         gdbscm_parse_function_args_1.
167
168 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
169
170         PR gdb/17816
171         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
172         operator.
173
174 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
175
176         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
177
178 2018-08-19  Michael Spang  <spang@google.com>
179
180         PR gdb/11786
181         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
182         for PT_TLS segments.
183
184 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
185
186         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
187         dwarf_variable_value.
188         * dwarf2-frame.c (class dwarf_expr_executor):
189         Add override for dwarf_variable_value.
190         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
191         (class symbol_needs_eval_context): Likewise.
192         (indirect_synthetic_pointer): Add forward declaration.
193         (sect_variable_value): New function.
194         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
195         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
196         for DW_OP_GNU_variable_value.
197
198 2018-08-16  Tom Tromey  <tom@tromey.com>
199
200         * top.c (read_command_file): Update.
201         (command_line_input): Remove "repeat" argument.
202         * ada-lang.c (get_selections): Update.
203         * linespec.c (decode_line_2): Update.
204         * defs.h (command_line_input): Remove argument.
205         * cli/cli-script.c (read_next_line): Update.
206         * python/py-gdb-readline.c: Update.
207
208 2018-08-17  Tom Tromey  <tom@tromey.com>
209
210         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
211         command_line_input.
212
213 2018-08-15  Tom Tromey  <tom@tromey.com>
214
215         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
216
217 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
218
219         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
220         If used, use find_pc_partial_function to find address range
221         to disassemble.
222         * mi/mi-main.c (mi_cmd_list_features): Report
223         "data-disassemble-a-option" feature.
224         * NEWS: Mention new -data-disassemble option -a.
225
226 2018-08-13  Tom Tromey  <tom@tromey.com>
227
228         * common/common-defs.h (_FORTIFY_SOURCE): Define.
229
230 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
231
232         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
233         (aarch64_linux_collect_sve_regset): Likewise.
234         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
235         * regcache.h (regcache_map_entry_size): New function.
236
237 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
238
239         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
240         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
241         (SVE_HEADER_VL_LENGTH): Likewise.
242         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
243         (SVE_HEADER_FLAGS_LENGTH): Likewise.
244         (SVE_HEADER_RESERVED_LENGTH): Likewise.
245         (SVE_HEADER_SIZE_OFFSET): Likewise.
246         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
247         (SVE_HEADER_VL_OFFSET): Likewise.
248         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
249         (SVE_HEADER_FLAGS_OFFSET): Likewise.
250         (SVE_HEADER_RESERVED_OFFSET): Likewise.
251         (SVE_HEADER_SIZE): Likewise.
252         (aarch64_linux_core_read_vq): Add function.
253         (aarch64_linux_core_read_description): Check for SVE section.
254
255 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
256
257         * aarch64-fbsd-tdep.c
258         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
259         collect_size.
260         * aarch64-linux-tdep.c
261         (aarch64_linux_iterate_over_regset_sections): Likewise.
262         * alpha-linux-tdep.c
263         (alpha_linux_iterate_over_regset_sections):
264         * alpha-nbsd-tdep.c
265         (alphanbsd_iterate_over_regset_sections): Likewise.
266         * amd64-fbsd-tdep.c
267         (amd64fbsd_iterate_over_regset_sections): Likewise.
268         * amd64-linux-tdep.c
269         (amd64_linux_iterate_over_regset_sections): Likewise.
270         * arm-bsd-tdep.c
271         (armbsd_iterate_over_regset_sections): Likewise.
272         * arm-fbsd-tdep.c
273         (arm_fbsd_iterate_over_regset_sections): Likewise.
274         * arm-linux-tdep.c
275         (arm_linux_iterate_over_regset_sections): Likewise.
276         * corelow.c (get_core_registers_cb): Likewise.
277         (core_target::fetch_registers): Likewise.
278         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
279         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
280         * gdbarch.h (void): Regenerate.
281         * gdbarch.sh: Add supply_size and collect_size.
282         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
283         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
284         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
285         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
286         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
287         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
288         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
289         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
290         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
291         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
292         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
293         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
294         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
295         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
296         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
297         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
298         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
299         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
300         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
301         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
302         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
303         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
304         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
305         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
306         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
307         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
308         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
309         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
310         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
311         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
312
313 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
314
315         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
316         with string_printf.
317
318 2018-08-10  Keith Seitz  <keiths@redhat.com>
319
320         * compile/compile-c-support.c (add_code_header, add_code_footer):
321         Move into policy class.
322         (c_push_user_expression, pop_user_expression_nop)
323         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
324         (compile_program): New host class.
325         (c_compile_program): New typedef.
326         (c_compute_porgram): Use c_compile_program.
327
328 2018-08-10  Keith Seitz  <keiths@redhat.com>
329
330         * compile/compile-internal.h (compile_instance::~compile_instance):
331         Remove calls to htab_delete.
332         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
333         * compile.c (compile_instance::compile_instance): Initialize
334         htab unique pointers.
335         (compile_instance::get_cached_type, compile_instance::insert_type)
336         (compile_instance::error_symbol_once): Update for unique_ptr.
337
338 2018-08-10  Keith Seitz  <keiths@redhat.com>
339
340         * compile/compile-c-symbols.c (struct symbol_error)
341         (hash_symbol_error, eq_symbol_error, del_symbol_error)
342         (compile_instance::insert_symbol_error)
343         (compile_instance::error_symbol_once): Move to ...
344         * compile/compile.c: ... here.
345
346 2018-08-10  Keith Seitz  <keiths@redhat.com>
347
348         * compile/compile-c-support.c (c_get_compile_context): Use `new'
349         instead of `new_compile_instance'.
350         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
351         Update description.
352         If the symbol error map is not initialized, create it.
353         (generate_c_for_for_one_symbol): Do not check/initialize
354         the symbol error map.
355         * compile/compile-c-types.c (compile_c_instance): Make a class.
356         Update all callers.
357         (compile_instance::compile_instance): Initialize the type cache.
358         (get_cached_type): New function.
359         (insert_type): Update description.
360         (compile_c_instance::m_default_cflags): Define.
361         (convert_type): Update description.  Use get_cached_type.
362         (delete_instance): Moved to destructor.
363         (new_compile_instance): Moved to constructor.
364         * compile/compile-c.h (compile_c_instance): Make class inheriting
365         from compile_instance.
366         <base>: Remove field.
367         <type_map, symbol_err_map>: Move to base class.
368         <c_plugin>: Rename to `m_plugin' and remove pointer type.
369         * compile/compile-internal.h (compile_instance): Make class.
370         <type_map_t, symbol_err_map_t>: Define.
371         <fe>: Rename to `m_gcc_fe'.
372         <scope, block, gcc_target_options>: Add `m_' prefix.
373         <m_type_map, m_symbol_err_map>: New fields, moved from
374         compile_c_instance.
375         <destroy>: Remove.
376         (convert_type, new_compile_instance): Remove.
377         * compile/compile.c (cleanup_compile_instance): Remove.
378         (compile_to_object): Use unique_ptr to eliminate cleanups.
379         (compile_instance::set_print_callback, compile_instance::version)
380         (compile_instance::set_verbose)
381         (compile_instance::set_driver_filename)
382         (compile_instance::set_triplet_regexp)
383         (compile_instance::set_arguments)
384         (compile_instance::set_source_file)
385         (compile_instance::compile): Define.
386
387 2018-08-10  Keith Seitz  <keiths@redhat.com>
388
389         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
390         * compile/compile-c-types.c: Define GCC_METHODN macros and include
391         gcc-c-fe.def to define C plugin.
392         (delete_instance): Delete `c_plugin'.
393         (new_compile_instance): Initialize `c_plugin'.
394         * compile/compile-c.h: Include gcc_c_plugin.h.
395         (struct compile_c_instance) <c_plugin>: New member.
396         * gcc-c-plugin.h: New file.
397         Update all callers with API change.
398
399 2018-08-10  Keith Seitz  <keiths@redhat.com>
400
401         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
402         (HFILES_NO_SRCDIR): ... to here.
403         Add compile-internal.h and compile-c.h.
404         * compile/compile-c-support.c: Include compile-c.h.
405         * compile/compile-c-symbols.c: Include compile-c.h.
406         (generate_c_for_variable_locations): Update comment.
407         * compile/compile-c-types.c: Include compile-c.h.
408         * compile/compile-c.h: New file -- moved C language declarations
409         from other files here.
410         * compile/compile-internal.h: Do not include hashtab.h or
411         common/enum-flags.h.
412         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
413         (gcc_convert_symbol, gcc_symbol_address)
414         (generate_c_for_variable_locations, c_get_mode_for_size)
415         (c_get_range_decl_name): Definitions moved to compile-c.h.
416         * compile/compile-loc2c.c: Include compile-c.h.
417
418 2018-08-10  Keith Seitz  <keiths@redhat.com>
419
420         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
421         (c_symbol_substitution_name): ... this.
422         Update all callers.
423
424 2018-08-10  Keith Seitz  <keiths@redhat.com>
425
426         * compile/compile-c-support.c (c_compute_program): Use
427         unique_xmalloc_ptr to eliminate cleanup.
428         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
429         Return a unique_xmalloc_ptr and eliminate cleanup.
430         * compile/compile-internal.h (generate_c_for_variable_locations):
431         Return unique_xmalloc_ptr and update description.
432
433 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
434
435         * corelow.c (core_target::get_core_register_section): Rename
436         min_size to section_min_size.
437
438 2018-08-09  Jim Wilson  <jimw@sifive.com>
439
440         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
441         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
442         * NEWS: Mention new GNU/Linux RISC-V target.
443         * configure.host: Add riscv*-*-linux*.
444         * configure.nat: Add riscv*.
445         * configure.tgt: Add riscv*-*-linux*.
446         * riscv-linux-nat.c: New file.
447         * riscv-linux-tdep.c: New file.
448
449 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
450
451         * infrun.c (resume): Make static, add forward declaration.
452         (proceed): Update header comment.
453         * infrun.h (resume): Delete declaration.
454
455 2018-08-09  Tom Tromey  <tom@tromey.com>
456
457         * riscv-tdep.h: Minor formatting fixes.
458
459 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
460
461         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
462         * dwarf-index-cache.c (create_dir_and_check): Likewise.
463         (test_mkdir_recursive): Likewise.
464         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
465
466 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
467
468         * valarith.c (value_subscripted_rvalue): If an array is not in
469         memory, and we don't know the upper bound, then we can't know that
470         the requested element exists or not.
471
472 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
473
474         * target.c (str_comma_list_concat_elem): Fix typo in comment.
475         (target_options_to_string): Add comment.
476
477 2018-08-08  Tom Tromey  <tom@tromey.com>
478
479         * unittests/scoped_mmap-selftests.c: Check result of "write".
480
481 2018-08-08  Jim Wilson  <jimw@sifive.com>
482
483         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
484         (decode_register_index_short): New.
485         (decode_j_type_insn, decode_cj_type_insn): New.
486         (decode_b_type_insn, decode_cb_type_insn): New.
487         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
488         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
489         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
490         is_c_sw_insn instead of is_sw_insn.
491         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
492         (riscv_software_single_step): New.
493         * riscv-tdep.h (riscv_software_single_step): Declare.
494
495         * riscv-tdep.c (riscv_isa_xlen): Drop static.
496         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
497
498 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
499
500         PR gdb/18050:
501         * target.c (dispose_inferior): Don't dispose of inferiors that are
502         already killed.
503
504 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
505
506         * remote.c (remote_target::download_tracepoint): Change char* to
507         const char*.
508
509 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
510
511         * target.h (target_options_to_string): Return an std::string.
512         * target.c (str_comma_list_concat_elem): Return void, use
513         std::string.
514         (do_option): Likewise.
515         (target_options_to_string): Return an std::string.
516         * linux-nat.c (linux_nat_target::wait): Adjust.
517         * target-debug.h (target_debug_print_options): Adjust.
518
519 2018-08-07  Tom Tromey  <tom@tromey.com>
520
521         * Makefile.in (CPPFLAGS): New variable.
522         (INTERNAL_CPPFLAGS): Use it.
523
524 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
525
526         * NEWS: Mention the index cache.
527
528 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
529
530         * common/pathstuff.h (get_standard_cache_dir): New.
531         * common/pathstuff.c (get_standard_cache_dir): New.
532         * build-id.h (build_id_to_string): New.
533         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
534         DEBUG_STR_SUFFIX): Move to here.
535         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
536         DEBUG_STR_SUFFIX): Move from there.
537         (write_psymtabs_to_index): Make non-static, add basename
538         parameter.  Write to temporary files, rename when done.
539         (save_gdb_index_command): Adjust call to
540         write_psymtabs_to_index.
541         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
542         field.
543         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
544         (get_gdb_index_contents_from_cache): New.
545         (get_gdb_index_contents_from_cache_dwz): New.
546         (dwarf2_initialize_objfile): Read index from cache.
547         (dwarf2_build_psymtabs): Save to index.
548         * dwarf-index-cache.h: New file.
549         * dwarf-index-cache.c: New file.
550         * dwarf-index-write.h: New file.
551
552 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
553
554         * gnulib/aclocal.m4: Re-generate.
555         * gnulib/config.in: Re-generate.
556         * gnulib/configure: Re-generate.
557         * gnulib/import/Makefile.am: Re-generate.
558         * gnulib/import/Makefile.in: Re-generate.
559         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
560         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
561         * gnulib/import/m4/mkdir.m4: New file.
562         * gnulib/import/mkdir.c: New file.
563         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
564         module.
565
566 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
567
568         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
569         * common/scoped_mmap.c: New file.
570         * common/scoped_mmap.h (destroy): New method.
571         (~scoped_mmap, reset): Use destroy.
572         (scoped_mmap): New move constructor.
573         (mmap_file): New declaration.
574         * unittests/scoped_mmap-selftests.c (test_normal,
575         test_invalid_filename, run_tests): New functions.
576         (_initialize_scoped_mmap_selftests): Register selftest.
577
578 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
579
580         * dwarf2read.c (read_gdb_index_from_section): Rename to...
581         (read_gdb_index_from_buffer): ... this.  Remove section
582         parameter, add buffer parameter.
583         (get_gdb_index_contents_ftype,
584         get_gdb_index_contents_dwz_ftype): New typedefs.
585         (dwarf2_read_gdb_index): Add callback parameters to get the
586         index contents.
587         (get_gdb_index_contents_from_section): New.
588         (dwarf2_initialize_objfile): Update call to
589         dwarf2_read_gdb_index.
590
591 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
592
593         * common/filestuff.h (gdb_fopen_cloexec): New overload.
594         (gdb_open_cloexec): Likewise.
595         * nat/linux-osdata.c (command_from_pid): Use string_printf.
596         (commandline_from_pid): Likewise.
597         (linux_xfer_osdata_threads): Likewise.
598         (linux_xfer_osdata_fds): Likewise.
599         * ada-lang.c (is_package_name): Likewise.
600         * auxv.c (procfs_xfer_auxv): Likewise.
601         * breakpoint.c (print_one_breakpoint_location): Use
602         uiout::field_fmt.
603         (print_one_catch_solib): Use string_printf.
604         * coff-pe-read.c (add_pe_exported_sym): Likewise.
605         (add_pe_forwarded_sym): Likewise.
606         * dwarf2read.c (create_type_unit_group): Likewise.
607         (build_error_marker_type): Likewise.
608         * infcall.c (get_function_name): Likewise.
609         * valprint.c (print_converted_chars_to_obstack): Likewise.
610         * xtensa-tdep.c (xtensa_register_type): Likewise.
611
612 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
613
614         * remote.c (remote_target::download_tracepoint): Fix format
615         string errors.
616
617 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
618
619         * tracefile.c: Include common/byte-vector.h.
620         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
621         with trace_regblock_size if needed.  Update uses of buf.
622
623 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
624
625         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
626         std::vector<unsigned char>.
627         * tracepoint.c (collection_list::collection_list): Remove
628         m_regs_mask initializer from initializer list.  Resize
629         m_regs_mask using the largest remote register number.
630         (collection_list::add_remote_register): Remove size check on
631         m_regs_mask.  Use at to access element.
632         (collection_list::stringify): Change type of temp_buf to
633         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
634         stringify the register mask.  Use pack_hex_byte for the register
635         mask.
636
637 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
638
639         * tracepoint.h (class collection_list) <add_register>: Remove.
640         <add_remote_register, add_ax_registers, add_local_register>:
641         Declare.
642         <add_memrange>: Add scope parameter.
643         * tracepoint.c (encode_actions_1): Likewise.
644         (collection_list::add_register): Rename to ...
645         (collection_list::add_remote_register): ... this.  Update
646         comment.
647         (collection_list::add_ax_registers, add_local_register): New
648         methods.
649         (collection_list::add_memrange): Add scope parameter.  Call
650         add_local_register instead of add_register.
651         (finalize_tracepoint_aexpr): New function.
652         (collection_list::collect_symbol): Update calls to add_memrange.
653         Call add_local_register instead of add_register.  Call
654         add_ax_registers.  Call finalize_tracepoint_aexpr.
655         (encode_actions_1): Get remote regnos for $reg action.  Call
656         add_remote_register, add_ax_registers, and add_local_register.
657         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
658         (validate_actionline): Call finalize_tracepoint_aexpr.
659
660 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
661
662         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
663         Replace array buf with gdb::char_vector buf, of size
664         get_remote_packet_size ().  Replace references to buf and
665         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
666         and xsnprintf with snprintf.  Raise errors if the buffer is too
667         small.
668
669 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
670
671         * remote.c (remote_target::download_tracepoint): Fix the has_more
672         predicate in the QTDP action list iteration.
673
674 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
675
676         * remote.c (remote_target::download_tracepoint): Fix indentation
677         in for block.
678
679 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
680
681         * proc-api.c (_initialize_proc_api): Remove c, unused.
682         * procfs.c (procfs_init_inferior): Remove signals, unused.
683         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
684         unused.
685
686 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
687             Andrew Burgess  <andrew.burgess@embecosm.com>
688
689         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
690         'W_STOPCODE (0)' as this could be ambiguous.
691
692 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
693
694         * ser-tcp.c (net_open): Fix thinko when deciding whether to
695         disable TCP's Nagle algorithm (use "ai_protocol" instead of
696         "ai_socktype").
697
698 2018-08-02  Tom Tromey  <tom@tromey.com>
699
700         PR symtab/16842.
701         * dwarf2read.c (read_func_scope): Set symtab on template parameter
702         symbols.
703         (process_structure_scope): Likewise.
704
705 2018-08-02  Xavier Roirand  <roirand@adacore.com>
706
707         PR gdb/22629:
708         * darwin-nat.c (darwin_kill_inferior): Fix handling of
709         kill inferior.
710
711 2018-08-02  Tom Tromey  <tom@tromey.com>
712
713         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
714         (darwin_suspend_inferior, darwin_resume_inferior)
715         (darwin_decode_notify_message, darwin_resume_inferior_threads)
716         (darwin_check_new_threads): Check result of get_darwin_inferior.
717
718 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
719
720         GDB 8.1.1 released.
721
722 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
723
724         * varobj.c (varobj_get_path_expr_parent): Report an error if
725         parent is a dynamic varobj.
726
727 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
728
729         * gnulib/aclocal.m4: Re-generate.
730         * gnulib/config.in: Re-generate.
731         * gnulib/configure: Re-generate.
732         * gnulib/import/Makefile.in: Re-generate.
733         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
734         * gnulib/import/m4/onceonly.m4: Re-generate.
735
736 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
737
738         * target-descriptions.c (struct xml_test_tdesc): New.
739         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
740         (record_xml_tdesc): Update.
741         (maintenance_check_xml_descriptions): Update.
742         * target-descriptions.h (record_xml_tdesc): Update comment.
743
744 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
745
746         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
747         checking array bounds are defined.
748
749 2018-07-30  Tom Tromey  <tom@tromey.com>
750
751         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
752         irreflexivity violation.
753
754 2018-07-30  Tom Tromey  <tom@tromey.com>
755
756         * cli/cli-decode.c (lookup_cmd): Remove lint code.
757         * value.c (unpack_long): Remove lint code.
758         * valops.c (value_ind): Remove lint code.
759         * valarith.c (value_x_binop, value_x_unop, value_equal)
760         (value_pos): Remove lint code.
761
762 2018-07-28  Tom de Vries  <tdevries@suse.de>
763
764         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
765         with undefined upper bound as <optimized out>.
766
767 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
768
769         * gcore.in: Rename variable "name" to "prefix".  Expand
770         "usage" text.
771
772 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
773
774         * windows-nat.c (windows_nat_target::create_inferior): Update to
775         call close() in global namespace.
776
777 2018-07-26  Tom Tromey  <tom@tromey.com>
778
779         * dwarf-index-write.c (add_address_entry): Don't add objfile
780         offsets.
781         * dbxread.c (find_stab_function): Rename from
782         find_stab_function_addr.  Return a bound_minimal_symbol.
783         (read_dbx_symtab): Use raw_text_low, raw_text_high.
784         Don't add objfile offsets.
785         (end_psymtab): Use raw_text_low, raw_text_high,
786         MSYMBOL_VALUE_RAW_ADDRESS.
787         (read_ofile_symtab): Update.
788         (process_one_symbol): Update.
789         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
790         offsets.
791         (dw2_relocate): Remove.
792         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
793         searching addrmap.
794         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
795         Update.
796         (process_psymtab_comp_unit_reader, add_partial_symbol)
797         (add_partial_subprogram, dwarf2_ranges_read): Update.
798         (load_partial_dies): Update.
799         (add_address_entry): Don't add objfile offsets.
800         (dwarf2_build_include_psymtabs): Update.
801         (create_addrmap_from_aranges): Don't add objfile offsets.
802         (dw2_find_pc_sect_compunit_symtab): Update.
803         * mdebugread.c (parse_symbol): Don't add objfile offsets.
804         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
805         Update.
806         (parse_partial_symbols): Don't add objfile offsets.  Use
807         raw_text_low, raw_text_high.  Update.
808         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
809         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
810         or call 'relocate' quick function.  Clear psymbol_map.
811         * psympriv.h (struct partial_symbol) <address>: Add section
812         offset.
813         <set_unrelocated_address>: Rename from set_address.
814         <raw_text_low, raw_text_high>: New methods.
815         <text_low, text_high>: Add objfile parameter.
816         (add_psymbol_to_bcache): Add 'section' parameter.  Call
817         set_unrelocated_address.
818         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
819         (find_pc_psymbol): Update.
820         (fixup_psymbol_section, relocate_psymtabs): Remove.
821         (dump_psymtab, psym_functions): Update.
822         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
823         parameter.
824         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
825         (start_psymtab_common): Update.
826         * symfile-debug.c (debug_qf_relocate): Remove.
827         (debug_sym_quick_functions): Update.
828         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
829         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
830         Update.
831
832 2018-07-26  Tom Tromey  <tromey@redhat.com>
833
834         * dbxread.c (end_psymtab): Use text_high_valid and
835         text_low_valid.
836         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
837         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
838         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
839         Update comment.
840         <text_low_valid, text_high_valid>: New fields.
841         <set_text_low, set_text_high>: Update.
842         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
843
844 2018-07-26  Tom Tromey  <tom@tromey.com>
845
846         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
847         Update.
848         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
849         textlow and texthigh fields.
850         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
851         Update.
852         * mdebugread.c (parse_lines, parse_partial_symbols)
853         (psymtab_to_symtab_1): Update.
854         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
855         Rename fields.  Update comment.  Now private.
856         <text_low, text_high, set_text_low, set_text_high>: New methods.
857         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
858         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
859         (start_psymtab_common, maintenance_info_psymtabs)
860         (maintenance_check_psymtabs): Update.
861         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
862         texthigh fields.
863         (scan_xcoff_symtab): Update.
864
865 2018-07-26  Tom Tromey  <tromey@redhat.com>
866
867         * psympriv.h (struct partial_symbol) <unrelocated_address,
868         address, set_address>: New methods.
869         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
870         (fixup_psymbol_section, relocate_psymtabs): Update.
871         (print_partial_symbols): Add 'objfile' parameter.  Update.
872         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
873         Update.
874
875 2018-07-26  Tom Tromey  <tom@tromey.com>
876
877         * dwarf-index-write.c (write_psymbols, debug_names::insert)
878         (debug_names::write_psymbols): Update.
879         * psympriv.h (struct partial_symbol): Derive from
880         general_symbol_info.
881         <obj_section>: New method.
882         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
883         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
884         (find_pc_sect_psymbol, fixup_psymbol_section)
885         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
886         (print_partial_symbols, recursively_search_psymtabs)
887         (compare_psymbols, psymbol_hash, psymbol_compare)
888         (add_psymbol_to_bcache, maintenance_check_psymtabs)
889         (psymbol_name_matches, psym_fill_psymbol_map): Update.
890
891 2018-07-26  Tom Tromey  <tromey@redhat.com>
892
893         * dbxread.c (end_psymtab): Remove dead code.
894
895 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
896
897         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
898         DWARF unwinders are disabled.
899         * dwarf2-frame.c: Add dwarf2read.h include.
900         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
901         disabled.
902         (dwarf2_frame_unwinders_enabled_p): Define.
903         (show_dwarf_unwinders_enabled_p): New function.
904         (_initialize_dwarf2_frame): Register switch to control DWARF
905         unwinder use.
906         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
907         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
908         (show_dwarf_cmdlist): Remove static keyword.
909         * dwarf2read.h (set_dwarf_cmdlist): Declare.
910         (show_dwarf_cmdlist): Declare.
911         * NEWS: Document new feature.
912
913 2018-07-26  Tom de Vries  <tdevries@suse.de>
914
915         PR breakpoints/23366
916         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
917
918 2018-07-26  Tom de Vries  <tdevries@suse.de>
919
920         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
921         DW_AT_count can't be translated to a dynamic prop.
922
923 2018-07-25  Tom de Vries  <tdevries@suse.de>
924
925         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
926         try/catch.
927
928 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
929
930         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
931
932 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
933
934         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
935
936 2018-07-24  Keith Seitz  <keiths@redhat.comt
937
938         PR symtab/23010
939         * dwarf2read.c (dw2_add_symbol_to_list): New function.
940         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
941         instead of add_symbol_to_list.
942         (read_file_scope): Call prepare_one_comp_unit before reading
943         any other DIEs.
944
945 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
946
947         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
948
949 2018-07-24  Tom Tromey  <tom@tromey.com>
950
951         * utils.c (malloc, realloc, free): Don't declare.
952         * configure, config.in: Rebuild.
953         * configure.ac: Don't check for declarations of free, malloc, or
954         realloc.
955
956 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
957
958         * aarch64-linux-nat.c
959         (aarch64_linux_nat_target::stopped_data_address): Remove unused
960         variable.
961         * arm-linux-nat.c (fetch_regs): Likewise.
962         (store_regs): Likewise.
963         (fetch_vfp_regs): Likewise.
964         (store_vfp_regs): Likewise.
965         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
966         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
967         (arm_linux_nat_target::insert_watchpoint): Likewise.
968         (arm_linux_nat_target::remove_watchpoint): Likewise.
969         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
970         Likewise.
971         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
972         Likewise.
973         * ppc-linux-nat.c (fetch_register): Likewise.
974         (fetch_all_gp_regs): Likewise.
975         (fetch_ppc_registers): Likewise.
976         (store_all_gp_regs): Likewise.
977         (store_ppc_registers): Likewise.
978         (hwdebug_insert_point): Likewise.
979         (can_use_watchpoint_cond_accel): Likewise.
980         * remote-sim.c (gdb_os_write_stdout): Likewise.
981
982 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
983             Tom Tromey  <tom@tromey.com>
984
985         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
986         test for it.
987         * configure: Rebuild.
988
989 2018-07-22  Tom Tromey  <tom@tromey.com>
990
991         * regformats/regdat.sh: Define xmltarget_${name} inside
992         #ifndef IN_PROCESS_AGENT.
993
994 2018-07-22  Tom Tromey  <tom@tromey.com>
995
996         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
997
998 2018-07-22  Tom Tromey  <tom@tromey.com>
999
1000         * symfile.c (reread_symbols): Notify iter, not objfile.
1001
1002 2018-07-22  Tom Tromey  <tom@tromey.com>
1003
1004         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1005         Use arch_ops.
1006         (ravenscar_thread_target::prepare_to_store): Likewise.
1007
1008 2018-07-22  Tom Tromey  <tom@tromey.com>
1009
1010         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1011         unused variable.  Call value_fetch_lazy when needed.
1012         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1013         Remove unused variable.  Call value_fetch_lazy when needed.
1014
1015 2018-07-22  Tom Tromey  <tom@tromey.com>
1016
1017         * m32c-tdep.c (mark_dma): Return void.
1018         (make_regs): Remove unused declarations.
1019
1020 2018-07-22  Tom Tromey  <tom@tromey.com>
1021
1022         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1023         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1024         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1025         bkscm_get_valid_block_smob_arg_unsafe for effect.
1026
1027 2018-07-22  Tom Tromey  <tom@tromey.com>
1028
1029         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1030         value_type.
1031
1032 2018-07-22  Tom Tromey  <tom@tromey.com>
1033
1034         * windows-nat.c (saved_context): Conditionally define.
1035         * remote.c (remote_target::remote_btrace_maybe_reopen):
1036         Conditionally declare "warned".
1037         * inflow.c (sigquit_ours): Conditionally define.
1038         (new_tty): Move "tty" declaration inside #if.
1039         * guile/guile.c (guile_datadir): Conditionally define.
1040         * charset.c (set_be_le_names): Move some declarations inside #if.
1041         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1042         #if.
1043         (parse_xml_btrace_conf): Likewise.
1044
1045 2018-07-22  Tom Tromey  <tom@tromey.com>
1046
1047         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1048
1049 2018-07-22  Tom Tromey  <tom@tromey.com>
1050
1051         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1052         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1053         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1054         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1055         * stack.c (frame_apply_level_command): Remove unused variable.
1056         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1057         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1058         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1059         unused variable.
1060         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1061         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1062         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1063         variable.
1064         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1065         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1066         variable.
1067         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1068         Remove unused variable.
1069         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1070         variable.
1071         * common/tdesc.c (print_xml_feature::visit): Remove unused
1072         variable.
1073         * compile/compile-object-load.c (store_regs): Remove unused
1074         variables.
1075         * complaints.c (clear_complaints): Remove unused variable.
1076         * corelow.c (core_target_open): Remove unused variable.
1077         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1078         variable.
1079         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1080         variable.
1081         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1082         variable.
1083         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1084         variable.
1085         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1086         variable.
1087         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1088         variable.
1089         * ia64-tdep.c (examine_prologue): Remove unused variable.
1090         * infcall.c (run_inferior_call): Remove unused variable.
1091         * inferior.c (exit_inferior): Remove unused variable.
1092         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1093         * linespec.c (decode_line_2): Remove unused variable.
1094         * linux-nat.c (super_close): Remove.
1095         * linux-tdep.c (linux_info_proc): Remove unused variable.
1096         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1097         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1098         Remove unused variable.
1099         * parse.c (find_minsym_type_and_address): Remove unused variable.
1100         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1101         variable.
1102         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1103         variable.
1104         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1105         variables.
1106         * record-btrace.c (record_btrace_target::store_registers): Remove
1107         unused variable.
1108         (cmd_show_record_btrace_cpu): Remove unused variable.
1109         * riscv-tdep.c (riscv_register_reggroup_p)
1110         (riscv_push_dummy_call, riscv_return_value): Remove unused
1111         variable.
1112         * rust-exp.y (literal): Remove unused variable.
1113         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1114         unused variable.
1115         <STRUCTOP_ANONYMOUS>: Likewise.
1116         * s390-linux-tdep.c (s390_linux_init_abi_31)
1117         (s390_linux_init_abi_64): Remove unused variable.
1118         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1119         (file_select_thread, net_windows_open, _initialize_ser_windows):
1120         Remove unused variables.
1121         * symtab.c (find_pc_sect_line): Remove unused variable.
1122         * target-memory.c (compute_garbled_blocks): Remove unused
1123         variable.
1124         (target_write_memory_blocks): Remove unused variable.
1125         * target.c (target_stack::unpush): Remove unused variables.
1126         * tracepoint.c (start_tracing, all_tracepoint_actions)
1127         (merge_uploaded_trace_state_variables)
1128         (print_one_static_tracepoint_marker): Remove unused variable.
1129         * unittests/basic_string_view/element_access/char/1.cc (test01):
1130         Remove unused variable.
1131         * windows-nat.c (windows_continue, windows_add_all_dlls)
1132         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1133         Remove unused variables.
1134
1135 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1136
1137         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1138         attr_profile in HAVE_ELF.
1139         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1140         HAVE_ELF.
1141
1142 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1143
1144         * frame.c (frame_register_unwind): Change parameter name.
1145         (frame_unwind_register): Likewise.
1146         (frame_unwind_register_value): Likewise.
1147         (frame_unwind_register_signed): Likewise.
1148         (frame_unwind_register_unsigned): Likewise.
1149         * frame.h (frame_register_unwind): Likewise.
1150         (frame_unwind_register): Likewise.
1151         (frame_unwind_register_value): Likewise.
1152         (frame_unwind_register_signed): Likewise.
1153         (frame_unwind_register_unsigned): Likewise.
1154         (frame_unwind_arch): Likewise.
1155
1156 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1157
1158         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1159         ISA maintenance.
1160
1161 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1162
1163         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1164         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1165         hand.
1166
1167 2018-07-20  Keith Seitz  <keiths@redhat.com>
1168
1169         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1170         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1171         m_compunit_symtab, m_language>: Add "m_" prefix.
1172         Update all uses.
1173         * buildsym.c: Update all uses.
1174
1175 2018-07-20  Tom Tromey  <tom@tromey.com>
1176
1177         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1178         * buildsym.h (record_line_ftype): Remove typedef.
1179
1180 2018-07-20  Tom Tromey  <tom@tromey.com>
1181
1182         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1183         (end_expandable_symtab): Likewise.
1184         (end_symtab_get_static_block): Likewise.
1185         (end_symtab_from_static_block): Likewise.
1186         * buildsym-legacy.c (augment_type_symtab): Remove.
1187         (end_expandable_symtab): Remove.
1188         (end_symtab_get_static_block): Remove.
1189         (end_symtab_from_static_block): Remove.
1190
1191 2018-07-20  Tom Tromey  <tom@tromey.com>
1192
1193         * dwarf2read.c: Include buildsym.h.
1194         (struct dwarf2_cu) <builder>: New method.
1195         (fixup_go_packaging): Update.
1196         (process_full_comp_unit, process_full_type_unit): Update.  Don't
1197         use scoped_free_pendings.
1198         (using_directives): Add "cu" parameter, remove "language".
1199         (read_import_statement, setup_type_unit_groups, )
1200         (read_func_scope, read_lexical_block_scope)
1201         (dwarf2_record_block_ranges, read_namespace): Update.
1202         (lnp_state_machine::lnp_state_machine): Add cu parameter.
1203         (lnp_state_machine::handle_end_sequence): Update.
1204         (class lnp_state_machine) <m_cu>: New member.
1205         <m_record_line_callback>: Remove.
1206         <m_currently_recording_lines>: New member.
1207         (lnp_state_machine::handle_set_file): Update.
1208         (noop_record_line): Remove.
1209         (dwarf_record_line_p): Add cu parameter.
1210         (dwarf_record_line_1, dwarf_finish_line): Likewise.
1211         (lnp_state_machine::record_line)
1212         (lnp_state_machine::lnp_state_machine)
1213         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1214         (dwarf_decode_lines): Update.
1215         (dwarf2_start_subfile): Add cu parameter.
1216         (dwarf2_start_symtab, new_symbol): Update.
1217         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1218         Remove dwarf2_per_objfile parameter.
1219         (dwarf_decode_macros): Update.
1220
1221 2018-07-20  Tom Tromey  <tom@tromey.com>
1222
1223         * stabsread.c (define_symbol): Update.
1224         * buildsym-legacy.h (get_buildsym_compunit): Declare.
1225         * dwarf2read.c (new_symbol): Update.
1226         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1227         * cp-namespace.c: Include buildsym.h.
1228         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1229         * buildsym-legacy.c (get_buildsym_compunit): New function.
1230
1231 2018-07-20  Tom Tromey  <tom@tromey.com>
1232
1233         * xcoffread.c: Include buildsym-legacy.h.
1234         * windows-nat.c: Include buildsym-legacy.h.
1235         * stabsread.c: Include buildsym-legacy.h.
1236         * mdebugread.c: Include buildsym-legacy.h.
1237         * buildsym-legacy.h: New file.
1238         * buildsym-legacy.c: New file, from buildsym.c.
1239         * go32-nat.c: Include buildsym-legacy.h.
1240         * dwarf2read.c: Include buildsym-legacy.h.
1241         * dbxread.c: Include buildsym-legacy.h.
1242         * cp-namespace.c: Include buildsym-legacy.h.
1243         * coffread.c: Include buildsym-legacy.h.
1244         * buildsym.h: Move some contents to buildsym-legacy.h.
1245         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
1246         buildsym-legacy.c.
1247         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1248
1249 2018-07-20  Tom Tromey  <tom@tromey.com>
1250
1251         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1252         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1253         (buildsym_compunit::buildsym_compunit)
1254         (buildsym_compunit::~buildsym_compunit)
1255         (buildsym_compunit::get_macro_table): Define.
1256
1257 2018-07-20  Tom Tromey  <tom@tromey.com>
1258
1259         * buildsym.c (reset_symtab_globals): Remove.
1260         (buildsym_compunit::end_symtab_from_static_block): Update.
1261         (buildsym_compunit::augment_type_symtab): Update.
1262         (end_symtab_from_static_block): Call free_buildsym_compunit.
1263         (augment_type_symtab, end_symtab, end_expandable_symtab):
1264         Likewise.
1265
1266 2018-07-20  Tom Tromey  <tom@tromey.com>
1267
1268         * arch-utils.c: Do not include buildsym.h.
1269         * mipsread.c: Do not include buildsym.h.
1270         * machoread.c: Do not include buildsym.h.
1271         * elfread.c: Do not include buildsym.h.
1272
1273 2018-07-20  Tom Tromey  <tom@tromey.com>
1274
1275         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1276         initialization.
1277         (buildsym_compunit): Add new constructor.
1278         (struct buildsym_compunit) <get_last_source_file, finish_block,
1279         record_block_range, start_subfile, patch_subfile_names,
1280         push_subfile, pop_subfile, record_line, get_compunit_symtab,
1281         set_last_source_start_addr, get_last_source_start_addr,
1282         get_local_using_directives, set_local_using_directives,
1283         get_global_using_directives, outermost_context_p,
1284         get_current_context_stack, get_context_stack_depth,
1285         get_current_subfile, get_local_symbols, get_file_symbols,
1286         get_global_symbols, record_debugformat, record_producer,
1287         push_context, pop_context, end_symtab_get_static_block,
1288         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1289         New public methods.
1290         <record_pending_block, finish_block_internal, make_blockvector,
1291         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1292         private methods.
1293         Update all users.
1294
1295 2018-05-22  Tom Tromey  <tom@tromey.com>
1296
1297         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1298         parameter.
1299         (finish_block_internal): Update.
1300
1301 2018-07-20  Tom Tromey  <tom@tromey.com>
1302
1303         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1304         parameter.
1305         (finish_block_internal): Update.
1306
1307 2018-07-20  Tom Tromey  <tom@tromey.com>
1308
1309         * buildsym.h (EXTERN): Don't define or undef.
1310         * buildsym.c (EXTERN): Don't define.
1311
1312 2018-07-20  Tom Tromey  <tom@tromey.com>
1313
1314         * buildsym.c: Remove TODO comment.
1315
1316 2018-07-20  Tom Tromey  <tom@tromey.com>
1317
1318         * coffread.c (coff_symtab_read): Update.
1319         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1320         (xcoff_new_init): Update.
1321         * mipsread.c (mipscoff_new_init): Update.
1322         * mdebugread.c (mdebug_build_psymtabs): Update.
1323         * elfread.c (elf_new_init): Update.
1324         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1325         Update.
1326         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1327         (coffstab_build_psymtabs, elfstab_build_psymtabs)
1328         (stabsect_build_psymtabs): Update.
1329         * buildsym.h (buildsym_init): Don't declare.
1330         * buildsym.c: Update comment.
1331         (prepare_for_building): Remove.
1332         (start_symtab, restart_symtab): Update.
1333         (reset_symtab_globals): Update comment.
1334         (buildsym_init): Remove.
1335
1336 2018-07-20  Tom Tromey  <tom@tromey.com>
1337
1338         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1339         * stabsread.c (patch_block_stabs, define_symbol, read_type)
1340         (read_enum_type, common_block_start, common_block_end)
1341         (cleanup_undefined_types_1, finish_global_stabs): Update.
1342         * mdebugread.c (psymtab_to_symtab_1): Update.
1343         * dwarf2read.c (fixup_go_packaging, read_func_scope)
1344         (read_lexical_block_scope, new_symbol): Update.
1345         * dbxread.c (process_one_symbol): Update.
1346         * coffread.c (coff_symtab_read, process_coff_symbol)
1347         (coff_read_enum_type): Update.
1348         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1349         declare.
1350         (get_local_symbols, get_file_symbols, get_global_symbols): New
1351         functions.
1352         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1353         m_global_symbols.
1354         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1355         (~scoped_free_pendings): Update.
1356         (finish_block, prepare_for_building, reset_symtab_globals)
1357         (end_symtab_get_static_block, end_symtab_with_blockvector)
1358         (augment_type_symtab, push_context): Update.
1359         (get_local_symbols, get_file_symbols, get_global_symbols): New
1360         functions.
1361         (buildsym_init): Update.
1362
1363 2018-07-20  Tom Tromey  <tom@tromey.com>
1364
1365         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1366         (process_full_type_unit): Likewise.
1367         (dwarf2_start_symtab): Set list_in_scope.
1368
1369 2018-07-20  Tom Tromey  <tom@tromey.com>
1370
1371         * dwarf2read.c (process_psymtab_comp_unit_reader)
1372         (build_type_psymtabs_reader): Do not set list_in_scope.
1373
1374 2018-07-20  Tom Tromey  <tom@tromey.com>
1375
1376         * buildsym.c (free_pendings): Remove.
1377         (add_symbol_to_list, scoped_free_pendings)
1378         (finish_block_internal, buildsym_init): Update.
1379
1380 2018-07-20  Tom Tromey  <tom@tromey.com>
1381
1382         * xcoffread.c (read_xcoff_symtab): Update.
1383         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1384         Update.
1385         * dbxread.c (process_one_symbol): Update.
1386         * coffread.c (coff_symtab_read): Update.
1387         * buildsym.h (finish_block): Update.
1388         * buildsym.c (finish_block): Remove "listhead" argument.
1389         (end_symtab_get_static_block): Update.
1390
1391 2018-07-20  Tom Tromey  <tom@tromey.com>
1392
1393         * buildsym.h (class scoped_free_pendings): Remove constructor.
1394         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1395         method.
1396         <m_pending_block_obstack, m_pending_blocks>: New members.
1397         (pending_block_obstack, pending_blocks): Remove.
1398         (scoped_free_pendings::scoped_free_pendings): Default.
1399         (~scoped_free_pendings): Update.
1400         (free_pending_blocks): Remove.
1401         (finish_block_internal, record_pending_block, make_blockvector)
1402         (end_symtab_get_static_block, augment_type_symtab, push_context)
1403         (buildsym_init): Update.
1404
1405 2018-07-20  Tom Tromey  <tom@tromey.com>
1406
1407         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1408         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1409         members.
1410         (pending_addrmap, pending_addrmap_obstack)
1411         (pending_addrmap_interesting): Remove.
1412         (scoped_free_pendings, record_block_range, make_blockvector)
1413         (prepare_for_building, reset_symtab_globals, buildsym_init):
1414         Update.
1415
1416 2018-07-20  Tom Tromey  <tom@tromey.com>
1417
1418         * xcoffread.c (process_linenos): Update.
1419         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1420         * mdebugread.c (psymtab_to_symtab_1): Update.
1421         * dwarf2read.c (setup_type_unit_groups)
1422         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1423         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1424         * dbxread.c (process_one_symbol): Update.
1425         * coffread.c (coff_symtab_read, enter_linenos)
1426         (process_coff_symbol): Update.
1427         * buildsym.h (current_subfile): Don't declare.
1428         (get_current_subfile): Declare.
1429         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1430         member.
1431         (start_subfile, free_buildsym_compunit, push_subfile)
1432         (prepare_for_building, start_symtab): Update.
1433         (get_current_subfile): New function.
1434
1435 2018-07-20  Tom Tromey  <tom@tromey.com>
1436
1437         * coffread.c (coff_symtab_read): Update.
1438         * xcoffread.c (read_xcoff_symtab): Update.
1439         * dwarf2read.c (new_symbol): Update.
1440         (read_func_scope, read_lexical_block_scope): Update.
1441         * dbxread.c (process_one_symbol): Update.
1442         * buildsym.h (context_stack, context_stack_depth): Don't declare.
1443         (outermost_context_p): Remove macro.
1444         (outermost_context_p, get_current_context_stack)
1445         (get_context_stack_depth): Declare.
1446         (pop_context): Return struct context_stack.
1447         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1448         member.
1449         (context_stack_size): Remove.
1450         (INITIAL_CONTEXT_STACK_SIZE): Remove.
1451         (prepare_for_building, end_symtab_get_static_block)
1452         (augment_type_symtab, push_context): Update.
1453         (pop_context): Return struct context_stack.
1454         (outermost_context_p, get_current_context_stack)
1455         (get_context_stack_depth): New functions.
1456         (buildsym_init): Update.
1457
1458 2018-07-20  Tom Tromey  <tom@tromey.com>
1459
1460         * rust-exp.y: Now a pure parser.  Update all rules.
1461         (%union): Move earlier.
1462         (current_parser, work_obstack): Remove globals.
1463         (rust_parser, ~rust_parser): Update.
1464         (class rust_parser) <copy_name, concat3, crate_name, super_name,
1465         lex_character, lex_number, lex_string, lex_identifier,
1466         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1467         convert_name, convert_params_to_expression,
1468         convert_ast_to_expression, ast_basic_type, ast_operation,
1469         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1470         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1471         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1472         ast_array_type, ast_slice_type, ast_reference_type,
1473         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1474         (rust_parse): Update.
1475         (rustyyerror, rustyylex): Add parser parameter.
1476         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1477         (rust_lex_stringish_test, rust_lex_test_sequence)
1478         (rust_lex_test_trailing_dot, rust_lex_test_completion)
1479         (rust_lex_test_push_back, rust_lex_tests): Update.
1480
1481 2018-07-19  Pedro Alves  <palves@redhat.com>
1482
1483         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1484         gdb::unique_xmalloc_ptr.
1485         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1486         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1487         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1488         copy-initialization.
1489         * guile/scm-pretty-print.c (ppscm_print_children): Use
1490         gdb::unique_xmalloc_ptr instead of cleanups.
1491         (gdbscm_apply_val_pretty_printer): Remove cleanups.
1492         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1493         gdb::unique_xmalloc_ptr.
1494         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1495         Adjust to use gdb::unique_xmalloc_ptr.
1496         * guile/scm-utils.c (extract_arg): Adjust.
1497         * guile/scm-value.c (gdbscm_value_field): Adjust to use
1498         gdb::unique_xmalloc_ptr instead of a cleanup.
1499
1500 2018-07-19  Tom Tromey  <tom@tromey.com>
1501
1502         * utils.c (do_value_free_to_mark)
1503         (make_cleanup_value_free_to_mark): Remove.
1504         * utils.h (make_cleanup_value_free_to_mark): Remove.
1505
1506 2018-07-19  Pedro Alves  <palves@redhat.com>
1507
1508         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1509         forwarding reference.
1510
1511 2018-07-18  Pedro Alves  <palves@redhat.com>
1512
1513         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1514         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
1515         cleanup.
1516
1517 2018-07-18  Pedro Alves  <palves@redhat.com>
1518
1519         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1520         exceptions.
1521         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1522         (gdbscm_wrap): New.
1523         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1524         directly instead of a cleanup.
1525         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1526         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
1527         (vlscm_binop_gdbthrow): New, factored out from ...
1528         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
1529         (vlscm_rich_compare): Use gdbscm_wrap.
1530         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1531         instead of a cleanup.
1532         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1533         cleanup.
1534         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1535         Use xfree directly instead of a cleanup.
1536         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1537         Adjust to use gdbscm_wrap and scoped_value_mark.
1538         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1539         (gdbscm_value_address, gdbscm_value_dereference)
1540         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1541         scoped_value_mark.
1542         (gdbscm_value_dynamic_type): Use scoped_value_mark.
1543         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1544         scoped_value_mark.
1545         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1546         gdbscm_wrap and scoped_value_mark.
1547         (gdbscm_value_to_string): Use xfree directly instead of a
1548         cleanup.  Move 'buffer' unique_ptr to TRY scope.
1549         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1550         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
1551         scoped_value_mark.
1552         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1553         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1554         scoped_value_mark.
1555         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1556         gdbscm_wrap.
1557
1558 2018-07-18  Tom de Vries  <tdevries@suse.de>
1559
1560         * findvar.c (default_read_var_value): Also resolve dynamic type for
1561         LOC_OPTIMIZED_OUT vars.
1562
1563 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
1564
1565         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1566         decoding.
1567
1568 2018-07-17  Tom Tromey  <tom@tromey.com>
1569
1570         * guile/scm-param.c (pascm_set_func, pascm_show_func)
1571         (compute_enum_list, pascm_set_param_value_x)
1572         (gdbscm_parameter_value): Update.
1573         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1574         (gdbscm_scm_to_host_string): Update.
1575         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1576         Update.
1577         * guile/scm-cmd.c (cmdscm_add_completion): Update.
1578         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1579         * guile/scm-string.c (gdbscm_scm_to_string): Return
1580         unique_xmalloc_ptr.
1581         (gdbscm_scm_to_host_string): Likewise.
1582
1583 2018-07-17  Tom Tromey  <tom@tromey.com>
1584
1585         * guile/guile.c (gdbscm_eval_from_control_command): Update.
1586         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1587         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1588         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1589         unique_xmalloc_ptr.
1590
1591 2018-07-17  Tom Tromey  <tom@tromey.com>
1592
1593         * guile/scm-param.c (pascm_signal_setshow_error): Update.
1594         * guile/guile-internal.h (gdbscm_exception_message_to_string):
1595         Update.
1596         * guile/scm-cmd.c (cmdscm_function): Update.
1597         * guile/scm-pretty-print.c
1598         (ppscm_print_exception_unless_memory_error): Update.
1599         * guile/scm-exception.c (gdbscm_exception_message_to_string):
1600         Return unique_xmalloc_ptr.
1601
1602 2018-07-17  Tom Tromey  <tom@tromey.com>
1603
1604         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1605         Use string_printf.
1606
1607 2018-07-17  Jim Wilson  <jimw@sifive.com>
1608
1609         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1610         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
1611         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
1612         unecessary braces after EF_RISCV_RVC test.  Delete call to
1613         set_gdbarch_decr_pc_after_break.
1614
1615         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1616         RISCV_LAST_FP_REGNUM + 1.
1617         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1618
1619 2018-07-17  Tom Tromey  <tom@tromey.com>
1620
1621         * configure.ac: Remove --disable-gdbcli.
1622         * configure: Rebuild.
1623         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1624         (SUBDIR_CLI_CFLAGS): Remove.
1625         (SFILES): Use SUBDIR_CLI_SRCS.
1626         (COMMON_OBS): Use SUBDIR_CLI_OBS.
1627
1628 2018-07-17  Tom Tromey  <tom@tromey.com>
1629
1630         PR gdb/18624:
1631         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1632
1633 2018-07-16  Jim Wilson  <jimw@sifive.com>
1634
1635         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1636
1637 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1638
1639         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1640         variable.
1641         (libunwind_frame_sniffer): Likewise.
1642         (libunwind_frame_prev_register): Likewise.
1643         (libunwind_sigtramp_frame_sniffer): Likewise.
1644         * ia64-tdep.c (ia64_access_reg): Likewise.
1645         (ia64_access_rse_reg): Likewise.
1646         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1647         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1648
1649 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1650
1651         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1652
1653 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
1654
1655         * remote-sim.c (gdbsim_target::close,
1656         gdbsim_target::mourn_inferior): Remove unused variables.
1657
1658 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
1659
1660         * ia64-tdep.c (ktab_buf): New global.
1661         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1662         (get_kernel_table): Adjust.
1663
1664 2018-07-16  Tom Tromey  <tom@tromey.com>
1665
1666         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1667         * dwarf2read.c (using_directives, new_symbol): Use
1668         outermost_context_p.
1669         * dbxread.c (process_one_symbol): Use outermost_context_p.
1670         * coffread.c (coff_symtab_read): Use outermost_context_p.
1671
1672 2018-07-16  Tom Tromey  <tom@tromey.com>
1673
1674         * dwarf2read.c (using_directives, read_func_scope)
1675         (read_lexical_block_scope): Update.
1676         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1677         * buildsym.h (local_using_directives, global_using_directives):
1678         Don't declare.
1679         (get_local_using_directives, set_local_using_directives)
1680         (get_global_using_directives): Declare.
1681         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1682         m_global_using_directives>: New members.
1683         (finish_block_internal, prepare_for_building)
1684         (reset_symtab_globals, end_symtab_get_static_block)
1685         (push_context): Update.
1686         (get_local_using_directives, set_local_using_directives)
1687         (get_global_using_directives): New functions.
1688         (buildsym_init): Update.
1689
1690 2018-07-16  Tom Tromey  <tom@tromey.com>
1691
1692         * xcoffread.c (xcoff_initial_scan): Don't call
1693         free_pending_blocks.
1694         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1695         * buildsym.h (class scoped_free_pendings): Add constructor.
1696         (free_pending_blocks): Don't declare.
1697         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1698         (free_pending_blocks): Now static.
1699
1700 2018-07-16  Tom Tromey  <tom@tromey.com>
1701
1702         * buildsym.h (push_subfile, pop_subfile): Update declarations.
1703         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1704         member.
1705         (struct subfile_stack): Remove.
1706         (subfile_stack): Remove.
1707         (push_subfile, pop_subfile, buildsym_init): Update.
1708
1709 2018-07-16  Tom Tromey  <tom@tromey.com>
1710
1711         * buildsym.c (push_subfile): Use gdb_assert.
1712         (pop_subfile): Use gdb_assert.
1713
1714 2018-07-16  Tom Tromey  <tom@tromey.com>
1715
1716         * buildsym.h (merge_symbol_lists): Remove.
1717         * buildsym.c (merge_symbol_lists): Remove.
1718
1719 2018-07-16  Tom Tromey  <tom@tromey.com>
1720
1721         * stabsread.c (scan_file_globals): Update comment.
1722         * stabsread.h (scan_file_globals): Move from buildsym.h.
1723         * buildsym.h (scan_file_globals): Move to stabsread.h.
1724
1725 2018-07-16  Tom Tromey  <tom@tromey.com>
1726
1727         * xcoffread.c (xcoff_new_init): Update.
1728         * mipsread.c (mipscoff_new_init): Update.
1729         * mdebugread.c (mdebug_build_psymtabs): Update.
1730         * elfread.c (elf_new_init): Update.
1731         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1732         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1733         * buildsym.h (buildsym_new_init): Don't declare.
1734         * buildsym.c (buildsym_new_init): Remove.
1735
1736 2018-07-16  Tom Tromey  <tom@tromey.com>
1737
1738         * stabsread.h (within_function): Move from buildsym.h.
1739         * stabsread.c (start_stabs): Clear within_function.
1740         * coffread.c (coff_start_symtab): Clear within_function.
1741         * buildsym.h (within_function): Move to stabsread.h.
1742         * buildsym.c (prepare_for_building): Update.
1743
1744 2018-07-16  Tom Tromey  <tom@tromey.com>
1745
1746         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1747         * dwarf2read.c (dwarf2_start_symtab): Don't set
1748         processing_gcc_compilation.
1749         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1750
1751 2018-07-16  Tom Tromey  <tom@tromey.com>
1752
1753         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1754         (next_symbol_text_func): Move from buildsym.h.
1755         * stabsread.c (hashname): Move from buildsym.c.
1756         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1757         (next_symbol_text_func, hashname): Move to stabsread.h.
1758         * buildsym.c: Don't include bcache.h
1759         (hashname): Move to stasbread.c.
1760
1761 2018-07-16  Tom Tromey  <tom@tromey.com>
1762
1763         * buildsym.h (context_stack_size): Don't declare.
1764         * buildsym.c (context_stack_size): New global.
1765
1766 2018-07-16  Tom Tromey  <tom@tromey.com>
1767
1768         * dbxread.c (processing_acc_compilation): New global.
1769         * buildsym.h (processing_acc_compilation): Don't declare.
1770
1771 2018-07-16  Tom Tromey  <tom@tromey.com>
1772
1773         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1774         * dbxread.c (read_ofile_symtab): Update.
1775         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1776         * buildsym.h (last_source_start_addr): Remove.
1777         (set_last_source_start_addr, get_last_source_start_addr):
1778         Declare.
1779         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1780         parameter.
1781         (struct buildsym_compunit) <m_last_source_start_addr>: New
1782         member.
1783         (prepare_for_building): Remove start_addr parameter.
1784         (start_symtab, restart_symtab, end_symtab_get_static_block)
1785         (end_symtab_with_blockvector): Update.
1786         (set_last_source_start_addr, get_last_source_start_addr): New
1787         functions.
1788
1789 2018-07-16  Tom Tromey  <tom@tromey.com>
1790
1791         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1792         member.
1793         (have_line_numbers): Remove.
1794         (record_line, prepare_for_building, end_symtab_get_static_block)
1795         (augment_type_symtab): Update.
1796
1797 2018-07-16  Tom Tromey  <tom@tromey.com>
1798
1799         * buildsym.c (~buildsym_compunit): Free the macro table.
1800         (struct buildsym_compunit) <get_macro_table, release_macros>: New
1801         methods.
1802         <m_pending_macros>: New member.
1803         (pending_macros): Remove.
1804         (~scoped_free_pendings, get_macro_table, prepare_for_building)
1805         (reset_symtab_globals, end_symtab_get_static_block)
1806         (end_symtab_with_blockvector, augment_type_symtab)
1807         (buildsym_init): Update.
1808
1809 2018-07-16  Tom Tromey  <tom@tromey.com>
1810
1811         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1812         parameter.
1813         (buildsym_compunit::set_last_source_file): New method.
1814         <m_last_source_file>: New member.
1815         (prepare_for_building): Remove "name" parameter.
1816         (start_symtab, restart_symtab, reset_symtab_globals): Update.
1817         (last_source_file): Remove.
1818         (set_last_source_file, get_last_source_file): Update.
1819
1820 2018-07-16  Tom Tromey  <tom@tromey.com>
1821
1822         * buildsym.c (prepare_for_building): Add assert.
1823
1824 2018-07-16  Tom Tromey  <tom@tromey.com>
1825
1826         * buildsym.c (~buildsym_compunit): Update.
1827         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1828         (start_subfile, patch_subfile_names)
1829         (end_symtab_with_blockvector): Update.
1830
1831 2018-07-16  Tom Tromey  <tom@tromey.com>
1832
1833         * buildsym.c (struct buildsym_compunit): Add constructor,
1834         destructor, initializers.
1835         (start_buildsym_compunit): Remove.
1836         (free_buildsym_compunit): Use "delete".
1837         (start_symtab, restart_symtab): Use "new".
1838
1839 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
1840
1841         * symfile.c (set_objfile_default_section_offset): Remove struct
1842         keyword.
1843
1844 2018-07-14  Stafford Horne  <shorne@gmail.com>
1845
1846         * (Responsible Maintainers): Add myself as or1k maintainer.
1847
1848 2018-07-13  Tom Tromey  <tom@tromey.com>
1849
1850         * symfile.c (set_objfile_default_section_offset): Use extra braces
1851         around initializer.
1852
1853 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1854
1855         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1856         non-branching basr.
1857
1858 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1859
1860         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1861         unittests/cli-utils-selftests.c
1862         * unittests/cli-utils-selftests.c: New file.
1863
1864 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1865
1866         * NEWS: Mention new commands. Mention change to 'thread apply'.
1867
1868 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1869
1870         * thread.c (thr_try_catch_cmd): New function.
1871         (thread_apply_all_command): Handle qcs flags.
1872         (thread_apply_command): Handle qcs flags.
1873         (taas_command): New function.
1874         (tfaas_command): New function.
1875         (_initialize_thread): Update to setup the new commands 'taas
1876         and 'tfaas'. Change doc string for 'thread apply'.
1877
1878 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1879
1880         * stack.c: (trailing_outermost_frame): New function, mostly
1881         extracted from backtrace_command_1.
1882         (leading_innermost_frame): New function.
1883         (backtrace_command_1): Update to call trailing_outermost_frame.
1884         (frame_apply_command_count): New function.
1885         (frame_apply_level_command): New function.
1886         (frame_apply_all_command): New function.
1887         (frame_apply_command): New function.
1888         (faas_command): New function.
1889         (frame_cmd_list): New variable.
1890         (_initialize_stack): Update to setup the new commands 'frame apply'
1891         and 'faas'.
1892
1893 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1894
1895         * cli-utils.c (number_or_range_parser::get_number): Only handle
1896         numbers or convenience var as numbers.
1897         (parse_flags): New function.
1898         (parse_flags_qcs): New function.
1899         (number_or_range_parser::finished): Ensure parsing end is detected
1900         before end of string.
1901         * cli-utils.h (parse_flags): New function.
1902         (parse_flags_qcs): New function.
1903         (number_or_range_parser): Remove m_finished bool.
1904         (number_or_range_parser::skip_range): Set m_in_range to false.
1905
1906 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1907
1908         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1909         on Windows.
1910
1911 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1912             Jan Kratochvil  <jan.kratochvil@redhat.com>
1913             Paul Fertser  <fercerpav@gmail.com>
1914             Tsutomu Seki  <sekiriki@gmail.com>
1915             Pedro Alves  <palves@redhat.com>
1916
1917         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1918         'unittests/parse-connection-spec-selftests.c'.
1919         (COMMON_SFILES): Add 'common/netstuff.c'.
1920         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1921         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1922         * common/netstuff.c: New file.
1923         * common/netstuff.h: New file.
1924         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1925         (wait_for_connect): Update comment.  New parameter
1926         'gdb::optional<int> sock' instead of 'struct serial *scb'.
1927         Use 'sock' directly instead of 'scb->fd'.
1928         (try_connect): New function, with code from 'net_open'.
1929         (net_open): Rewrite main loop to deal with multiple
1930         sockets/addresses.  Handle IPv6-style hostnames; implement
1931         support for IPv6 connections.
1932         * unittests/parse-connection-spec-selftests.c: New file.
1933
1934 2018-07-11  Pedro Alves  <palves@redhat.com>
1935
1936         PR gdb/23377
1937         * remote.c (remote_target::remote_detach_pid): Call
1938         set_current_process.
1939
1940 2018-07-11  Pedro Alves  <palves@redhat.com>
1941
1942         * h8300-tdep.c (h8300_gdbarch_init): Remove
1943         set_gdbarch_ecoff_reg_to_regnum calls.
1944
1945 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1946
1947         PR c++/23373
1948         * c-typeprint.c (c_type_print_base_struct_union): Don't print
1949         offsets/sizes for static members of a class/struct.
1950
1951 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
1952
1953         * target-descriptions.c (tdesc_register_bitsize): Rename.
1954         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1955         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1956         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1957
1958 2018-07-10  Tom Tromey  <tom@tromey.com>
1959
1960         * breakpoint.c (moribund_locations): Now static and a
1961         std::vector.
1962         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1963         (build_bpstat_chain, update_global_location_list)
1964         (breakpoint_retire_moribund): Update.
1965         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1966         VEC.
1967
1968 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1969
1970         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1971         (riscv_register_reggroup_p): Use new function, remove unneeded
1972         parenthesis.
1973         (riscv_push_dummy_call): Extend assert to compare against xlen or
1974         flen based on register type.
1975
1976 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1977
1978         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1979
1980 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1981
1982         * remote.c (show_hardware_watchpoint_limit): New function.
1983         (show_hardware_watchpoint_length_limit): New function.
1984         (show_hardware_breakpoint_limit): New function.
1985         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1986         where appropriate, update help text.
1987
1988 2018-07-09  Tom Tromey  <tom@tromey.com>
1989
1990         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1991         (CLIBS): Don't mention NAT_CLIBS.
1992
1993 2018-07-09  Tom Tromey  <tom@tromey.com>
1994
1995         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1996         (LIBGDB_OBS, clean mostlyclean): Update.
1997         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1998
1999 2018-07-09  Tom Tromey  <tom@tromey.com>
2000
2001         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2002         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2003         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2004
2005 2018-07-09  Tom Tromey  <tom@tromey.com>
2006
2007         * Makefile.in (ALLDEPFILES): Remove exec.c.
2008         (COMMON_OBS): Remove exec.o.
2009         (COMMON_SFILES): Add exec.c.
2010
2011 2018-07-09  Tom Tromey  <tom@tromey.com>
2012
2013         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2014
2015 2018-07-09  Tom Tromey  <tom@tromey.com>
2016
2017         * Makefile.in (clean mostlyclean): Remove stamp-version.
2018         (version.c): Depend on stamp-version.
2019         (stamp-version): New rule, from version.c rule.
2020
2021 2018-07-09  Tom Tromey  <tom@tromey.com>
2022
2023         * Makefile.in (init.c): Depend on stamp-init.
2024         (stamp-init): New rule, from init.c rule.
2025         (clean mostlyclean): Remove stamp-init.
2026
2027 2018-07-09  Tom Tromey  <tom@tromey.com>
2028
2029         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2030         SUBDIR_GCC_COMPILE_SRCS.
2031
2032 2018-07-09  Tom Tromey  <tom@tromey.com>
2033
2034         * Makefile.in (init.c): Remove some unused sed rules.
2035
2036 2018-07-09  Tom Tromey  <tom@tromey.com>
2037
2038         * Makefile.in (TSOBS): Remove.
2039         (INIT_FILES): Update.
2040         (LIBGDB_OBS): Update.
2041         (COMMON_SFILES): Add inflow.c.
2042         (SFILES): Remove inflow.c.
2043
2044 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2045
2046         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2047
2048 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2049
2050         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2051         get_saveloc_name, is_signal_frame_name, step_name,
2052         init_remote_name, create_addr_space_name,
2053         destroy_addr_space_name, search_unwind_table_name,
2054         find_dyn_list_name): Constify.
2055
2056 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2057
2058         * darwin-nat.c (darwin_pthread_kill): New function.
2059         (darwin_resume_thread): Use darwin_pthread_kill.
2060
2061 2018-07-05  Tom de Vries  <tdevries@suse.de>
2062
2063         * macroexp.c (macro_buffer) <operator=>: New member function.
2064
2065 2018-07-04  Tom Tromey  <tom@tromey.com>
2066
2067         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2068
2069 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2070
2071         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2072         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2073         * maint.c: Likewise.
2074         * top.c: Likewise.
2075
2076 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2077
2078         * NEWS: Create a new section for the next release branch.
2079         Rename the section of the current branch, now that it has
2080         been cut.
2081
2082 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2083
2084         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2085         * version.in: Bump version to 8.2.50.DATE-git.
2086
2087 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2088             Pedro Alves  <palves@redhat.com>
2089
2090         * linux-nat.c (linux_init_ptrace): Rename to ...
2091         (linux_init_ptrace_procfs): ... this.  Call
2092         linux_proc_init_warnings.
2093         (linux_nat_target::post_attach)
2094         (linux_nat_target::post_startup_inferior): Adjust.
2095         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2096         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2097
2098 2018-07-04  Tom de Vries  <tdevries@suse.de>
2099
2100         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2101         check ...
2102         (read_comp_unit_head): ... here.
2103
2104 2018-07-03  Tom Tromey  <tom@tromey.com>
2105
2106         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2107         (stop_tracing, tstatus_command)
2108         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2109         (print_one_static_tracepoint_marker): Update.
2110         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2111         std::vector.
2112         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2113         VEC.
2114         (all_tracepoints, static_tracepoints_here): Return std::vector.
2115
2116 2018-07-03  Tom Tromey  <tom@tromey.com>
2117
2118         * common/ptid.c (ptid_equal): Remove.
2119         * common/ptid.h (ptid_equal): Don't declare.
2120         * ada-tasks.c: Update.
2121         * breakpoint.c: Update.
2122         * common/agent.c: Update.
2123         * corelow.c: Update.
2124         * darwin-nat-info.c: Update.
2125         * darwin-nat.c: Update.
2126         * dcache.c: Update.
2127         * dtrace-probe.c: Update.
2128         * dummy-frame.c: Update.
2129         * fbsd-nat.c: Update.
2130         * frame.c: Update.
2131         * gdbthread.h: Update.
2132         * gnu-nat.c: Update.
2133         * go32-nat.c: Update.
2134         * inf-loop.c: Update.
2135         * inf-ptrace.c: Update.
2136         * infcall.c: Update.
2137         * infcmd.c: Update.
2138         * inflow.c: Update.
2139         * infrun.c: Update.
2140         * linux-fork.c: Update.
2141         * linux-nat.c: Update.
2142         * linux-thread-db.c: Update.
2143         * mi/mi-cmd-var.c: Update.
2144         * mi/mi-interp.c: Update.
2145         * mi/mi-main.c: Update.
2146         * nto-procfs.c: Update.
2147         * ppc-linux-tdep.c: Update.
2148         * procfs.c: Update.
2149         * python/py-inferior.c: Update.
2150         * python/py-record-btrace.c: Update.
2151         * python/py-record.c: Update.
2152         * ravenscar-thread.c: Update.
2153         * regcache.c: Update.
2154         * remote-sim.c: Update.
2155         * remote.c: Update.
2156         * sol-thread.c: Update.
2157         * solib.c: Update.
2158         * target.c: Update.
2159         * tui/tui-stack.c: Update.
2160         * varobj.c: Update.
2161         * windows-nat.c: Update.
2162         * windows-tdep.c: Update.
2163
2164 2018-07-03  Tom Tromey  <tom@tromey.com>
2165
2166         * common/ptid.c (ptid_match): Remove.
2167         * common/ptid.h (ptid_match): Don't declare.
2168         * fbsd-nat.c: Update.
2169         * infcmd.c: Update.
2170         * infrun.c: Update.
2171         * linux-nat.c: Update.
2172         * record-btrace.c: Update.
2173         * regcache.c: Update.
2174         * remote.c: Update.
2175
2176 2018-07-03  Tom Tromey  <tom@tromey.com>
2177
2178         * common/ptid.c (ptid_tid_p): Remove.
2179         * common/ptid.h (ptid_tid_p): Don't declare.
2180         * sol-thread.c: Update.
2181
2182 2018-07-03  Tom Tromey  <tom@tromey.com>
2183
2184         * common/ptid.c (ptid_lwp_p): Remove.
2185         * common/ptid.h (ptid_lwp_p): Don't declare.
2186         * fbsd-nat.c: Update.
2187         * linux-nat.c: Update.
2188         * nat/linux-procfs.c: Update.
2189         * nat/x86-linux-dregs.c: Update.
2190         * sol-thread.c: Update.
2191
2192 2018-07-03  Tom Tromey  <tom@tromey.com>
2193
2194         * common/ptid.c (ptid_is_pid): Remove.
2195         * common/ptid.h (ptid_is_pid): Don't declare.
2196         * infrun.c: Update.
2197         * linux-nat.c: Update.
2198         * mi/mi-interp.c: Update.
2199         * remote.c: Update.
2200         * thread.c: Update.
2201
2202 2018-07-03  Tom Tromey  <tom@tromey.com>
2203
2204         * common/ptid.c (ptid_get_tid): Remove.
2205         * common/ptid.h (ptid_get_tid): Don't declare.
2206         * ada-tasks.c: Update.
2207         * aix-thread.c: Update.
2208         * bsd-uthread.c: Update.
2209         * darwin-nat.c: Update.
2210         * fbsd-nat.c: Update.
2211         * i386-darwin-nat.c: Update.
2212         * infrun.c: Update.
2213         * linux-tdep.c: Update.
2214         * nto-procfs.c: Update.
2215         * ppc-ravenscar-thread.c: Update.
2216         * python/py-infthread.c: Update.
2217         * ravenscar-thread.c: Update.
2218         * sol-thread.c: Update.
2219         * sparc-ravenscar-thread.c: Update.
2220         * windows-nat.c: Update.
2221
2222 2018-07-03  Tom Tromey  <tom@tromey.com>
2223
2224         * common/ptid.c (ptid_get_lwp): Remove.
2225         * common/ptid.h (ptid_get_lwp): Don't declare.
2226         * aarch64-linux-nat.c: Update.
2227         * ada-tasks.c: Update.
2228         * aix-thread.c: Update.
2229         * amd64-linux-nat.c: Update.
2230         * arm-linux-nat.c: Update.
2231         * corelow.c: Update.
2232         * fbsd-nat.c: Update.
2233         * fbsd-tdep.c: Update.
2234         * gnu-nat.c: Update.
2235         * i386-cygwin-tdep.c: Update.
2236         * i386-gnu-nat.c: Update.
2237         * i386-linux-nat.c: Update.
2238         * ia64-linux-nat.c: Update.
2239         * inf-ptrace.c: Update.
2240         * infrun.c: Update.
2241         * linux-fork.c: Update.
2242         * linux-nat.c: Update.
2243         * linux-tdep.c: Update.
2244         * linux-thread-db.c: Update.
2245         * mips-linux-nat.c: Update.
2246         * nat/aarch64-linux-hw-point.c: Update.
2247         * nat/aarch64-linux.c: Update.
2248         * nat/linux-btrace.c: Update.
2249         * nat/linux-osdata.c: Update.
2250         * nat/linux-procfs.c: Update.
2251         * nat/x86-linux-dregs.c: Update.
2252         * obsd-nat.c: Update.
2253         * ppc-fbsd-nat.c: Update.
2254         * ppc-linux-nat.c: Update.
2255         * procfs.c: Update.
2256         * python/py-infthread.c: Update.
2257         * ravenscar-thread.c: Update.
2258         * remote.c: Update.
2259         * s390-linux-nat.c: Update.
2260         * sol-thread.c: Update.
2261         * sol2-tdep.c: Update.
2262         * spu-linux-nat.c: Update.
2263         * x86-linux-nat.c: Update.
2264         * xtensa-linux-nat.c: Update.
2265
2266 2018-07-03  Tom Tromey  <tom@tromey.com>
2267
2268         * common/ptid.c (ptid_get_pid): Remove.
2269         * common/ptid.h (ptid_get_pid): Don't declare.
2270         * aarch64-linux-nat.c: Update.
2271         * ada-lang.c: Update.
2272         * aix-thread.c: Update.
2273         * alpha-bsd-nat.c: Update.
2274         * amd64-fbsd-nat.c: Update.
2275         * amd64-linux-nat.c: Update.
2276         * arm-linux-nat.c: Update.
2277         * arm-nbsd-nat.c: Update.
2278         * auxv.c: Update.
2279         * break-catch-syscall.c: Update.
2280         * breakpoint.c: Update.
2281         * bsd-uthread.c: Update.
2282         * corelow.c: Update.
2283         * ctf.c: Update.
2284         * darwin-nat.c: Update.
2285         * fbsd-nat.c: Update.
2286         * fbsd-tdep.c: Update.
2287         * gcore.c: Update.
2288         * gnu-nat.c: Update.
2289         * hppa-nbsd-nat.c: Update.
2290         * hppa-obsd-nat.c: Update.
2291         * i386-fbsd-nat.c: Update.
2292         * ia64-linux-nat.c: Update.
2293         * inf-ptrace.c: Update.
2294         * infcmd.c: Update.
2295         * inferior.c: Update.
2296         * inferior.h: Update.
2297         * inflow.c: Update.
2298         * infrun.c: Update.
2299         * linux-fork.c: Update.
2300         * linux-nat.c: Update.
2301         * linux-tdep.c: Update.
2302         * linux-thread-db.c: Update.
2303         * m68k-bsd-nat.c: Update.
2304         * mi/mi-interp.c: Update.
2305         * mi/mi-main.c: Update.
2306         * mips-linux-nat.c: Update.
2307         * mips-nbsd-nat.c: Update.
2308         * mips64-obsd-nat.c: Update.
2309         * nat/aarch64-linux-hw-point.c: Update.
2310         * nat/aarch64-linux.c: Update.
2311         * nat/linux-btrace.c: Update.
2312         * nat/linux-osdata.c: Update.
2313         * nat/linux-procfs.c: Update.
2314         * nat/x86-linux-dregs.c: Update.
2315         * nto-procfs.c: Update.
2316         * obsd-nat.c: Update.
2317         * ppc-linux-nat.c: Update.
2318         * ppc-nbsd-nat.c: Update.
2319         * ppc-obsd-nat.c: Update.
2320         * proc-service.c: Update.
2321         * procfs.c: Update.
2322         * python/py-inferior.c: Update.
2323         * python/py-infthread.c: Update.
2324         * ravenscar-thread.c: Update.
2325         * record.c: Update.
2326         * remote-sim.c: Update.
2327         * remote.c: Update.
2328         * rs6000-nat.c: Update.
2329         * s390-linux-nat.c: Update.
2330         * sh-nbsd-nat.c: Update.
2331         * sol-thread.c: Update.
2332         * sparc-nat.c: Update.
2333         * sparc64-tdep.c: Update.
2334         * spu-linux-nat.c: Update.
2335         * spu-tdep.c: Update.
2336         * target-debug.h: Update.
2337         * target.c: Update.
2338         * thread.c: Update.
2339         * tid-parse.c: Update.
2340         * tracefile-tfile.c: Update.
2341         * vax-bsd-nat.c: Update.
2342         * windows-nat.c: Update.
2343         * x86-linux-nat.c: Update.
2344         * x86-nat.c: Update.
2345
2346 2018-07-03  Tom Tromey  <tom@tromey.com>
2347
2348         * common/ptid.c (pid_to_ptid): Remove.
2349         * common/ptid.h (pid_to_ptid): Don't declare.
2350         * aix-thread.c: Update.
2351         * arm-linux-nat.c: Update.
2352         * common/ptid.c: Update.
2353         * common/ptid.h: Update.
2354         * corelow.c: Update.
2355         * ctf.c: Update.
2356         * darwin-nat.c: Update.
2357         * fbsd-nat.c: Update.
2358         * fork-child.c: Update.
2359         * gnu-nat.c: Update.
2360         * go32-nat.c: Update.
2361         * inf-ptrace.c: Update.
2362         * infcmd.c: Update.
2363         * inferior.c: Update.
2364         * infrun.c: Update.
2365         * linux-fork.c: Update.
2366         * linux-nat.c: Update.
2367         * nat/aarch64-linux-hw-point.c: Update.
2368         * nat/fork-inferior.c: Update.
2369         * nat/x86-linux-dregs.c: Update.
2370         * nto-procfs.c: Update.
2371         * obsd-nat.c: Update.
2372         * procfs.c: Update.
2373         * progspace.c: Update.
2374         * remote.c: Update.
2375         * rs6000-nat.c: Update.
2376         * s390-linux-nat.c: Update.
2377         * sol-thread.c: Update.
2378         * spu-linux-nat.c: Update.
2379         * target.c: Update.
2380         * top.c: Update.
2381         * tracefile-tfile.c: Update.
2382         * windows-nat.c: Update.
2383
2384 2018-07-03  Tom Tromey  <tom@tromey.com>
2385
2386         * common/ptid.h (ptid_build): Don't declare.
2387         * common/ptid.c (ptid_build): Remove.
2388         * aix-thread.c: Update.
2389         * bsd-kvm.c: Update.
2390         * bsd-uthread.c: Update.
2391         * common/agent.c: Update.
2392         * common/ptid.c: Update.
2393         * common/ptid.h: Update.
2394         * corelow.c: Update.
2395         * darwin-nat.c: Update.
2396         * fbsd-nat.c: Update.
2397         * gnu-nat.c: Update.
2398         * linux-fork.c: Update.
2399         * linux-nat.c: Update.
2400         * linux-thread-db.c: Update.
2401         * nat/linux-osdata.c: Update.
2402         * nat/linux-procfs.c: Update.
2403         * nto-procfs.c: Update.
2404         * obsd-nat.c: Update.
2405         * proc-service.c: Update.
2406         * procfs.c: Update.
2407         * ravenscar-thread.c: Update.
2408         * remote-sim.c: Update.
2409         * remote.c: Update.
2410         * sol-thread.c: Update.
2411         * target.c: Update.
2412         * windows-nat.c: Update.
2413
2414 2018-07-03  Tom Tromey  <tom@tromey.com>
2415
2416         * infrun.c (follow_exec): Use exit_inferior_silent.
2417         * inferior.c (exit_inferior_num_silent): Remove.
2418         * inferior.h (exit_inferior_num_silent): Don't declare.
2419
2420 2018-07-03  Tom Tromey  <tom@tromey.com>
2421
2422         PR cli/23340:
2423         * darwin-nat.c (darwin_attach_pid): Reset inferior and
2424         inferior_ptid on error.
2425
2426 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
2427             Simon Marchi  <simon.marchi@polymtl.ca>
2428
2429         PR tdep/8282
2430         * disasm.h (gdb_disassembler): Add
2431         `m_disassembler_options_holder'. member
2432         * disasm.c (get_all_disassembler_options): New function.
2433         (gdb_disassembler::gdb_disassembler): Use it.
2434         (gdb_buffered_insn_length_init_dis): Likewise.
2435         (gdb_buffered_insn_length): Adjust accordingly.
2436         (set_disassembler_options): Handle options with arguments.
2437         (show_disassembler_options_sfunc): Likewise.  Add a leading new
2438         line if showing options with descriptions.
2439         (disassembler_options_completer): Adapt to using the
2440         `disasm_options_and_args_t' structure.
2441         * mips-tdep.c (mips_disassembler_options): New variable.
2442         (mips_disassembler_options_o32): Likewise.
2443         (mips_disassembler_options_n32): Likewise.
2444         (mips_disassembler_options_n64): Likewise.
2445         (gdb_print_insn_mips): Don't set `disassembler_options'.
2446         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2447         functions.
2448         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2449         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
2450         `gdbarch_disassembler_options_implicit' and
2451         `gdbarch_valid_disassembler_options'.
2452         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2453         `disasm_options_and_args_t' structure.
2454         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2455         method.
2456         (valid_disassembler_options): Switch from `disasm_options_t' to
2457         the `disasm_options_and_args_t' structure.
2458         * NEWS: Document `set disassembler-options' support for the MIPS
2459         target.
2460         * gdbarch.h: Regenerate.
2461         * gdbarch.c: Regenerate.
2462
2463 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2464
2465         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2466
2467 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
2468
2469         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2470         parameter in call to amd64_target_description.
2471         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2472         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2473         (amd64fbsd_init_abi): Likewise.
2474         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2475         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2476         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2477         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2478
2479 2018-06-29  Pedro Alves  <palves@redhat.com>
2480
2481         * gdb/amd64-tdep.h (amd64_create_target_description): Add
2482         "segments" parameter.
2483         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2484         (_initialize_amd64_tdep): Update call to
2485         amd64_create_target_description.
2486         (amd64_target_description): Add "segments" parameter.  Adjust
2487         the implementation to use it.
2488         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2489         call to amd64_create_target_description.
2490         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2491         * gdb/arch/amd64.h (amd64_create_target_description): Add
2492         "segments" register.
2493         * gdb/arch/amd64.c (amd64_create_target_description): Add
2494         "segments" parameter.  Call create_feature_i386_64bit_segments
2495         only if SEGMENTS is true.
2496         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2497         call to amd64_create_target_description.
2498
2499 2018-06-29  Pedro Alves  <palves@redhat.com>
2500
2501         * thread.c (thread_target_id_str): New, factored out from ...
2502         (print_thread_info_1): ... here.  Use it to compute the max
2503         "Target Id" column width.
2504
2505 2018-06-29  Pedro Alves  <palves@redhat.com>
2506
2507         * remote.c (remote_target::extra_thread_info): Delete
2508         'display_buf' and 'n' locals.  from the cache, regardless of
2509         packet mechanims is in use.  Use cache for qThreadExtra and qP
2510         methods too.
2511
2512 2018-06-29  Pedro Alves  <palves@redhat.com>
2513
2514         * blockframe.c (find_pc_sect_containing_function): New function.
2515         * breakpoint.c (print_breakpoint_location): Don't call
2516         find_pc_sect_function.
2517         * linespec.c (create_sals_line_offset): Record the location's
2518         symbol in the sal.
2519         * linespec.c (convert_address_location_to_sals): Fill in sal's
2520         symbol with find_pc_sect_containing_function.
2521         * symtab.c (find_function_start_sal): Rename to ...
2522         (find_function_start_sal_1): ... this.
2523         (find_function_start_sal): Reimplement as wrapper around
2524         find_function_start_sal_1, and use
2525         find_pc_sect_containing_function to fill in the sal's symbol.
2526         (find_function_start_sal(symbol*, bool)): Adjust.
2527         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2528         comments.
2529         (find_pc_sect_containing_function): Declare.
2530
2531 2018-06-29  Pedro Alves  <palves@redhat.com>
2532
2533         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2534         true if the the location has no symbol.
2535
2536 2018-06-28  Tom Tromey  <tom@tromey.com>
2537
2538         * NEWS: Mention --enable-codesign.
2539         * silent-rules.mk (ECHO_SIGN): New variable.
2540         * configure.ac: Add --enable-codesign.
2541         * configure: Rebuild.
2542         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2543         (gdb$(EXEEXT)): Optionally invoke codesign.
2544
2545 2018-06-28  Pedro Alves  <palves@redhat.com>
2546
2547         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2548         comments.
2549         (switch_to_thread_no_regs): Adjust comment.
2550         * infcmd.c (stop_pc): Delete.
2551         (post_create_inferior, info_program_command): Replace references
2552         to stop_pc with references to thread_info->suspend.stop_pc.
2553         * inferior.h (stop_pc): Delete declaration.
2554         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2555         (handle_inferior_event_1, handle_signal_stop)
2556         (process_event_stop_test, keep_going_stepped_thread)
2557         (handle_step_into_function, handle_step_into_function_backward)
2558         (print_stop_location): Replace references to stop_pc with
2559         references to thread_info->suspend.stop_pc.
2560         (struct infcall_suspend_state) <stop_pc>: Delete field.
2561         (save_infcall_suspend_state, restore_infcall_suspend_state):
2562         Remove references to inf_stat->stop_pc.
2563         * linux-fork.c (fork_load_infrun_state): Likewise.
2564         * record-btrace.c (record_btrace_set_replay): Likewise.
2565         * record-full.c (record_full_goto_entry): Likewise.
2566         * remote.c (print_one_stopped_thread): Likewise.
2567         * target.c (target_resume): Extend comment.
2568         * thread.c (set_executing_thread): New.
2569         (set_executing): Use it.
2570         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2571         Remove references to stop_pc.
2572
2573 2018-06-28  Pedro Alves  <palves@redhat.com>
2574
2575         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2576         Moving fetching stop_pc until after ecs->event_thread is refreshed.
2577
2578 2018-06-28  Tom Tromey  <tom@tromey.com>
2579
2580         * coffread.c (coff_symfile_finish): Update.
2581         * xcoffread.c (xcoff_symfile_finish): Update.
2582         * elfread.c (elf_symfile_finish): Update.
2583         * symfile.h (dwarf2_free_objfile): Don't declare.
2584         * dwarf2read.c (_initialize_dwarf2_read): Use
2585         register_objfile_data_with_cleanup.
2586         (dwarf2_free_objfile): Now static.  Change signature.
2587
2588 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2589
2590         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2591         option "-o" to add-symbol-file-load to add an offset to each
2592         section's load address.
2593         * symfile.c (set_objfile_default_section_offset): New function.
2594
2595 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2596
2597         * symfile.c (add_symbol_file_command): Make sure that sections
2598         with the same name are sorted in the same order.
2599
2600 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2601
2602         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2603         require the second argument.  If omitted, load sections at the
2604         addresses specified in the file.
2605
2606 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2607
2608         * symfile.c (symbol_file_command, symbol_file_add_main_1)
2609         (_initialize_symfile): Add option "-o" to symbol-file to add an
2610         offset to each section of the symbol file.
2611
2612 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
2613
2614         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2615
2616 2018-06-27  Tom Tromey  <tom@tromey.com>
2617
2618         * stack.c (_initialize_stack): Update "func" help text.
2619
2620 2018-06-27  Tom Tromey  <tom@tromey.com>
2621
2622         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2623         std::vector.
2624         (unwind_infopy_str, pyuw_create_unwind_info)
2625         (unwind_infopy_add_saved_register, pyuw_sniffer)
2626         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2627         Update.
2628         (struct saved_reg): Add constructor.
2629         <value>: Now a gdbpy_ref<>.
2630
2631 2018-06-27  Tom Tromey  <tom@tromey.com>
2632
2633         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2634
2635 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2636
2637         * gdb-gdb.py.in: Format using autopep8.
2638
2639 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2640
2641         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2642         (type_lookup_function): Recognize CORE_ADDR values.
2643
2644 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2645
2646         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2647         print tag_name.
2648
2649 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2650
2651         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2652         <__lt__>: Add.
2653
2654 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2655
2656         * gdb-gdb.py: Move to...
2657         * gdb-gdb.py.in: ... here.
2658         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2659         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2660         dependencies.
2661         (distclean): Remove gdb-gdb.py when cleaning.
2662         (gdb-gdb.py, gdb-gdb.gdb): New rules.
2663         * configure: Re-generate.
2664
2665 2018-06-27  Pedro Alves  <palves@redhat.com>
2666
2667         * proc-service.c (get_ps_regcache): New.
2668         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2669         (ps_lsetfpregs): Use it.
2670
2671 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
2672
2673         PR gdb/21695
2674         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2675         (dwarf_decode_lines_1): Adjust.
2676
2677 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2678
2679         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2680         override.
2681         <info_proc>: Likewise.
2682
2683 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
2684
2685         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2686         to windows_fetch_one_register, and only handle the case of
2687         fetching one register.  Move the code that reloads the context
2688         and iterates over all registers if R is negative to...
2689         (windows_nat_target::fetch_registers): ... here.
2690         (do_windows_store_inferior_registers): Rename to
2691         windows_store_one_register, and only handle the case of storing
2692         one register.  Move the code that handles the case where r is
2693         negative to...
2694         (windows_nat_target::store_registers) ... here.
2695
2696 2018-06-26  Tom Tromey  <tom@tromey.com>
2697
2698         PR rust/22574:
2699         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2700         * rust-lang.c (rust_print_struct_def): Add podata parameter.
2701         Update.
2702         (rust_internal_print_type): Add podata parameter.
2703         (rust_print_type): Update.
2704
2705 2018-06-26  Tom Tromey  <tom@tromey.com>
2706
2707         * typeprint.h (struct print_offset_data) <update, finish,
2708         maybe_print_hole>: New methods.
2709         <indentation>: New constant.
2710         * typeprint.c (print_offset_data::indentation): Define.
2711         (print_offset_data::maybe_print_hole, print_offset_data::update)
2712         (print_offset_data::finish): Move from c-typeprint.c and rename.
2713         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2714         (print_spaces_filtered_with_print_options): Update.
2715         (c_print_type_union_field_offset, maybe_print_hole)
2716         (c_print_type_struct_field_offset): Move to typeprint.c and
2717         rename.
2718         (c_type_print_base_struct_union): Update.
2719
2720 2018-06-25  Pedro Alves  <palves@redhat.com>
2721
2722         * gdbthread.h (thread_info_ref, delete_thread)
2723         (delete_thread_silent, first_thread_of_inferior)
2724         (any_thread_of_inferior, switch_to_thread)
2725         (enable_thread_stack_temporaries)
2726         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2727         (get_last_thread_stack_temporary)
2728         (value_in_thread_stack_temporaries, can_access_registers_thread):
2729         Spell out "struct thread_info" instead of just "thread_info".
2730         * inferior.h (notice_new_inferior): Likewise.
2731
2732 2018-06-25  Pedro Alves  <palves@redhat.com>
2733
2734         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2735         pass thread_info pointer to delete_thread.
2736         (windows_nat_target::detach): Pass inferior pointer to
2737         detach_inferior.
2738         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2739         delete_thread.
2740         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2741         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2742         and pass a thread_info pointer to delete_thread.
2743         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2744         pass thread_info pointer to delete_thread.
2745         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2746         delete_thread_silent call.
2747         * procfs.c (procfs_target::detach): Pass inferior pointer to
2748         detach_inferior.
2749         (procfs_target::wait): Pass thread_info pointer to delete_thread.
2750         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2751         delete_thread_silent call.
2752         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2753         pass thread_info pointer to delete_thread.
2754         (windows_nat_target::detach): Pass inferior pointer to
2755         delete_inferior.
2756
2757 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2758
2759         * regcache.c (readable_regcache::read_part): Fix asserts.
2760         (reg_buffer::raw_collect_part): New function.
2761         (regcache::write_part): Fix asserts.
2762         (reg_buffer::raw_supply_part): New function.
2763         (regcache::transfer_regset_register): New helper function.
2764         (regcache::transfer_regset): Call new functions.
2765         (regcache_supply_regset): Use gdb_byte*.
2766         (regcache::supply_regset): Likewise.
2767         (regcache_collect_regset): Likewise.
2768         (regcache::collect_regset): Likewise.
2769         * regcache.h (reg_buffer::raw_collect_part): New declaration.
2770         (reg_buffer::raw_supply_part): Likewise.
2771         (regcache::transfer_regset_register): Likewise.
2772         (regcache::transfer_regset): Use gdb_byte*.
2773
2774 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
2775
2776         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2777
2778 2018-06-21  Pedro Alves  <palves@redhat.com>
2779
2780         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2781         instead of a ptid_t.  All callers adjusted.
2782         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
2783         adjusted.
2784         (print_ada_task_info, display_current_task_id, task_command_1):
2785         Adjust.
2786         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2787         inferior_thread.
2788         (breakpoint_kind): Adjust.
2789         (remove_breakpoints_pid): Rename to ...
2790         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
2791         pointer.  All callers adjusted.
2792         (bpstat_clear_actions): Use inferior_thread.
2793         (get_bpstat_thread): New.
2794         (bpstat_do_actions): Use it.
2795         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2796         to take a thread_info pointer.  All callers adjusted.
2797         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2798         (breakpoint_re_set_thread): Use inferior_thread.
2799         * breakpoint.h (struct inferior): Forward declare.
2800         (bpstat_stop_status): Update.
2801         (remove_breakpoints_pid): Delete.
2802         (remove_breakpoints_inf): New.
2803         * bsd-uthread.c (bsd_uthread_target::wait)
2804         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2805         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2806         (maint_btrace_packet_history_cmd)
2807         (maint_btrace_clear_packet_history_cmd): Adjust.
2808         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2809         inferior_thread.
2810         * cli/cli-interp.c: Include "inferior.h".
2811         * common/refcounted-object.h (struct
2812         refcounted_object_ref_policy): New.
2813         * compile/compile-object-load.c: Include gdbthread.h.
2814         (store_regs): Use inferior_thread.
2815         * corelow.c (core_target::close): Use current_inferior.
2816         (core_target_open): Adjust to use first_thread_of_inferior and use
2817         the current inferior.
2818         * ctf.c (ctf_target::close): Adjust to use current_inferior.
2819         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2820         <thread>: ... this new field.  All references adjusted.
2821         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2822         Take a thread_info pointer instead of a ptid_t.
2823         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2824         (dummy_frame_discard, register_dummy_frame_dtor): Take a
2825         thread_info pointer instead of a ptid_t.
2826         * elfread.c: Include "inferior.h".
2827         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2828         Use inferior_thread.
2829         * eval.c (evaluate_subexp): Likewise.
2830         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2831         inferior_thread.
2832         * gdb_proc_service.h (struct thread_info): Forward declare.
2833         (struct ps_prochandle) <ptid>: Delete, replaced by ...
2834         <thread>: ... this new field.  All references adjusted.
2835         * gdbarch.h, gdbarch.c: Regenerate.
2836         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2837         'thread' parameter.  All implementations and callers adjusted.
2838         * gdbthread.h (thread_info) <set_running>: New method.
2839         (delete_thread, delete_thread_silent): Take a thread_info pointer
2840         instead of a ptid.
2841         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2842         (first_thread_of_process): Delete, replaced by ...
2843         (first_thread_of_inferior): ... this new function.  All callers
2844         adjusted.
2845         (any_live_thread_of_process): Delete, replaced by ...
2846         (any_live_thread_of_inferior): ... this new function.  All callers
2847         adjusted.
2848         (switch_to_thread, switch_to_no_thread): Declare.
2849         (is_executing): Delete.
2850         (enable_thread_stack_temporaries): Update comment.
2851         <enable_thread_stack_temporaries>: Take a thread_info pointer
2852         instead of a ptid_t.  Incref the thread.
2853         <~enable_thread_stack_temporaries>: Decref the thread.
2854         <m_ptid>: Delete
2855         <m_thr>: New.
2856         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2857         (get_last_thread_stack_temporary)
2858         (value_in_thread_stack_temporaries, can_access_registers_thread):
2859         Take a thread_info pointer instead of a ptid_t.  All callers
2860         adjusted.
2861         * infcall.c (get_call_return_value): Use inferior_thread.
2862         (run_inferior_call): Work with thread pointers instead of ptid_t.
2863         (call_function_by_hand_dummy): Work with thread pointers instead
2864         of ptid_t.  Use thread_info_ref.
2865         * infcmd.c (proceed_thread_callback): Access thread's state
2866         directly.
2867         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2868         access thread's state directly.
2869         (continue_command): Use inferior_thread.
2870         (info_program_command): Use find_thread_ptid and access thread
2871         state directly.
2872         (proceed_after_attach_callback): Use thread state directly.
2873         (notice_new_inferior): Take a thread_info pointer instead of a
2874         ptid_t.  All callers adjusted.
2875         (exit_inferior): Take an inferior pointer instead of a pid.  All
2876         callers adjusted.
2877         (exit_inferior_silent): New.
2878         (detach_inferior): Delete.
2879         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2880         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2881         (detach_inferior_command, kill_inferior_command): Use
2882         find_inferior_id instead of valid_gdb_inferior_id and
2883         gdb_inferior_id_to_pid.
2884         (inferior_command): Use inferior and thread pointers.
2885         * inferior.h (struct thread_info): Forward declare.
2886         (notice_new_inferior): Take a thread_info pointer instead of a
2887         ptid_t.  All callers adjusted.
2888         (detach_inferior): Delete declaration.
2889         (exit_inferior, exit_inferior_silent): Take an inferior pointer
2890         instead of a pid.  All callers adjusted.
2891         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2892         (valid_gdb_inferior_id): Delete.
2893         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2894         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2895         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2896         ...
2897         <inf>: ... this new field.
2898         <step_ptid>: Delete, replaced by ...
2899         <step_thread>: ... this new field.
2900         (get_displaced_stepping_state): Take an inferior pointer instead
2901         of a pid.  All callers adjusted.
2902         (displaced_step_in_progress_any_inferior): Adjust.
2903         (displaced_step_in_progress_thread): Take a thread pointer instead
2904         of a ptid_t.  All callers adjusted.
2905         (displaced_step_in_progress, add_displaced_stepping_state): Take
2906         an inferior pointer instead of a pid.  All callers adjusted.
2907         (get_displaced_step_closure_by_addr): Adjust.
2908         (remove_displaced_stepping_state): Take an inferior pointer
2909         instead of a pid.  All callers adjusted.
2910         (displaced_step_prepare_throw, displaced_step_prepare)
2911         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2912         All callers adjusted.
2913         (start_step_over): Adjust.
2914         (infrun_thread_ptid_changed): Remove bit updating ptids in the
2915         displaced step queue.
2916         (do_target_resume): Adjust.
2917         (fetch_inferior_event): Use inferior_thread.
2918         (context_switch, get_inferior_stop_soon): Take an
2919         execution_control_state pointer instead of a ptid_t.  All callers
2920         adjusted.
2921         (switch_to_thread_cleanup): Delete.
2922         (stop_all_threads): Use scoped_restore_current_thread.
2923         * inline-frame.c: Include "gdbthread.h".
2924         (inline_state) <inline_state>: Take a thread pointer instead of a
2925         ptid_t.  All callers adjusted.
2926         <ptid>: Delete, replaced by ...
2927         <thread>: ... this new field.
2928         (find_inline_frame_state): Take a thread pointer instead of a
2929         ptid_t.  All callers adjusted.
2930         (skip_inline_frames, step_into_inline_frame)
2931         (inline_skipped_frames, inline_skipped_symbol): Take a thread
2932         pointer instead of a ptid_t.  All callers adjusted.
2933         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2934         (inline_skipped_frames, inline_skipped_symbol): Likewise.
2935         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2936         pointers directly.
2937         * linux-nat.c (get_detach_signal): Likewise.
2938         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2939         (thread_db_notice_clone): Adjust.
2940         (thread_db_find_new_threads_silently)
2941         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2942         a thread pointer instead of a ptid_t.  All callers adjusted.
2943         * mi/mi-cmd-var.c: Include "inferior.h".
2944         (mi_cmd_var_update_iter): Update to use thread pointers.
2945         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2946         inferior directly.
2947         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2948         out to ...
2949         (mi_output_running): ... this new function.
2950         (mi_on_resume_1): Adjust to use it.
2951         (mi_user_selected_context_changed): Adjust to use inferior_thread.
2952         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2953         directly.
2954         (interrupt_thread_callback): : Adjust to use thread and inferior
2955         pointers.
2956         * proc-service.c: Include "gdbthread.h".
2957         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2958         * progspace-and-thread.c: Include "inferior.h".
2959         * progspace.c: Include "inferior.h".
2960         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2961         hold a reference to an inferior_object.
2962         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2963         inferior_thread.
2964         * python/py-inferior.c (struct inferior_object): Give the type a
2965         tag name instead of a typedef.
2966         (python_on_normal_stop): No need to check if the current thread is
2967         listed.
2968         (inferior_to_inferior_object): Change return type to
2969         inferior_object.  All callers adjusted.
2970         (find_thread_object): Delete, bits factored out to ...
2971         (thread_to_thread_object): ... this new function.
2972         * python/py-infthread.c (create_thread_object): Use
2973         inferior_to_inferior_object.
2974         (thpy_is_stopped): Use thread pointer directly.
2975         (gdbpy_selected_thread): Use inferior_thread.
2976         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2977         field, replaced with ...
2978         <thread>: ... this new field.  All users adjusted.
2979         (btpy_insn_or_gap_new): Drop const.
2980         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2981         callers adjusted.
2982         * python/py-record.c: Include "gdbthread.h".
2983         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2984         a ptid_t.  All callers adjusted.
2985         (gdbpy_current_recording): Use inferior_thread.
2986         * python/py-record.h (recpy_record_object) <ptid>: Delete
2987         field, replaced with ...
2988         <thread>: ... this new field.  All users adjusted.
2989         (recpy_element_object) <ptid>: Delete
2990         field, replaced with ...
2991         <thread>: ... this new field.  All users adjusted.
2992         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2993         a ptid_t.  All callers adjusted.
2994         * python/py-threadevent.c: Include "gdbthread.h".
2995         (get_event_thread): Use thread_to_thread_object.
2996         * python/python-internal.h (struct inferior_object): Forward
2997         declare.
2998         (find_thread_object, find_inferior_object): Delete declarations.
2999         (thread_to_thread_object, inferior_to_inferior_object): New
3000         declarations.
3001         * record-btrace.c: Include "inferior.h".
3002         (require_btrace_thread): Use inferior_thread.
3003         (record_btrace_frame_sniffer)
3004         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3005         (get_thread_current_frame): Use scoped_restore_current_thread and
3006         switch_to_thread.
3007         (get_thread_current_frame): Use thread pointer directly.
3008         (record_btrace_replay_at_breakpoint): Use thread's inferior
3009         pointer directly.
3010         * record-full.c: Include "inferior.h".
3011         * regcache.c: Include "gdbthread.h".
3012         (get_thread_arch_regcache): Use the inferior's address space
3013         directly.
3014         (get_thread_regcache, registers_changed_thread): New.
3015         * regcache.h (get_thread_regcache(thread_info *thread)): New
3016         overload.
3017         (registers_changed_thread): New.
3018         (remote_target) <remote_detach_1>: Swap order of parameters.
3019         (remote_add_thread): <remote_add_thread>: Return the new thread.
3020         (get_remote_thread_info(ptid_t)): New overload.
3021         (remote_target::remote_notice_new_inferior): Use thread pointers
3022         directly.
3023         (remote_target::process_initial_stop_replies): Use
3024         thread_info::set_running.
3025         (remote_target::remote_detach_1, remote_target::detach)
3026         (extended_remote_target::detach): Adjust.
3027         * stack.c (frame_show_address): Use inferior_thread.
3028         * target-debug.h (target_debug_print_thread_info_pp): New.
3029         * target-delegates.c: Regenerate.
3030         * target.c (default_thread_address_space): Delete.
3031         (memory_xfer_partial_1): Use current_inferior.
3032         (target_detach): Use current_inferior.
3033         (target_thread_address_space): Delete.
3034         (generic_mourn_inferior): Use current_inferior.
3035         * target.h (struct target_ops) <thread_address_space>: Delete.
3036         (target_thread_address_space): Delete.
3037         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3038         pointers directly.
3039         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3040         thread pointer instead of a ptid_t.  Adjust all callers.
3041         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3042         (first_thread_of_process): Delete, replaced by ...
3043         (first_thread_of_inferior): ... this new function.  All callers
3044         adjusted.
3045         (any_thread_of_process): Rename to ...
3046         (any_thread_of_inferior): ... this, and take an inferior pointer.
3047         (any_live_thread_of_process): Rename to ...
3048         (any_live_thread_of_inferior): ... this, and take an inferior
3049         pointer.
3050         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3051         (value_in_thread_stack_temporaries)
3052         (get_last_thread_stack_temporary): Take a thread pointer instead
3053         of a ptid_t.  Adjust all callers.
3054         (thread_info::set_running): New.
3055         (validate_registers_access): Use inferior_thread.
3056         (can_access_registers_ptid): Rename to ...
3057         (can_access_registers_thread): ... this, and take a thread
3058         pointer.
3059         (print_thread_info_1): Adjust to compare thread pointers instead
3060         of ptids.
3061         (switch_to_no_thread, switch_to_thread): Make extern.
3062         (scoped_restore_current_thread::~scoped_restore_current_thread):
3063         Use m_thread pointer directly.
3064         (scoped_restore_current_thread::scoped_restore_current_thread):
3065         Use inferior_thread.
3066         (thread_command): Use thread pointer directly.
3067         (thread_num_make_value_helper): Use inferior_thread.
3068         * top.c (execute_command): Use inferior_thread.
3069         * tui/tui-interp.c: Include "inferior.h".
3070         * varobj.c (varobj_create): Use inferior_thread.
3071         (value_of_root_1): Use find_thread_global_id instead of
3072         global_thread_id_to_ptid.
3073
3074 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3075
3076         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3077         possible.
3078         (regcache::write_part): Likewise.
3079         (readable_regcache::cooked_read_part): Update comment.
3080         (readable_regcache::cooked_write_part): Likewise.
3081         * regcache.h: (readable_regcache::read_part): Likewise.
3082         (regcache::write_part): Likewise.
3083
3084 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3085             Dirk Schubert  <dirk.schubert@arm.com>
3086
3087         * aarch64-linux-nat.c (post_attach): New.
3088         (aarch64_linux_nat_target::post_attach): Override post_attach to
3089         record the number of hardware debug registers.
3090
3091 2018-06-20  Tom Tromey  <tom@tromey.com>
3092
3093         * python/py-param.c (add_setshow_generic): Make parameters const.
3094         (parmpy_init): Update.
3095
3096 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3097
3098         * regcache.h (regcache_cooked_read_ftype): Rename to...
3099         (register_read_ftype): ...this, change type to function_view.
3100         (class reg_buffer) <save>: Remove src parameter.
3101         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3102         parameter non-const in first overload.  Remove src parameter in
3103         second overload.
3104         * regcache.c (do_cooked_read): Remove.
3105         (readonly_detached_regcache::readonly_detached_regcache): Make
3106         parameter non-const, adjust call to other constructor.
3107         (reg_buffer::save): Remove src parameter.
3108         * frame.c (do_frame_register_read): Remove.
3109         (frame_save_as_regcache): Use lambda function.
3110         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3111         parameter to ppu2spu_data *.
3112         (ppu2spu_sniffer): Use lambda function.
3113
3114 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3115
3116         * record-full.c (record_full_target::insert_breakpoint): Remove
3117         "struct" keyword, add const.
3118
3119 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3120
3121         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3122         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3123         * configure.ac: Remove AC_PREREQ, add missing quoting.
3124         * gnulib/configure.ac: Modernize usage of
3125         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3126         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3127         (AUTOMAKE_VERSION): Bump to 1.15.1.
3128         * configure: Re-generate.
3129         * config.in: Re-generate.
3130         * aclocal.m4: Re-generate.
3131         * gnulib/aclocal.m4: Re-generate.
3132         * gnulib/config.in: Re-generate.
3133         * gnulib/configure: Re-generate.
3134         * gnulib/import/Makefile.in: Re-generate.
3135
3136 2018-06-19  Pedro Alves  <palves@redhat.com>
3137
3138         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3139         (lookup_minimal_symbol_by_pc_section): ... here with
3140         gdb_assert_not_reached added.
3141
3142 2018-06-19  Pedro Alves  <palves@redhat.com>
3143
3144         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3145         parameter with a block parameter.  Compare location's block symbol
3146         with the frame's block instead of addresses.
3147         (skip_inline_frames): Pass the current block instead of the
3148         frame's address.  Break out as soon as we determine the frame
3149         should not be skipped.
3150
3151 2018-06-18  Tom Tromey  <tom@tromey.com>
3152
3153         * solib-aix.c (solib_aix_get_section_offsets): Return
3154         unique_xmalloc_ptr.
3155         (solib_aix_solib_create_inferior_hook): Update.
3156
3157 2018-06-18  Tom Tromey  <tom@tromey.com>
3158
3159         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3160
3161 2018-06-18  Tom Tromey  <tom@tromey.com>
3162
3163         * solib-frv.c (frv_relocate_main_executable): Use
3164         unique_xmalloc_ptr.
3165         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3166         unique_xmalloc_ptr.
3167
3168 2018-06-18  Tom Tromey  <tom@tromey.com>
3169
3170         * objfiles.h (inhibit_section_map_updates): Update.
3171         (resume_section_map_updates, resume_section_map_updates_cleanup):
3172         Remove.
3173         * solib-svr4.c (svr4_handle_solib_event): Update.
3174         * objfiles.c (inhibit_section_map_updates): Return
3175         scoped_restore_tmpl<int>.
3176         (resume_section_map_updates, resume_section_map_updates_cleanup):
3177         Remove.
3178
3179 2018-06-18  Tom Tromey  <tom@tromey.com>
3180
3181         * valprint.h (read_string): Update.
3182         * valprint.c (read_string): Change type of "buffer".
3183         (val_print_string): Update.
3184         * python/py-value.c (valpy_string): Update.
3185         * language.h (struct language_defn) <la_get_string>: Change
3186         type of "buffer".
3187         (default_get_string, c_get_string): Update.
3188         * language.c (default_get_string): Change type of "buffer".
3189         * guile/scm-value.c (gdbscm_value_to_string): Update.
3190         * c-lang.c (c_get_string): Change type of "buffer".
3191
3192 2018-06-18  Tom Tromey  <tom@tromey.com>
3193
3194         * ser-mingw.c (struct pipe_state_destroyer): New.
3195         (pipe_state_up): New typedef.
3196         (cleanup_pipe_state): Remove.
3197         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
3198
3199 2018-06-18  Tom Tromey  <tom@tromey.com>
3200
3201         * rust-lang.h (rust_yyerror): Don't declare.
3202         * rust-lang.c (rust_language_defn): Update.
3203         * rust-exp.y (yyerror): Now static.
3204         * parse.c (parse_exp_in_context_1): Update.
3205         * p-lang.h (p_yyerror): Don't declare.
3206         * p-lang.c (p_language_defn): Update.
3207         * p-exp.y (yyerror): Now static.
3208         * opencl-lang.c (opencl_language_defn): Update.
3209         * objc-lang.c (objc_language_defn): Update.
3210         * m2-lang.h (m2_yyerror): Don't declare.
3211         * m2-lang.c (m2_language_defn): Update.
3212         * m2-exp.y (yyerror): Now static.
3213         * language.h (struct language_defn) <la_error>: Remove.
3214         * language.c (unk_lang_error): Remove.
3215         (unknown_language_defn, auto_language_defn): Remove.
3216         * go-lang.h (go_yyerror): Don't declare.
3217         * go-lang.c (go_language_defn): Update.
3218         * go-exp.y (yyerror): Now static.
3219         * f-lang.h (f_yyerror): Don't declare.
3220         * f-lang.c (f_language_defn): Update.
3221         * f-exp.y (yyerror): Now static.
3222         * d-lang.h (d_yyerror): Don't declare.
3223         * d-lang.c (d_language_defn): Update.
3224         * d-exp.y (yyerror): Now static.
3225         * c-lang.h (c_yyerror): Don't declare.
3226         * c-lang.c (c_language_defn, cplus_language_defn)
3227         (asm_language_defn, minimal_language_defn): Update.
3228         * c-exp.y (yyerror): Now static.
3229         * ada-lang.h (ada_yyerror): Don't declare.
3230         * ada-lang.c (ada_language_defn): Update.
3231         * ada-exp.y (yyerror): Now static.
3232
3233 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3234
3235         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3236         (store_sveregs_to_thread): Likewise.
3237         (aarch64_linux_fetch_inferior_registers): Check for SVE.
3238         (aarch64_linux_store_inferior_registers): Likewise.
3239         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3240         function.
3241         (aarch64_sve_regs_copy_to_regcache): Likewise.
3242         (aarch64_sve_regs_copy_from_regcache): Likewise.
3243         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3244         declaration.
3245         (aarch64_sve_regs_copy_to_regcache): Likewise.
3246         (aarch64_sve_regs_copy_from_regcache): Likewise.
3247         (sve_context): Structure from Linux headers.
3248         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3249         (SVE_SIG_ZREG_SIZE): Likewise.
3250         (SVE_SIG_PREG_SIZE): Likewise.
3251         (SVE_SIG_FFR_SIZE): Likewise.
3252         (SVE_SIG_REGS_OFFSET): Likewise.
3253         (SVE_SIG_ZREGS_OFFSET): Likewise.
3254         (SVE_SIG_ZREG_OFFSET): Likewise.
3255         (SVE_SIG_ZREGS_SIZE): Likewise.
3256         (SVE_SIG_PREGS_OFFSET): Likewise.
3257         (SVE_SIG_PREG_OFFSET): Likewise.
3258         (SVE_SIG_PREGS_SIZE): Likewise.
3259         (SVE_SIG_FFR_OFFSET): Likewise.
3260         (SVE_SIG_REGS_SIZE): Likewise.
3261         (SVE_SIG_CONTEXT_SIZE): Likewise.
3262         (SVE_PT_REGS_MASK): Likewise.
3263         (SVE_PT_REGS_FPSIMD): Likewise.
3264         (SVE_PT_REGS_SVE): Likewise.
3265         (SVE_PT_VL_INHERIT): Likewise.
3266         (SVE_PT_VL_ONEXEC): Likewise.
3267         (SVE_PT_REGS_OFFSET): Likewise.
3268         (SVE_PT_FPSIMD_OFFSET): Likewise.
3269         (SVE_PT_FPSIMD_SIZE): Likewise.
3270         (SVE_PT_SVE_ZREG_SIZE): Likewise.
3271         (SVE_PT_SVE_PREG_SIZE): Likewise.
3272         (SVE_PT_SVE_FFR_SIZE): Likewise.
3273         (SVE_PT_SVE_FPSR_SIZE): Likewise.
3274         (SVE_PT_SVE_FPCR_SIZE): Likewise.
3275         (__SVE_SIG_TO_PT): Likewise.
3276         (SVE_PT_SVE_OFFSET): Likewise.
3277         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3278         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3279         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3280         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3281         (SVE_PT_SVE_PREG_OFFSET): Likewise.
3282         (SVE_PT_SVE_PREGS_SIZE): Likewise.
3283         (SVE_PT_SVE_FFR_OFFSET): Likewise.
3284         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3285         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3286         (SVE_PT_SVE_SIZE): Likewise.
3287         (SVE_PT_SIZE): Likewise.
3288         (HAS_SVE_STATE): New define.
3289
3290 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3291
3292         * nat/aarch64-sve-linux-sigcontext.h: New file.
3293         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3294         new files.
3295         (SVE_VQ_MIN): Likewise.
3296         (SVE_VQ_MAX): Likewise.
3297         (SVE_VL_MIN): Likewise.
3298         (SVE_VL_MAX): Likewise.
3299         (SVE_NUM_ZREGS): Likewise.
3300         (SVE_NUM_PREGS): Likewise.
3301         (sve_vl_valid): Likewise.
3302         (struct user_sve_header): Likewise.
3303
3304 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
3305             Richard Bunt <Richard.Bunt@arm.com>
3306
3307         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3308         was requested by GDB.
3309
3310 2018-06-15  Tom de Vries  <tdevries@suse.de>
3311
3312         * MAINTAINERS (Write After Approval): Add Tom de Vries.
3313
3314 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
3315
3316         * gnulib/update-gnulib.sh: Print expected versions of
3317         autoconf/aclocal.
3318
3319 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
3320
3321         * arch-utils.c (default_type_align): Use type_length_units.
3322         * gdbtypes.c (type_align): Use type_length_units.
3323
3324 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3325
3326         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3327         of 'define' command.
3328
3329 2018-06-14  Tom de Vries  <tdevries@suse.de>
3330
3331         PR cli/22573
3332         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3333         get_no_prettyformat_print_options.
3334
3335 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
3336
3337         * sparc-nat.h: Include target.h.
3338         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3339         <fetch_registers>: Remove this argument in function call.
3340         <store_registers>: Remove this argument in function call, remove
3341         extra semicolon.
3342         <low_forget_process>: Call sparc64_forget_process instead of
3343         sparc_forget_process.
3344
3345 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3346
3347         * procfs.c (_initialize_procfs): Use add_inf_child_target.
3348         (procfs_target::make_corefile_notes): Adjust to new
3349         target_read_alloc return type.
3350
3351 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3352             Stephen Roberts  <stephen.roberts@arm.com>
3353
3354         PR gdb/22882
3355         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3356         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3357         Move should_notify_stop local into more inner scope.
3358
3359 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3360             Stephen Roberts  <stephen.roberts@arm.com>
3361
3362         PR gdb/22882
3363         * infrun.c (resume_1): Add call to mark_async_event_handler.
3364
3365 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
3366
3367         * infrun.c (do_target_wait): Change old version of $pc printed.
3368
3369 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
3370
3371         * dwarf2read.c (read_index_from_section): Rename to...
3372         (read_gdb_index_from_section): ... this, update all callers.
3373         (dwarf2_read_index): Rename to...
3374         (dwarf2_read_gdb_index): ... this, update all callers.
3375
3376 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
3377
3378         * gdb/hppa-linux-nat.c
3379         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3380         hppa_linux_nat_target::fetch_registers.
3381
3382 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3383
3384         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3385         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3386         (AARCH64_DWARF_SVE_FFR): Likewise.
3387         (AARCH64_DWARF_SVE_P0): Likewise.
3388         (AARCH64_DWARF_SVE_Z0): Likewise.
3389
3390 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3391
3392         * common/common-regcache.h (raw_compare): New function.
3393         * regcache.c (regcache::raw_compare): Likewise.
3394         * regcache.h (regcache::raw_compare): New declaration.
3395
3396 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
3397
3398         * common/common-regcache.h (reg_buffer_common): New structure.
3399         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3400         (reg_buffer::raw_supply): Likewise.
3401         (reg_buffer::raw_supply_integer): Likewise.
3402         (reg_buffer::raw_supply_zeroed): Likewise.
3403         (reg_buffer::raw_collect): Likewise.
3404         (reg_buffer::raw_collect_integer): Likewise.
3405         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3406         (reg_buffer::raw_supply): Likewise.
3407         (reg_buffer::raw_supply_integer): Likewise.
3408         (reg_buffer::raw_supply_zeroed): Likewise.
3409         (reg_buffer::raw_collect): Likewise.
3410         (reg_buffer::raw_collect_integer): Likewise.
3411
3412 2018-06-10  Tom Tromey  <tom@tromey.com>
3413
3414         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
3415         (class remote_state) <stop_reply_queue>: Now std::vector.
3416         (remote_state::~remote_state)
3417         (remote_target::stop_reply_queue_length): Update.
3418         (struct queue_iter_param, remove_child_of_pending_fork)
3419         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3420         (check_pending_event_prevents_wildcard_vcont_callback)
3421         (remove_stop_reply_for_inferior)
3422         (remove_stop_reply_of_remote_state)
3423         (remote_notif_remove_once_on_match)
3424         (stop_reply_match_ptid_and_ws)
3425         (remote_kill_child_of_pending_fork): Remove.
3426         (remote_target::remove_new_fork_children)
3427         (remote_target::check_pending_events_prevent_wildcard_vcont)
3428         (remote_target::discard_pending_stop_replies)
3429         (remote_target::discard_pending_stop_replies_in_queue)
3430         (remote_target::remote_notif_remove_queued_reply)
3431         (remote_target::queued_stop_reply)
3432         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3433         (remote_target::wait, remote_target::kill_new_fork_children)
3434         (remote_target::async): Update.
3435
3436 2018-06-10  Tom Tromey  <tom@tromey.com>
3437
3438         * record-full.c (record_full_arch_list_cleanups): Remove.
3439         (record_full_message): Use try/catch.
3440         (record_full_wait_cleanups): Remove.
3441         (record_full_wait_1): Use try/catch.
3442         (record_full_restore): Likewise.
3443
3444 2018-06-10  Tom Tromey  <tom@tromey.com>
3445
3446         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
3447         declare VEC.  Add constructor.
3448         <in_target_beneath>: Now bool.
3449         (record_full_breakpoints): Now a std::vector, static.
3450         (record_full_sync_record_breakpoints)
3451         (record_full_init_record_breakpoints)
3452         (record_full_target::insert_breakpoint)
3453         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
3454
3455 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
3456
3457         * dwarf2read.c (process_cu_includes): Remove struct keyword.
3458         * serial.c (serial_interface_lookup): Remove struct keyword.
3459
3460 2018-06-10  Tom Tromey  <tom@tromey.com>
3461
3462         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3463         method.
3464         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3465         a method.
3466         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3467         method.
3468         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3469         "beneath" as a method.
3470         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3471         Use "beneath" as a method.
3472
3473 2018-06-10  Tom Tromey  <tom@tromey.com>
3474
3475         * tracefile.c (struct trace_file_writer_deleter): New.
3476         <operator()>: Rename from trace_file_writer_xfree.
3477         (trace_file_writer_up): New typedef.
3478         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3479
3480 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3481
3482         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3483         <m_registers, m_register_status>: Change type to
3484         std::unique_ptr.
3485         * regcache.c (reg_buffer::reg_buffer): Use new instead of
3486         XCNEWVEC.
3487
3488 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
3489
3490         * common/common-regcache.h (enum register_status): Add
3491         underlying type "signed char".
3492         * regcache.h (reg_buffer) <m_register_status>: Change type to
3493         register_status *.
3494         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3495         register_status instead of signed char.
3496         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3497         (reg_buffer::get_register_status): Remove cast.
3498         (readable_regcache::raw_read): Remove cast.
3499         (readable_regcache::cooked_read): Remove cast.
3500
3501 2018-06-09  Tom Tromey  <tom@tromey.com>
3502
3503         * source.c (reverse_search_command, forward_search_command): Use
3504         scoped_fd.
3505
3506 2018-06-09  Tom Tromey  <tom@tromey.com>
3507
3508         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
3509         (serial_ops_list): Now static, std::vector.
3510         (serial_interface_lookup, serial_add_interface): Update.
3511
3512 2018-06-09  Tom Tromey  <tom@tromey.com>
3513
3514         * dwarf2read.c (process_cu_includes): Update.
3515         (process_full_comp_unit): Update.
3516         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3517         std::vector.
3518
3519 2018-06-08  Paul Koning  <paul_koning@dell.com>
3520
3521         PR gdb/23252
3522
3523         * python/python.c (do_start_initialization):
3524         Avoid call to internal Python API.
3525         (init__gdb_module): New function.
3526
3527 2018-06-08  Gary Benson <gbenson@redhat.com>
3528
3529         * linux-thread-db.c (valprint.h): New include.
3530         (struct check_thread_db_info): New structure.
3531         (check_thread_db_on_load, tdb_testinfo): New static globals.
3532         (check_thread_db, check_thread_db_callback): New functions.
3533         (try_thread_db_load_1): Run integrity checks if requested.
3534         (maintenance_check_libthread_db): New function.
3535         (_initialize_thread_db): Register "maint check libthread-db"
3536         and "maint set/show check-libthread-db".
3537         * NEWS: Mention the above new commands.
3538
3539 2018-06-08  Tom Tromey  <tom@tromey.com>
3540
3541         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3542         now a method.
3543
3544 2018-06-08  Tom Tromey  <tom@tromey.com>
3545
3546         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3547
3548 2018-06-08  Tom Tromey  <tom@tromey.com>
3549
3550         * common/btrace-common.h (struct btrace_data): Add constructor,
3551         destructor, move assignment operator.
3552         <empty, clear, fini>: New methods.
3553         <format>: Initialize.
3554         (btrace_data_init, btrace_data_fini, btrace_data_clear)
3555         (btrace_data_empty): Don't declare.
3556         * common/btrace-common.c (btrace_data_init): Remove.
3557         (btrace_data::fini): Rename from btrace_data_fini.
3558         (btrace_data::empty): Rename from btrace_data_empty.
3559         (btrace_data::clear): Rename from btrace_data_clear.  Return
3560         bool.
3561         * btrace.h (make_cleanup_btrace_data): Don't declare.
3562         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3563         (parse_xml_btrace): Update.
3564         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3565         (maint_btrace_clear_packet_history_cmd): Update.
3566
3567 2018-06-07  Pedro Alves  <palves@redhat.com>
3568
3569         * target.h (target_ops) <beneath>: Now a method.  All references
3570         updated.
3571         (class target_stack): New.
3572         * target.c (g_target_stack): New.
3573         (g_current_top_target): Delete.
3574         (current_top_target): Get the top target out of g_target_stack.
3575         (target_stack::push, target_stack::unpush): New.
3576         (push_target, unpush_target): Reimplement.
3577         (target_is_pushed): Reimplement in terms of g_target_stack.
3578         (target_ops::beneath, target_stack::find_beneath): New.
3579
3580 2018-06-07  Pedro Alves  <palves@redhat.com>
3581
3582         * target.h (find_target_beneath): Delete declaration.
3583         * target.c (find_target_beneath): Delete definition.
3584         * aix-thread.c: All callers of find_target_beneath adjusted to
3585         call target_ops::beneath instead.
3586         * bsd-uthread.c: Likewise.
3587         * linux-thread-db.c: Likewise.
3588         * ravenscar-thread.c: Likewise.
3589         * sol-thread.c: Likewise.
3590         * spu-multiarch.c: Likewise.
3591
3592 2018-06-07  Pedro Alves  <palves@redhat.com>
3593
3594         * target.h (target_ops) <beneath>: Now a method.  All references
3595         updated.
3596         (target_ops) <m_beneath>: New.
3597         * target.c (target_ops::beneath): New.
3598         * corelow.c: Adjust all references to target_ops::beneath.
3599         * linux-thread-db.c: Likewise.
3600         * make-target-delegates: Likewise.
3601         * record-btrace.c: Likewise.
3602         * record-full.c: Likewise.
3603         * remote.c: Likewise.
3604         * target.c: Likewise.
3605         * target-delegates.c: Regenerate.
3606
3607 2018-06-07  Pedro Alves  <palves@redhat.com>
3608
3609         * target.h (target_stack): Delete.
3610         (current_top_target): Declare function.
3611         * target.c (target_stack): Delete.
3612         (g_current_top_target): New.
3613         (current_top_target): New function.
3614         * auxv.c: Use current_top_target instead of target_stack
3615         throughout.
3616         * avr-tdep.c: Likewise.
3617         * breakpoint.c: Likewise.
3618         * corefile.c: Likewise.
3619         * elfread.c: Likewise.
3620         * eval.c: Likewise.
3621         * exceptions.c: Likewise.
3622         * frame.c: Likewise.
3623         * gdbarch-selftests.c: Likewise.
3624         * gnu-v3-abi.c: Likewise.
3625         * ia64-tdep.c: Likewise.
3626         * ia64-vms-tdep.c: Likewise.
3627         * infcall.c: Likewise.
3628         * infcmd.c: Likewise.
3629         * infrun.c: Likewise.
3630         * linespec.c: Likewise.
3631         * linux-tdep.c: Likewise.
3632         * minsyms.c: Likewise.
3633         * ppc-linux-nat.c: Likewise.
3634         * ppc-linux-tdep.c: Likewise.
3635         * procfs.c: Likewise.
3636         * regcache.c: Likewise.
3637         * remote.c: Likewise.
3638         * rs6000-tdep.c: Likewise.
3639         * s390-linux-nat.c: Likewise.
3640         * s390-tdep.c: Likewise.
3641         * solib-aix.c: Likewise.
3642         * solib-darwin.c: Likewise.
3643         * solib-dsbt.c: Likewise.
3644         * solib-spu.c: Likewise.
3645         * solib-svr4.c: Likewise.
3646         * solib-target.c: Likewise.
3647         * sparc-tdep.c: Likewise.
3648         * sparc64-tdep.c: Likewise.
3649         * spu-tdep.c: Likewise.
3650         * symfile.c: Likewise.
3651         * symtab.c: Likewise.
3652         * target-descriptions.c: Likewise.
3653         * target-memory.c: Likewise.
3654         * target.c: Likewise.
3655         * target.h: Likewise.
3656         * tracefile-tfile.c: Likewise.
3657         * tracepoint.c: Likewise.
3658         * valops.c: Likewise.
3659         * valprint.c: Likewise.
3660         * value.c: Likewise.
3661         * windows-tdep.c: Likewise.
3662         * mi/mi-main.c: Likewise.
3663
3664 2018-06-07  Tom Tromey  <tom@tromey.com>
3665
3666         * valprint.h (build_address_symbolic): Declare.
3667         * printcmd.c (print_address_symbolic): Update.
3668         (build_address_symbolic): Change "name" and "filename" to
3669         std::string.
3670         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3671         Update.
3672         * defs.h (build_address_symbolic): Remove declaration.
3673
3674 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
3675
3676         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3677         (aarch64_vnv_type): Add function.
3678         (aarch64_pseudo_register_name): Add V regs for SVE.
3679         (aarch64_pseudo_register_type): Likewise.
3680         (aarch64_pseudo_register_reggroup_p): Likewise.
3681         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3682         (aarch64_pseudo_read_value): Add V regs for SVE.
3683         (aarch64_pseudo_write_2): Use V0 offset for SVE
3684         (aarch64_pseudo_write): Add V regs for SVE.
3685         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3686
3687 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
3688
3689         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3690         (sve_vl_from_vq): Likewise.
3691
3692 2018-06-05  Tom Tromey  <tom@tromey.com>
3693
3694         * cli/cli-cmds.c (show_version): Update.
3695         * top.c (print_gdb_version): Add "interactive" parameter.
3696         Update.
3697         * main.c (captured_main_1): Update.
3698         * top.h (print_gdb_version): Add "interactive" parameter and a
3699         comment.
3700
3701 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
3702
3703         * common/enum-flags.h: Add trailing semicolon to example in
3704         comment.
3705
3706 2018-06-05  Tom Tromey  <tom@tromey.com>
3707
3708         PR cli/12326:
3709         * NEWS: Add entry about pager.
3710         * utils.c (pagination_disabled_for_command): New global.
3711         (prompt_for_continue): Allow "c" response to prompt.
3712         (reinitialize_more_filter): Clear
3713         pagination_disabled_for_command.
3714         (fputs_maybe_filtered): Check pagination_disabled_for_command.
3715
3716 2018-06-04  Tom Tromey  <tom@tromey.com>
3717
3718         * ada-lang.h (ada_lookup_symbol_list): Update.
3719         * ada-lang.c (resolve_subexp): Update.
3720         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
3721         parameter.
3722         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3723         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3724         results parameter to std::vector.
3725         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3726         Update.
3727         * ada-exp.y (block_lookup): Update.
3728         (select_possible_type_sym): Change type of syms.  Remove nsyms
3729         parameter.
3730         (write_var_or_type, write_name_assoc): Update.
3731
3732 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
3733
3734         * windows-nat.c (windows_nat_target::xfer_partial): Return
3735         TARGET_XFER_E_IO if we need to delegate to the target beneath
3736         but BENEATH is NULL.
3737
3738 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
3739
3740         * Makefile.in (config.status): Add configure.nat as a
3741         dependency.
3742
3743 2018-06-04  Tom Tromey  <tom@tromey.com>
3744
3745         * cp-name-parser.y (cpname_state): Add method declarations.
3746         (HANDLE_QUAL): Update.
3747         (cpname_state::d_grab, cpname_state::fill_comp)
3748         (cpname_state::make_operator, cpname_state::make_dtor)
3749         (cpname_state::make_builtin_type, cpname_state::make_name)
3750         (cpname_state::d_qualify, cpname_state::d_int_type)
3751         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3752         (%union): Move earlier.
3753
3754 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3755
3756         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3757
3758 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3759
3760         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3761         (aarch64_pseudo_write_1): Likewise.
3762         (aarch64_pseudo_read_value): Use helper.
3763         (aarch64_pseudo_write): Likewise.
3764
3765 2018-06-04  Pedro Alves  <palves@redhat.com>
3766
3767         * darwin-nat.c (darwin_ops): Delete.
3768         (darwin_attach_pid): Use get_native_target.
3769
3770 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3771
3772         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3773         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3774
3775 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3776
3777         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3778         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3779         (aarch64_gdbarch_init): Check for SVE.
3780         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3781
3782 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
3783
3784         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3785         * aarch64-tdep.h (aarch64_read_description): Likewise.
3786         * arch/aarch64.c (aarch64_create_target_description): Likewise.
3787         * arch/aarch64.h (aarch64_create_target_description): Likewise.
3788         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3789         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3790         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3791
3792 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3793
3794         * value.c (value_fetch_lazy_bitfield): New.
3795         (value_fetch_lazy_memory): New.
3796         (value_fetch_lazy_register): New.
3797         (value_fetch_lazy): Factor out to smaller functions.
3798
3799 2018-06-01  Tom Tromey  <tom@tromey.com>
3800
3801         * cp-name-parser.y (backslashable, represented): Now const.
3802
3803 2018-06-01  Tom Tromey  <tom@tromey.com>
3804
3805         * cp-name-parser.y: Include parser-defs.h.
3806         (parser_fprintf): Remove declaration.
3807
3808 2018-06-01  Tom Tromey  <tom@tromey.com>
3809
3810         * cp-name-parser.y: Use %pure-parser, %lex-param, and
3811         %parse-param.
3812         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3813         (global_result): Remove globals.
3814         (struct cpname_state): New.
3815         (yyparse): Don't declare.
3816         (yylex, yyerror): Move declarations after %union.
3817         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3818         (make_name): Add state parameter.
3819         Update all callers.
3820         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3821         parameter.
3822         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3823         Update.
3824         (yylex): Add lvalp, state parameters.
3825         (yyerror): Add state parameter.
3826         (cp_demangled_name_to_comp): Update.
3827
3828 2018-06-01  Tom Tromey  <tom@tromey.com>
3829
3830         * cp-name-parser.y (parser_fprintf): Declare.
3831         (GDB_YY_REMAP_PREFIX): Define.
3832         Include yy-remap.h.  Don't redefine yy* identifiers.
3833
3834 2018-06-01  Tom Tromey  <tom@tromey.com>
3835
3836         * python/py-type.c (typy_legacy_template_argument): Update.
3837         * cp-support.h (cp_demangled_name_to_comp): Update.
3838         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3839         parameter to be a "std::string *".
3840         (main): Update.
3841
3842 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
3843
3844         * ada-lex.l: Include "diagnostics.h" instead of
3845         "common/diagnostics.h".
3846         * unittests/environ-selftests.c: Likewise.
3847         * common/diagnostics.h: Moved to ../include.
3848
3849 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
3850
3851         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3852         to language_mode_manual while calling breakpoint_re_set_one.
3853
3854 2018-06-01  Tom Tromey  <tom@tromey.com>
3855
3856         * valops.c (value_cast_structs, destructor_name_p): Update.
3857         * symtab.c (gdb_mangle_name): Update.
3858         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3859         Update.
3860         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3861         (pascal_object_print_value_fields, pascal_object_print_value):
3862         Update.
3863         * p-typeprint.c (pascal_type_print_derivation_info): Update.
3864         * linespec.c (find_methods): Update.
3865         * gdbtypes.h (type_name_no_tag): Remove.
3866         (type_name_or_error): Rename from type_name_no_tag_or_error.
3867         * gdbtypes.c (type_name_no_tag): Remove.
3868         (type_name_or_error): Rename from type_name_no_tag_or_error.
3869         (lookup_struct_elt_type, check_typedef): Update.
3870         * expprint.c (print_subexp_standard): Update.
3871         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3872         * d-namespace.c (d_lookup_nested_symbol): Update.
3873         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3874         (cp_print_class_member): Update.
3875         * cp-namespace.c (cp_lookup_nested_symbol): Update.
3876         * completer.c (add_struct_fields): Update.
3877         * c-typeprint.c (cp_type_print_derivation_info)
3878         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3879         Update.
3880         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3881         (ada_prefer_type, ada_is_exception_sym): Update.
3882
3883 2018-06-01  Tom Tromey  <tom@tromey.com>
3884
3885         * valops.c (enum_constant_from_type, value_namespace_elt)
3886         (value_maybe_namespace_elt): Update.
3887         * valarith.c (find_size_for_pointer_math): Update.
3888         * target-descriptions.c (make_gdb_type): Update.
3889         * symmisc.c (print_symbol): Update.
3890         * stabsread.c (define_symbol, read_type)
3891         (complain_about_struct_wipeout, add_undefined_type)
3892         (cleanup_undefined_types_1): Update.
3893         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3894         (rust_range_type_p, val_print_struct, rust_print_struct_def)
3895         (rust_internal_print_type, rust_composite_type)
3896         (rust_evaluate_funcall, rust_evaluate_subexp)
3897         (rust_inclusive_range_type_p): Update.
3898         * python/py-type.c (typy_get_tag): Update.
3899         * p-typeprint.c (pascal_type_print_base): Update.
3900         * mdebugread.c (parse_symbol, parse_type): Update.
3901         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3902         Update.
3903         * guile/scm-type.c (gdbscm_type_tag): Update.
3904         * go-lang.c (sixg_string_p): Update.
3905         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3906         Update.
3907         * gdbtypes.h (struct main_type) <tag_name>: Remove.
3908         (TYPE_TAG_NAME): Remove.
3909         * gdbtypes.c (type_name_no_tag): Simplify.
3910         (check_typedef, check_types_equal, recursive_dump_type)
3911         (copy_type_recursive, arch_composite_type): Update.
3912         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
3913         in summary mode when needed.
3914         * eval.c (evaluate_funcall): Update.
3915         * dwarf2read.c (fixup_go_packaging, read_structure_type)
3916         (process_structure_scope, read_enumeration_type)
3917         (read_namespace_type, read_module_type, determine_prefix): Update.
3918         * cp-support.c (inspect_type): Update.
3919         * coffread.c (process_coff_symbol, decode_base_type): Update.
3920         * c-varobj.c (c_is_path_expr_parent): Update.
3921         * c-typeprint.c (c_type_print_base_struct_union): Update.
3922         (c_type_print_base_1): Update.  Print struct/class/union/enum in
3923         summary when using C language.
3924         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3925         (gen_maybe_namespace_elt): Update.
3926         * ada-lang.c (ada_type_name): Simplify.
3927         (empty_record, ada_template_to_fixed_record_type_1)
3928         (template_to_static_fixed_type)
3929         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3930
3931 2018-06-01  Tom Tromey  <tom@tromey.com>
3932
3933         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3934         c_print_type.
3935         * c-typeprint.c (c_print_type_1): Add "language" parameter.
3936         (c_print_type): Update.
3937         (c_print_type): New overload.
3938         (c_type_print_varspec_prefix, c_type_print_args)
3939         (c_type_print_varspec_suffix, c_print_type_no_offsets)
3940         (c_type_print_base_struct_union, c_type_print_base_1)
3941         (cp_type_print_method_args): Add "language" parameter.
3942         (c_type_print_base): Update.
3943         * c-lang.h (c_print_type): Add new overload.
3944
3945 2018-06-01  Tom Tromey  <tom@tromey.com>
3946
3947         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3948         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3949
3950 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
3951
3952         * aarch64-tdep.c (aarch64_sve_register_names): New const
3953         var.
3954         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3955         (AARCH64_SVE_Z_REGS_NUM): New define.
3956         (AARCH64_SVE_P_REGS_NUM): Likewise.
3957         (AARCH64_SVE_NUM_REGS): Likewise.
3958
3959 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3960
3961         * nat/linux-ptrace.h [__alpha__]
3962         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3963         definitions.
3964
3965 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3966
3967         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3968         the endianness selected.
3969         * NEWS: Document `set endian auto' mode operation update.
3970
3971 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3972
3973         * Makefile.in: Add new header.
3974         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3975         (sve_vl_from_vg): Likewise.
3976         (sve_vq_from_vl): Likewise.
3977         (sve_vl_from_vq): Likewise.
3978         (sve_vq_from_vg): Likewise.
3979         (sve_vg_from_vq): Likewise.
3980         * configure.nat: Add new c file.
3981         * nat/aarch64-sve-linux-ptrace.c: New file.
3982         * nat/aarch64-sve-linux-ptrace.h: New file.
3983
3984 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3985
3986         * aarch64-linux-nat.c (aarch64_linux_read_description):
3987         Add parmeter zero.
3988         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3989         Likewise.
3990         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3991         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3992         (aarch64_gdbarch_init): Add parmeter zero.
3993         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3994         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3995         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3996         parmeter.
3997         * doc/gdb.texinfo: Describe SVE feature
3998         * features/aarch64-sve.c: New file.
3999
4000 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4001
4002         PR gdb/23210
4003         * gdbarch.sh (significant_addr_bit): Default to zero when
4004         not set by target architecture.
4005         * gdbarch.c: Re-generated.
4006         * utils.c (address_significant): Update.
4007
4008 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4009
4010         * stack.c (func_command): Remove trailing newline in call to error.
4011
4012 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4013
4014         * regcache.h (regcache_raw_collect): Remove, update callers to
4015         use regcache::raw_collect.
4016         * regcache.c (regcache_raw_collect): Remove.
4017
4018 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4019
4020         * regcache.h (regcache_raw_supply): Remove, update callers to
4021         use detached_regcache::raw_supply.
4022         * regcache.c (regcache_raw_supply): Remove.
4023
4024 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4025
4026         * regcache.h (regcache_cooked_write_part): Remove, update
4027         callers to use regcache::cooked_write_part.
4028         * regcache.c (regcache_cooked_write_part): Remove.
4029
4030 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4031
4032         * regcache.h (regcache_cooked_read_part): Remove, update callers
4033         to use readable_regcache::cooked_read_part.
4034         * regcache.c (regcache_cooked_read_part): Remove.
4035
4036 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4037
4038         * regcache.h (regcache_cooked_read_value): Remove, update
4039         callers to use readable_regcache::cooked_read_value.
4040         * regcache.c (regcache_cooked_read_value): Remove.
4041
4042 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4043
4044         * regcache.h (regcache_cooked_write): Remove, update callers to
4045         use regcache::cooked_write.
4046         * regcache.c (regcache_cooked_write): Remove.
4047
4048 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4049
4050         * regcache.h (regcache_invalidate): Remove, update callers to
4051         use detached_regcache::invalidate instead.
4052         * regcache.c (regcache_invalidate): Remove.
4053
4054 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4055
4056         * regcache.h (regcache_raw_write_part): Remove, update callers
4057         to use regcache::raw_write_part instead.
4058         * regcache.c (regcache_raw_write_part): Remove.
4059
4060 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4061
4062         * regcache.h (regcache_raw_read_part): Remove, update callers to
4063         use readable_regcache::raw_read_part instead.
4064         * regcache.c (regcache_raw_read_part): Remove.
4065
4066 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4067
4068         * regcache.h (regcache_cooked_read): Remove, update callers to
4069         use readable_regcache::cooked_read instead.
4070         * regcache.c (regcache_cooked_read): Remove.
4071
4072 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4073
4074         * regcache.h (regcache_raw_write): Remove, update callers to use
4075         regcache::raw_write instead.
4076         * regcache.c (regcache_raw_write): Remove.
4077
4078 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4079
4080         * regcache.h (regcache_raw_read): Remove, update callers to use
4081         readable_regcache::raw_read instead.
4082         * regcache.c (regcache_raw_read): Remove.
4083
4084 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4085
4086         * regcache.h (regcache_raw_update): Remove, update callers to
4087         use readable_regcache::raw_update instead.
4088         * regcache.c (regcache_raw_update): Remove.
4089
4090 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4091
4092         * regcache.h (regcache_register_status): Remove, update callers
4093         to use reg_buffer::get_register_status directly instead.
4094         * regcache.c (regcache_register_status): Remove.
4095
4096 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4097
4098         * regcache.h (regcache_get_ptid): Remove, update all callers to
4099         call regcache::ptid instead.
4100         * regcache.c (regcache_get_ptid): Remove.
4101
4102 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4103
4104         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4105
4106 2018-05-30  Pedro Alves  <palves@redhat.com>
4107
4108         * common/common-exceptions.h (exception_rethrow): Use
4109         ATTRIBUTE_NORETURN.
4110
4111 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4112
4113         * breakpoint.c (print_solib_event, check_status_catch_solib):
4114         Remove struct keyword in range-based for loops.
4115         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4116         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4117         Likewise.
4118         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4119         Likewise.
4120         * symfile.c (addr_info_make_relative): Likewise.
4121         * thread.c (value_in_thread_stack_temporaries): Likewise.
4122
4123 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4124
4125         PR gdb/16841
4126         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4127         aggregate type to get its real type before accessing it.
4128
4129 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4130
4131         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4132         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4133         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4134         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4135         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4136         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4137         * printcmd.c (info_address_command): Likewise.
4138
4139 2018-05-29  Tom Tromey  <tom@tromey.com>
4140
4141         * windows-nat.c (handle_exception): Update fall-through comment.
4142
4143 2018-05-29  Tom Tromey  <tom@tromey.com>
4144
4145         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4146         (struct program_space) <added_solibs>: Now a std::vector.
4147         * breakpoint.c (print_solib_event): Update.
4148         (check_status_catch_solib): Update.
4149         * progspace.c (clear_program_space_solib_cache): Update.
4150         * solib.c (update_solib_list): Update.
4151
4152 2018-05-29  Tom Tromey  <tom@tromey.com>
4153
4154         * python/py-type.c (typy_richcompare): Update.
4155         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4156         * gdbtypes.h (types_deeply_equal): Return bool.
4157         (types_equal): Likewise.
4158         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4159         declare VEC.
4160         (check_types_equal): Change worklist to std::vector.  Return
4161         bool.
4162         (struct type_equality_entry): Add constructor.
4163         (compare_maybe_null_strings): Return bool.
4164         (check_types_worklist): Return bool.  Change worklist to
4165         std::vector.
4166         (types_deeply_equal): Use std::vector.
4167         (types_equal): Return bool.
4168         (compare_maybe_null_strings): Simplify.
4169
4170 2018-05-29  Tom Tromey  <tom@tromey.com>
4171
4172         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4173
4174 2018-05-29  Tom Tromey  <tom@tromey.com>
4175
4176         * objc-lang.h: Don't include cp-support.h.
4177         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4178         declare VEC.
4179
4180 2018-05-27  Tom Tromey  <tom@tromey.com>
4181
4182         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4183
4184 2018-05-25  Tom Tromey  <tom@tromey.com>
4185
4186         * value.c (value::location): Initialize.
4187
4188 2018-05-25  Tom Tromey  <tom@tromey.com>
4189
4190         * dbxread.c (init_bincl_list): Remove.
4191         (bincl_list): Now a std::vector.
4192         (bincls_allocated, next_bincl): Remove.
4193         (free_bincl_list, do_free_bincl_list_cleanup)
4194         (make_cleanup_free_bincl_list): Remove.
4195         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4196         unique_xmalloc_ptr.
4197         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4198         (struct header_file_location): Add constructor.
4199         (add_bincl_to_list): Remove.
4200
4201 2018-05-25  Tom Tromey  <tom@tromey.com>
4202
4203         * tui/tui.c (tui_enable): Update.
4204         * mi/mi-interp.c (mi_interp::init): Update.
4205         * interps.h (class interp) <name>: New method.
4206         <m_name>: Rename from name.
4207         (~scoped_restore_interp): Update.
4208         * interps.c (interp::interp): Update.
4209         (interp_add, interp_set, interp_lookup_existing)
4210         (current_interp_named_p): Update.
4211
4212 2018-05-25  Tom Tromey  <tom@tromey.com>
4213
4214         * interps.c (interp_name): Remove.
4215         * mi/mi-interp.c (mi_interp::init): Update.
4216         * interps.h (interp_name): Remove.
4217         (~scoped_restore_interp): Update.
4218         * tui/tui.c (tui_enable): Update.
4219
4220 2018-05-25  Tom Tromey  <tom@tromey.com>
4221
4222         * utils.c (fputs_maybe_filtered): Update.
4223         * linespec.c (decode_line_full): Update.
4224         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4225         (mi_print_breakpoint_for_event, mi_solib_loaded)
4226         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4227         (mi_user_selected_context_changed): Update.
4228         * mi/mi-main.c (mi_execute_command): Update.
4229         * cli/cli-script.c (execute_control_command): Update.
4230         * python/python.c (execute_gdb_command): Update.
4231         * solib.c (info_sharedlibrary_command): Update.
4232         * interps.c (interp_ui_out): Remove.
4233         * interps.h (interp_ui_out): Remove.
4234
4235 2018-05-25  Tom Tromey  <tom@tromey.com>
4236
4237         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4238         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4239         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4240
4241 2018-05-25  Tom Tromey  <tom@tromey.com>
4242
4243         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4244         * interps.c (interp_exec): Use scoped_restore.
4245
4246 2018-05-25  Tom Tromey  <tom@tromey.com>
4247
4248         * remote.c (remote_target::remote_file_get): Use
4249         gdb::byte_vector.
4250         (remote_target::remote_file_put): Likewise.
4251
4252 2018-05-25  Tom Tromey  <tom@tromey.com>
4253
4254         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4255         a std::string.
4256         (get_pe_section_index, add_pe_exported_sym): Update.
4257         (read_pe_exported_syms): Use gdb::def_vector.
4258
4259 2018-05-25  Tom Tromey  <tom@tromey.com>
4260
4261         * frame.c (remove_prev_frame): Remove.
4262         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4263
4264 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
4265
4266         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4267         Remove prototypes.
4268         * mips-linux-nat.c (supply_fpregset): Always call
4269         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4270         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4271         `mips_fill_fpregset'.
4272         * mips-linux-tdep.c (mips_supply_fpregset)
4273         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4274         (mips_fill_fpregset_wrapper): Remove functions.
4275         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4276         (mips_linux_fpregset): Remove variable.
4277         (mips_linux_iterate_over_regset_sections): Use
4278         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4279         (mips_linux_o32_sigframe_init): Remove comment.
4280
4281 2018-05-25  Pedro Alves  <palves@redhat.com>
4282
4283         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4284         (struct readahead_cache, struct packet_reg, struct
4285         remote_arch_state, class remote_state): Move higher up in the
4286         file.
4287         (remote_target::m_remote_state): Now an object instead of a pointer.
4288         (remote_target::get_remote_state): Adjust.
4289
4290 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4291
4292         * stack.c (select_and_print_frame): Delete.
4293         (struct function_bounds): Move struct within function.
4294         (func_command): Most content moved into new function
4295         find_frame_for_function, use new function, print result, add
4296         function comment.
4297         (find_frame_for_function): New function, now returns a result.
4298
4299 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4300
4301         * stack.c (iterate_over_block_arg_vars): Fix comment.
4302         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4303
4304 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
4305
4306         PR gdb/23203
4307         * frame.c
4308         (scoped_restore_selected_frame::scoped_restore_selected_frame):
4309         Define.
4310         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4311         Define.
4312         * frame.h (class scoped_restore_selected_frame): New class.
4313         * stack.c (print_frame_local_vars): Remove catching and rethrowing
4314         of any exception, use scoped_restore_selected_frame to restore the
4315         frame instead.
4316
4317 2018-05-24  Pedro Alves  <palves@redhat.com>
4318
4319         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4320         override.
4321
4322 2018-05-23  Tom Tromey  <tom@tromey.com>
4323
4324         * complaints.c (struct complaints): Remove.
4325         (symfile_complaint_book): Remove.
4326         (series): New global.
4327         (complaint_internal): Update.
4328         (clear_complaints): Update.
4329
4330 2018-05-23  Tom Tromey  <tom@tromey.com>
4331
4332         * complaints.c (counters): New global.
4333         (struct complain): Remove.
4334         (struct complaints) <root>: Remove.
4335         (complaint_sentinel): Remove.
4336         (symfile_complaint_book): Update.
4337         (find_complaint) Remove.
4338         (complaint_internal, clear_complaints): Update.
4339
4340 2018-05-23  Tom Tromey  <tom@tromey.com>
4341
4342         * complaints.c (struct complain) <file, line>: Remove.
4343         (find_complaint): Remove file, line parameters.
4344         (complaint_internal): Update.
4345
4346 2018-05-23  Tom Tromey  <tom@tromey.com>
4347
4348         * complaints.c (vcomplaint): Remove.
4349         (complaint_internal) Merge in contents of vcomplaint.
4350
4351 2018-05-23  Tom Tromey  <tom@tromey.com>
4352
4353         * complaints.c (struct complaints) <explanation>: Remove.
4354         (symfile_explanations): Remove.
4355         (symfile_complaint_book): Update.
4356         (vcomplaint): Update.
4357         (struct explanation): Remove.
4358
4359 2018-05-23  Tom Tromey  <tom@tromey.com>
4360
4361         * complaints.c (symfile_complaints): Remove.
4362         (complaint_internal): Remove "complaints" parameter.
4363         (clear_complaints, vcomplaint): Remove "c" parameter.
4364         (get_complaints): Remove.
4365         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4366         (dwarf2_debug_line_missing_file_complaint)
4367         (dwarf2_debug_line_missing_end_sequence_complaint)
4368         (dwarf2_complex_location_expr_complaint)
4369         (dwarf2_const_value_length_mismatch_complaint)
4370         (dwarf2_section_buffer_overflow_complaint)
4371         (dwarf2_macro_malformed_definition_complaint)
4372         (dwarf2_invalid_attrib_class_complaint)
4373         (create_addrmap_from_index, dw2_symtab_iter_next)
4374         (dw2_expand_marked_cus)
4375         (dw2_debug_names_iterator::find_vec_in_debug_names)
4376         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4377         (create_debug_type_hash_table, init_cutu_and_read_dies)
4378         (partial_die_parent_scope, add_partial_enumeration)
4379         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4380         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4381         (read_import_statement, read_file_scope, create_dwo_cu_reader)
4382         (create_cus_hash_table, create_dwp_hash_table)
4383         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4384         (dwarf2_rnglists_process, dwarf2_ranges_process)
4385         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4386         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4387         (handle_struct_member_die, process_structure_scope)
4388         (read_array_type, read_common_block, read_module_type)
4389         (read_tag_pointer_type, read_typedef, read_base_type)
4390         (read_subrange_type, load_partial_dies, partial_die_info::read)
4391         (partial_die_info::read, partial_die_info::read)
4392         (partial_die_info::read, read_checked_initial_length_and_offset)
4393         (dwarf2_string_attr, read_formatted_entries)
4394         (dwarf_decode_line_header)
4395         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4396         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4397         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4398         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4399         (get_signatured_type, get_DW_AT_signature_type)
4400         (decode_locdesc, file_file_name, consume_improper_spaces)
4401         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4402         (dwarf_decode_macro_bytes, dwarf_decode_macros)
4403         (dwarf2_symbol_mark_computed, set_die_type)
4404         (read_attribute_value): Update.
4405         * stap-probe.c (handle_stap_probe, get_stap_base_address):
4406         Update.
4407         * dbxread.c (unknown_symtype_complaint)
4408         (lbrac_mismatch_complaint, repeated_header_complaint)
4409         (set_namestring, function_outside_compilation_unit_complaint)
4410         (read_dbx_symtab, process_one_symbol): Update.
4411         * gdbtypes.c (stub_noname_complaint): Update.
4412         * windows-nat.c (handle_unload_dll): Update.
4413         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4414         (decode_base_type): Update.
4415         * xcoffread.c (bf_notfound_complaint, ef_complaint)
4416         (eb_complaint, record_include_begin, record_include_end)
4417         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4418         (process_xcoff_symbol, read_symbol)
4419         (function_outside_compilation_unit_complaint)
4420         (scan_xcoff_symtab): Update.
4421         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4422         * buildsym.c (finish_block_internal, make_blockvector)
4423         (end_symtab_get_static_block, augment_type_symtab): Update.
4424         * dtrace-probe.c (dtrace_process_dof)
4425         (dtrace_static_probe_ops::get_probes): Update.
4426         * complaints.h (struct complaint): Don't declare.
4427         (symfile_complaints): Remove.
4428         (complaint_internal): Remove "complaints" parameter.
4429         (complaint): Likewise.
4430         (clear_complaints): Likewise.
4431         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4432         (reread_symbols): Update.
4433         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4434         (dwarf2_frame_cache, decode_frame_entry): Update.
4435         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4436         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4437         (info_selectors_command): Update.
4438         * macrotab.c (macro_include, check_for_redefinition)
4439         (macro_undef): Update.
4440         * objfiles.c (filter_overlapping_sections): Update.
4441         * stabsread.c (invalid_cpp_abbrev_complaint)
4442         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4443         (define_symbol, error_type, read_type, rs6000_builtin_type)
4444         (stabs_method_name_from_physname, read_member_functions)
4445         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4446         (attach_fields_to_type, complain_about_struct_wipeout)
4447         (read_range_type, read_args, common_block_start)
4448         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4449         Update.
4450         * mdebugread.c (index_complaint, unknown_ext_complaint)
4451         (basic_type_complaint, bad_tag_guess_complaint)
4452         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4453         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4454         (parse_procedure, parse_lines)
4455         (function_outside_compilation_unit_complaint)
4456         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4457         (bad_tag_guess_complaint, reg_value_complaint): Update.
4458         * cp-support.c (demangled_name_complaint): Update.
4459         * macroscope.c (sal_macro_scope): Update.
4460         * dwarf-index-write.c (class debug_names): Update.
4461
4462 2018-05-23  Tom Tromey  <tom@tromey.com>
4463
4464         * complaints.c (clear_complaints): Remove "noisy" parameter.
4465         * complaints.h (clear_complaints): Update.
4466         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4467         (reread_symbols): Update.
4468
4469 2018-05-23  Tom Tromey  <tom@tromey.com>
4470
4471         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4472         SUBSEQUENT_MESSAGE.
4473         (vcomplaint, clear_complaints): Update.
4474         (symfile_explanations): Remove some messages.
4475
4476 2018-05-23  Tom Tromey  <tom@tromey.com>
4477
4478         * complaints.c (internal_complaint): Remove.
4479         * complaints.h (internal_complaint): Remove.
4480
4481 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4482
4483         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4484
4485 2018-05-22  Pedro Alves  <palves@redhat.com>
4486
4487         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4488         (remote_fileio_badfd, remote_fileio_return_errno)
4489         (remote_fileio_return_success, remote_fileio_func_open)
4490         (remote_fileio_func_open, remote_fileio_func_close)
4491         (remote_fileio_func_read, remote_fileio_func_write)
4492         (remote_fileio_func_lseek, remote_fileio_func_rename)
4493         (remote_fileio_func_unlink, remote_fileio_func_stat)
4494         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4495         (remote_fileio_func_isatty, remote_fileio_func_system): Add
4496         remote_target parameter.
4497         (remote_fio_func_map) <func>: Add remote_target parameter.
4498         (do_remote_fileio_request, remote_fileio_request):
4499         * remote-fileio.h (remote_fileio_request):
4500         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4501         remote_target parameter.
4502         (remote_notif_process, handle_notification): Adjust to pass down
4503         the remote.
4504         (remote_notif_state_allocate): Add remote_target parameter.  Save
4505         it.
4506         * remote-notif.h (struct remote_target): Forward declare.
4507         (struct notif_client) <parse, ack, can_get_pending_events>: Add
4508         remote_target parameter.
4509         (struct remote_notif_state) <remote>: New field.
4510         (remote_notif_ack, remote_notif_parse): Add remote_target
4511         parameter.
4512         (remote_notif_state_allocate, remote_notif_state_allocate): Add
4513         remote_target parameter.
4514         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4515         (threads_listing_context, rmt_thread_action, protocol_feature)
4516         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4517         (packet_result, struct threads_listing_context, remote_state):
4518         Move definitions and declarations higher up.
4519         (remote_target) <~remote_target>: Declare.
4520         (remote_download_command_source, remote_file_put, remote_file_get)
4521         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4522         (remote_hostio_pread_vFile, remote_hostio_send_command)
4523         (remote_hostio_set_filesystem, remote_hostio_open)
4524         (remote_hostio_close, remote_hostio_unlink, remote_state)
4525         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4526         (get_memory_write_packet_size, get_memory_read_packet_size)
4527         (append_pending_thread_resumptions, remote_detach_1)
4528         (append_resumption, remote_resume_with_vcont)
4529         (add_current_inferior_and_thread, wait_ns, wait_as)
4530         (process_stop_reply, remote_notice_new_inferior)
4531         (process_initial_stop_replies, remote_add_thread)
4532         (btrace_sync_conf, remote_btrace_maybe_reopen)
4533         (remove_new_fork_children, kill_new_fork_children)
4534         (discard_pending_stop_replies, stop_reply_queue_length)
4535         (check_pending_events_prevent_wildcard_vcont)
4536         (discard_pending_stop_replies_in_queue, stop_reply)
4537         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4538         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4539         (remote_interrupt_as, remote_interrupt_ns)
4540         (remote_get_noisy_reply, remote_query_attached)
4541         (remote_add_inferior, remote_current_thread, get_current_thread)
4542         (set_thread, set_general_thread, set_continue_thread)
4543         (set_general_process, write_ptid)
4544         (remote_unpack_thread_info_response, remote_get_threadinfo)
4545         (parse_threadlist_response, remote_get_threadlist)
4546         (remote_threadlist_iterator, remote_get_threads_with_ql)
4547         (remote_get_threads_with_qxfer)
4548         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4549         (get_offsets, remote_check_symbols, remote_supported_packet)
4550         (remote_query_supported, remote_packet_size)
4551         (remote_serial_quit_handler, remote_detach_pid)
4552         (remote_vcont_probe, remote_resume_with_hc)
4553         (send_interrupt_sequence, interrupt_query)
4554         (remote_notif_get_pending_events, fetch_register_using_p)
4555         (send_g_packet, process_g_packet, fetch_registers_using_g)
4556         (store_register_using_P, store_registers_using_G)
4557         (set_remote_traceframe, check_binary_download)
4558         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4559         (remote_xfer_live_readonly_partial, remote_read_bytes)
4560         (remote_send_printf, remote_flash_write, readchar)
4561         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4562         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4563         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4564         (extended_remote_disable_randomization, extended_remote_run)
4565         (send_environment_packet, extended_remote_environment_support)
4566         (extended_remote_set_inferior_cwd, remote_write_qxfer)
4567         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4568         (packet_command): Now methods of ...
4569         (remote_target): ... this class.
4570         (m_remote_state) <remote_target>: New field.
4571         (struct remote_state) <stop_reply_queue,
4572         remote_async_inferior_event_token, wait_forever_enabled_p>: New
4573         fields.
4574         (remote_state::remote_state): Allocate stop_reply_queue.
4575         (remote_state): Delete global.
4576         (get_remote_state_raw): Delete.
4577         (remote_target::get_remote_state): Allocate m_remote_state on
4578         demand.
4579         (get_current_remote_target): New.
4580         (remote_ops, extended_remote_ops): Delete.
4581         (wait_forever_enabled_p, remote_async_inferior_event_token):
4582         Delete, moved to struct remote_state.
4583         (remote_target::close): Delete self.  Destruction bits split to
4584         ...
4585         (remote_target::~remote_target): ... this.
4586         (show_memory_packet_size): Adjust to use
4587         get_current_remote_target.
4588         (struct protocol_feature) <func>: Add remote_target parameter.
4589         All callers adjusted.
4590         (curr_quit_handler_target): New.
4591         (remote_serial_quit_handler): Reimplement.
4592         (remote_target::open_1): Adjust to use get_current_remote_target.
4593         Heap-allocate remote_target/extended_remote_target instances.
4594         (vcont_builder::vcont_builder): Add remote_target parameter, and
4595         save it in m_remote.  All callers adjusted.
4596         (vcont_builder::m_remote): New field.
4597         (vcont_builder::restart, vcont_builder::flush)
4598         (vcont_builder::push_action): Use it.
4599         (remote_target::commit_resume): Use it.
4600         (struct queue_iter_param) <remote>: New field.
4601         (remote_target::remove_new_fork_children): Fill in 'remote' field.
4602         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4603         (check_pending_event_prevents_wildcard_vcont_callback)
4604         (remote_target::check_pending_events_prevent_wildcard_vcont)
4605         (remote_target::discard_pending_stop_replies)
4606         (remote_target::discard_pending_stop_replies_in_queue)
4607         (remote_target::remote_notif_remove_queued_reply): Fill in
4608         'remote' field.
4609         (remote_notif_get_pending_events): New.
4610         (remote_target::readchar, remote_target::remote_serial_write):
4611         Save/restore curr_quit_handler_target.
4612         (putpkt): New.
4613         (kill_new_fork_children): Fill in 'remote' field.
4614         (packet_command): Use get_current_remote_target, defer to
4615         remote_target method of same name.
4616         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4617         parameter, and save it in m_remote.  All callers adjusted.
4618         (scoped_remote_fd::release): Use m_remote.
4619         (scoped_remote_fd::m_remote): New field.
4620         (remote_file_put, remote_file_get, remote_file_delete): Use
4621         get_current_remote_target, defer to remote_target method of same
4622         name.
4623         (remote_btrace_reset): Add remote_state paremeter.  Update all
4624         callers.
4625         (remote_async_inferior_event_handler). Pass down 'data'.
4626         (remote_new_objfile): Use get_current_remote_target.
4627         (remote_target::vcont_r_supported): New.
4628         (set_range_stepping): Use get_current_remote_target and
4629         remote_target::vcont_r_supported.
4630         (_initialize_remote): Don't allocate 'remote_state' and
4631         'stop_reply_queue' globals.
4632         * remote.h (struct remote_target): Forward declare.
4633         (getpkt, putpkt, remote_notif_get_pending_events): Add
4634         'remote_target' parameter.
4635
4636 2018-05-22  Pedro Alves  <palves@redhat.com>
4637
4638         * remote.c (vcont_builder): Now a class.  Make all data members
4639         private.
4640         (vcont_builder) <vcont_builder, restart, flush, push_action>:
4641         Declare methods.
4642         (vcont_builder_restart): Rename to ...
4643         (vcont_builder::restart): ... this.
4644         (vcont_builder_flush): Rename to ...
4645         (vcont_builder::flush): ... this.
4646         (vcont_builder_push_action): Rename to ...
4647         (vcont_builder::push_action): ... this.
4648         (remote_target::commit_resume): Adjust.
4649
4650 2018-05-22  Pedro Alves  <palves@redhat.com>
4651
4652         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4653         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4654         (get_fixed_memory_packet_size): New.
4655         (get_memory_packet_size): Use it.
4656         (set_memory_packet_size): Don't override the config size with
4657         DEFAULT_MAX_MEMORY_PACKET_SIZE.
4658         (show_memory_packet_size): Use get_fixed_memory_packet_size.
4659         Don't refer to get_memory_packet_size if not connected to a remote
4660         target.  Show "(default)" if configured size is 0.
4661
4662 2018-05-22  Pedro Alves  <palves@redhat.com>
4663
4664         * remote.c (remote_target::mourn_inferior): Move
4665         discard_pending_stop_replies call here from ...
4666         (_initialize_remote): ... here.
4667
4668 2018-05-22  Pedro Alves  <palves@redhat.com>
4669
4670         * remote.c (compare_section_command): Remove set_general_process
4671         call.
4672
4673 2018-05-22  Pedro Alves  <palves@redhat.com>
4674
4675         * remote.c (struct packet_reg, struct remote_arch_state):
4676         Move higher up in the file.
4677         (remote_state) <m_arch_states>: Store remote_arch_state values
4678         instead of remote_arch_state pointers.
4679         (remote_state::get_remote_arch_state): Adjust.
4680
4681 2018-05-22  Pedro Alves  <palves@redhat.com>
4682
4683         * remote.c: Include <unordered_map>.
4684         (remote_state): Now a class.
4685         (remote_state) <get_remote_arch_state>: Declare method.
4686         <get_remote_arch_state>: New field.
4687         (remote_arch_state) <remote_arch_state>: Declare ctor.
4688         <regs>: Now a unique_ptr.
4689         (remote_gdbarch_data_handle): Delete.
4690         (get_remote_arch_state): Delete.
4691         (remote_state::get_remote_arch_state): New.
4692         (get_remote_state): Adjust to call remote_state's
4693         get_remote_arch_state method.
4694         (init_remote_state): Delete, bits factored out to ...
4695         (remote_arch_state::remote_arch_state): ... this new method.
4696         (get_remote_packet_size, get_memory_packet_size)
4697         (process_g_packet, remote_target::fetch_registers)
4698         (remote_target::prepare_to_store, store_registers_using_G)
4699         (remote_target::store_registers, remote_target::get_trace_status):
4700         Adjust to call remote_state's method.
4701         (_initialize_remote): Remove reference to
4702         remote_gdbarch_data_handle.
4703
4704 2018-05-22  Pedro Alves  <palves@redhat.com>
4705
4706         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4707         pread>: New method declarations.
4708         (remote_target::open_1): Adjust.
4709         (readahead_cache_invalidate): Rename to ...
4710         (readahead_cache::invalidate): ... this, and adjust to be a class
4711         method.
4712         (readahead_cache_invalidate_fd): Rename to ...
4713         (readahead_cache::invalidate_fd): ... this, and adjust to be a
4714         class method.
4715         (remote_hostio_pwrite): Adjust.
4716         (remote_hostio_pread_from_cache): Rename to ...
4717         (readahead_cache::pread): ... this, and adjust to be a class
4718         method.
4719         (remote_hostio_close): Adjust.
4720
4721 2018-05-22  Pedro Alves  <palves@redhat.com>
4722
4723         * remote.c (remote_hostio_close_cleanup): Delete.
4724         (class scoped_remote_fd): New.
4725         (remote_file_put, remote_file_get): Use it.
4726
4727 2018-05-22  Pedro Alves  <palves@redhat.com>
4728
4729         (struct vCont_action_support): Use bool and initialize all fields.
4730         (struct readahead_cache): Initialize all fields.
4731         (remote_state): Use bool and initialize all fields.
4732         (remote_state::remote_state, remote_state::~remote_state): New.
4733         (new_remote_state): Delete.
4734         (_initialize_remote): Use new to allocate remote_state.
4735
4736 2018-05-22  Pedro Alves  <palves@redhat.com>
4737             張俊芝  <zjz@zjz.name>
4738
4739         PR gdb/22973
4740         * c-exp.y: Include "c-support.h".
4741         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4742         of tolower.  Use c_ident_is_alpha to scan names.
4743         * c-lang.c: Include "c-support.h".
4744         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4745         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4746         * c-support.h: New file, with bits factored out from ...
4747         * cp-name-parser.y: ... this file.
4748         Include "c-support.h".
4749         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4750         c-support.h and renamed.
4751         (symbol_end, yylex): Adjust.
4752
4753 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4754
4755         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4756         parameter type to CORE_ADDR.
4757         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4758         parameter type in declaration to CORE_ADDR.
4759         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4760         target_auxv_search to get AT_HWCAP and use the result to get the
4761         target description.
4762         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4763         to CORE_ADDR. Remove the cast of the return value to unsigned
4764         long. Fix error predicate of target_auxv_search.
4765         (ppc_linux_nat_target::read_description): Change the type of the
4766         hwcap variable to CORE_ADDR.
4767
4768 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4769
4770         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4771         if the size of fpscr is larger than 32 bits.
4772
4773 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4774
4775         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4776         (ppc32_linux_vsxregmap): New global.
4777         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4778         regcache_supply_regset, and regcache_collect_regset.
4779         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4780         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4781         (fetch_vsx_register, store_vsx_register): Remove.
4782         (fetch_vsx_registers): Add regno parameter. Get regset using
4783         ppc_linux_vsxregset. Use regset to supply registers.
4784         (store_vsx_registers): Add regno parameter. Get regset using
4785         ppc_linux_vsxregset. Use regset to collect registers.
4786         (fetch_register): Call fetch_vsx_registers instead of
4787         fetch_vsx_register.
4788         (store_register): Call store_vsx_registers instead of
4789         store_vsx_register.
4790         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4791         new regno parameter.
4792         (store_ppc_registers): Call store_vsx_registers with -1 for the
4793         new regno parameter.
4794         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4795         (ppc_collect_vsxregset): Remove.
4796
4797 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4798
4799         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4800         offset fields.
4801         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4802         for vector register offset fields.
4803         (ppc64_fbsd_reg_offsets): Likewise.
4804         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4805         to vector register offset fields.
4806         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4807         to vector register offset fields.
4808         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4809         vector register offset fields.
4810         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4811         initializers for vector register offset fields.
4812         (rs6000_aix64_reg_offsets): Likewise.
4813         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4814         (ppc_supply_vrregset): Remove.
4815         (ppc_collect_vrregset): Remove.
4816         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4817         (ppc_linux_vrregset) : New function.
4818         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4819         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4820         (ppc32_linux_vrregset): Remove.
4821         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4822         and use result instead of ppc32_linux_vrregset.
4823         (ppc32_linux_reg_offsets): Remove initializers for vector register
4824         offset fields.
4825         (ppc64_linux_reg_offsets): Likewise.
4826         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4827         * ppc-linux-nat.c: Include regset.h.
4828         (gdb_vrregset_t): Adjust comment to account for little-endian
4829         mode.
4830         (supply_vrregset, fill_vrregset): Remove.
4831         (fetch_altivec_register, store_altivec_register): Remove.
4832         (fetch_altivec_registers): Add regno parameter. Get regset using
4833         ppc_linux_vrregset. Use regset to supply registers.
4834         (store_altivec_registers): Add regno parameter. Get regset using
4835         ppc_linux_vrregset. Use regset to collect registers.
4836         (fetch_register): Call fetch_altivec_registers instead of
4837         fetch_altivec_register.
4838         (store_register): Call store_altivec_registers instead of
4839         store_altivec_register.
4840         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4841         the new regno parameter.
4842         (store_ppc_registers): Call store_altivec_registers with -1 for
4843         the new regno parameter.
4844
4845 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4846
4847         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4848         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4849         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4850         (gdb_vrregset_t): Change array type size to
4851         PPC_LINUX_SIZEOF_VRREGSET.
4852         (gdb_vsxregset_t): Change array type size to
4853         PPC_LINUX_SIZEOF_VSXREGSET.
4854         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4855         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4856         PPC_LINUX_SIZEOF_VSXREGSET.
4857
4858 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4859
4860         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4861         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4862         nat/ppc-linux.c.
4863         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4864         ppc_linux_target_wordsize with tid.
4865         (ppc_linux_nat_target::read_description): Call ppc_linux_target
4866         wordsize with tid.
4867         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4868         (ppc64_64bit_inferior_p): Add static and inline specifiers.
4869         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4870         tid parameter. Remove static specifier.
4871         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4872         (ppc_linux_target_wordsize): New declaration.
4873
4874 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
4875
4876         * arch/ppc-linux-common.c: New file.
4877         * arch/ppc-linux-common.h: New file.
4878         * arch/ppc-linux-tdesc.h: New file.
4879         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4880         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4881         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4882         arch/ppc-linux-tdesc.h.
4883         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4884         arch/ppc-linux-tdesc.h.
4885         (ppc_linux_nat_target::read_description): Remove target
4886         description matching code. Fill a ppc_linux_features struct and
4887         call ppc_linux_match_description with it. Move comment about ISA
4888         2.05 to ppc-linux-common.c.
4889         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4890         arch/ppc-linux-tdesc.h.
4891         (ppc_linux_core_read_description): Remove target description
4892         matching code. Fill a ppc_linux_features struct and call
4893         ppc_linux_match_description with it.
4894         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4895         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4896         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4897         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4898         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4899         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4900         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4901         (tdesc_powerpc_e500l): Remove.
4902
4903 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
4904
4905         * ada-lang.c (catch_assert_command): Pass empty string instead
4906         of NULL for excep_string argument.
4907
4908 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
4909
4910         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4911         the width of the requested register exceeds the width of the
4912         `ptrace' data type.
4913
4914 2018-05-21  Tom Tromey  <tom@tromey.com>
4915
4916         * printcmd.c (output_command): Remove.
4917         (output_command_const): Rename to output_command.
4918         * valprint.h (output_command): Rename from output_command_const.
4919         * tracepoint.c (trace_dump_actions): Call output_command.
4920
4921 2018-05-21  Tom Tromey  <tom@tromey.com>
4922
4923         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4924         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4925         * ada-lang.h (create_ada_exception_catchpoint): Update.
4926         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4927         std::string.
4928         (create_excep_cond_exprs, ~ada_catchpoint)
4929         (should_stop_exception, print_one_exception)
4930         (print_mention_exception, print_recreate_exception): Update.
4931         (ada_get_next_arg): Remove.
4932         (catch_ada_exception_command_split): Use std::string.  Change type
4933         of "excep_string", "cond_string".
4934         (catch_ada_exception_command): Update.
4935         (create_ada_exception_catchpoint): Change type of excep_string.
4936         (ada_exception_sal): Remove excep_string parameter.
4937         (~ada_catchpoint): Remove.
4938
4939 2018-05-21  Tom Tromey  <tom@tromey.com>
4940
4941         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4942         cleanup.
4943
4944 2018-05-21  Tom Tromey  <tom@tromey.com>
4945
4946         * ada-lang.c (ada_exception_message_1, ada_exception_message):
4947         Return unique_xmalloc_ptr.
4948         (print_it_exception): Update.
4949
4950 2018-05-21  Tom Tromey  <tom@tromey.com>
4951
4952         * tracepoint.c (trace_dump_actions): Use std::string.
4953
4954 2018-05-21  Tom Tromey  <tom@tromey.com>
4955
4956         * symfile.c (reread_symbols): Use std::string for original_name.
4957
4958 2018-05-21  Tom Tromey  <tom@tromey.com>
4959
4960         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4961         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4962         constructor.
4963
4964 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4965
4966         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4967         instance to...
4968         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4969         * objfiles.c (get_objfile_bfd_data): Allocate
4970         objfile_per_bfd_storage with obstack_new when allocating on
4971         obstack.
4972
4973 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4974
4975         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4976         OBSTACK_ZALLOC.
4977         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4978         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4979         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4980         (add_pending): Likewise.
4981         (parse_symbol): Likewise.
4982         (parse_partial_symbols): Likewise.
4983         (psymtab_to_symtab_1): Likewise.
4984         (new_psymtab): Likewise.
4985         (elfmdebug_build_psymtabs): Likewise.
4986         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4987         * objfiles.c (get_objfile_bfd_data): Likewise.
4988         (objfile_register_static_link): Likewise.
4989         * psymtab.c (allocate_psymtab): Likewise.
4990         * stabsread.c (read_member_functions): Likewise.
4991         * xcoffread.c (xcoff_end_psymtab): Likewise.
4992
4993 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4994
4995         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4996         compiler supports std::is_trivially_constructible.
4997         * common/poison.h: Include obstack.h.
4998         (IsMallocable): Define to is_trivially_constructible if the
4999         compiler supports it, define to true_type otherwise.
5000         (xobnew): New.
5001         (XOBNEW): Redefine.
5002         (xobnewvec): New.
5003         (XOBNEWVEC): Redefine.
5004         * gdb_obstack.h (obstack_zalloc): New.
5005         (OBSTACK_ZALLOC): Redefine.
5006         (obstack_calloc): New.
5007         (OBSTACK_CALLOC): Redefine.
5008         (obstack_new): New.
5009         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5010         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5011         gdbarch.c.
5012         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5013         obstack_calloc/obstack_zalloc.
5014         (gdbarch_obstack_zalloc): Remove.
5015         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5016
5017 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5018
5019         * stack.c (backtrace_command_1): Remove useless variable int i.
5020
5021 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5022
5023         * stack.c (print_frame_info): Fix comment.
5024
5025 2018-05-18  Tom Tromey  <tom@tromey.com>
5026
5027         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5028         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5029         (~dwarf2_per_objfile): Update
5030         (dwarf2_get_dwz_file): Use new.
5031         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5032         unique_ptr.
5033
5034 2018-05-18  Tom Tromey  <tom@tromey.com>
5035
5036         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5037         unique_ptr.
5038         * dwarf2read.c (struct dwp_file): Add constructor and
5039         initializers.
5040         (open_and_init_dwp_file): Return a unique_ptr.
5041         (dwarf2_per_objfile, create_dwp_hash_table)
5042         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5043         (lookup_dwo_unit_in_dwp): Update.
5044         (open_and_init_dwp_file, get_dwp_file): Update.
5045
5046 2018-05-18  Tom Tromey  <tom@tromey.com>
5047
5048         * dwarf2read.c (dwarf2_per_objfile): Update.
5049         (struct mapped_index): Add initializers.
5050         (dwarf2_read_index): Use new.
5051         (dw2_symtab_iter_init): Update.
5052         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5053         unique_ptr.
5054
5055 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5056
5057         * dwarf2read.c (mapped_index) <total_size>: Remove.
5058
5059 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5060
5061         * unittests/format_pieces-selftests.c (test_format_specifier):
5062         Add ARI comments.
5063
5064 2018-05-18  Tom Tromey  <tom@tromey.com>
5065
5066         * c-typeprint.c (maybe_print_hole): New function.
5067         (c_print_type_struct_field_offset): Update.
5068         (c_type_print_base_struct_union): Call maybe_print_hole.
5069
5070 2018-05-17  Keith Seitz  <keiths@redhat.com>
5071
5072         * breakpoint.c (build_bpstat_chain): New function, moved from
5073         bpstat_stop_status.
5074         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5075         If no stop chain is passed, call build_bpstat_chain to build it.
5076         * breakpoint.h (build_bpstat_chain): Declare.
5077         (bpstat_stop_status): Move documentation here from breakpoint.c.
5078         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5079         build the stop chain and pass it to skip_inline_frames.
5080         Pass this stop chain to bpstat_stop_status.
5081         * inline-frame.c: Include breakpoint.h.
5082         (stopped_by_user_bp_inline_frame): New function.
5083         (skip_inline_frames): Add parameter `stop_chain'.
5084         Move documention to inline-frame.h.
5085         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5086         whether the frame should be elided.
5087         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5088         Add moved documentation and update for new parameter.
5089
5090 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5091
5092         PR cli/14975
5093         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5094         unittests/format_pieces-selftests.c.
5095         * common/format.h (format_piece) <operator==>: New.
5096         (format_pieces) <operator[]>: Remove.
5097         * common/format.c (format_pieces::format_pieces): Handle \e.
5098         * unittests/format_pieces-selftests.c: New.
5099
5100 2018-05-17  Tom Tromey  <tom@tromey.com>
5101
5102         PR symtab/23010:
5103         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5104         (dw2_instantiate_symtab): Add skip_partial parameter.
5105         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5106         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5107         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5108         (dw2_expand_symtabs_matching_one)
5109         (dw2_find_pc_sect_compunit_symtab)
5110         (dw2_debug_names_lookup_symbol)
5111         (dw2_debug_names_expand_symtabs_for_function): Update.
5112         (init_cutu_and_read_dies): Add skip_partial parameter.
5113         (process_psymtab_comp_unit, build_type_psymtabs_1)
5114         (process_skeletonless_type_unit, load_partial_comp_unit)
5115         (psymtab_to_symtab_1): Update.
5116         (load_full_comp_unit): Add skip_partial parameter.
5117         (process_imported_unit_die, dwarf2_read_addr_index)
5118         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5119         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5120         (read_signatured_type): Update.
5121
5122 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5123
5124         * value.c (release_value): Remove unused variable.
5125         (record_latest_value): Likewise.
5126         (access_value_history): Likewise.
5127         (preserve_values): Likewise.
5128
5129 2018-05-17  Tom Tromey  <tom@tromey.com>
5130
5131         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5132         Initialize.
5133
5134 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5135
5136         PR gdb/22286
5137         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5138         Also handle registers whose width is not a multiple of
5139         PTRACE_TYPE_RET.
5140         (linux_nat_trad_target::store_register): Likewise.
5141
5142 2018-05-16  Tom Tromey  <tom@tromey.com>
5143
5144         * gdbcore.h (core_bfd): Redefine.
5145         * corelow.c (core_target::close): Update.
5146         (core_target_open): Update.
5147         * progspace.h (struct program_space) <cbfd>: Now a
5148         gdb_bfd_ref_ptr.
5149
5150 2018-05-16  Tom Tromey  <tom@tromey.com>
5151
5152         PR cli/19551:
5153         * symfile-add-flags.h (enum symfile_add_flags)
5154         <SYMFILE_NOT_FILENAME>: New constant.
5155         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5156         objfile name from BFD.
5157         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5158         * minidebug.c (find_separate_debug_file_in_section): Put
5159         ".gnu_debugdata" into BFD's file name.
5160
5161 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5162
5163         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5164         Remove.
5165
5166 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5167
5168         PR binutils/21446
5169         * aarch64-tdep.c (aarch64_analyze_prologue,
5170         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5171         Indicate not interested in errors.
5172
5173 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5174
5175         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5176         Supply the MIPS_ZERO_REGNUM register.
5177
5178 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5179
5180         * mips-tdep.c (mask_address_var): Make variable static.
5181
5182 2018-05-14  Tom Tromey  <tom@tromey.com>
5183
5184         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5185
5186 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
5187
5188         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5189         FXSAVE_ADDR for the mxcsr register.
5190
5191 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
5192
5193         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5194
5195 2018-05-11  Pedro Alves  <palves@redhat.com>
5196
5197         * corelow.c (core_target) <core_target>: No longer inline.
5198         Initialize m_core_gdbarch, m_core_vec and build the section table
5199         here.
5200         <~core_target>: New.
5201         <core_gdbarch, get_core_register_section>: New methods.
5202         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5203         factored out from ...
5204         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5205         (core_ops): Delete.
5206         (sniff_core_bfd): Add gdbarch parameter.
5207         (core_close): Delete, merged into ...
5208         (core_target::close): ... here.  Delete self.
5209         (core_close_cleanup): Delete.
5210         (core_target_open): Allocate a core_target on the heap.  Use a
5211         unique_ptr instead of a cleanup.  Bits moved into the core_target
5212         ctor.  Adjust to use core_target methods instead of globals.
5213         (get_core_register_section): Rename to ...
5214         (core_target::get_core_register_section): ... this and adjust.
5215         (struct get_core_registers_cb_data): New.
5216         (get_core_registers_cb): Use it.  Use bool.
5217         (core_target::fetch_registers, core_target::files_info)
5218         (core_target::xfer_partial, core_target::read_description)
5219         (core_target::pid_to, core_target::thread_name): Adjust to
5220         reference class fields instead of globals.
5221         * target.h (struct target_ops_deleter, target_ops_up): New.
5222
5223 2018-05-11  Pedro Alves  <palves@redhat.com>
5224
5225         * corefile.c (core_file_command): Move to corelow.c.
5226         * corelow.c (the_core_target): Delete.
5227         (core_file_command): Moved from corefile.c.  Check exec_bfd
5228         instead of the_core_target.  Use target_detach instead of calling
5229         into the_core_target directly.
5230         (maybe_say_no_core_file_now): New.
5231         (core_target::detach): Use it.
5232         (_initialize_corelow): Remove references to the_core_target.
5233         * gdbcore.h (the_core_target): Delete.
5234
5235 2018-05-11  Tom Tromey  <tromey@redhat.com>
5236             Pedro Alves  <palves@redhat.com>
5237
5238         * corefile.c (core_bfd): Remove.
5239         * gdbcore.h (core_bfd): Now a macro.
5240         * progspace.h (struct program_space) <cbfd>: New field.
5241
5242 2018-05-11  Tom Tromey  <tom@tromey.com>
5243
5244         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5245         gdb::def_vector.
5246
5247 2018-05-10  Tom Tromey  <tom@tromey.com>
5248
5249         * configure: Rebuild.
5250         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5251
5252 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
5253
5254         PR server/23158:
5255         * regformats/regdat.sh: Adjust script, following the addition
5256         of the new expedite_regs parameter to init_target_desc.
5257
5258 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
5259     
5260         PR gdb/23127
5261         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5262         set_gdbarch_significant_addr_bit.
5263         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5264         set_gdbarch_significant_addr_bit.
5265         * utils.c (address_significant): Update to sign extend addr.
5266
5267 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
5268
5269         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5270         (xtensa_linux_init_abi): Limit tdep->num_regs by
5271         tdep->num_nopriv_regs.
5272         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5273         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5274         not initialized.
5275
5276 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
5277
5278         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5279
5280 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5281
5282         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5283         (I387_MXCSR_INIT_VAL): New constant.
5284         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5285         buffer if it was supplied by the inferior.
5286         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5287         (i387_xsave_get_clear_bv): New function.
5288         (i387_supply_xsave): Only read x87 control registers from the
5289         xsave buffer if the feature is enabled, and the state will have
5290         been written, otherwise, provide a suitable default.
5291         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5292         including x87 control registers.  Update control registers if they
5293         have changed from the default value, and mark features as enabled
5294         as required.
5295         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5296
5297 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
5298
5299         * spu-tdep.c (info_spu_event_command): Fix output formatting.
5300
5301 2018-05-07  Tom Tromey  <tom@tromey.com>
5302
5303         * configure: Rebuild.
5304         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5305
5306 2018-05-07  Tom Tromey  <tom@tromey.com>
5307
5308         PR tdep/20362:
5309         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5310         bit.  Use correct value for VDIV.
5311
5312 2018-05-04  Tom Tromey  <tom@tromey.com>
5313
5314         * configure: Rebuild.
5315         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5316
5317 2018-05-04  Tom Tromey  <tom@tromey.com>
5318
5319         * linux-record.c (record_linux_system_call) <case
5320         RECORD_SYS_RECVFROM>: Add "break".
5321
5322 2018-05-04  Tom Tromey  <tom@tromey.com>
5323
5324         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5325         Add missing "break".
5326         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5327         Add missing "break".
5328
5329 2018-05-04  Tom Tromey  <tom@tromey.com>
5330
5331         * rs6000-tdep.c (ppc_process_record_op4)
5332         (ppc_process_record_op63): Add fall-through comment.
5333
5334 2018-05-04  Tom Tromey  <tom@tromey.com>
5335
5336         * i386-tdep.c (i386_process_record): Add fall-through comment.
5337
5338 2018-05-04  Tom Tromey  <tom@tromey.com>
5339
5340         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5341         comment.
5342
5343 2018-05-04  Tom Tromey  <tom@tromey.com>
5344
5345         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5346         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5347         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5348         comment.
5349         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5350         comment.
5351         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5352         comment.
5353
5354 2018-05-04  Tom Tromey  <tom@tromey.com>
5355
5356         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5357
5358 2018-05-04  Tom Tromey  <tom@tromey.com>
5359
5360         * s390-tdep.c (s390_process_record): Fix fall-through comments.
5361         * xcoffread.c (scan_xcoff_symtab): Move comment later.
5362         * symfile.c (section_is_mapped): Fix fall-through comment.
5363         * stabsread.c (define_symbol, read_member_functions): Fix
5364         fall-through comment.
5365         * s390-linux-tdep.c (s390_process_record): Fix fall-through
5366         comment.
5367         * remote.c (remote_wait_as): Fix fall-through comment.
5368         * p-exp.y (yylex): Fix fall-through comment.
5369         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5370         comment.
5371         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5372         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5373         * jv-exp.y (yylex): Fix fall-through comment.
5374         * go-exp.y (lex_one_token): Fix fall-through comment.
5375         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5376         fall-through comment.
5377         * f-exp.y (yylex): Fix fall-through comment.
5378         * dwarf2read.c (process_die): Fix fall-through comments.
5379         * dbxread.c (process_one_symbol): Fix fall-through comment.
5380         * d-exp.y (lex_one_token): Fix fall-through comment.
5381         * cp-name-parser.y (yylex): Fix fall-through comment.
5382         * coffread.c (coff_symtab_read): Fix fall-through comment.
5383         * c-exp.y (lex_one_token): Fix fall-through comment.
5384         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5385         comment.
5386         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5387         comment.
5388
5389 2018-05-04  Tom Tromey  <tom@tromey.com>
5390
5391         PR python/22730:
5392         * NEWS: Mention gdb.execute change.
5393         * gdbcmd.h (execute_control_command): Don't declare.
5394         * python/python.c (execute_gdb_command): Use read_command_lines_1,
5395         execute_control_commands, execute_control_commands_to_string.
5396         * cli/cli-script.h (execute_control_commands)
5397         (execute_control_commands_to_string): Declare.
5398         (execute_control_command): Add from_tty parameter.
5399         * cli/cli-script.c (execute_control_commands)
5400         (execute_control_commands_to_string): New functions.
5401         (execute_user_command): Use execute_control_commands.
5402         (execute_control_command_1): Add "from_tty" parameter.  Update.
5403         (execute_control_command): Likewise.
5404
5405 2018-05-04  Tom Tromey  <tom@tromey.com>
5406
5407         PR python/22731:
5408         * NEWS: Mention that breakpoint commands are writable.
5409         * python/py-breakpoint.c (bppy_set_commands): New function.
5410         (breakpoint_object_getset) <"commands">: Use it.
5411
5412 2018-05-04  Tom Tromey  <tom@tromey.com>
5413
5414         * tracepoint.c (actions_command): Update.
5415         * mi/mi-cmd-break.c (mi_command_line_array)
5416         (mi_command_line_array_cnt, mi_command_line_array_ptr)
5417         (mi_read_next_line): Remove.
5418         (mi_cmd_break_commands): Update.
5419         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5420         function_view.
5421         * cli/cli-script.c (get_command_line): Update.
5422         (process_next_line): Use function_view.  Constify.
5423         (recurse_read_control_structure, read_command_lines)
5424         (read_command_lines_1): Change argument types to function_view.
5425         (do_define_command, document_command): Update.
5426         * breakpoint.h (check_tracepoint_command): Don't declare.
5427         * breakpoint.c (check_tracepoint_command): Remove.
5428         (commands_command_1, create_tracepoint_from_upload): Update.
5429
5430 2018-05-04  Tom Tromey  <tom@tromey.com>
5431
5432         PR gdb/11750:
5433         * cli/cli-script.h (enum command_control_type) <define_control>:
5434         New constant.
5435         * cli/cli-script.c (multi_line_command_p): Handle define_control.
5436         (build_command_line, execute_control_command_1)
5437         (process_next_line): Likewise.
5438         (do_define_command): New function, extracted from define_command.
5439         (define_command): Use it.
5440
5441 2018-05-04  Tom Tromey  <tom@tromey.com>
5442
5443         * tracepoint.c (actions_command): Update.
5444         * cli/cli-script.h (read_command_lines): Update.
5445         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5446         (MAX_TMPBUF): Remove define.
5447         (define_command): Use string_printf.
5448         (document_command): Likewise.
5449         * breakpoint.c (commands_command_1): Update.
5450
5451 2018-05-04  Tom Tromey  <tom@tromey.com>
5452
5453         * top.c (execute_command): Update.
5454         * cli/cli-script.h (print_command_lines): Now varargs.
5455         * cli/cli-script.c (print_command_lines): Now varargs.
5456         (execute_control_command_1) <case while_control, case if_control>:
5457         Update.
5458
5459 2018-05-04  Tom Tromey  <tom@tromey.com>
5460
5461         * tracepoint.c (all_tracepoint_actions): Rename from
5462         all_tracepoint_actions_and_cleanup.  Change return type.
5463         (actions_command, encode_actions_1, encode_actions)
5464         (trace_dump_actions, tdump_command): Update.
5465         * remote.c (remote_download_command_source): Update.
5466         * python/python.c (gdbpy_eval_from_control_command)
5467         (python_command, python_interactive_command): Update.
5468         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5469         * guile/guile.c (guile_command)
5470         (gdbscm_eval_from_control_command, guile_command): Update.
5471         * compile/compile.c (compile_code_command)
5472         (compile_print_command, compile_to_object): Update.
5473         * cli/cli-script.h (struct command_lines_deleter): New.
5474         (counted_command_line): New typedef.
5475         (struct command_line): Add constructor, destructor.
5476         <body_list>: Remove.
5477         <body_list_0, body_list_1>: New members.
5478         (command_line_up): Remove typedef.
5479         (read_command_lines, read_command_lines_1, get_command_line):
5480         Update.
5481         (copy_command_lines): Don't declare.
5482         * cli/cli-script.c (build_command_line): Use "new".
5483         (get_command_line): Return counted_command_line.
5484         (print_command_lines, execute_user_command)
5485         (execute_control_command_1, while_command, if_command): Update.
5486         (realloc_body_list): Remove.
5487         (process_next_line, recurse_read_control_structure): Update.
5488         (read_command_lines, read_command_lines_1): Return counted_command_line.
5489         (free_command_lines): Use "delete".
5490         (copy_command_lines): Remove.
5491         (define_command, document_command, show_user_1): Update.
5492         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5493         a counted_command_line.
5494         * breakpoint.h (counted_command_line): Remove typedef.
5495         (breakpoint_set_commands): Update.
5496         * breakpoint.c (check_no_tracepoint_commands)
5497         (validate_commands_for_breakpoint): Update.
5498         (breakpoint_set_commands): Change commands to be a
5499         counted_command_line.
5500         (commands_command_1, update_dprintf_command_list)
5501         (create_tracepoint_from_upload): Update.
5502
5503 2018-05-04  Tom Tromey  <tom@tromey.com>
5504
5505         * cli/cli-decode.h (cmd_list_element): New constructor.
5506         (~cmd_list_element): New destructor.
5507         (struct cmd_list_element): Add initializers.
5508         * cli/cli-decode.c (do_add_cmd): Use "new".
5509         (delete_cmd): Use "delete".
5510
5511 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
5512             Pedro Alves <palves@redhat.com>
5513
5514         PR breakpoints/19806 and support for PR external/20207.
5515         * NEWS: Mention Aarch64 watchpoint improvements.
5516         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5517         watchpoints and PR external/20207 watchpoints.
5518         * nat/aarch64-linux-hw-point.c
5519         (kernel_supports_any_contiguous_range): New.
5520         (aarch64_watchpoint_offset): New.
5521         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5522         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5523         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5524         (aarch64_align_watchpoint): New parameters aligned_offset_p and
5525         next_addr_orig_p.  Support PR external/20207 watchpoints.
5526         (aarch64_downgrade_regs): New.
5527         (aarch64_dr_state_insert_one_point): New parameters offset and
5528         addr_orig.
5529         (aarch64_dr_state_remove_one_point): Likewise.
5530         (aarch64_handle_breakpoint): Update caller.
5531         (aarch64_handle_aligned_watchpoint): Likewise.
5532         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5533         aligned_offset.
5534         (aarch64_linux_set_debug_regs): Remove const from state.  Call
5535         aarch64_downgrade_regs.
5536         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5537         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5538         (DR_CONTROL_MASK): ... this.
5539         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5540         (unsigned int aarch64_watchpoint_offset): New prototype.
5541         (aarch64_linux_set_debug_regs): Remove const from state.
5542         * utils.c (align_up, align_down): Move to ...
5543         * common/common-utils.c (align_up, align_down): ... here.
5544         * utils.h (align_up, align_down): Move to ...
5545         * common/common-utils.h (align_up, align_down): ... here.
5546
5547 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
5548
5549         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5550         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5551         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5552         Re-implement to match the ABI as summarized in GCC's
5553         gcc/config/sparc/sparc.c.  All callers updated.
5554         (sparc32_store_arguments): Remove assertion.
5555
5556 2018-05-04  Tom Tromey  <tom@tromey.com>
5557
5558         * printcmd.c: Don't include tui.h.
5559         (decode_format): Use skip_spaces.
5560
5561 2018-05-04  Tom Tromey  <tom@tromey.com>
5562
5563         PR gdb/22619:
5564         * printcmd.c (last_count): New global.
5565         (x_command): Use saved count when repeating.
5566
5567 2018-05-04  Tom Tromey  <tom@tromey.com>
5568
5569         * nto-procfs.c (do_closedir_cleanup): Remove.
5570         (procfs_pidlist): Use gdb_dir_up.
5571         * procfs.c (do_closedir_cleanup): Remove.
5572         (proc_update_threads): Use gdb_dir_up.
5573         * common/filestuff.h (struct gdb_dir_deleter): New.
5574         (gdb_dir_up): New typedef.
5575
5576 2018-05-04  Tom Tromey  <tom@tromey.com>
5577
5578         * ada-lang.c (print_mention_exception): Use std::string.
5579
5580 2018-05-04  Tom Tromey  <tom@tromey.com>
5581
5582         * ada-lang.c (create_excep_cond_exprs): Update.
5583         (ada_exception_catchpoint_cond_string): Use std::string.
5584
5585 2018-05-04  Tom Tromey  <tom@tromey.com>
5586
5587         * ada-lang.c (xget_renaming_scope): Return std::string.
5588         (old_renaming_is_invisible): Update.
5589
5590 2018-05-04  Tom Tromey  <tom@tromey.com>
5591
5592         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5593         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5594
5595 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
5596
5597         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5598
5599 2018-05-04  Tom Tromey  <tom@tromey.com>
5600
5601         * remote.c (remote_query_supported_append): Change type.
5602         (remote_check_symbols): Update.
5603
5604 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
5605
5606         PR gdb/11420
5607         * configure.ac: Prepend libpython.
5608         * python/python-config.py: Likewise.
5609         * configure: Regenerate.
5610
5611 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5612
5613         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5614
5615 2018-05-03  Pedro Alves  <palves@redhat.com>
5616
5617         * s390-linux-nat.c
5618         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5619         override.  Write 'true' instead of '1'.
5620         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5621         declaration.
5622
5623 2018-05-02  Pedro Alves  <palves@redhat.com>
5624
5625         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5626         add_inf_child_target.
5627         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5628         add_inf_child_target.
5629         * aix-thread.c (aix_thread_target_info): New.
5630         (aix_thread_target) <shortname, longname, doc>: Delete.
5631         <info>: New.
5632         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5633         add_inf_child_target.
5634         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5635         add_inf_child_target.
5636         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5637         add_inf_child_target.
5638         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5639         add_inf_child_target.
5640         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5641         add_inf_child_target.
5642         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5643         add_inf_child_target.
5644         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5645         add_inf_child_target.
5646         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5647         add_inf_child_target.
5648         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5649         add_inf_child_target.
5650         * bfd-target.c (target_bfd_target_info): New.
5651         (target_bfd) <shortname, longname, doc>: Delete.
5652         <info>: New.
5653         * bsd-kvm.c (bsd_kvm_target_info): New.
5654         (bsd_kvm_target) <shortname, longname, doc>: Delete.
5655         <info>: New.
5656         (bsd_kvm_target::open): Rename to ...
5657         (bsd_kvm_target_open): ... this.  Adjust.
5658         * bsd-uthread.c (bsd_uthread_target_info): New.
5659         (bsd_uthread_target) <shortname, longname, doc>: Delete.
5660         <info>: New.
5661         * corefile.c (core_file_command): Adjust.
5662         * corelow.c (core_target_info): New.
5663         (core_target) <shortname, longname, doc>: Delete.
5664         <info>: New.
5665         (core_target::open): Rename to ...
5666         (core_target_open): ... this.  Adjust.
5667         * ctf.c (ctf_target_info): New.
5668         (ctf_target) <shortname, longname, doc>: Delete.
5669         <info>: New.
5670         (ctf_target::open): Rename to ...
5671         (ctf_target_open): ... this.
5672         (_initialize_ctf): Adjust.
5673         * exec.c (exec_target_info): New.
5674         (exec_target) <shortname, longname, doc>: Delete.
5675         <info>: New.
5676         (exec_target::open): Rename to ...
5677         (exec_target_open): ... this.
5678         * gdbcore.h (core_target_open): Declare.
5679         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5680         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5681         add_inf_child_target.
5682         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5683         add_inf_child_target.
5684         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5685         add_inf_child_target.
5686         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5687         add_inf_child_target.
5688         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5689         add_inf_child_target.
5690         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5691         add_inf_child_target.
5692         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5693         add_inf_child_target.
5694         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5695         add_inf_child_target.
5696         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5697         add_inf_child_target.
5698         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5699         add_inf_child_target.
5700         * inf-child.c (inf_child_target_info): New.
5701         (inf_child_target::info): New.
5702         (inf_child_open_target): Remove 'target' parameter.  Use
5703         get_native_target instead.
5704         (inf_child_target::open): Delete.
5705         (add_inf_child_target): New.
5706         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5707         Delete.
5708         <info>: New.
5709         (add_inf_child_target): Declare.
5710         (inf_child_open_target): Declare.
5711         * linux-thread-db.c (thread_db_target_info): New.
5712         (thread_db_target) <shortname, longname, doc>: Delete.
5713         <info>: New.
5714         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5715         add_inf_child_target.
5716         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5717         add_inf_child_target.
5718         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5719         add_inf_child_target.
5720         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5721         add_inf_child_target.
5722         * make-target-delegates (print_class): Adjust.
5723         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5724         add_inf_child_target.
5725         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5726         add_inf_child_target.
5727         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5728         add_inf_child_target.
5729         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5730         add_inf_child_target.
5731         * nto-procfs.c (nto_native_target_info): New.
5732         (nto_procfs_target_native) <shortname, longname, doc>:
5733         Delete.
5734         <info>: New.
5735         (nto_procfs_target_info): New.
5736         (nto_procfs_target_procfs) <shortname, longname, doc>:
5737         Delete.
5738         <info>: New.
5739         (init_procfs_targets): Adjust.
5740         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5741         add_inf_child_target.
5742         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5743         add_inf_child_target.
5744         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5745         add_inf_child_target.
5746         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5747         add_inf_child_target.
5748         * ravenscar-thread.c (ravenscar_target_info): New.
5749         (ravenscar_thread_target) <shortname, longname, doc>:
5750         Delete.
5751         <info>: New.
5752         * record-btrace.c (record_btrace_target_info):
5753         (record_btrace_target) <shortname, longname, doc>: Delete.
5754         <info>: New.
5755         (record_btrace_target::open): Rename to ...
5756         (record_btrace_target_open): ... this.  Adjust.
5757         * record-full.c (record_longname, record_doc): New.
5758         (record_full_base_target) <shortname, longname, doc>: Delete.
5759         <info>: New.
5760         (record_full_target_info): New.
5761         (record_full_target): <shortname>: Delete.
5762         <info>: New.
5763         (record_full_core_open_1, record_full_open_1): Update comments.
5764         (record_full_base_target::open): Rename to ...
5765         (record_full_open): ... this.
5766         (cmd_record_full_restore): Update.
5767         (_initialize_record_full): Update.
5768         * remote-sim.c (remote_sim_target_info): New.
5769         (gdbsim_target) <shortname, longname, doc>: Delete.
5770         <info>: New.
5771         (gdbsim_target::open): Rename to ...
5772         (gdbsim_target_open): ... this.
5773         (_initialize_remote_sim): Adjust.
5774         * remote.c (remote_doc): New.
5775         (remote_target_info): New.
5776         (remote_target) <shortname, longname, doc>: Delete.
5777         <info>: New.
5778         (extended_remote_target_info): New.
5779         (extended_remote_target) <shortname, longname, doc>: Delete.
5780         <info>: New.
5781         (remote_target::open_1): Make static.  Adjust.
5782         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5783         * s390-linux-nat.c (_initialize_s390_nat): Use
5784         add_inf_child_target.
5785         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5786         add_inf_child_target.
5787         * sol-thread.c (thread_db_target_info): New.
5788         (sol_thread_target) <shortname, longname, doc>: Delete.
5789         <info>: New.
5790         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5791         add_inf_child_target.
5792         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5793         add_inf_child_target.
5794         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5795         add_inf_child_target.
5796         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5797         add_inf_child_target.
5798         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5799         add_inf_child_target.
5800         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5801         add_inf_child_target.
5802         * spu-linux-nat.c (_initialize_spu_nat): Use
5803         add_inf_child_target.
5804         * spu-multiarch.c (spu_multiarch_target_info): New.
5805         (spu_multiarch_target) <shortname, longname, doc>: Delete.
5806         <info>: New.
5807         * target-delegates.c: Regenerate.
5808         * target.c: Include <unordered_map>.
5809         (target_ops_p): Delete.
5810         (DEF_VEC_P(target_ops_p)): Delete.
5811         (target_factories): New.
5812         (test_target_info): New.
5813         (test_target_ops::info): New.
5814         (open_target): Adjust to use target_factories.
5815         (add_target_with_completer): Rename to ...
5816         (add_target): ... this.  Change prototype.  Register target_info
5817         and open callback in target_factories.  Register target_info in
5818         command context instead of target_ops.
5819         (add_target): Delete old implementation.
5820         (add_deprecated_target_alias): Change prototype.  Adjust.
5821         (the_native_target): New.
5822         (set_native_target, get_native_target): New.
5823         (find_default_run_target): Use the_native_target.
5824         (find_attach_target, find_run_target): Simplify.
5825         (target_ops::open): Delete.
5826         (dummy_target_info): New.
5827         (dummy_target::shortname, dummy_target::longname)
5828         (dummy_target::doc): Delete.
5829         (dummy_target::info): New.
5830         (debug_target::shortname, debug_target::longname)
5831         (debug_target::doc): Delete.
5832         (debug_target::info): New.
5833         * target.h (struct target_info): New.
5834         (target_ops::~target_ops): Add comment.
5835         (target_ops::info): New.
5836         (target_ops::shortname, target_ops::longname, target_ops::doc): No
5837         longer virtual.  Implement in terms of target_info.
5838         (set_native_target, get_native_target): Declare.
5839         (target_open_ftype): New.
5840         (add_target, add_target_with_completer)
5841         (add_deprecated_target_alias): Change prototype.
5842         (test_target) <shortname, longname, doc>: Delete.
5843         <info>: New.
5844         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5845         add_inf_child_target.
5846         * tracefile-tfile.c (tfile_target_info): New.
5847         (tfile_target) <shortname, longname, doc>: Delete.
5848         <info>: New.
5849         (tfile_target::open): Rename to ...
5850         (tfile_target_open): ... this.
5851         (_initialize_tracefile_tfile): Adjust.
5852         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5853         add_inf_child_target.
5854         * windows-nat.c (_initialize_windows_nat): Use
5855         add_inf_child_target.
5856         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5857         add_inf_child_target.
5858
5859 2018-05-02  Pedro Alves  <palves@redhat.com>
5860
5861         * linux-nat.h (linux_nat_target) <low_new_thread,
5862         low_delete_thread, low_new_fork, low_forget_process,
5863         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5864         New virtual methods.
5865         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5866         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5867         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5868         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5869         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5870         Delete.
5871         * linux-fork.c (delete_fork): Adjust to call low method.
5872         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5873         (linux_nat_new_fork, linux_nat_forget_process_hook)
5874         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5875         (linux_nat_status_is_event):
5876         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5877         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5878         to call low method.
5879         (sigtrap_is_event): Rename to ...
5880         (linux_nat_target::low_status_is_event): ... this.
5881         (linux_nat_set_status_is_event): Delete.
5882         (save_stop_reason, linux_nat_wait_1)
5883         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5884         low methods.
5885         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5886         (linux_nat_set_new_fork, linux_nat_set_forget_process)
5887         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5888         (linux_nat_set_prepare_to_resume): Delete.
5889         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5890         low virtual methods.
5891         * amd64-linux-nat.c: Likewise.
5892         * arm-linux-nat.c: Likewise.
5893         * i386-linux-nat.c: Likewise.
5894         * ia64-linux-nat.c: Likewise.
5895         * mips-linux-nat.c: Likewise.
5896         * ppc-linux-nat.c: Likewise.
5897         * s390-linux-nat.c: Likewise.
5898         * sparc64-linux-nat.c: Likewise.
5899         * x86-linux-nat.c: Likewise.
5900         * x86-linux-nat.h: Include "nat/x86-linux.h".
5901         (x86_linux_nat_target) <low_new_fork, low_forget_process,
5902         low_prepare_to_resume, low_new_thread, low_delete_thread>:
5903         Override methods.
5904
5905 2018-05-02  Pedro Alves  <palves@redhat.com>
5906
5907         * target.h (target_ops)
5908         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5909         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5910         stopped_by_watchpoint, have_continuable_watchpoint,
5911         stopped_data_address, watchpoint_addr_within_range,
5912         can_accel_watchpoint_condition, can_run, thread_alive,
5913         has_all_memory, has_memory, has_stack, has_registers,
5914         has_execution, can_async_p, is_async_p, supports_non_stop,
5915         always_non_stop_p, can_execute_reverse, supports_multi_process,
5916         supports_enable_disable_tracepoint,
5917         supports_disable_randomization, supports_string_tracing,
5918         supports_evaluation_of_breakpoint_conditions,
5919         can_run_breakpoint_commands, filesystem_is_local,
5920         can_download_tracepoint, get_trace_state_variable_value,
5921         set_trace_notes, get_tib_address, use_agent, can_use_agent,
5922         record_is_replaying, record_will_replay,
5923         augmented_libraries_svr4_read>: Adjust to return bool.
5924         * aarch64-linux-nat.c: All implementations adjusted.
5925         * aix-thread.c: All implementations adjusted.
5926         * arm-linux-nat.c: All implementations adjusted.
5927         * breakpoint.c: All implementations adjusted.
5928         * bsd-kvm.c: All implementations adjusted.
5929         * bsd-uthread.c: All implementations adjusted.
5930         * corelow.c: All implementations adjusted.
5931         * ctf.c: All implementations adjusted.
5932         * darwin-nat.c: All implementations adjusted.
5933         * darwin-nat.h: All implementations adjusted.
5934         * exec.c: All implementations adjusted.
5935         * fbsd-nat.c: All implementations adjusted.
5936         * fbsd-nat.h: All implementations adjusted.
5937         * gnu-nat.c: All implementations adjusted.
5938         * gnu-nat.h: All implementations adjusted.
5939         * go32-nat.c: All implementations adjusted.
5940         * ia64-linux-nat.c: All implementations adjusted.
5941         * inf-child.c: All implementations adjusted.
5942         * inf-child.h: All implementations adjusted.
5943         * inf-ptrace.c: All implementations adjusted.
5944         * inf-ptrace.h: All implementations adjusted.
5945         * linux-nat.c: All implementations adjusted.
5946         * linux-nat.h: All implementations adjusted.
5947         * mips-linux-nat.c: All implementations adjusted.
5948         * nto-procfs.c: All implementations adjusted.
5949         * ppc-linux-nat.c: All implementations adjusted.
5950         * procfs.c: All implementations adjusted.
5951         * ravenscar-thread.c: All implementations adjusted.
5952         * record-btrace.c: All implementations adjusted.
5953         * record-full.c: All implementations adjusted.
5954         * remote-sim.c: All implementations adjusted.
5955         * remote.c: All implementations adjusted.
5956         * s390-linux-nat.c: All implementations adjusted.
5957         * sol-thread.c: All implementations adjusted.
5958         * spu-multiarch.c: All implementations adjusted.
5959         * target-delegates.c: All implementations adjusted.
5960         * target.c: All implementations adjusted.
5961         * target.h: All implementations adjusted.
5962         * tracefile-tfile.c: All implementations adjusted.
5963         * tracefile.c: All implementations adjusted.
5964         * tracefile.h: All implementations adjusted.
5965         * windows-nat.c: All implementations adjusted.
5966         * x86-linux-nat.h: All implementations adjusted.
5967         * x86-nat.h: All implementations adjusted.
5968
5969 2018-05-02  Pedro Alves  <palves@redhat.com>
5970
5971         * make-target-delegates (scan_target_h): Don't trim lines here.
5972         Replace sequences of tabs and/or whitespace with a single
5973         whitespace.
5974         (top level, parsing methods): Trim each line before processing it
5975         here.
5976
5977 2018-05-02  Pedro Alves  <palves@redhat.com>
5978             John Baldwin  <jhb@freebsd.org>
5979
5980         * target.h (enum strata) <debug_stratum>: New.
5981         (struct target_ops) <all delegation methods>: Replace by C++
5982         virtual methods, and drop "to_" prefix.  All references updated
5983         throughout.
5984         <to_shortname, to_longname, to_doc, to_data,
5985         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5986         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5987         virtual methods.  All references updated throughout.
5988         <can_attach, supports_terminal_ours, can_create_inferior,
5989         get_thread_control_capabilities, attach_no_wait>: New
5990         virtual methods.
5991         <insert_breakpoint, remove_breakpoint>: Now
5992         TARGET_DEFAULT_NORETURN methods.
5993         <info_proc>: Now returns bool.
5994         <to_magic>: Delete.
5995         (OPS_MAGIC): Delete.
5996         (current_target): Delete.  All references replaced by references
5997         to ...
5998         (target_stack): ... this.  New.
5999         (target_shortname, target_longname): Adjust.
6000         (target_can_run): Now a function declaration.
6001         (default_child_has_all_memory, default_child_has_memory)
6002         (default_child_has_stack, default_child_has_registers)
6003         (default_child_has_execution): Remove target_ops parameter.
6004         (complete_target_initialization): Delete.
6005         (memory_breakpoint_target): New template class.
6006         (test_target_ops): Refactor as a C++ class with virtual methods.
6007         * make-target-delegates (NAME_PART): Tighten.
6008         (POINTER_PART, CP_SYMBOL): New.
6009         (SIMPLE_RETURN_PART): Reimplement.
6010         (VEC_RETURN_PART): Expect less.
6011         (RETURN_PART, VIRTUAL_PART): New.
6012         (METHOD): Adjust to C++ virtual methods.
6013         (scan_target_h): Remove reference to C99.
6014         (dname): Output "target_ops::" prefix.
6015         (write_function_header): Adjust to output a C++ class method.
6016         (write_declaration): New.
6017         (write_delegator): Adjust to output a C++ class method.
6018         (tdname): Output "dummy_target::" prefix.
6019         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6020         method.
6021         (tdefault_names, debug_names): Delete.
6022         (return_types, tdefaults, styles, argtypes_array): New.
6023         (top level): All methods are delegators.
6024         (print_class): New.
6025         (top level): Print dummy_target and debug_target classes.
6026         * target-delegates.c: Regenerate.
6027         * target-debug.h (target_debug_print_enum_info_proc_what)
6028         (target_debug_print_thread_control_capabilities)
6029         (target_debug_print_thread_info_p): New.
6030         * target.c (dummy_target): Delete.
6031         (the_dummy_target, the_debug_target): New.
6032         (target_stack): Now extern.
6033         (set_targetdebug): Push/unpush debug target.
6034         (default_child_has_all_memory, default_child_has_memory)
6035         (default_child_has_stack, default_child_has_registers)
6036         (default_child_has_execution): Remove target_ops parameter.
6037         (complete_target_initialization): Delete.
6038         (add_target_with_completer): No longer call
6039         complete_target_initialization.
6040         (target_supports_terminal_ours): Use regular delegation.
6041         (update_current_target): Delete.
6042         (push_target): No longer check magic number.  Don't call
6043         update_current_target.
6044         (unpush_target): Don't call update_current_target.
6045         (target_is_pushed): No longer check magic number.
6046         (target_require_runnable): Skip for all stratums over
6047         process_stratum.
6048         (target_ops::info_proc): New.
6049         (target_info_proc): Use find_target_at and
6050         find_default_run_target.
6051         (target_supports_disable_randomization): Use regular delegation.
6052         (target_get_osdata): Use find_target_at.
6053         (target_ops::open, target_ops::close, target_ops::can_attach)
6054         (target_ops::attach, target_ops::can_create_inferior)
6055         (target_ops::create_inferior, target_ops::can_run)
6056         (target_can_run): New.
6057         (default_fileio_target): Use regular delegation.
6058         (target_ops::fileio_open, target_ops::fileio_pwrite)
6059         (target_ops::fileio_pread, target_ops::fileio_fstat)
6060         (target_ops::fileio_close, target_ops::fileio_unlink)
6061         (target_ops::fileio_readlink): New.
6062         (target_fileio_open_1, target_fileio_unlink)
6063         (target_fileio_readlink): Always call the target method.  Handle
6064         FILEIO_ENOSYS.
6065         (return_zero, return_zero_has_execution): Delete.
6066         (init_dummy_target): Delete.
6067         (dummy_target::dummy_target, dummy_target::shortname)
6068         (dummy_target::longname, dummy_target::doc)
6069         (debug_target::debug_target, debug_target::shortname)
6070         (debug_target::longname, debug_target::doc): New.
6071         (target_supports_delete_record): Use regular delegation.
6072         (setup_target_debug): Delete.
6073         (maintenance_print_target_stack): Skip debug_stratum.
6074         (initialize_targets): Instantiate the_dummy_target and
6075         the_debug_target.
6076         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6077         use target_stack.
6078         (target_auxv_search, fprint_target_auxv): Adjust.
6079         (info_auxv_command): Adjust to use target_stack.
6080         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6081         * exceptions.c (print_flush): Handle a NULL target_stack.
6082         * regcache.c (target_ops_no_register): Refactor as class with
6083         virtual methods.
6084
6085         * exec.c (exec_target): New class.
6086         (exec_ops): Now an exec_target.
6087         (exec_open, exec_close_1, exec_get_section_table)
6088         (exec_xfer_partial, exec_files_info, exec_has_memory)
6089         (exec_make_note_section): Refactor as exec_target methods.
6090         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6091         Delete.
6092         (exec_target::find_memory_regions): New.
6093         (_initialize_exec): Don't call init_exec_ops.
6094         * gdbcore.h (exec_file_clear): Delete.
6095
6096         * corefile.c (core_target): Delete.
6097         (core_file_command): Adjust.
6098         * corelow.c (core_target): New class.
6099         (the_core_target): New.
6100         (core_close): Remove target_ops parameter.
6101         (core_close_cleanup): Adjust.
6102         (core_target::close): New.
6103         (core_open, core_detach, get_core_registers, core_files_info)
6104         (core_xfer_partial, core_thread_alive, core_read_description)
6105         (core_pid_to_str, core_thread_name, core_has_memory)
6106         (core_has_stack, core_has_registers, core_info_proc): Rework as
6107         core_target methods.
6108         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6109         (_initialize_corelow): Initialize the_core_target.
6110         * gdbcore.h (core_target): Delete.
6111         (the_core_target): New.
6112
6113         * ctf.c: (ctf_target): New class.
6114         (ctf_ops): Now a ctf_target.
6115         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6116         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6117         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6118         methods.
6119         (init_ctf_ops): Delete.
6120         (_initialize_ctf): Don't call it.
6121         * tracefile-tfile.c (tfile_target): New class.
6122         (tfile_ops): Now a tfile_target.
6123         (tfile_open, tfile_close, tfile_files_info)
6124         (tfile_get_tracepoint_status, tfile_trace_find)
6125         (tfile_fetch_registers, tfile_xfer_partial)
6126         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6127         Refactor as tfile_target methods.
6128         (tfile_xfer_partial_features): Remove target_ops parameter.
6129         (init_tfile_ops): Delete.
6130         (_initialize_tracefile_tfile): Don't call it.
6131         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6132         (tracefile_has_stack, tracefile_has_registers)
6133         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6134         tracefile_target methods.
6135         (init_tracefile_ops): Delete.
6136         (tracefile_target::tracefile_target): New.
6137         * tracefile.h: Include "target.h".
6138         (tracefile_target): New class.
6139         (init_tracefile_ops): Delete.
6140
6141         * spu-multiarch.c (spu_multiarch_target): New class.
6142         (spu_ops): Now a spu_multiarch_target.
6143         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6144         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6145         (spu_search_memory, spu_mourn_inferior): Refactor as
6146         spu_multiarch_target methods.
6147         (init_spu_ops): Delete.
6148         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6149         complete_target_initialization.
6150
6151         * ravenscar-thread.c (ravenscar_thread_target): New class.
6152         (ravenscar_ops): Now a ravenscar_thread_target.
6153         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6154         (ravenscar_thread_alive, ravenscar_pid_to_str)
6155         (ravenscar_fetch_registers, ravenscar_store_registers)
6156         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6157         (ravenscar_stopped_by_hw_breakpoint)
6158         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6159         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6160         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6161         methods.
6162         (init_ravenscar_thread_ops): Delete.
6163         (_initialize_ravenscar): Remove references to
6164         init_ravenscar_thread_ops and complete_target_initialization.
6165
6166         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6167         (bsd_uthread_target): New class.
6168         (bsd_uthread_ops): Now a bsd_uthread_target.
6169         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6170         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6171         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6172         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6173         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6174         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6175         (bsd_uthread_target): Delete function.
6176         (_initialize_bsd_uthread): Remove reference to
6177         complete_target_initialization.
6178
6179         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6180         (target_bfd): ... this new class.
6181         (target_bfd_xfer_partial, target_bfd_get_section_table)
6182         (target_bfd_close): Refactor as target_bfd methods.
6183         (target_bfd::~target_bfd): New.
6184         (target_bfd_reopen): Adjust.
6185         (target_bfd::close): New.
6186
6187         * record-btrace.c (record_btrace_target): New class.
6188         (record_btrace_ops): Now a record_btrace_target.
6189         (record_btrace_open, record_btrace_stop_recording)
6190         (record_btrace_disconnect, record_btrace_close)
6191         (record_btrace_async, record_btrace_info)
6192         (record_btrace_insn_history, record_btrace_insn_history_range)
6193         (record_btrace_insn_history_from, record_btrace_call_history)
6194         (record_btrace_call_history_range)
6195         (record_btrace_call_history_from, record_btrace_record_method)
6196         (record_btrace_is_replaying, record_btrace_will_replay)
6197         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6198         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6199         (record_btrace_store_registers, record_btrace_prepare_to_store)
6200         (record_btrace_to_get_unwinder)
6201         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6202         (record_btrace_commit_resume, record_btrace_wait)
6203         (record_btrace_stop, record_btrace_can_execute_reverse)
6204         (record_btrace_stopped_by_sw_breakpoint)
6205         (record_btrace_supports_stopped_by_sw_breakpoint)
6206         (record_btrace_stopped_by_hw_breakpoint)
6207         (record_btrace_supports_stopped_by_hw_breakpoint)
6208         (record_btrace_update_thread_list, record_btrace_thread_alive)
6209         (record_btrace_goto_begin, record_btrace_goto_end)
6210         (record_btrace_goto, record_btrace_stop_replaying_all)
6211         (record_btrace_execution_direction)
6212         (record_btrace_prepare_to_generate_core)
6213         (record_btrace_done_generating_core): Refactor as
6214         record_btrace_target methods.
6215         (init_record_btrace_ops): Delete.
6216         (_initialize_record_btrace): Remove reference to
6217         init_record_btrace_ops.
6218         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6219         the execution_direction global.
6220         (record_full_base_target, record_full_target)
6221         (record_full_core_target): New classes.
6222         (record_full_ops): Now a record_full_target.
6223         (record_full_core_ops): Now a record_full_core_target.
6224         (record_full_target::detach, record_full_target::disconnect)
6225         (record_full_core_target::disconnect)
6226         (record_full_target::mourn_inferior, record_full_target::kill):
6227         New.
6228         (record_full_open, record_full_close, record_full_async): Refactor
6229         as methods of the record_full_base_target class.
6230         (record_full_resume, record_full_commit_resume): Refactor
6231         as methods of the record_full_target class.
6232         (record_full_wait, record_full_stopped_by_watchpoint)
6233         (record_full_stopped_data_address)
6234         (record_full_stopped_by_sw_breakpoint)
6235         (record_full_supports_stopped_by_sw_breakpoint)
6236         (record_full_stopped_by_hw_breakpoint)
6237         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6238         methods of the record_full_base_target class.
6239         (record_full_store_registers, record_full_xfer_partial)
6240         (record_full_insert_breakpoint, record_full_remove_breakpoint):
6241         Refactor as methods of the record_full_target class.
6242         (record_full_can_execute_reverse, record_full_get_bookmark)
6243         (record_full_goto_bookmark, record_full_execution_direction)
6244         (record_full_record_method, record_full_info, record_full_delete)
6245         (record_full_is_replaying, record_full_will_replay)
6246         (record_full_goto_begin, record_full_goto_end, record_full_goto)
6247         (record_full_stop_replaying): Refactor as methods of the
6248         record_full_base_target class.
6249         (record_full_core_resume, record_full_core_kill)
6250         (record_full_core_fetch_registers)
6251         (record_full_core_prepare_to_store)
6252         (record_full_core_store_registers, record_full_core_xfer_partial)
6253         (record_full_core_insert_breakpoint)
6254         (record_full_core_remove_breakpoint)
6255         (record_full_core_has_execution): Refactor
6256         as methods of the record_full_core_target class.
6257         (record_full_base_target::supports_delete_record): New.
6258         (init_record_full_ops): Delete.
6259         (init_record_full_core_ops): Delete.
6260         (record_full_save): Refactor as method of the
6261         record_full_base_target class.
6262         (_initialize_record_full): Remove references to
6263         init_record_full_ops and init_record_full_core_ops.
6264
6265         * remote.c (remote_target, extended_remote_target): New classes.
6266         (remote_ops): Now a remote_target.
6267         (extended_remote_ops): Now an extended_remote_target.
6268         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6269         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6270         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6271         (remote_pass_signals, remote_set_syscall_catchpoint)
6272         (remote_program_signals, )
6273         (remote_thread_always_alive): Remove target_ops parameter.
6274         (remote_thread_alive, remote_thread_name)
6275         (remote_update_thread_list, remote_threads_extra_info)
6276         (remote_static_tracepoint_marker_at)
6277         (remote_static_tracepoint_markers_by_strid)
6278         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6279         (remote_open): Refactor as methods of remote_target.
6280         (extended_remote_open, extended_remote_detach)
6281         (extended_remote_attach, extended_remote_post_attach):
6282         (extended_remote_supports_disable_randomization)
6283         (extended_remote_create_inferior): : Refactor as method of
6284         extended_remote_target.
6285         (remote_set_permissions, remote_open_1, remote_detach)
6286         (remote_follow_fork, remote_follow_exec, remote_disconnect)
6287         (remote_resume, remote_commit_resume, remote_stop)
6288         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6289         (remote_terminal_ours, remote_wait, remote_fetch_registers)
6290         (remote_prepare_to_store, remote_store_registers)
6291         (remote_flash_erase, remote_flash_done, remote_files_info)
6292         (remote_kill, remote_mourn, remote_insert_breakpoint)
6293         (remote_remove_breakpoint, remote_insert_watchpoint)
6294         (remote_watchpoint_addr_within_range)
6295         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6296         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6297         (remote_supports_stopped_by_sw_breakpoint)
6298         (remote_stopped_by_hw_breakpoint)
6299         (remote_supports_stopped_by_hw_breakpoint)
6300         (remote_stopped_by_watchpoint, remote_stopped_data_address)
6301         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6302         (remote_verify_memory): Refactor as methods of remote_target.
6303         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6304         parameter.
6305         (remote_xfer_partial, remote_get_memory_xfer_limit)
6306         (remote_search_memory, remote_rcmd, remote_memory_map)
6307         (remote_pid_to_str, remote_get_thread_local_address)
6308         (remote_get_tib_address, remote_read_description): Refactor as
6309         methods of remote_target.
6310         (remote_target::fileio_open, remote_target::fileio_pwrite)
6311         (remote_target::fileio_pread, remote_target::fileio_close): New.
6312         (remote_hostio_readlink, remote_hostio_fstat)
6313         (remote_filesystem_is_local, remote_can_execute_reverse)
6314         (remote_supports_non_stop, remote_supports_disable_randomization)
6315         (remote_supports_multi_process, remote_supports_cond_breakpoints)
6316         (remote_supports_enable_disable_tracepoint)
6317         (remote_supports_string_tracing)
6318         (remote_can_run_breakpoint_commands, remote_trace_init)
6319         (remote_download_tracepoint, remote_can_download_tracepoint)
6320         (remote_download_trace_state_variable, remote_enable_tracepoint)
6321         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6322         (remote_trace_start, remote_get_trace_status)
6323         (remote_get_tracepoint_status, remote_trace_stop)
6324         (remote_trace_find, remote_get_trace_state_variable_value)
6325         (remote_save_trace_data, remote_get_raw_trace_data)
6326         (remote_set_disconnected_tracing, remote_core_of_thread)
6327         (remote_set_circular_trace_buffer, remote_traceframe_info)
6328         (remote_get_min_fast_tracepoint_insn_len)
6329         (remote_set_trace_buffer_size, remote_set_trace_notes)
6330         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6331         (remote_disable_btrace, remote_teardown_btrace)
6332         (remote_read_btrace, remote_btrace_conf)
6333         (remote_augmented_libraries_svr4_read, remote_load)
6334         (remote_pid_to_exec_file, remote_can_do_single_step)
6335         (remote_execution_direction, remote_thread_handle_to_thread_info):
6336         Refactor as methods of remote_target.
6337         (init_remote_ops, init_extended_remote_ops): Delete.
6338         (remote_can_async_p, remote_is_async_p, remote_async)
6339         (remote_thread_events, remote_upload_tracepoints)
6340         (remote_upload_trace_state_variables): Refactor as methods of
6341         remote_target.
6342         (_initialize_remote): Remove references to init_remote_ops and
6343         init_extended_remote_ops.
6344
6345         * remote-sim.c (gdbsim_target): New class.
6346         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6347         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6348         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6349         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6350         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6351         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6352         Refactor as methods of gdbsim_target.
6353         (gdbsim_ops): Now a gdbsim_target.
6354         (init_gdbsim_ops): Delete.
6355         (gdbsim_cntrl_c): Adjust.
6356         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6357
6358         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6359         (the_amd64_linux_nat_target): New.
6360         (amd64_linux_fetch_inferior_registers)
6361         (amd64_linux_store_inferior_registers): Refactor as methods of
6362         amd64_linux_nat_target.
6363         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
6364         * i386-linux-nat.c: Don't include "linux-nat.h".
6365         (i386_linux_nat_target): New class.
6366         (the_i386_linux_nat_target): New.
6367         (i386_linux_fetch_inferior_registers)
6368         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6369         as methods of i386_linux_nat_target.
6370         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
6371         * inf-child.c (inf_child_ops): Delete.
6372         (inf_child_fetch_inferior_registers)
6373         (inf_child_store_inferior_registers): Delete.
6374         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6375         methods of inf_child_target.
6376         (inf_child_target::supports_terminal_ours)
6377         (inf_child_target::terminal_init)
6378         (inf_child_target::terminal_inferior)
6379         (inf_child_target::terminal_ours_for_output)
6380         (inf_child_target::terminal_ours, inf_child_target::interrupt)
6381         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6382         New.
6383         (inf_child_open, inf_child_disconnect, inf_child_close)
6384         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6385         (inf_child_post_startup_inferior, inf_child_can_run)
6386         (inf_child_pid_to_exec_file): Refactor as methods of
6387         inf_child_target.
6388         (inf_child_follow_fork): Delete.
6389         (inf_child_target::can_create_inferior)
6390         (inf_child_target::can_attach): New.
6391         (inf_child_target::has_all_memory, inf_child_target::has_memory)
6392         (inf_child_target::has_stack, inf_child_target::has_registers)
6393         (inf_child_target::has_execution): New.
6394         (inf_child_fileio_open, inf_child_fileio_pwrite)
6395         (inf_child_fileio_pread, inf_child_fileio_fstat)
6396         (inf_child_fileio_close, inf_child_fileio_unlink)
6397         (inf_child_fileio_readlink, inf_child_use_agent)
6398         (inf_child_can_use_agent): Refactor as methods of
6399         inf_child_target.
6400         (return_zero, inf_child_target): Delete.
6401         (inf_child_target::inf_child_target): New.
6402         * inf-child.h: Include "target.h".
6403         (inf_child_target): Delete function prototype.
6404         (inf_child_target): New class.
6405         (inf_child_open_target, inf_child_mourn_inferior)
6406         (inf_child_maybe_unpush_target): Delete.
6407         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6408         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6409         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6410         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6411         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6412         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6413         (inf_ptrace_wait, inf_ptrace_xfer_partial)
6414         (inf_ptrace_thread_alive, inf_ptrace_files_info)
6415         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6416         methods of inf_ptrace_target.
6417         (inf_ptrace_target): Delete function.
6418         * inf-ptrace.h: Include "inf-child.h".
6419         (inf_ptrace_target): Delete function declaration.
6420         (inf_ptrace_target): New class.
6421         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6422         * linux-nat.c (linux_target): New.
6423         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6424         (linux_nat_target::~linux_nat_target): New.
6425         (linux_child_post_attach, linux_child_post_startup_inferior)
6426         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6427         (linux_child_remove_fork_catchpoint)
6428         (linux_child_insert_vfork_catchpoint)
6429         (linux_child_remove_vfork_catchpoint)
6430         (linux_child_insert_exec_catchpoint)
6431         (linux_child_remove_exec_catchpoint)
6432         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6433         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6434         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6435         (linux_nat_stopped_data_address)
6436         (linux_nat_stopped_by_sw_breakpoint)
6437         (linux_nat_supports_stopped_by_sw_breakpoint)
6438         (linux_nat_stopped_by_hw_breakpoint)
6439         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6440         (linux_nat_kill, linux_nat_mourn_inferior)
6441         (linux_nat_xfer_partial, linux_nat_thread_alive)
6442         (linux_nat_update_thread_list, linux_nat_pid_to_str)
6443         (linux_nat_thread_name, linux_child_pid_to_exec_file)
6444         (linux_child_static_tracepoint_markers_by_strid)
6445         (linux_nat_is_async_p, linux_nat_can_async_p)
6446         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6447         (linux_nat_supports_multi_process)
6448         (linux_nat_supports_disable_randomization, linux_nat_async)
6449         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6450         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6451         (linux_nat_fileio_open, linux_nat_fileio_readlink)
6452         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6453         methods of linux_nat_target.
6454         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6455         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6456         parameter.
6457         (check_stopped_by_watchpoint): Adjust.
6458         (linux_xfer_partial): Delete.
6459         (linux_target_install_ops, linux_target, linux_nat_add_target):
6460         Delete.
6461         (linux_nat_target::linux_nat_target): New.
6462         * linux-nat.h: Include "inf-ptrace.h".
6463         (linux_nat_target): New.
6464         (linux_target, linux_target_install_ops, linux_nat_add_target):
6465         Delete function declarations.
6466         (linux_target): Declare global.
6467         * linux-thread-db.c (thread_db_target): New.
6468         (thread_db_target::thread_db_target): New.
6469         (thread_db_ops): Delete.
6470         (the_thread_db_target): New.
6471         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6472         (thread_db_update_thread_list, thread_db_pid_to_str)
6473         (thread_db_extra_thread_info)
6474         (thread_db_thread_handle_to_thread_info)
6475         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6476         (thread_db_resume): Refactor as methods of thread_db_target.
6477         (init_thread_db_ops): Delete.
6478         (_initialize_thread_db): Remove reference to init_thread_db_ops.
6479         * x86-linux-nat.c: Don't include "linux-nat.h".
6480         (super_post_startup_inferior): Delete.
6481         (x86_linux_nat_target::~x86_linux_nat_target): New.
6482         (x86_linux_child_post_startup_inferior)
6483         (x86_linux_read_description, x86_linux_enable_btrace)
6484         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6485         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6486         methods of x86_linux_nat_target.
6487         (x86_linux_create_target): Delete.  Bits folded ...
6488         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
6489         pointer.
6490         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6491         (x86_linux_nat_target): New class.
6492         (x86_linux_create_target): Delete.
6493         (x86_linux_add_target): Now takes a linux_nat_target pointer.
6494         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6495         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6496         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6497         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6498         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6499         make extern.
6500         (x86_use_watchpoints): Delete.
6501         * x86-nat.h: Include "breakpoint.h" and "target.h".
6502         (x86_use_watchpoints): Delete.
6503         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6504         (x86_stopped_by_watchpoint, x86_stopped_data_address)
6505         (x86_insert_watchpoint, x86_remove_watchpoint)
6506         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6507         (x86_stopped_by_hw_breakpoint): New declarations.
6508         (x86_nat_target): New template class.
6509
6510         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6511         (the_ppc_linux_nat_target): New.
6512         (ppc_linux_fetch_inferior_registers)
6513         (ppc_linux_can_use_hw_breakpoint)
6514         (ppc_linux_region_ok_for_hw_watchpoint)
6515         (ppc_linux_ranged_break_num_registers)
6516         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6517         (ppc_linux_insert_mask_watchpoint)
6518         (ppc_linux_remove_mask_watchpoint)
6519         (ppc_linux_can_accel_watchpoint_condition)
6520         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6521         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6522         (ppc_linux_watchpoint_addr_within_range)
6523         (ppc_linux_masked_watch_num_registers)
6524         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6525         (ppc_linux_read_description): Refactor as methods of
6526         ppc_linux_nat_target.
6527         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
6528
6529         * procfs.c (procfs_xfer_partial): Delete forward declaration.
6530         (procfs_target): New class.
6531         (the_procfs_target): New.
6532         (procfs_target): Delete function.
6533         (procfs_auxv_parse, procfs_attach, procfs_detach)
6534         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6535         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6536         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6537         (procfs_create_inferior, procfs_update_thread_list)
6538         (procfs_thread_alive, procfs_pid_to_str)
6539         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6540         (procfs_stopped_data_address, procfs_insert_watchpoint)
6541         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6542         (proc_find_memory_regions, procfs_info_proc)
6543         (procfs_make_note_section): Refactor as methods of procfs_target.
6544         (_initialize_procfs): Adjust.
6545         * sol-thread.c (sol_thread_target): New class.
6546         (sol_thread_ops): Now a sol_thread_target.
6547         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6548         (sol_thread_fetch_registers, sol_thread_store_registers)
6549         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6550         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6551         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6552         (init_sol_thread_ops): Delete.
6553         (_initialize_sol_thread): Adjust.  Remove references to
6554         init_sol_thread_ops and complete_target_initialization.
6555
6556         * windows-nat.c (windows_nat_target): New class.
6557         (windows_fetch_inferior_registers)
6558         (windows_store_inferior_registers, windows_resume, windows_wait)
6559         (windows_attach, windows_detach, windows_pid_to_exec_file)
6560         (windows_files_info, windows_create_inferior)
6561         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6562         (windows_close, windows_pid_to_str, windows_xfer_partial)
6563         (windows_get_tib_address, windows_get_ada_task_ptid)
6564         (windows_thread_name, windows_thread_alive): Refactor as
6565         windows_nat_target methods.
6566         (do_initial_windows_stuff): Adjust.
6567         (windows_target): Delete function.
6568         (_initialize_windows_nat): Adjust.
6569
6570         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6571         (darwin_mourn_inferior, darwin_kill_inferior)
6572         (darwin_create_inferior, darwin_attach, darwin_detach)
6573         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6574         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6575         (darwin_supports_multi_process): Refactor as darwin_nat_target
6576         methods.
6577         (darwin_resume_to, darwin_files_info): Delete.
6578         (_initialize_darwin_inferior): Rename to ...
6579         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
6580         * darwin-nat.h: Include "inf-child.h".
6581         (darwin_nat_target): New class.
6582         (darwin_complete_target): Delete.
6583         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6584         (darwin_target): New.
6585         (i386_darwin_fetch_inferior_registers)
6586         (i386_darwin_store_inferior_registers): Refactor as methods of
6587         darwin_nat_target.
6588         (darwin_complete_target): Delete, with ...
6589         (_initialize_i386_darwin_nat): ... bits factored out here.
6590
6591         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6592         (the_alpha_linux_nat_target): New.
6593         (alpha_linux_register_u_offset): Refactor as
6594         alpha_linux_nat_target method.
6595         (_initialize_alpha_linux_nat): Adjust.
6596         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6597         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6598         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6599         methods of linux_nat_trad_target.
6600         (linux_trad_target): Delete.
6601         * linux-nat-trad.h (linux_trad_target): Delete function.
6602         (linux_nat_trad_target): New class.
6603         * mips-linux-nat.c (mips_linux_nat_target): New class.
6604         (super_fetch_registers, super_store_registers, super_close):
6605         Delete.
6606         (the_mips_linux_nat_target): New.
6607         (mips64_linux_regsets_fetch_registers)
6608         (mips64_linux_regsets_store_registers)
6609         (mips64_linux_fetch_registers, mips64_linux_store_registers)
6610         (mips_linux_register_u_offset, mips_linux_read_description)
6611         (mips_linux_can_use_hw_breakpoint)
6612         (mips_linux_stopped_by_watchpoint)
6613         (mips_linux_stopped_data_address)
6614         (mips_linux_region_ok_for_hw_watchpoint)
6615         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6616         (mips_linux_close): Refactor as methods of mips_linux_nat.
6617         (_initialize_mips_linux_nat): Adjust to C++ification.
6618
6619         * aix-thread.c (aix_thread_target): New class.
6620         (aix_thread_ops): Now an aix_thread_target.
6621         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6622         (aix_thread_fetch_registers, aix_thread_store_registers)
6623         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6624         (aix_thread_thread_alive, aix_thread_pid_to_str)
6625         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6626         Refactor as methods of aix_thread_target.
6627         (init_aix_thread_ops): Delete.
6628         (_initialize_aix_thread): Remove references to init_aix_thread_ops
6629         and complete_target_initialization.
6630         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6631         (rs6000_nat_target): New class.
6632         (the_rs6000_nat_target): New.
6633         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6634         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6635         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6636         (super_create_inferior): Delete.
6637         (_initialize_rs6000_nat): Adjust to C++ification.
6638
6639         * arm-linux-nat.c (arm_linux_nat_target): New class.
6640         (the_arm_linux_nat_target): New.
6641         (arm_linux_fetch_inferior_registers)
6642         (arm_linux_store_inferior_registers, arm_linux_read_description)
6643         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6644         (arm_linux_remove_hw_breakpoint)
6645         (arm_linux_region_ok_for_hw_watchpoint)
6646         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6647         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6648         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6649         arm_linux_nat_target.
6650         (_initialize_arm_linux_nat): Adjust to C++ification.
6651
6652         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6653         (the_aarch64_linux_nat_target): New.
6654         (aarch64_linux_fetch_inferior_registers)
6655         (aarch64_linux_store_inferior_registers)
6656         (aarch64_linux_child_post_startup_inferior)
6657         (aarch64_linux_read_description)
6658         (aarch64_linux_can_use_hw_breakpoint)
6659         (aarch64_linux_insert_hw_breakpoint)
6660         (aarch64_linux_remove_hw_breakpoint)
6661         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6662         (aarch64_linux_region_ok_for_hw_watchpoint)
6663         (aarch64_linux_stopped_data_address)
6664         (aarch64_linux_stopped_by_watchpoint)
6665         (aarch64_linux_watchpoint_addr_within_range)
6666         (aarch64_linux_can_do_single_step): Refactor as methods of
6667         aarch64_linux_nat_target.
6668         (super_post_startup_inferior): Delete.
6669         (_initialize_aarch64_linux_nat): Adjust to C++ification.
6670
6671         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6672         (the_hppa_linux_nat_target): New.
6673         (hppa_linux_fetch_inferior_registers)
6674         (hppa_linux_store_inferior_registers): Refactor as methods of
6675         hppa_linux_nat_target.
6676         (_initialize_hppa_linux_nat): Adjust to C++ification.
6677
6678         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6679         (the_ia64_linux_nat_target): New.
6680         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6681         (ia64_linux_stopped_data_address)
6682         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6683         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6684         ia64_linux_nat_target methods.
6685         (super_xfer_partial): Delete.
6686         (_initialize_ia64_linux_nat): Adjust to C++ification.
6687
6688         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6689         (the_m32r_linux_nat_target): New.
6690         (m32r_linux_fetch_inferior_registers)
6691         (m32r_linux_store_inferior_registers): Refactor as
6692         m32r_linux_nat_target methods.
6693         (_initialize_m32r_linux_nat): Adjust to C++ification.
6694
6695         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6696         (the_m68k_linux_nat_target): New.
6697         (m68k_linux_fetch_inferior_registers)
6698         (m68k_linux_store_inferior_registers): Refactor as
6699         m68k_linux_nat_target methods.
6700         (_initialize_m68k_linux_nat): Adjust to C++ification.
6701
6702         * s390-linux-nat.c (s390_linux_nat_target): New class.
6703         (the_s390_linux_nat_target): New.
6704         (s390_linux_fetch_inferior_registers)
6705         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6706         (s390_insert_watchpoint, s390_remove_watchpoint)
6707         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6708         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6709         (s390_auxv_parse, s390_read_description): Refactor as methods of
6710         s390_linux_nat_target.
6711         (_initialize_s390_nat): Adjust to C++ification.
6712
6713         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6714         (the_sparc_linux_nat_target): New.
6715         (_initialize_sparc_linux_nat): Adjust to C++ification.
6716         * sparc-nat.c (sparc_fetch_inferior_registers)
6717         (sparc_store_inferior_registers): Remove target_ops parameter.
6718         * sparc-nat.h (sparc_fetch_inferior_registers)
6719         (sparc_store_inferior_registers): Remove target_ops parameter.
6720         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6721         (the_sparc64_linux_nat_target): New.
6722         (_initialize_sparc64_linux_nat): Adjust to C++ification.
6723
6724         * spu-linux-nat.c (spu_linux_nat_target): New class.
6725         (the_spu_linux_nat_target): New.
6726         (spu_child_post_startup_inferior, spu_child_post_attach)
6727         (spu_child_wait, spu_fetch_inferior_registers)
6728         (spu_store_inferior_registers, spu_xfer_partial)
6729         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6730         methods.
6731         (_initialize_spu_nat): Adjust to C++ification.
6732
6733         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6734         (the_tilegx_linux_nat_target): New.
6735         (fetch_inferior_registers, store_inferior_registers):
6736         Refactor as methods.
6737         (_initialize_tile_linux_nat): Adjust to C++ification.
6738
6739         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6740         (the_xtensa_linux_nat_target): New.
6741         (xtensa_linux_fetch_inferior_registers)
6742         (xtensa_linux_store_inferior_registers): Refactor as
6743         xtensa_linux_nat_target methods.
6744         (_initialize_xtensa_linux_nat): Adjust to C++ification.
6745
6746         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6747         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6748         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6749         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6750         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6751         (fbsd_stopped_by_sw_breakpoint)
6752         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6753         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6754         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6755         (fbsd_post_startup_inferior, fbsd_post_attach)
6756         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6757         (fbsd_set_syscall_catchpoint)
6758         (super_xfer_partial, super_resume, super_wait)
6759         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6760         (fbsd_handle_debug_trap): Remove target_ops parameter.
6761         (fbsd_nat_add_target): Delete.
6762         * fbsd-nat.h: Include "inf-ptrace.h".
6763         (fbsd_nat_add_target): Delete.
6764         (USE_SIGTRAP_SIGINFO): Define.
6765         (fbsd_nat_target): New class.
6766
6767         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6768         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6769         (amd64bsd_target): Delete.
6770         * amd64-bsd-nat.h: New file.
6771         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6772         "x86-bsd-nat.h".
6773         (amd64_fbsd_nat_target): New class.
6774         (the_amd64_fbsd_nat_target): New.
6775         (amd64fbsd_read_description): Refactor as method of
6776         amd64_fbsd_nat_target.
6777         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6778         (_initialize_amd64fbsd_nat): Adjust to C++ification.
6779         * amd64-nat.h (amd64bsd_target): Delete function declaration.
6780         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6781         (i386bsd_store_inferior_registers): Remove target_ops parameter.
6782         (i386bsd_target): Delete.
6783         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6784         (i386bsd_fetch_inferior_registers)
6785         (i386bsd_store_inferior_registers): Declare.
6786         (i386_bsd_nat_target): New class.
6787         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6788         (the_i386_fbsd_nat_target): New.
6789         (i386fbsd_resume, i386fbsd_read_description): Refactor as
6790         i386_fbsd_nat_target methods.
6791         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6792         (_initialize_i386fbsd_nat): Adjust to C++ification.
6793         * x86-bsd-nat.c (super_mourn_inferior): Delete.
6794         (x86bsd_mourn_inferior, x86bsd_target): Delete.
6795         (_initialize_x86_bsd_nat): Adjust to C++ification.
6796         * x86-bsd-nat.h: Include "x86-nat.h".
6797         (x86bsd_target): Delete declaration.
6798         (x86bsd_nat_target): New class.
6799
6800         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6801         (the_aarch64_fbsd_nat_target): New.
6802         (aarch64_fbsd_fetch_inferior_registers)
6803         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6804         aarch64_fbsd_nat_target.
6805         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6806         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6807         (the_alpha_bsd_nat_target): New.
6808         (alphabsd_fetch_inferior_registers)
6809         (alphabsd_store_inferior_registers): Refactor as
6810         alpha_bsd_nat_target methods.
6811         (_initialize_alphabsd_nat): Refactor as methods of
6812         alpha_bsd_nat_target.
6813         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6814         (the_amd64_nbsd_nat_target): New.
6815         (_initialize_amd64nbsd_nat): Adjust to C++ification.
6816         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6817         (the_amd64_obsd_nat_target): New.
6818         (_initialize_amd64obsd_nat): Adjust to C++ification.
6819         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6820         (the_arm_fbsd_nat_target): New.
6821         (arm_fbsd_fetch_inferior_registers)
6822         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6823         (_initialize_arm_fbsd_nat): Refactor as methods of
6824         arm_fbsd_nat_target.
6825         (_initialize_arm_fbsd_nat): Adjust to C++ification.
6826         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6827         (the_arm_netbsd_nat_target): New.
6828         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6829         arm_netbsd_nat_target.
6830         (_initialize_arm_netbsd_nat): Adjust to C++ification.
6831         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6832         (the_hppa_nbsd_nat_target): New.
6833         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6834         hppa_nbsd_nat_target methods.
6835         (_initialize_hppanbsd_nat): Adjust to C++ification.
6836         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6837         (the_hppa_obsd_nat_target): New.
6838         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6839         methods of hppa_obsd_nat_target.
6840         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
6841         add_target.
6842         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6843         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
6844         add_target.
6845         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6846         (_initialize_i386obsd_nat): Use add_target.
6847         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6848         (the_m68k_bsd_nat_target): New.
6849         (m68kbsd_fetch_inferior_registers)
6850         (m68kbsd_store_inferior_registers): Refactor as methods of
6851         m68k_bsd_nat_target.
6852         (_initialize_m68kbsd_nat): Adjust to C++ification.
6853         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6854         (the_mips_fbsd_nat_target): New.
6855         (mips_fbsd_fetch_inferior_registers)
6856         (mips_fbsd_store_inferior_registers): Refactor as methods of
6857         mips_fbsd_nat_target.
6858         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
6859         add_target.
6860         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6861         (the_mips_nbsd_nat_target): New.
6862         (mipsnbsd_fetch_inferior_registers)
6863         (mipsnbsd_store_inferior_registers): Refactor as methods of
6864         mips_nbsd_nat_target.
6865         (_initialize_mipsnbsd_nat): Adjust to C++ification.
6866         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6867         (the_mips64_obsd_nat_target): New.
6868         (mips64obsd_fetch_inferior_registers)
6869         (mips64obsd_store_inferior_registers): Refactor as methods of
6870         mips64_obsd_nat_target.
6871         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
6872         add_target.
6873         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6874         nbsd_nat_target.
6875         * nbsd-nat.h: Include "inf-ptrace.h".
6876         (nbsd_nat_target): New class.
6877         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6878         (obsd_wait): Refactor as methods of obsd_nat_target.
6879         (obsd_add_target): Delete.
6880         * obsd-nat.h: Include "inf-ptrace.h".
6881         (obsd_nat_target): New class.
6882         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6883         (the_ppc_fbsd_nat_target): New.
6884         (ppcfbsd_fetch_inferior_registers)
6885         (ppcfbsd_store_inferior_registers): Refactor as methods of
6886         ppc_fbsd_nat_target.
6887         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
6888         add_target.
6889         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6890         (the_ppc_nbsd_nat_target): New.
6891         (ppcnbsd_fetch_inferior_registers)
6892         (ppcnbsd_store_inferior_registers): Refactor as methods of
6893         ppc_nbsd_nat_target.
6894         (_initialize_ppcnbsd_nat): Adjust to C++ification.
6895         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6896         (the_ppc_obsd_nat_target): New.
6897         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6898         methods of ppc_obsd_nat_target.
6899         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
6900         add_target.
6901         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6902         (the_sh_nbsd_nat_target): New.
6903         (shnbsd_fetch_inferior_registers)
6904         (shnbsd_store_inferior_registers): Refactor as methods of
6905         sh_nbsd_nat_target.
6906         (_initialize_shnbsd_nat): Adjust to C++ification.
6907         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6908         (inf_ptrace_xfer_partial): Delete.
6909         (sparc_xfer_partial, sparc_target): Delete.
6910         * sparc-nat.h (sparc_fetch_inferior_registers)
6911         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6912         (sparc_target): Delete function declaration.
6913         (sparc_target): New template class.
6914         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6915         (_initialize_sparcnbsd_nat): Adjust to C++ification.
6916         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6917         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
6918         add_target.
6919         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6920         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6921         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6922         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
6923         add_target.
6924         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6925         (the_vax_bsd_nat_target): New.
6926         (vaxbsd_fetch_inferior_registers)
6927         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6928         methods.
6929         (_initialize_vaxbsd_nat): Adjust to C++ification.
6930
6931         * bsd-kvm.c (bsd_kvm_target): New class.
6932         (bsd_kvm_ops): Now a bsd_kvm_target.
6933         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6934         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6935         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6936         bsd_kvm_target.
6937         (bsd_kvm_return_one): Delete.
6938         (bsd_kvm_add_target): Adjust to C++ification.
6939
6940         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6941         (nto_procfs_target_procfs): New classes.
6942         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6943         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6944         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6945         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6946         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6947         (procfs_remove_hw_breakpoint, procfs_resume)
6948         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6949         (procfs_kill_inferior, procfs_store_registers)
6950         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6951         as methods of nto_procfs_target.
6952         (nto_procfs_ops): Now an nto_procfs_target_procfs.
6953         (nto_native_ops): Delete.
6954         (procfs_open, procfs_native_open): Delete.
6955         (nto_native_ops): Now an nto_procfs_target_native.
6956         (init_procfs_targets): Adjust to C++ification.
6957         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6958         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6959         Refactor as methods of nto_procfs_target.
6960
6961         * go32-nat.c (go32_nat_target): New class.
6962         (the_go32_nat_target): New.
6963         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6964         (go32_store_registers, go32_xfer_partial, go32_files_info)
6965         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6966         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6967         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6968         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6969         (go32_target): Delete.
6970         (_initialize_go32_nat): Adjust to C++ification.
6971
6972         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6973         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6974         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6975         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6976         gnu_nat_target.
6977         (gnu_target): Delete.
6978         * gnu-nat.h (gnu_target): Delete.
6979         (gnu_nat_target): New class.
6980         * i386-gnu-nat.c (gnu_base_target): New.
6981         (i386_gnu_nat_target): New class.
6982         (the_i386_gnu_nat_target): New.
6983         (_initialize_i386gnu_nat): Adjust to C++ification.
6984
6985 2018-05-02  Pedro Alves  <palves@redhat.com>
6986
6987         * bfd-target.c (target_bfd_xclose): Rename to ...
6988         (target_bfd_close): ... this.
6989         (target_bfd_reopen): Adjust.
6990         * target.c (target_close): Remove references to to_xclose.
6991         * target.h (target_ops::to_xclose): Delete.
6992         (target_ops::to_close): Update comments.
6993
6994 2018-05-02  Pedro Alves  <palves@redhat.com>
6995
6996         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6997         "linux-nat.h".
6998         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6999         * inf-ptrace.c (inf_ptrace_register_u_offset)
7000         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7001         (inf_ptrace_store_register, inf_ptrace_store_registers)
7002         (inf_ptrace_trad_target): Move to ...
7003         * linux-nat-trad.c: ... this new file.
7004         * linux-nat-trad.h: New file.
7005         * linux-nat.c (linux_target_install_ops): Make extern.
7006         (linux_trad_target): Delete.
7007         * linux-nat.h (linux_trad_target): Delete declaration.
7008         (linux_target_install_ops): Declare.
7009         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7010         "linux-nat.h".
7011
7012 2018-05-02  Pedro Alves  <palves@redhat.com>
7013
7014         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7015         procfs_target/add_target here.
7016         * procfs.c (procfs_target): Make static.
7017         (_initialize_procfs): Call add_target here.
7018         * procfs.h (struct target_ops): Remove forward declaration.
7019         (procfs_target): Remove declaration.
7020         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7021
7022 2018-05-02  Pedro Alves  <palves@redhat.com>
7023
7024         * procfs.c (procfs_stopped_by_watchpoint)
7025         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7026         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7027         Forward declare.
7028         (procfs_use_watchpoints): Delete, move contents...
7029         (procfs_target): ... here.
7030         * procfs.h (procfs_use_watchpoints): Delete declaration.
7031         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7032         procfs_use_watchpoints.
7033         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7034         procfs_use_watchpoints.
7035
7036 2018-05-02  Tom Tromey  <tom@tromey.com>
7037
7038         PR python/20084:
7039         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7040         and var_zuinteger_unlimited.
7041         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7042         and PARAM_ZUINTEGER_UNLIMITED.
7043         (set_parameter_value): Handle var_zuinteger and
7044         var_zuinteger_unlimited.
7045         (add_setshow_generic): Likewise.
7046         (parmpy_init): Likewise.
7047
7048 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7049
7050         PR rust/23124
7051         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7052         pointer is not null before dereferencing it.
7053
7054 2018-04-30  Tom Tromey  <tom@tromey.com>
7055
7056         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7057         is_mi_like_p.
7058
7059 2018-04-30  Tom Tromey  <tom@tromey.com>
7060
7061         * breakpoint.c (mention): Remove use of is_mi_like_p.
7062         (print_mention_ranged_breakpoint): Likewise.
7063         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7064         of is_mi_like_p.
7065
7066 2018-04-30  Tom Tromey  <tom@tromey.com>
7067
7068         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7069
7070 2018-04-30  Tom Tromey  <tom@tromey.com>
7071
7072         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7073         (info_spu_event_command): Remove some uses of is_mi_like_p.
7074
7075 2018-04-30  Tom Tromey  <tom@tromey.com>
7076
7077         * python/py-framefilter.c (py_print_single_arg)
7078         (enumerate_locals, py_print_args, py_print_frame): Remove some
7079         uses of is_mi_like_p.
7080
7081 2018-04-30  Tom Tromey  <tom@tromey.com>
7082
7083         * ui-out.c: Update.
7084         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7085         * ui-out.h (ui_out::is_mi_like_p): Now const.
7086         (ui_out::do_is_mi_like_p): Now const.
7087         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7088
7089 2018-04-30  Tom Tromey  <tom@tromey.com>
7090
7091         * varobj.c (varobj_set_visualizer): Use new_reference.
7092         * python/python.c (gdbpy_decode_line): Use new_reference.
7093         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7094         new_reference.
7095
7096 2018-04-30  Tom Tromey  <tom@tromey.com>
7097
7098         * varobj.c (install_new_value): Use new_reference.
7099         * value.h (value_incref): Return void.  Swap intro comment with
7100         value_decref.
7101         * value.c (set_value_parent): Use new_reference.
7102         (value_incref): Return void.  Update intro comment.
7103         (release_value): Use new_reference.
7104         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7105
7106 2018-04-30  Tom Tromey  <tom@tromey.com>
7107
7108         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7109         * gdb_bfd.h (new_bfd_ref): Remove.
7110         (gdb_bfd_open): Update comment.
7111         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7112         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7113         (gdb_bfd_fdopenr): Use new_reference.
7114         * exec.c (exec_file_attach): Use new_reference.
7115
7116 2018-04-30  Tom Tromey  <tom@tromey.com>
7117
7118         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7119         method.
7120
7121 2018-04-30  Tom Tromey  <tom@tromey.com>
7122
7123         * jit.c (jit_read_code_entry): Use type_align.
7124         * i386-tdep.c (i386_gdbarch_init): Don't call
7125         set_gdbarch_long_long_align_bit.
7126         * gdbarch.sh: Remove long_long_align_bit.
7127         * gdbarch.c, gdbarch.h: Rebuild.
7128         * arc-tdep.c (arc_type_align): New function.
7129         (arc_gdbarch_init): Use arc_type_align.  Don't call
7130         set_gdbarch_long_long_align_bit.
7131
7132 2018-04-30  Tom Tromey  <tom@tromey.com>
7133
7134         * rust-lang.c (rust_type_alignment): Remove.
7135         (rust_composite_type): Use type_align.
7136
7137 2018-04-30  Tom Tromey  <tom@tromey.com>
7138
7139         * NEWS: Mention Type.align.
7140         * python/py-type.c (typy_get_alignof): New function.
7141         (type_object_getset): Add "alignof".
7142
7143 2018-04-30  Tom Tromey  <tom@tromey.com>
7144
7145         PR exp/17095:
7146         * NEWS: Update.
7147         * std-operator.def (UNOP_ALIGNOF): New operator.
7148         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7149         New.
7150         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7151         * c-lang.c (c_op_print_tab): Add alignof.
7152         * c-exp.y (ALIGNOF): New token.
7153         (exp): Add "ALIGNOF" production.
7154         (ident_tokens): Add _Alignof and alignof.
7155
7156 2018-04-30  Tom Tromey  <tom@tromey.com>
7157
7158         * i386-tdep.c (i386_type_align): New function.
7159         (i386_gdbarch_init): Update.
7160         * gdbarch.sh (type_align): New method.
7161         * gdbarch.c, gdbarch.h: Rebuild.
7162         * arch-utils.h (default_type_align): Declare.
7163         * arch-utils.c (default_type_align): New function.
7164         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7165         (struct type) <align_log2>: New field.
7166         <instance_flags>: Now a bitfield.
7167         (TYPE_RAW_ALIGN): New macro.
7168         (type_align, type_raw_align, set_type_align): Declare.
7169         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7170         functions.
7171         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7172         (get_alignment, maybe_set_alignment): New functions.
7173         (read_structure_type, read_enumeration_type, read_array_type)
7174         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7175         (read_subrange_type, read_base_type): Set type alignment.
7176
7177 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
7178
7179         * dwarf2read.c (read_index_from_section): Use bool.
7180
7181 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
7182
7183         PR gdb/22950
7184         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7185         with #ifdef.
7186
7187 2018-04-29  John Reiser  <jreiser@BitWagon.com>
7188
7189         PR build/22873
7190         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7191         last step, and do it atomically.
7192
7193 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
7194
7195         * compile/compile-c-types.c (convert_int, convert_float):
7196         Update for C FE v1.
7197
7198 2018-04-27  Tom Tromey  <tom@tromey.com>
7199
7200         PR rust/22545:
7201         * rust-lang.c (rust_inclusive_range_type_p): New function.
7202         (rust_range): Handle inclusive ranges.
7203         (rust_compute_range): Likewise.
7204         * rust-exp.y (struct rust_op) <inclusive>: New field.
7205         (DOTDOTEQ): New constant.
7206         (range_expr): Add "..=" productions.
7207         (operator_tokens): Add "..=" token.
7208         (ast_range): Add "inclusive" parameter.
7209         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7210         ranges.
7211         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7212         bounds values.
7213         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7214         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7215         Update comments.
7216         * expprint.c (print_subexp_standard): Handle new bounds values.
7217         (dump_subexp_body_standard): Likewise.
7218
7219 2018-04-27  Tom Tromey  <tom@tromey.com>
7220
7221         * configure: Rebuild.
7222         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7223         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7224         "OVERRIDE".
7225         (class symbol_needs_eval_context): Likewise.
7226         * dwarf2read.c (mock_mapped_index::symbol_name_count)
7227         (mock_mapped_index::symbol_name_at): Use "override".  Remove
7228         "virtual".
7229         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7230         "override".
7231         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7232         * aarch64-tdep.c (instruction_reader::read): Use "override".
7233         (instruction_reader_test::read): Likewise.
7234         * arm-tdep.c (instruction_reader::read): Use "override".
7235         (instruction_reader_thumb::read): Likewise.
7236
7237 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
7238
7239         PR remote/9665
7240         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7241         instead of remote_send.
7242         (remote_send): Remove.
7243
7244 2018-04-26  Pedro Alves  <palves@redhat.com>
7245
7246         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7247         find_function_start_sal instead of find_pc_line.
7248
7249 2018-04-26  Pedro Alves  <palves@redhat.com>
7250
7251         * breakpoint.c (set_breakpoint_location_function): Handle
7252         mst_data_gnu_ifunc.
7253         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7254         * elfread.c (elf_symtab_read): Give data symbols with
7255         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7256         (elf_rel_plt_read): Update comment.
7257         * linespec.c (convert_linespec_to_sals): Handle
7258         mst_data_gnu_ifunc.
7259         (minsym_found): Handle mst_data_gnu_ifunc.
7260         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7261         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7262         * parse.c (find_minsym_type_and_address): Handle
7263         mst_data_gnu_ifunc.
7264         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7265         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7266         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7267         comment.
7268         <mst_data_gnu_ifunc>: New enumerator.
7269
7270 2018-04-26  Pedro Alves  <palves@redhat.com>
7271
7272         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7273         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
7274         'want_trampoline' parameter by a lookup_msym_prefer parameter.
7275         Handle it.
7276         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7277         (lookup_minimal_symbol_by_pc): Adjust.
7278         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7279         (lookup_solib_trampoline_symbol_by_pc): Adjust.
7280         * minsyms.h (lookup_msym_prefer): New enum.
7281         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7282         parameter by a lookup_msym_prefer parameter.
7283
7284 2018-04-26  Pedro Alves  <palves@redhat.com>
7285
7286         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7287         ends in "@plt" instead of looking at the symbol's section.
7288
7289 2018-04-26  Pedro Alves  <palves@redhat.com>
7290
7291         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
7292         all references.
7293         (find_pc_partial_function_gnu_ifunc): Rename to ...
7294         (find_pc_partial_function): ... this, and remove references to
7295         'is_gnu_ifunc_p'.
7296         (find_pc_partial_function): Delete old implementation.
7297         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7298
7299 2018-04-26  Pedro Alves  <palves@redhat.com>
7300
7301         * linespec.c (struct bound_minimal_symbol_search_key): New.
7302         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
7303         skip first line if we found a GNU ifunc minimal symbol by name.
7304         (compare_msymbols): Change parameters to work with a destructured
7305         lhs minsym.
7306         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7307         functions.
7308
7309 2018-04-26  Pedro Alves  <palves@redhat.com>
7310
7311         * breakpoint.c (set_breakpoint_location_function): Don't resolve
7312         ifunc targets here.  Instead, if we have an ifunc minsym, use its
7313         address/name.
7314         (add_location_to_breakpoint): Store the minsym and the objfile in
7315         the breakpoint location.
7316         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7317         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7318         Record the minsym in the sal.
7319         * symtab.h (symtab_and_line) <msymbol>: New field.
7320
7321 2018-04-26  Pedro Alves  <palves@redhat.com>
7322
7323         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7324         unless we actually resolved the ifunc.
7325
7326 2018-04-26  Pedro Alves  <palves@redhat.com>
7327
7328         * c-exp.y (variable production): Prefer ifunc minsyms over
7329         regular function symbols.
7330         * symtab.c (find_gnu_ifunc): New function.
7331         * minsyms.h (lookup_msym_prefer): New enum.
7332         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7333         parameter by a lookup_msym_prefer parameter.
7334         * symtab.h (find_gnu_ifunc): New declaration.
7335
7336 2018-04-26  Pedro Alves  <palves@redhat.com>
7337
7338         * blockframe.c (find_gnu_ifunc_target_type): New function.
7339         (find_function_type): New.
7340         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7341         return a value with a memory address.
7342         (eval_call): For calls to GNU ifunc functions, try to find the
7343         type of the target function from the type that the resolver
7344         returns.
7345         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7346         symbols.
7347         * infcall.c (find_function_return_type): Delete.
7348         (find_function_addr): Add 'function_type' parameter.  For calls to
7349         GNU ifunc functions, try to find the type of the target function
7350         from the type that the resolver returns, and return it via
7351         FUNCTION_TYPE.
7352         (call_function_by_hand_dummy): Adjust to use the function type
7353         returned by find_function_addr.
7354         (find_function_addr): Add 'function_type' parameter and move
7355         description here.
7356         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7357         declarations.
7358
7359 2018-04-26  Pedro Alves  <palves@redhat.com>
7360
7361         * c-exp.y (variable production): Skip finding an alias for ifunc
7362         symbols.
7363
7364 2018-04-26  Pedro Alves  <palves@redhat.com>
7365
7366         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7367
7368 2018-04-25  Pedro Alves  <palves@redhat.com>
7369
7370         * infcmd.c (kill_command): Print the pid as string, not the whole
7371         thread's ptid.  Add comment.  s/has been killed/killed/ in output
7372         message.
7373         * remote.c (remote_detach_1): Print the pid as string, not the
7374         whole thread's ptid.
7375
7376 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7377             Sergio Durigan Junior  <sergiodj@redhat.com>
7378             Pedro Alves  <palves@redhat.com>
7379
7380         * infcmd.c (kill_command): Print message when inferior has
7381         been killed.
7382         * inferior.c (print_inferior_events): Remove 'static'.  Set as
7383         '1'.
7384         (add_inferior): Improve message printed when
7385         'print_inferior_events' is on.
7386         (exit_inferior): Remove message printed when
7387         'print_inferior_events' is on.
7388         (detach_inferior): Improve message printed when
7389         'print_inferior_events' is on.
7390         (initialize_inferiors): Use 'add_inferior_silent' to set
7391         'current_inferior_'.
7392         * inferior.h (print_inferior_events): Declare here as
7393         'extern'.
7394         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7395         '[Detaching...]' messages when 'print_inferior_events' is on.
7396         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
7397         as prefix/suffix for messages.  Remove periods.  Fix erroneous
7398         'Detaching after fork from child...', replace it by '... from
7399         parent...'.
7400         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7401         prefix/suffix when printing 'Detaching...' messages.  Print
7402         them when 'print_inferior_events' is on.
7403         * remote.c (remote_detach_1): Print message when detaching
7404         from inferior and '!is_fork_parent'.
7405
7406 2018-04-24  Tom Tromey  <tom@tromey.com>
7407
7408         * cli-out.h: Reindent.
7409
7410 2018-04-24  Tom Tromey  <tom@tromey.com>
7411
7412         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7413         (cli_ui_out::do_field_string): Use fputs_filtered.
7414         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7415
7416 2018-04-23  Tom Tromey  <tom@tromey.com>
7417
7418         * guile/scm-frame.c (gdbscm_frame_read_var): Use
7419         gdb::unique_xmalloc_ptr.
7420
7421 2018-04-23  Tom Tromey  <tom@tromey.com>
7422
7423         * configure: Rebuild.
7424
7425 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
7426
7427         PR gdb/23095
7428         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7429         prepare_for_testing.  Set normal_bp to r_debug_state if target
7430         is bsd.
7431
7432 2018-04-21  Pedro Alves  <palves@redhat.com>
7433             Rajendra SY  <rajendra.sy@gmail.com>
7434
7435         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7436         * remote.c (extended_remote_attach): In all-stop mode, mark the
7437         thread as executing.
7438
7439 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7440
7441         * thread.c (thread_apply_all_command): Fix comment.
7442         (thread_command): Fix comment.
7443
7444 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
7445
7446         * common/tdesc.h (tdesc_create_feature): Remove xml filename
7447         parameter.
7448         * features/aarch64-core.c (create_feature_aarch64_core):
7449         Regenerate.
7450         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7451         Likewise.
7452         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7453         Likewise.
7454         * features/i386/32bit-avx512.c
7455         (create_feature_i386_32bit_avx512): Likewise.
7456         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7457         Likewise.
7458         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7459         Likewise.
7460         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7461         Likewise.
7462         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7463         Likewise.
7464         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7465         Likewise.
7466         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7467         Likewise.
7468         * features/i386/64bit-avx512.c
7469         (create_feature_i386_64bit_avx512): Likewise.
7470         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7471         Likewise.
7472         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7473         Likewise.
7474         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7475         Likewise.
7476         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7477         Likewise.
7478         * features/i386/64bit-segments.c
7479         (create_feature_i386_64bit_segments): Likewise.
7480         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7481         Likewise.
7482         * features/i386/x32-core.c
7483         (create_feature_i386_x32_core): Likewise.
7484         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7485         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7486         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7487         * target-descriptions.c: In generated code, don't pass xml
7488         filename.
7489
7490 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7491
7492         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7493         (print_xml_feature::visit_post): Likewise.
7494         (print_xml_feature::visit): Likewise.
7495         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7496         (print_xml_feature): Add new class.
7497         * regformats/regdat.sh: Null xmltarget on feature targets.
7498         * target-descriptions.c (struct target_desc): Add xmltarget.
7499         (maintenance_check_tdesc_xml_convert): Add unittest function.
7500         (tdesc_get_features_xml): Add function to get xml.
7501         (maintenance_check_xml_descriptions): Test xml generation.
7502         * xml-tdesc.c (string_read_description_xml): Add function.
7503         * xml-tdesc.h (string_read_description_xml): Add declaration.
7504
7505 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7506
7507         * features/Makefile: Add feature marker to targets with new style
7508         target descriptions.
7509         * regformats/aarch64.dat: Regenerate.
7510         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7511         * regformats/i386/amd64-avx-linux.dat: Likewise.
7512         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7513         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7514         * regformats/i386/amd64-linux.dat: Likewise.
7515         * regformats/i386/amd64-mpx-linux.dat: Likewise.
7516         * regformats/i386/amd64.dat: Likewise.
7517         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7518         * regformats/i386/i386-avx-linux.dat: Likewise.
7519         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7520         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7521         * regformats/i386/i386-linux.dat: Likewise.
7522         * regformats/i386/i386-mmx-linux.dat: Likewise.
7523         * regformats/i386/i386-mpx-linux.dat: Likewise.
7524         * regformats/i386/i386.dat: Likewise.
7525         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7526         * regformats/i386/x32-avx-linux.dat: Likewise.
7527         * regformats/i386/x32-linux.dat: Likewise.
7528         * regformats/tic6x-c62x-linux.dat: Likewise.
7529         * regformats/tic6x-c64x-linux.dat: Likewise.
7530         * regformats/tic6x-c64xp-linux.dat: Likewise.
7531         * regformats/regdat.sh: Parse feature marker.
7532
7533 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7534
7535         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7536         (tdesc_osabi_name): Likewise.
7537         * target-descriptions.c (tdesc_architecture_name): Add new
7538         function.
7539         (tdesc_osabi_name): Likewise.
7540
7541 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7542
7543         * common/tdesc.c (tdesc_predefined_type): Move to here.
7544         (tdesc_named_type): Likewise.
7545         (tdesc_create_vector): Likewise.
7546         (tdesc_create_struct): Likewise.
7547         (tdesc_set_struct_size): Likewise.
7548         (tdesc_create_union): Likewise.
7549         (tdesc_create_flags): Likewise.
7550         (tdesc_create_enum): Likewise.
7551         (tdesc_add_field): Likewise.
7552         (tdesc_add_typed_bitfield): Likewise.
7553         (tdesc_add_bitfield): Likewise.
7554         (tdesc_add_flag): Likewise.
7555         (tdesc_add_enum_value): Likewise.
7556         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7557         (struct tdesc_type_vector): Likewise.
7558         (struct tdesc_type_field): Likewise.
7559         (struct tdesc_type_with_fields): Likewise.
7560         (tdesc_create_enum): Add declaration.
7561         (tdesc_add_typed_bitfield): Likewise.
7562         (tdesc_add_enum_value): Likewise.
7563         * target-descriptions.c (tdesc_type_field): Move from here.
7564         (tdesc_type_builtin): Likewise.
7565         (tdesc_type_vector): Likewise.
7566         (tdesc_type_with_fields): Likewise.
7567         (tdesc_predefined_types): Likewise.
7568         (tdesc_named_type): Likewise.
7569         (tdesc_create_vector): Likewise.
7570         (tdesc_create_struct): Likewise.
7571         (tdesc_set_struct_size): Likewise.
7572         (tdesc_create_union): Likewise.
7573         (tdesc_create_flags): Likewise.
7574         (tdesc_create_enum): Likewise.
7575         (tdesc_add_field): Likewise.
7576         (tdesc_add_typed_bitfield): Likewise.
7577         (tdesc_add_bitfield): Likewise.
7578         (tdesc_add_flag): Likewise.
7579         (tdesc_add_enum_value): Likewise.
7580         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7581         (tdesc_add_typed_bitfield): Likewise.
7582         (tdesc_add_enum_value): Likewise.
7583
7584 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7585
7586         * common/tdesc.c (tdesc_feature::accept): Move to here.
7587         (tdesc_feature::operator==): Likewise.
7588         (tdesc_create_reg): Likewise.
7589         * common/tdesc.h (tdesc_type_kind): Likewise.
7590         (struct tdesc_type): Likewise.
7591         (struct tdesc_feature): Likewise.
7592         * regformats/regdat.sh: Create a feature.
7593         * target-descriptions.c (tdesc_type_kind): Move from here.
7594         (tdesc_type): Likewise.
7595         (tdesc_type_up): Likewise.
7596         (tdesc_feature): Likewise.
7597         (tdesc_create_reg): Likewise.
7598
7599 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
7600
7601         * Makefile.in: Add arch/tdesc.c
7602         * common/tdesc.c: New file.
7603         * common/tdesc.h (tdesc_element_visitor): Move to here.
7604         (tdesc_element): Likewise.
7605         (tdesc_reg): Likewise.
7606         (tdesc_reg_up): Likewise.
7607         * regformats/regdef.h (reg): Add offset to constructors.
7608         * target-descriptions.c (tdesc_element_visitor): Move from here.
7609         (tdesc_element): Likewise.
7610         (tdesc_reg): Likewise.
7611         (tdesc_reg_up): Likewise.
7612
7613 2018-04-17  Tom Tromey  <tom@tromey.com>
7614
7615         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7616         discriminant field.
7617
7618 2018-04-17  Tom Tromey  <tom@tromey.com>
7619
7620         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7621
7622 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7623
7624         * symtab.c (print_symbol_info): Skip printing filename and line
7625         number when `last' is NULL.
7626         (symtab_symbol_info): Use empty string instead of NULL for first
7627         invocation of print_symbol_info.
7628         (rbreak_command): Pass NULL to `last' parameter of
7629         print_symbol_info.
7630
7631 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
7632
7633         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7634         instead of nullptr.
7635
7636 2018-04-16  Pedro Alves  <palves@redhat.com>
7637
7638         * MAINTAINERS (sh): Remove.
7639         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7640         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7641         (ALLDEPFILES): Remove sh64-tdep.c.
7642         * NEWS: Mentions that support for SH-5/SH64 is removed.
7643         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7644         (sh*-*-openbsd*): Ditto.
7645         (sh64-*-elf*): Remove.
7646         (sh*): Remove.
7647         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7648         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7649         * sh-tdep.c: No longer include "sh64-tdep.h".
7650         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7651         * sh64-tdep.c, sh64-tdep.h: Remove files.
7652
7653 2018-04-16  Pedro Alves  <palves@redhat.com>
7654
7655         * MAINTAINERS: Remove m88k.
7656         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7657         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7658         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7659         * NEWS: Mention that support for m88k was removed.
7660         * configure.host (m88*-*-*): Remove support.
7661         * configure.nat (m88k-*-*): Remove support.
7662         * configure.tgt (m88*-*-openbsd*): Remove.
7663         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7664
7665 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
7666
7667         * configure.tgt (x86_tobjs): New variable.
7668         (amd64_tobjs, i386_tobjs): Use it.
7669
7670 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7671
7672         * symtab.c (print_symbol_info): Precede the symbol definition by
7673         the line number when available.
7674         * NEWS: Advertise this enhancement.
7675
7676 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7677
7678         * NEWS (New options): announce set/show record btrace cpu.
7679         * btrace.c: Include record-btrace.h.
7680         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7681         the vendor is unknown.
7682         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
7683         Maybe overwrite the btrace configuration's cpu.
7684         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
7685         (btrace_fetch): Add cpu parameter.  Update callers.
7686         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7687         Maybe overwrite the btrace configuration's cpu.  Skip enabling
7688         errata workarounds if the vendor is unknown.
7689         * python/py-record-btrace.c: Include record-btrace.h.
7690         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7691         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7692         * record-btrace.c (record_btrace_cpu_state_kind): New.
7693         (record_btrace_cpu): New.
7694         (set_record_btrace_cpu_cmdlist): New.
7695         (record_btrace_get_cpu): New.
7696         (require_btrace_thread, record_btrace_info)
7697         (record_btrace_resume_thread): Call record_btrace_get_cpu.
7698         (cmd_set_record_btrace_cpu_none): New.
7699         (cmd_set_record_btrace_cpu_auto): New.
7700         (cmd_set_record_btrace_cpu): New.
7701         (cmd_show_record_btrace_cpu): New.
7702         (_initialize_record_btrace): Initialize set/show record btrace cpu
7703         commands.
7704         * record-btrace.h (record_btrace_get_cpu): New.
7705
7706 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7707
7708         * record.c (set_record_command): Fix typo in message.
7709
7710 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7711
7712         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7713
7714 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
7715
7716         * infrun.c (process_event_stop_test): Call
7717         gdbarch_in_indirect_branch_thunk.
7718         * gdbarch.sh (in_indirect_branch_thunk): New.
7719         * gdbarch.c: Regenerated.
7720         * gdbarch.h: Regenerated.
7721         * x86-tdep.h: New.
7722         * x86-tdep.c: New.
7723         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7724         (HFILES_NO_SRCDIR): Add x86-tdep.h.
7725         (ALLDEPFILES): Add x86-tdep.c.
7726         * arch-utils.h (default_in_indirect_branch_thunk): New.
7727         * arch-utils.c (default_in_indirect_branch_thunk): New.
7728         * i386-tdep: Include x86-tdep.h.
7729         (i386_in_indirect_branch_thunk): New.
7730         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7731         function.
7732         * amd64-tdep: Include x86-tdep.h.
7733         (amd64_in_indirect_branch_thunk): New.
7734         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7735
7736 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
7737
7738         PR gdb/23053
7739         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7740         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7741         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7742         regression.
7743
7744 2018-04-12  Tom Tromey  <tom@tromey.com>
7745
7746         * rust-lang.c (rust_print_struct_def): Remove univariant code.
7747         (rust_evaluate_subexp): Likewise.
7748
7749 2018-04-12  Pedro Alves  <palves@redhat.com>
7750
7751         * procfs.c (procfs_detach): Make forward declaration's prototype
7752         match definition's protototype.
7753         (proc_get_LDT_entry): Remove stale do_cleanups call.
7754
7755 2018-04-12  Pedro Alves  <palves@redhat.com>
7756
7757         * target.h (target_ops::to_has_exited): Delete.
7758         (target_has_exited): Delete.
7759         * target-delegates.c: Regenerate.
7760
7761 2018-04-11  Pedro Alves  <palves@redhat.com>
7762
7763         * target.c (fileio_fh_t::t): Add comment.
7764         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7765         (target_fileio_close): Handle a NULL target.
7766         (invalidate_fileio_fh): New.
7767         (target_close): Call it.
7768         * remote.c (remote_hostio_send_command): No longer check whether
7769         remote_desc is open.
7770
7771 2018-04-11  Pedro Alves  <palves@redhat.com>
7772
7773         * target.c (fileio_fh_t): Make it a named struct instead of a
7774         typedef.
7775         (fileio_fh_t::is_closed): New method.
7776         (DEF_VEC_O (fileio_fh_t)): Remove.
7777         (fileio_fhandles): Now a std::vector.
7778         (is_closed_fileio_fh): Delete.
7779         (acquire_fileio_fd): Adjust.  Rename parameters.
7780         (release_fileio_fd): Adjust.
7781         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7782         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7783         (target_fileio_close): Adjust.
7784
7785 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
7786
7787         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7788         index.
7789
7790 2018-04-10  Pedro Alves  <palves@redhat.com>
7791
7792         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7793         (scoped_finish_thread_state): New class.
7794         * infcmd.c (run_command_1): Use it instead of finish_thread_state
7795         cleanup.
7796         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7797         (fetch_inferior_event, normal_stop): Likewise.
7798         * thread.c (finish_thread_state_cleanup): Delete.
7799
7800 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7801             Pedro Alves  <palves@redhat.com>
7802
7803         * value.c: Include "selftest.h" and "common/array-view.h".
7804         (struct range) <operator ==>: New.
7805         (test_ranges_contain): New.
7806         (check_ranges_vector): New.
7807         (test_insert_into_bit_range_vector): New.
7808         (_initialize_values): Register selftests.
7809         * common/array-view.h (operator==, operator!=): New.
7810
7811 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7812
7813         * common/gdb_vecs.h (unordered_remove): Add overload that takes
7814         an iterator.
7815         * inline-frame.c: Include <algorithm>.
7816         (struct inline_state): Add constructor.
7817         (inline_state_s): Remove.
7818         (DEF_VEC_O(inline_state_s)): Remove.
7819         (inline_states): Change type to std::vector.
7820         (find_inline_frame_state): Adjust to std::vector.
7821         (allocate_inline_frame_state): Remove.
7822         (clear_inline_frame_state): Adjust to std::vector.
7823         (skip_inline_frames): Adjust to std::vector.
7824
7825 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7826
7827         * tracepoint.h (struct trace_state_variable): Add constructor.
7828         <name>: Change type to std::string.
7829         * tracepoint.c (tsv_s): Remove.
7830         (DEF_VEC_O(tsv_s)): Remove.
7831         (tvariables): Change to std::vector.
7832         (create_trace_state_variable): Adjust to std::vector.
7833         (find_trace_state_variable): Likewise.
7834         (find_trace_state_variable_by_number): Likewise.
7835         (delete_trace_state_variable): Likewise.
7836         (trace_variable_command): Adjust to std::string.
7837         (delete_trace_variable_command): Likewise.
7838         (tvariables_info_1): Adjust to std::vector.
7839         (save_trace_state_variables): Likewise.
7840         (start_tracing): Likewise.
7841         (merge_uploaded_trace_state_variables): Adjust to std::vector
7842         and std::string.
7843         * target.h (struct target_ops)
7844         <to_download_trace_state_variable>: Pass reference to
7845         trace_state_variable.
7846         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7847         * target-delegates.c: Re-generate.
7848         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7849         (mi_tsv_deleted): Likewise.
7850         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7851         * remote.c (remote_download_trace_state_variable): Change
7852         pointer to reference and adjust.
7853         * make-target-delegates (parse_argtypes): Handle references.
7854         (write_function_header): Likewise.
7855         (munge_type): Likewise.
7856
7857 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7858
7859         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7860         string_view-selftests.c.
7861         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7862         testsuite.
7863         * unittests/basic_string_view/cons/char/1.cc: Likewise.
7864         * unittests/basic_string_view/cons/char/2.cc: Likewise.
7865         * unittests/basic_string_view/cons/char/3.cc: Likewise.
7866         * unittests/basic_string_view/element_access/char/1.cc:
7867         Likewise.
7868         * unittests/basic_string_view/element_access/char/empty.cc:
7869         Likewise.
7870         * unittests/basic_string_view/element_access/char/front_back.cc:
7871         Likewise.
7872         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7873         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7874         Likewise.
7875         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7876         Likewise.
7877         * unittests/basic_string_view/modifiers/swap/char/1.cc:
7878         Likewise.
7879         * unittests/basic_string_view/operations/compare/char/1.cc:
7880         Likewise.
7881         * unittests/basic_string_view/operations/compare/char/13650.cc:
7882         Likewise.
7883         * unittests/basic_string_view/operations/copy/char/1.cc:
7884         Likewise.
7885         * unittests/basic_string_view/operations/data/char/1.cc:
7886         Likewise.
7887         * unittests/basic_string_view/operations/find/char/1.cc:
7888         Likewise.
7889         * unittests/basic_string_view/operations/find/char/2.cc:
7890         Likewise.
7891         * unittests/basic_string_view/operations/find/char/3.cc:
7892         Likewise.
7893         * unittests/basic_string_view/operations/find/char/4.cc:
7894         Likewise.
7895         * unittests/basic_string_view/operations/rfind/char/1.cc:
7896         Likewise.
7897         * unittests/basic_string_view/operations/rfind/char/2.cc:
7898         Likewise.
7899         * unittests/basic_string_view/operations/rfind/char/3.cc:
7900         Likewise.
7901         * unittests/basic_string_view/operations/substr/char/1.cc:
7902         Likewise.
7903         * unittests/basic_string_view/operators/char/2.cc: Likewise.
7904         * unittests/string_view-selftests.c: New file.
7905
7906 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7907
7908         * unittests/basic_string_view/capacity/1.cc: New file.
7909         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7910         * unittests/basic_string_view/cons/char/1.cc: New file.
7911         * unittests/basic_string_view/cons/char/2.cc: New file.
7912         * unittests/basic_string_view/cons/char/3.cc: New file.
7913         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7914         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7915         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7916         * unittests/basic_string_view/element_access/char/1.cc: New file.
7917         * unittests/basic_string_view/element_access/char/2.cc: New file.
7918         * unittests/basic_string_view/element_access/char/empty.cc: New file.
7919         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7920         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7921         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7922         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7923         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7924         * unittests/basic_string_view/include.cc: New file.
7925         * unittests/basic_string_view/inserters/char/1.cc: New file.
7926         * unittests/basic_string_view/inserters/char/2.cc: New file.
7927         * unittests/basic_string_view/inserters/char/3.cc: New file.
7928         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7929         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7930         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7931         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7932         * unittests/basic_string_view/literals/types.cc: New file.
7933         * unittests/basic_string_view/literals/values.cc: New file.
7934         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7935         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7936         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7937         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7938         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7939         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7940         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7941         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7942         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7943         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7944         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7945         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7946         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7947         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7948         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7949         * unittests/basic_string_view/operations/data/char/1.cc: New file.
7950         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7951         * unittests/basic_string_view/operations/find/char/1.cc: New file.
7952         * unittests/basic_string_view/operations/find/char/2.cc: New file.
7953         * unittests/basic_string_view/operations/find/char/3.cc: New file.
7954         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7955         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7956         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7957         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7958         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7959         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7960         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7961         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7962         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7963         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7964         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7965         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7966         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7967         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7968         * unittests/basic_string_view/operators/char/2.cc: New file.
7969         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7970         * unittests/basic_string_view/range_access/char/1.cc: New file.
7971         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7972         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7973         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7974         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7975         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7976         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7977         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7978         * unittests/basic_string_view/typedefs.cc: New file.
7979         * unittests/basic_string_view/types/1.cc: New file.
7980
7981 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7982
7983         * common/gdb_string_view.h: Remove libstdc++ implementation
7984         details, adjust to gdb reality.
7985         * common/gdb_string_view.tcc: Likewise.
7986         * cli/cli-script.c (struct string_view): Remove.
7987         (user_args) <m_args>: Change element type to gdb::string_view.
7988         (user_args::insert_args): Adjust.
7989
7990 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7991
7992         * common/gdb_string_view.h: New file.
7993         * common/gdb_string_view.tcc: New file.
7994
7995 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7996
7997         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7998         * configure: Re-generate.
7999
8000 2018-04-09  Pedro Alves  <palves@redhat.com>
8001
8002         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8003         (set_target_gdbarch): Call
8004         gdb::observers::architecture_changed.notify instead of
8005         observer_notify_architecture_changed.
8006
8007 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8008
8009         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8010         (do_restore_current_traceframe_cleanup): Remove.
8011         (restore_current_traceframe_cleanup_dtor): Remove.
8012         (make_cleanup_restore_current_traceframe): Remove.
8013         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8014         New.
8015         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8016         * infrun.c (fetch_inferior_event): Use
8017         scoped_restore_current_traceframe.
8018
8019 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8020
8021         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8022         Remove.
8023         <n_allocated_type_units>: Remove.
8024         <all_type_units>: Change to std::vector.
8025         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8026         to std::vector change.
8027         (dwarf2_per_objfile::get_cutu): Likewise.
8028         (dwarf2_per_objfile::get_tu): Likewise.
8029         (create_signatured_type_table_from_index): Likewise.
8030         (create_signatured_type_table_from_debug_names): Likewise.
8031         (dw2_symtab_iter_next): Likewise.
8032         (dw2_print_stats): Likewise.
8033         (dw2_expand_all_symtabs): Likewise.
8034         (dw2_expand_marked_cus): Likewise.
8035         (dw2_debug_names_iterator::next): Likewise.
8036         (dwarf2_initialize_objfile): Likewise.
8037         (add_signatured_type_cu_to_table): Likewise.
8038         (create_all_type_units): Likewise.
8039         (add_type_unit): Likewise.
8040         (struct tu_abbrev_offset): Add constructor.
8041         (build_type_psymtabs_1): Adjust to std::vector change.
8042         (print_tu_stats): Likewise.
8043         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8044         (write_debug_names): Likewise.
8045
8046 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8047
8048         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8049         Make an std::vector.
8050         <n_comp_units>: Remove.
8051         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8052         to std::vector change.
8053         (dwarf2_per_objfile::get_cutu): Likewise.
8054         (dwarf2_per_objfile::get_cu): Likewise.
8055         (create_cus_from_index): Likewise.
8056         (create_addrmap_from_index): Likewise.
8057         (create_addrmap_from_aranges): Likewise.
8058         (dwarf2_read_index): Likewise.
8059         (dw2_find_last_source_symtab): Likewise.
8060         (dw2_map_symtabs_matching_filename): Likewise.
8061         (dw2_symtab_iter_next): Likewise.
8062         (dw2_print_stats): Likewise.
8063         (dw2_expand_all_symtabs): Likewise.
8064         (dw2_expand_symtabs_with_fullname): Likewise.
8065         (dw2_expand_marked_cus): Likewise.
8066         (dw2_map_symbol_filenames): Likewise.
8067         (create_cus_from_debug_names): Likewise.
8068         (dwarf2_read_debug_names): Likewise.
8069         (dw2_debug_names_iterator::next): Likewise.
8070         (dwarf2_initialize_objfile): Likewise.
8071         (set_partial_user): Likewise.
8072         (dwarf2_build_psymtabs_hard): Likewise.
8073         (read_comp_units_from_section): Remove arguments, adjust to
8074         std::vector change.
8075         (create_all_comp_units): Adjust to std::vector and
8076         read_comp_units_from_section changes.
8077         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8078         change.
8079         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8080         (psyms_seen_size): Likewise.
8081         (write_gdbindex): Likewise.
8082         (write_debug_names): Likewise.
8083
8084 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8085
8086         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8087         with dwarf2_per_objfile.
8088         (create_cus_from_index): Likewise.
8089         (create_signatured_type_table_from_index): Likewise.
8090         (dwarf2_read_index): Likewise.
8091         (dwarf2_initialize_objfile): Likewise.
8092         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8093         per_cu rather than get_dwarf2_per_objfile.
8094
8095 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8096
8097         * dwarf2read.h (struct signatured_type): Forward declare.
8098         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8099         New methods.
8100         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8101         (dw2_get_cutu): ...this.
8102         (dwarf2_per_objfile::get_cu): Rename from...
8103         (dw2_get_cu): ...this.
8104         (dwarf2_per_objfile::get_tu): New.
8105         (create_addrmap_from_index): Adjust.
8106         (create_addrmap_from_aranges): Adjust.
8107         (dw2_find_last_source_symtab): Adjust.
8108         (dw2_map_symtabs_matching_filename): Adjust.
8109         (dw2_symtab_iter_next): Adjust.
8110         (dw2_print_stats): Adjust.
8111         (dw2_expand_all_symtabs): Adjust.
8112         (dw2_expand_symtabs_with_fullname): Adjust.
8113         (dw2_expand_marked_cus): Adjust.
8114         (dw_expand_symtabs_matching_file_matcher): Adjust.
8115         (dw2_map_symbol_filenames): Adjust.
8116         (dw2_debug_names_iterator::next): Adjust.
8117         (dwarf2_initialize_objfile): Adjust.
8118         (set_partial_user): Adjust.
8119         (dwarf2_build_psymtabs_hard): Adjust.
8120
8121 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8122
8123         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8124         Remove unused variables.
8125         (dw2_map_symtabs_matching_filename): Likewise.
8126         (dwarf2_record_block_ranges): Likewise.
8127         (dwarf2_read_addr_index): Likewise.
8128         (follow_die_offset): Likewise.
8129
8130 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8131
8132         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8133         to symbol_file_add_main.
8134
8135 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8136
8137         PR mi/22299
8138         * mi/mi-console.c (do_fputc_async_safe): New.
8139         (mi_console_file::write_async_safe): New.
8140         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8141         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8142         New.
8143         * ui-file.c (ui_file::putstrn): Adjust call to
8144         fputstrn_unfiltered.
8145         * utils.c (printchar): Replace do_fputs and do_fprintf
8146         parameters by do_fputc.
8147         (fputstr_filtered): Adjust call to printchar.
8148         (fputstr_unfiltered): Likewise.
8149         (fputstrn_filtered): Likewise.
8150         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8151         printchar.
8152         * utils.h (do_fputc_ftype): New typedef.
8153         (fputstrn_unfiltered): Add do_fputc parameter.
8154
8155 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8156
8157         * regformats/i386/i386-avx.dat: Remove.
8158
8159 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8160
8161         PR gdb/22979
8162         * amd64-tdep.c (amd64_none_init_abi): New function.
8163         (amd64_x32_none_init_abi): New function.
8164         (_initialize_amd64_tdep): Register handlers for x86-64 and
8165         x64_32 with GDB_OSABI_NONE.
8166         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8167         GDB_OSABI_NONE osabi.
8168
8169 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8170
8171         PR gdb/22980
8172         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8173         GDB_OSABI_NONE.
8174         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8175         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8176
8177 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8178
8179         * common/byte-vector.h (char_vector): New type.
8180         * target.h (target_read_alloc): Return
8181         gdb::optional<byte_vector>.
8182         (target_read_stralloc): Return gdb::optional<char_vector>.
8183         (target_get_osdata): Return gdb::optional<char_vector>.
8184         * target.c (target_read_alloc_1): Templatize.  Replacement
8185         manual memory management with vector.
8186         (target_read_alloc): Change return type, adjust.
8187         (target_read_stralloc): Change return type, adjust.
8188         (target_get_osdata): Change return type, adjust.
8189         * auxv.c (struct auxv_info) <length>: Remove.
8190         <data>: Change type to gdb::optional<byte_vector>.
8191         (auxv_inferior_data_cleanup): Free auxv_info with delete.
8192         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8193         (target_auxv_search): Adjust.
8194         (fprint_target_auxv): Adjust.
8195         * avr-tdep.c (avr_io_reg_read_command): Adjust.
8196         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8197         (linux_make_corefile_notes): Adjust.
8198         * osdata.c (get_osdata): Adjust.
8199         * remote.c (remote_get_threads_with_qxfer): Adjust.
8200         (remote_memory_map): Adjust.
8201         (remote_traceframe_info): Adjust.
8202         (btrace_read_config): Adjust.
8203         (remote_read_btrace): Adjust.
8204         (remote_pid_to_exec_file): Adjust.
8205         * solib-aix.c (solib_aix_get_library_list): Adjust.
8206         * solib-dsbt.c (decode_loadmap): Don't free buf.
8207         (dsbt_get_initial_loadmaps): Adjust.
8208         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8209         * solib-target.c (solib_target_current_sos): Adjust.
8210         * tracepoint.c (sdata_make_value): Adjust.
8211         * xml-support.c (xinclude_start_include): Adjust.
8212         (xml_fetch_content_from_file): Adjust.
8213         * xml-support.h (xml_fetch_another): Change return type.
8214         (xml_fetch_content_from_file): Change return type.
8215         * xml-syscall.c (xml_init_syscalls_info): Adjust.
8216         * xml-tdesc.c (file_read_description_xml): Adjust.
8217         (fetch_available_features_from_target): Change return type.
8218         (target_fetch_description_xml): Adjust.
8219         (target_read_description_xml): Adjust.
8220
8221 2018-04-06  Tom Tromey  <tom@tromey.com>
8222
8223         * value.c (~value): Update.
8224         (struct value) <contents>: Now unique_xmalloc_ptr.
8225         (value_contents_bits_eq, allocate_value_contents)
8226         (value_contents_raw, value_contents_all_raw)
8227         (value_contents_for_printing, value_contents_for_printing_const)
8228         (set_value_enclosing_type): Update.
8229
8230 2018-04-06  Tom Tromey  <tom@tromey.com>
8231
8232         * value.c (range_s): Remove typedef, VEC.
8233         (struct range): Add operator<.
8234         (range_lessthan): Remove.
8235         (ranges_contain): Change type.
8236         (~value): Update.
8237         (struct value) <unavailable, optimized_out>: Now std::vector.
8238         (value_entirely_available)
8239         (value_entirely_covered_by_range_vector)
8240         (value_entirely_unavailable, value_entirely_optimized_out):
8241         Update.
8242         (insert_into_bit_range_vector): Change argument type.
8243         (find_first_range_overlap): Likewise.
8244         (struct ranges_and_idx, value_contents_bits_eq)
8245         (require_not_optimized_out, require_available): Update.
8246         (ranges_copy_adjusted): Change argument types.
8247         (value_optimized_out, value_copy, value_fetch_lazy): Update.
8248
8249 2018-04-06  Tom Tromey  <tom@tromey.com>
8250
8251         * value.c (~value): Update.
8252         (struct value) <parent>: Now a value_ref_ptr.
8253         (value_parent, set_value_parent, value_address, value_copy):
8254         Update.
8255
8256 2018-04-06  Tom Tromey  <tom@tromey.com>
8257
8258         * value.c (struct value): Add constructor, destructor, and member
8259         initializers.
8260         (allocate_value_lazy, value_decref): Update.
8261
8262 2018-04-06  Tom Tromey  <tom@tromey.com>
8263
8264         * value.c (struct value) <released, next>: Remove.
8265         (all_values): Now a std::vector.
8266         (allocate_value_lazy): Update.
8267         (value_next): Remove.
8268         (value_mark, value_free_to_mark, release_value)
8269         (value_release_to_mark): Update.
8270
8271 2018-04-06  Tom Tromey  <tom@tromey.com>
8272
8273         * value.h (fetch_subexp_value, value_release_to_mark): Update.
8274         (free_value_chain): Remove.
8275         * value.c (free_value_chain): Remove.
8276         (value_release_to_mark): Return a std::vector.
8277         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8278         std::vector.
8279         (check_condition): Update.
8280         * eval.c (fetch_subexp_value): Change "val_chain" to a
8281         std::vector.
8282         * breakpoint.c (update_watchpoint): Update.
8283         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8284
8285 2018-04-06  Tom Tromey  <tom@tromey.com>
8286
8287         * value.h (free_all_values): Remove.
8288         * value.c (free_all_values): Remove.
8289
8290 2018-04-06  Tom Tromey  <tom@tromey.com>
8291
8292         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8293         (value_history_chain, value_history_count): Remove.
8294         (value_history): New global.
8295         (record_latest_value, access_value_history, show_values)
8296         (preserve_values): Update.
8297
8298 2018-04-06  Tom Tromey  <tom@tromey.com>
8299
8300         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8301         * varobj.c (varobj_set_display_format, varobj_set_value)
8302         (install_default_visualizer, construct_visualizer)
8303         (install_new_value, ~varobj, varobj_get_value_type)
8304         (my_value_of_variable, varobj_editable_p): Update.
8305         * c-varobj.c (c_describe_child, c_value_of_variable)
8306         (cplus_number_of_children, cplus_describe_child): Update.
8307         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8308         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8309         (ada_value_of_variable, ada_value_is_changeable_p): Update.
8310
8311 2018-04-06  Tom Tromey  <tom@tromey.com>
8312
8313         * printcmd.c (last_examine_address): Change type to
8314         value_ref_ptr.
8315         (do_examine, x_command): Update.
8316
8317 2018-04-06  Tom Tromey  <tom@tromey.com>
8318
8319         * value.c (release_value): Update.
8320         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8321         (struct bpstats) <val>: Now a value_ref_ptr.
8322         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8323         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8324         (~watchpoint, print_it_watchpoint, watch_command_1)
8325         (invalidate_bp_value_on_memory_change): Update.
8326
8327 2018-04-06  Tom Tromey  <tom@tromey.com>
8328
8329         * varobj.c (varobj_clear_saved_item)
8330         (update_dynamic_varobj_children, install_new_value, ~varobj):
8331         Update.
8332         * value.h (value_incref): Move declaration earlier.
8333         (value_decref): Rename from value_free.
8334         (struct value_ref_policy): New.
8335         (value_ref_ptr): New typedef.
8336         (struct value_deleter): Remove.
8337         (gdb_value_up): Remove typedef.
8338         (release_value): Change return type.
8339         (release_value_or_incref): Remove.
8340         * value.c (set_value_parent): Update.
8341         (value_incref): Change return type.
8342         (value_decref): Rename from value_free.
8343         (value_free_to_mark, free_all_values, free_value_chain): Update.
8344         (release_value): Return value_ref_ptr.
8345         (release_value_or_incref): Remove.
8346         (record_latest_value, set_internalvar, clear_internalvar):
8347         Update.
8348         * stack.c (info_frame_command): Don't call value_free.
8349         * python/py-value.c (valpy_dealloc, valpy_new)
8350         (value_to_value_object): Update.
8351         * printcmd.c (do_examine): Update.
8352         * opencl-lang.c (lval_func_free_closure): Update.
8353         * mi/mi-main.c (register_changed_p): Don't call value_free.
8354         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8355         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8356         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8357         value_free.
8358         * guile/scm-value.c (vlscm_free_value_smob)
8359         (vlscm_scm_from_value): Update.
8360         * frame.c (frame_register_unwind, frame_unwind_register_signed)
8361         (frame_unwind_register_unsigned, get_frame_register_bytes)
8362         (put_frame_register_bytes): Don't call value_free.
8363         * findvar.c (address_from_register): Don't call value_free.
8364         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8365         * dwarf2loc.c (entry_data_value_free_closure)
8366         (value_of_dwarf_reg_entry, free_pieced_value_closure)
8367         (dwarf2_evaluate_loc_desc_full): Update.
8368         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8369         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8370         (~watchpoint, watch_command_1)
8371         (invalidate_bp_value_on_memory_change): Update.
8372         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8373
8374 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
8375
8376         PR gdb/23022
8377         * warning.m4: Add -Wno-error=deprecated-register.
8378         * configure: Re-generate.
8379
8380 2018-04-05  Tom Tromey  <tom@tromey.com>
8381
8382         * linespec.h: Remove include of "vec.h".
8383
8384 2018-04-05  Tom Tromey  <tom@tromey.com>
8385
8386         * linespec.c (typep): Remove typedef.
8387         (find_methods, find_superclass_methods): Take a std::vector.
8388         (find_method): Use std::vector.
8389
8390 2018-04-05  Tom Tromey  <tom@tromey.com>
8391
8392         * utils.c (compare_strings): Remove.
8393         * utils.h (compare_strings): Remove.
8394         * objc-lang.h (find_imps): Update.
8395         * objc-lang.c (find_methods): Take a std::vector.
8396         (uniquify_strings, find_imps): Likewise.
8397         * linespec.c (find_methods): Take a std::vector.
8398         (decode_objc): Use std::vector.
8399         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8400         a std::vector.
8401         (find_method, find_function_symbols): Use std::vector.
8402
8403 2018-04-05  Tom Tromey  <tom@tromey.com>
8404
8405         * completer.c (completion_tracker::completion_tracker): Remove
8406         cast.
8407         (completion_tracker::discard_completions): Likewise.
8408         * breakpoint.c (ambiguous_names_p): Remove cast.
8409         * ada-lang.c (_initialize_ada_language): Remove cast.
8410         * utils.h (streq): Update.
8411         (streq_hash): Add new declaration.
8412         * utils.c (streq): Return bool.
8413         (streq_hash): New function.
8414
8415 2018-04-05  Tom Tromey  <tom@tromey.com>
8416
8417         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8418         Remove a string copy.
8419
8420 2018-04-05  Tom Tromey  <tom@tromey.com>
8421
8422         * linespec.c (filter_results): Use std::vector.
8423         (decode_line_2, decode_line_full): Update.
8424
8425 2018-04-05  Tom Tromey  <tom@tromey.com>
8426
8427         * linespec.c (canonical_to_fullform): Return std::string.
8428         (filter_results): Update.
8429         (struct decode_line_2_item): Add constructor.
8430         <fullform, displayform>: Now std::string.
8431         (decode_line_2_compare_items): Now a std::sort comparator.
8432         (decode_line_2): Update.
8433
8434 2018-04-05  Tom Tromey  <tom@tromey.com>
8435
8436         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8437         (unexpected_linespec_error): Update.
8438         (linespec_parse_basic, parse_linespec): Update.
8439
8440 2018-04-05  Tom Tromey  <tom@tromey.com>
8441
8442         * linespec.c (linespec_parse_basic): Reindent.
8443
8444 2018-04-05  Tom Tromey  <tom@tromey.com>
8445
8446         * minsyms.h (iterate_over_minimal_symbols): Update.
8447         * minsyms.c (iterate_over_minimal_symbols): Take a
8448         gdb::function_view.
8449         * linespec.c (struct collect_minsyms): Remove.
8450         (compare_msyms): Now a std::sort comparator.
8451         (add_minsym): Add parameters.
8452         (search_minsyms_for_name): Update.  Use std::vector.
8453
8454 2018-04-03  Tom Tromey  <tom@tromey.com>
8455
8456         * mipsread.c (read_alphacoff_dynamic_symtab): Use
8457         gdb::byte_vector.
8458
8459 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
8460
8461         * MAINTAINERS (Write After Approval): Add Weimin Pan.
8462
8463 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
8464
8465         PR gdb/16959
8466         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
8467         printing static type.
8468
8469 2018-04-01  Tom Tromey  <tom@tromey.com>
8470
8471         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8472         (rs6000_xfer_shared_libraries): Update.
8473
8474 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
8475
8476         * common/gdb_vecs.h (char_ptr): Remove.
8477         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8478
8479 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8480
8481         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8482         with std::vector.
8483         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8484
8485 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
8486
8487         * tracepoint.h (struct uploaded_tp): Initialize fields.
8488         <actions, step_actions, cmd_strings>: Change type to
8489         std::vector<char *>.
8490         * tracepoint.c (get_uploaded_tp): Allocate with new.
8491         (free_uploaded_tps): Free with delete.
8492         (parse_tracepoint_definition): Adjust to std::vector change.
8493         * breakpoint.c (read_uploaded_action): Likewise.
8494         (create_tracepoint_from_upload): Likewise.
8495         * ctf.c (ctf_write_uploaded_tp): Likewise.
8496         (SET_ARRAY_FIELD): Likewise.
8497         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8498
8499 2018-03-30  Tom Tromey  <tom@tromey.com>
8500
8501         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
8502         std::unique_ptr.
8503         (svr4_keep_data_in_core): Update.
8504         (svr4_read_so_list): Update.
8505
8506 2018-03-30  Tom Tromey  <tom@tromey.com>
8507
8508         * windows-nat.c (handle_output_debug_string, handle_exception):
8509         Update.
8510         * target.h (target_read_string): Update.
8511         * target.c (target_read_string): Change "string" to
8512         unique_xmalloc_ptr.
8513         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8514         Update.
8515         * solib-frv.c (frv_current_sos): Update.
8516         * solib-dsbt.c (dsbt_current_sos): Update.
8517         * solib-darwin.c (darwin_current_sos): Update.
8518         * linux-thread-db.c (inferior_has_bug): Update.
8519         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8520         Update.  Remove alloca.
8521         * ada-lang.c (ada_main_name): Update.
8522
8523 2018-03-30  Tom Tromey  <tom@tromey.com>
8524
8525         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8526         (struct dwo_file_deleter): New.
8527         (dwo_file_up): New typedef.
8528         (open_and_init_dwo_file): Use dwo_file_up.
8529         (free_dwo_file_cleanup): Remove.
8530
8531 2018-03-30  Tom Tromey  <tom@tromey.com>
8532
8533         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8534         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8535
8536 2018-03-30  Tom Tromey  <tom@tromey.com>
8537
8538         * dwarf2read.c (class free_cached_comp_units): New class.
8539         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8540         (free_cached_comp_units): Remove function.
8541
8542 2018-03-30  Tom Tromey  <tom@tromey.com>
8543
8544         * utils.h (make_cleanup_unpush_target): Remove.
8545         * inf-ptrace.c (struct target_unpusher): New.
8546         (target_unpush_up) New typedef.
8547         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8548         target_unpush_up.
8549         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8550
8551 2018-03-27  Tom Tromey  <tom@tromey.com>
8552
8553         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8554
8555 2018-03-27  Pedro Alves  <palves@redhat.com>
8556             Tom Tromey  <tom@tromey.com>
8557
8558         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8559         destructor.  Now a class.
8560         (gdb_readline_wrapper_cleanup): Remove function.
8561         (gdb_readline_wrapper): Remove cleanups.
8562
8563 2018-03-27  Tom Tromey  <tom@tromey.com>
8564
8565         * typeprint.h (struct type_print_options) <local_typedefs,
8566         global_typedefs>: Remove "struct" keyword.
8567         (class typedef_hash_table): New class.
8568         (recursively_update_typedef_hash, add_template_parameters)
8569         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8570         (find_typedef_in_hash): Don't declare.
8571         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8572         (typedef_hash_table::recursively_update): Rename from
8573         recursively_update_typedef_hash.  Now a member.
8574         (typedef_hash_table::add_template_parameters): Rename from
8575         add_template_parameters.  Now a member.
8576         (typedef_hash_table::typedef_hash_table): Now a constructor;
8577         rename from create_typedef_hash.
8578         (typedef_hash_table::~typedef_hash_table): Now a destructor;
8579         rename from free_typedef_hash.
8580         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8581         (do_free_global_table): Remove.
8582         (typedef_hash_table::typedef_hash_table): New constructor; renamed
8583         from copy_type_recursive.
8584         (create_global_typedef_table): Remove.
8585         (typedef_hash_table::find_global_typedef): Now a member of
8586         typedef_hash_table.
8587         (typedef_hash_table::find_typedef): Rename from
8588         find_typedef_in_hash; now a member.
8589         (whatis_exp): Update.
8590         * extension.h (struct ext_lang_type_printers): Add constructor and
8591         destructor.
8592         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8593         declare.
8594         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8595         Now a constructor; rename from start_ext_lang_type_printers.
8596         (ext_lang_type_printers): Now a destructor; rename from
8597         free_ext_lang_type_printers.
8598         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8599         Update.
8600         (c_type_print_base_struct_union): Update.  Remove cleanups.
8601
8602 2018-03-27  Tom Tromey  <tom@tromey.com>
8603
8604         * dwarf-index-write.c: Include <cmath>.
8605
8606 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8607
8608         * NEWS: Add entry describing new "set|show varsize-limit" command.
8609         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8610         command.
8611         * printcmd.c (_initialize_printcmd): Add "set var" alias of
8612         "set variable".
8613
8614 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
8615
8616         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8617         dwarf-index-write.c
8618         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8619         * dwarf-index-common.c: New file.
8620         * dwarf-index-common.h: New file.
8621         * dwarf-index-write.c: New file.
8622         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8623         (struct dwarf2_section_info): Move from here.
8624         (dwarf2_section_info_def): Likewise.
8625         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8626         (offset_type): Likewise.
8627         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8628         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8629         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8630         (byte_swap): Likewise.
8631         (MAYBE_SWAP): Likewise.
8632         (dwarf2_per_cu_ptr): Likewise.
8633         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8634         (struct tu_stats): Likewise.
8635         (struct dwarf2_per_objfile): Likewise.
8636         (struct dwarf2_per_cu_data): Likewise.
8637         (struct signatured_type): Likewise.
8638         (sig_type_ptr): Likewise.
8639         (DEF_VEC_P (sig_type_ptr)): Likewise.
8640         (INDEX4_SUFFIX): Likewise.
8641         (INDEX5_SUFFIX): Likewise.
8642         (DEBUG_STR_SUFFIX): Likewise.
8643         (dwarf2_read_section): Make non-static.
8644         (mapped_index_string_hash): Move from here.
8645         (dwarf5_djb_hash): Likewise.
8646         (file_write): Likewise.
8647         (class data_buf): Likewise.
8648         (struct symtab_index_entry): Likewise.
8649         (struct mapped_symtab): Likewise.
8650         (find_slot): Likewise.
8651         (hash_expand): Likewise.
8652         (add_index_entry): Likewise.
8653         (uniquify_cu_indices): Likewise.
8654         (class c_str_view): Likewise.
8655         (class c_str_view_hasher): Likewise.
8656         (class vector_hasher): Likewise.
8657         (write_hash_table): Likewise.
8658         (psym_index_map): Likewise.
8659         (struct addrmap_index_data): Likewise.
8660         (add_address_entry): Likewise.
8661         (add_address_entry_worker): Likewise.
8662         (write_address_map): Likewise.
8663         (symbol_kind): Likewise.
8664         (write_psymbols): Likewise.
8665         (struct signatured_type_index_data): Likewise.
8666         (write_one_signatured_type): Likewise.
8667         (recursively_count_psymbols): Likewise.
8668         (recursively_write_psymbols): Likewise.
8669         (class debug_names): Likewise.
8670         (check_dwarf64_offsets): Likewise.
8671         (psyms_seen_size): Likewise.
8672         (write_gdbindex): Likewise.
8673         (write_debug_names): Likewise.
8674         (assert_file_size): Likewise.
8675         (write_psymtabs_to_index): Likewise.
8676         (save_gdb_index_command): Likewise.
8677         (_initialize_dwarf2_read): Don't register the "save gdb-index"
8678         command.
8679         * dwarf2read.h: New file.
8680
8681 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
8682
8683         PR gdb/22670
8684         * dwarf2read.c (dwarf2_physname): Do not return the demangled
8685         symbol name if the CU's language stores symbol names in linkage
8686         format.
8687         * language.h (struct language_defn)
8688         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
8689         all instances of this struct.
8690
8691 2018-03-26  Tom Tromey  <tom@tromey.com>
8692
8693         * stack.c (backtrace_command_1): Remove verbose code.
8694
8695 2018-03-26  Tom Tromey  <tom@tromey.com>
8696
8697         * python/py-framefilter.c (py_print_type): Don't catch
8698         exceptions.  Return void.
8699         (py_print_value): Likewise.
8700         (py_print_single_arg): Likewise.
8701         (enumerate_args): Don't catch exceptions.
8702         (py_print_args): Likewise.
8703         (py_print_frame): Likewise.
8704         (gdbpy_apply_frame_filter): Catch exceptions here.
8705
8706 2018-03-26  Tom Tromey  <tom@tromey.com>
8707
8708         * stack.c (_initialize_stack): Remove trailing newlines from help
8709         text.  Add "Usage" line to "backtrace" help.
8710
8711 2018-03-26  Tom Tromey  <tom@tromey.com>
8712
8713         PR python/16486:
8714         * python/py-framefilter.c (py_print_args): Call wrap_hint.
8715
8716 2018-03-26  Tom Tromey  <tom@tromey.com>
8717
8718         * python/py-framefilter.c (py_print_single_arg): Return
8719         EXT_LANG_BT_ERROR from catch.
8720
8721 2018-03-26  Tom Tromey  <tom@tromey.com>
8722
8723         PR backtrace/15584:
8724         * stack.c (backtrace_command_1): Move some code into no-filters
8725         "if".
8726
8727 2018-03-26  Tom Tromey  <tom@tromey.com>
8728
8729         * python/py-framefilter.c (throw_quit_or_print_exception): New
8730         function.
8731         (gdbpy_apply_frame_filter): Use it.
8732
8733 2018-03-26  Tom Tromey  <tom@tromey.com>
8734
8735         PR cli/17716:
8736         * python/py-framefilter.c (py_print_type, py_print_value)
8737         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8738         RETURN_MASK_ERROR.
8739
8740 2018-03-26  Tom Tromey  <tom@tromey.com>
8741
8742         * python/py-framefilter.c (enumerate_args): Use
8743         gdb::unique_xmalloc_ptr.
8744
8745 2018-03-26  Tom Tromey  <tom@tromey.com>
8746
8747         * python/py-framefilter.c (py_print_frame): Return
8748         EXT_LANG_BT_OK.
8749         (gdbpy_apply_frame_filter): Update comment.
8750         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8751         Remove.
8752         <EXT_LANG_BT_NO_FILTERS>: Change value.
8753
8754 2018-03-26  Tom Tromey  <tom@tromey.com>
8755
8756         PR backtrace/15582:
8757         * stack.c (backtrace_command): Parse "hide" argument.
8758         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8759         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8760         constant.
8761
8762 2018-03-26  Tom Tromey  <tom@tromey.com>
8763
8764         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8765         add "flags".
8766         (backtrace_command): Remove "fulltrace", add "flags".
8767
8768 2018-03-26  Tom Tromey  <tom@tromey.com>
8769
8770         * stack.c (backtrace_command): Rewrite command line parsing.
8771
8772 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8773
8774         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8775
8776 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
8777
8778         * filename-seen-cache.h: Add include guard.
8779
8780 2018-03-26  Keith Seitz  <keiths@redhat.com>
8781
8782         * symfile.c (place_section): Remove "struct" from section_addr_info
8783         in comment.
8784         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8785         "struct" keyword from section_addr_info.
8786
8787 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
8788
8789         * regformats/regdef.h (reg): Add constructors.
8790
8791 2018-03-25  Pedro Alves  <palves@redhat.com>
8792
8793         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8794         if then/else bodies in var_func_name extraction.
8795
8796 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
8797
8798         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8799         lookup_minimal_symbol() to find symbol entry.
8800         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8801
8802 2018-03-23  Keith Seitz  <keiths@redhat.com>
8803
8804         PR c++/22968
8805         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8806         nested type definitions for C++, too.
8807
8808 2018-03-23  Tom Tromey  <tom@tromey.com>
8809
8810         * machoread.c (struct oso_el): Add a constructor.  Don't define as
8811         a typedef.
8812         (macho_register_oso): Remove.
8813         (macho_symtab_read): Take a std::vector.
8814         (oso_el_compare_name): Now a std::sort comparator.
8815         (macho_symfile_read_all_oso): Take a std::vector.
8816         (macho_symfile_read): Use std::vector.  Remove cleanups.
8817
8818 2018-03-22  Tom Tromey  <tom@tromey.com>
8819
8820         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8821         (record_full_goto_bookmark): Use std::string.
8822
8823 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8824
8825         PR tdep/18295
8826         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8827         a single mask.
8828
8829 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8830
8831         * rs6000-tdep.c (store_insn_p): New function.
8832         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8833         and cr_reg to their unshifted values. Use store_insn_p to
8834         match LR saves using either R1 or fdata->alloca_reg. Use
8835         store_insn_p to match CR saves. Set alloca_reg_offset
8836         when alloca_reg and framep are set. Remove lr_reg shift
8837         when assigning to fdata->lr_register.
8838
8839 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8840
8841         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8842         command line args instead of emitting a warning.
8843
8844 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8845
8846         * tracepoint.h (struct static_tracepoint_marker): Initialize
8847         fields, define default constructor, move constructor and move
8848         assignment, disable the rest.
8849         <str_id, extra>: Make std::string.
8850         (release_static_tracepoint_marker): Remove.
8851         (free_current_marker): Remove.
8852         * tracepoint.c (free_current_marker): Remove.
8853         (parse_static_tracepoint_marker_definition): Adjust to
8854         std::string, use new hex2str overload.
8855         (release_static_tracepoint_marker): Remove.
8856         (print_one_static_tracepoint_marker): Get marker by reference
8857         and adjust to std::string.
8858         (info_static_tracepoint_markers_command): Adjust to std::vector
8859         changes
8860         * target.h (static_tracepoint_marker_p): Remove typedef.
8861         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8862         (struct target_ops) <to_static_tracepoint_marker_at>: Return
8863         bool.
8864         <to_static_tracepoint_markers_by_strid>: Return std::vector.
8865         * target-debug.h
8866         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8867         (target_debug_print_std_vector_static_tracepoint_marker): New.
8868         (target_debug_print_struct_static_tracepoint_marker_p): Rename
8869         to...
8870         (target_debug_print_static_tracepoint_marker_p): ... this.
8871         * target-delegates.c: Re-generate.
8872         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8873         Make std::string.
8874         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8875         (decode_static_tracepoint_spec): Adjust to std::vector.
8876         (tracepoint_print_one_detail): Adjust to std::string.
8877         (strace_marker_decode_location): Adjust to std::string.
8878         (update_static_tracepoint): Adjust to std::string, remove call
8879         to release_static_tracepoint_marker.
8880         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8881         Adjust to std::vector.
8882         * remote.c (remote_static_tracepoint_marker_at): Return bool.
8883         (remote_static_tracepoint_markers_by_strid): Adjust to
8884         std::vector.
8885         * common/rsp-low.h (hex2str): New overload with explicit count
8886         of bytes.
8887         * common/rsp-low.c (hex2str): New overload with explicit count
8888         of bytes.
8889         * unittests/rsp-low-selftests.c (test_hex2str): New function.
8890         (_initialize_rsp_low_selftests): Add test_hex2str test.
8891         * unittests/tracepoint-selftests.c
8892         (test_parse_static_tracepoint_marker_definition): Adjust to
8893         std::string.
8894
8895 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8896
8897         * tracepoint.c (parse_static_tracepoint_marker_definition):
8898         Consider case where the definition is followed by more
8899         definitions.
8900         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8901         tracepoint-selftests.c.
8902         * unittests/tracepoint-selftests.c: New.
8903
8904 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8905
8906         * MAINTAINERS (Write After Approval): Add Pedro Franco de
8907         Carvalho.
8908
8909 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8910
8911         * symtab.c (find_pc_sect_line): fixed indentation.
8912
8913 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
8914
8915         * symtab.c (find_pc_sect_line): now uses binary search.
8916
8917 2018-03-19  Tom Tromey  <tom@tromey.com>
8918
8919         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8920         "IDENT" production.
8921
8922 2018-03-19  Pedro Alves  <palves@redhat.com>
8923             Tom Tromey  <tom@tromey.com>
8924
8925         * unittests/observable-selftests.c: New file.
8926         * common/observable.h: New file.
8927         * observable.h: New file.
8928         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8929         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8930         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8931         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8932         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8933         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8934         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8935         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8936         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8937         python/py-breakpoint.c, python/py-finishbreakpoint.c,
8938         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8939         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8940         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8941         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8942         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8943         tui/tui-interp.c, valops.c: Update all users.
8944         * tui/tui-hooks.c (tui_bp_created_observer)
8945         (tui_bp_deleted_observer, tui_bp_modified_observer)
8946         (tui_inferior_exit_observer, tui_before_prompt_observer)
8947         (tui_normal_stop_observer, tui_register_changed_observer):
8948         Remove.
8949         (tui_observers_token): New global.
8950         (attach_or_detach, tui_attach_detach_observers): New functions.
8951         (tui_install_hooks, tui_remove_hooks): Use
8952         tui_attach_detach_observers.
8953         * record-btrace.c (record_btrace_thread_observer): Remove.
8954         (record_btrace_thread_observer_token): New global.
8955         * observer.sh: Remove.
8956         * observer.c: Rename to observable.c.
8957         * observable.c (namespace gdb_observers): Define new objects.
8958         (observer_debug): Move into gdb_observers namespace.
8959         (struct observer, struct observer_list, xalloc_observer_list_node)
8960         (xfree_observer_list_node, generic_observer_attach)
8961         (generic_observer_detach, generic_observer_notify): Remove.
8962         (_initialize_observer): Update.
8963         Don't include observer.inc.
8964         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8965         (clean mostlyclean): Likewise.
8966         (observer.h, observer.inc): Remove targets.
8967         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8968         (COMMON_SFILES): Use observable.c, not observer.c.
8969         * .gitignore: Remove observer.h.
8970
8971 2018-03-18  Tom Tromey  <tom@tromey.com>
8972
8973         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8974         gdb::def_vector.
8975         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8976
8977 2018-03-17  Tom Tromey  <tom@tromey.com>
8978
8979         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8980
8981 2018-03-17  Tom Tromey  <tom@tromey.com>
8982
8983         * target.c (class scoped_target_fd): New.
8984         (target_fileio_close_cleanup): Remove.
8985         (target_fileio_read_alloc_1): Use scoped_target_fd.
8986
8987 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8988
8989         * silent-rules.mk: New.
8990         * Makefile.in: Include silent-rules.mk
8991         (srcdir, VPATH, top_srcdir): Move up.
8992         (COMPILE): Add ECHO_CXX.
8993         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8994         (init.c): Add ECHO_INIT_C.
8995         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8996         (version.c): Add ECHO_GEN.
8997         (printcmd.o): Add ECHO_CXX.
8998         (target-float.o): Add ECHO_CXX.
8999         (ada-exp.o): Add ECHO_CXX.
9000         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9001         (insight$(EXEEXT)): Add ECHO_CXXLD.
9002         * gnulib/configure.ac: Add AM_SILENT_RULES.
9003         * gnulib/aclocal.m4: Re-generate.
9004         * gnulib/configure: Re-generate.
9005         * gnulib/import/Makefile.in: Re-generate.
9006
9007 2018-03-16  Tom Tromey  <tom@tromey.com>
9008
9009         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9010         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9011         * utils.c (do_free_section_addr_info)
9012         (make_cleanup_free_section_addr_info): Remove.
9013         * symfile.h (struct other_sections): Add constructor.
9014         (struct section_addr_info): Remove.
9015         (section_addr_info): New typedef.
9016         (struct sym_fns) <sym_offsets>: Change type of parameter.
9017         (build_section_addr_info_from_objfile)
9018         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9019         (default_symfile_offsets, symbol_file_add)
9020         (symbol_file_add_from_bfd)
9021         (build_section_addr_info_from_section_table): Update.
9022         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9023         * symfile.c (alloc_section_addr_info): Remove.
9024         (build_section_addr_info_from_section_table): Change return type.
9025         Update.
9026         (build_section_addr_info_from_bfd)
9027         (build_section_addr_info_from_objfile): Likewise.
9028         (free_section_addr_info): Remove.
9029         (relative_addr_info_to_section_offsets): Change type of "addrs".
9030         (addrs_section_compar): Now a std::sort comparator.
9031         (addrs_section_sort): Change return type.
9032         (addr_info_make_relative): Change type of "addrs".  Update.
9033         (default_symfile_offsets, syms_from_objfile_1)
9034         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9035         (symbol_file_add_separate): Update.
9036         (symbol_file_add): Change type of "addrs".  Update.
9037         (add_symbol_file_command): Update.  Remove cleanups.
9038         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9039         cleanups.
9040         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9041         * solib.c (solib_read_symbols): Update.
9042         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9043         * machoread.c (macho_symfile_offsets): Update.
9044         * jit.c (jit_bfd_try_read_symtab): Update.
9045
9046 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9047
9048         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9049         unittests/utils-selftests.c.
9050         * unittests/utils-selftests.c: New file.
9051
9052 2018-03-14  Tom Tromey  <tom@tromey.com>
9053
9054         PR cli/14977:
9055         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9056         for NULL.
9057
9058 2018-03-14  Tom Tromey  <tom@tromey.com>
9059
9060         PR cli/19918:
9061         * printcmd.c (printf_pointer): Allow "-" in format.
9062
9063 2018-03-14  Tom Tromey  <tom@tromey.com>
9064
9065         * printcmd.c (_initialize_printcmd): Add usage to printf.
9066
9067 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9068
9069         * MAINTAINERS: Update my email address.
9070
9071 2018-03-13  Tom Tromey  <tom@tromey.com>
9072
9073         * machoread.c (macho_check_dsym): Change filenamep to a
9074         std::string*.
9075         (macho_symfile_read): Update.
9076         * symfile.c (load_command): Use std::string.
9077
9078 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9079
9080         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9081         to error message string.
9082         (riscv_register_name): Use xsnprintf instead of sprintf.
9083         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9084         internal_error.
9085         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9086         error.
9087         (riscv_push_dummy_call): Likewise.
9088
9089 2018-03-12  Tom Tromey  <tom@tromey.com>
9090
9091         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9092         Use gdb::byte_vector.
9093         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9094
9095 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9096
9097         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9098         parameter type to readable_regcache.
9099         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9100         the declaration.
9101
9102 2018-03-11  Tom Tromey  <tom@tromey.com>
9103
9104         * dwarf2read.c (struct nextfield): Add initializers.
9105         (struct nextfnfield): Remove.
9106         (struct fnfieldlist): Add initializers.  Remove "length" and
9107         "head", use std::vector.
9108         (struct decl_field_list): Remove.
9109         (struct field_info): Add initializers.
9110         <fields, baseclasses>: Now std::vector.
9111         <nbaseclasses, nfnfields, typedef_field_list_count,
9112         nested_types_list_count>: Remove.
9113         (dwarf2_add_field, dwarf2_add_type_defn)
9114         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9115         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9116         (process_structure_scope): Update.
9117
9118 2018-03-11  Tom Tromey  <tom@tromey.com>
9119
9120         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9121         for use by std::sort.
9122         (build_type_psymtabs_1): Use std::vector.
9123
9124 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9125
9126         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9127         and LIBMPFR in the printed configuration.
9128
9129 2018-03-08  Tom Tromey  <tom@tromey.com>
9130
9131         * source.c (get_filename_and_charpos): Use scoped_fd.
9132         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9133         (procfs_pidlist): Likewise.
9134         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9135         (iterate_over_mappings): Likewise.
9136
9137 2018-03-08  Tom Tromey  <tom@tromey.com>
9138
9139         * infcall.c (struct call_return_meta_info)
9140         <stack_temporaries_enabled>: Remove.
9141         (get_call_return_value, call_function_by_hand_dummy): Update.
9142         * thread.c (disable_thread_stack_temporaries): Remove.
9143         (enable_thread_stack_temporaries): Remove.
9144         (thread_stack_temporaries_enabled_p): Return bool.
9145         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9146         (get_last_thread_stack_temporary): Update.
9147         * eval.c (evaluate_subexp): Update.
9148         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9149         class, not a function.
9150         (value_ptr, value_vec): Remove typedefs.
9151         (class thread_info) <stack_temporaries_enabled>: Now bool.
9152         <stack_temporaries>: Now a std::vector.
9153         (thread_stack_temporaries_enabled_p)
9154         (value_in_thread_stack_temporaries): Return bool.
9155
9156 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9157
9158         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9159         (getpkt_or_notif_sane_1): Likewise.
9160
9161 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9162
9163         * build-id.c (build_id_to_debug_bfd): Use std::string.
9164
9165 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9166
9167         * build-id.c (find_separate_debug_file_by_buildid): Return
9168         std::string.
9169         * build-id.h (find_separate_debug_file_by_buildid): Return
9170         std::string.
9171         * coffread.c (coff_symfile_read): Adjust to std::string.
9172         * elfread.c (elf_symfile_read): Adjust to std::string.
9173         * symfile.c (separate_debug_file_exists): Change parameter to
9174         std::string.
9175         (find_separate_debug_file): Return std::string.
9176         (find_separate_debug_file_by_debuglink): Return std::string.
9177         * symfile.h (find_separate_debug_file_by_debuglink): Return
9178         std::string.
9179
9180 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9181
9182         * common/xml-utils.c (xml_escape_text): Move code to...
9183         (xml_escape_text_append): ... this new function.
9184         * common/xml-utils.h (xml_escape_text_append): New declaration.
9185         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9186         New function.
9187         (_initialize_xml_utils): register test_xml_escape_text_append as
9188         a selftest.
9189
9190 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
9191
9192         * defs.h: Remove MAX_REGISTER_SIZE.
9193         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9194         asserts.
9195         * python/py-unwind.c (pyuw_sniffer): Likewise.
9196
9197 2018-03-07  Tom Tromey  <tom@tromey.com>
9198
9199         * linux-tdep.c (linux_info_proc): Update.
9200         * target.h (struct target_ops) <to_fileio_readlink>: Return
9201         optional<string>.
9202         (target_fileio_readlink): Return optional<string>.
9203         * remote.c (remote_hostio_readlink): Return optional<string>.
9204         * inf-child.c (inf_child_fileio_readlink): Return
9205         optional<string>.
9206         * target.c (target_fileio_readlink): Return optional<string>.
9207
9208 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
9209
9210         * regcache.c (cooked_read_test): Add riscv to the list of
9211         architectures that have a save_reggroup.
9212
9213 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9214
9215         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9216         value is not a dynamic class object.
9217
9218 2018-03-06  Tom Tromey  <tom@tromey.com>
9219
9220         * rust-exp.y: Formatting fixes.
9221
9222 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9223
9224         * riscv-tdep.c (riscv_register_name): Remove target description
9225         support.
9226         (riscv_gdbarch_init): Remove target description check.
9227
9228 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9229
9230         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9231         comment.
9232         * riscv-tdep.h: Likewise.
9233
9234 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9235
9236         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9237         (riscv_pseudo_register_write): Delete.
9238         (riscv_gdbarch_init): Remove all use of pseudo registers.
9239
9240 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9241
9242         * record-btrace.c (btrace_print_lines): Replace cleanup
9243         parameter with RAII equivalents.
9244         (btrace_insn_history): Replace cleanup with RAII equivalents.
9245         * ui-out.h (make_cleanup_ui_out_list_begin_end,
9246         make_cleanup_ui_out_tuple_begin_end): Remove.
9247         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9248         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9249         make_cleanup_ui_out_list_begin_end): Remove.
9250
9251 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9252
9253         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9254         parameter types to std::vector.  Use bool.
9255         (record_btrace_wait): Replace VEC(tp_t) with
9256         std::vector<thread_info *>.
9257         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9258
9259 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9260
9261         * record-btrace.c (record_btrace_disable_callback): Remove.
9262         (struct scoped_btrace_disable): New.
9263         (record_btrace_open): Use scoped_btrace_disable.
9264
9265 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9266
9267         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9268         reading values from registers.
9269
9270 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9271
9272         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9273         where appropriate.
9274
9275 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9276
9277         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9278         change parameter type.  Use GDB's print functions, and use
9279         core_addr_to_string where appropriate.
9280         (riscv_push_dummy_call): Use core_addr_to_string where
9281         appropriate, update call to riscv_print_arg_location, and reindent
9282         a few lines.
9283         (riscv_return_value): Update call to riscv_print_arg_location.
9284
9285 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9286             Tim Newsome <tim@sifive.com>
9287             Albert Ou <a0u@eecs.berkeley.edu>
9288             Darius Rad <darius@bluespec.com>
9289
9290         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9291         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9292         (ALLDEPFILES): Add riscv-tdep.c
9293         * configure.tgt: Add riscv support.
9294         * riscv-tdep.c: New file.
9295         * riscv-tdep.h: New file.
9296         * NEWS: Mention new target.
9297         * MAINTAINERS: Add entry for riscv.
9298
9299 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9300
9301         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9302         fields within aggregates.
9303
9304 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
9305
9306         * record-btrace.c (btrace_print_lines): Change type of flags to
9307         gdb_disassembly_flags.
9308
9309 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9310
9311         * fbsd-nat.c: Include "inf-ptrace.h".
9312         (USE_SIGTRAP_SIGINFO): Conditionally define.
9313         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9314         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9315         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9316         function.
9317         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9318         Likewise.
9319         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9320         Likewise.
9321         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9322         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9323         "supports_stopped_by_hw_breakpoint" target methods.
9324
9325 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9326
9327         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9328         * fbsd-nat.c (debug_fbsd_nat): New variable.
9329         (show_fbsd_nat_debug): New function.
9330         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9331         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9332
9333 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
9334
9335         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9336         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9337         prototype.
9338         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9339         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9340         method.
9341
9342 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9343
9344         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9345         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9346
9347 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9348
9349         * charset.c (struct charset_vector): New.
9350         (charsets): Change type to charset_vector.
9351         (find_charset_names): Adjust.
9352         (add_one): Adjust.
9353         (_initialize_charset): Adjust.
9354
9355 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9356
9357         * progspace.h (struct program_space) <deleted_solibs>: Change
9358         type to std::vector<std::string>.
9359         * progspace.c (clear_program_space_solib_cache): Adjust.
9360         * breakpoint.c (print_solib_event): Adjust.
9361         (check_status_catch_solib): Adjust.
9362         * solib.c (update_solib_list): Adjust.
9363         * ui-out.h (class ui_out) <field_string>: New overload.
9364         * ui-out.c (ui_out::field_string): New overload.
9365
9366 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9367
9368         * progspace.h (struct program_space): Add constructor and
9369         destructor, initialize fields.
9370         (add_program_space): Remove.
9371         * progspace.c (add_program_space): Rename to...
9372         (program_space::program_space): ... this.
9373         (release_program_space): Rename to...
9374         (program_space::~program_space): ... this.
9375         (delete_program_space): Use delete to delete program_space.
9376         (initialize_progspace): Use new to allocate program_space.
9377         * inferior.c (add_inferior_with_spaces): Likewise.
9378         (clone_inferior_command): Likewise.
9379         * infrun.c (follow_fork_inferior): Likewise.
9380         (handle_vfork_child_exec_or_exit): Likewise.
9381
9382 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
9383
9384         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9385         (delim_string_to_char_ptr_vec): Return std::vector of
9386         gdb::unique_xmalloc_ptr.
9387         (dirnames_to_char_ptr_vec_append): Take std::vector of
9388         gdb::unique_xmalloc_ptr.
9389         (dirnames_to_char_ptr_vec): Return std::vector of
9390         gdb::unique_xmalloc_ptr.
9391         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9392         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9393         (delim_string_to_char_ptr_vec): Return an std::vector of
9394         gdb::unique_xmalloc_ptr, adjust the code.
9395         (dirnames_to_char_ptr_vec_append): Take an std::vector of
9396         gdb::unique_xmalloc_ptr, adjust the code.
9397         (dirnames_to_char_ptr_vec): Return an std::vector of
9398         gdb::unique_xmalloc_ptr, adjust the code.
9399         * auto-load.c (auto_load_safe_path_vec): Change type to
9400         std::vector of gdb::unique_xmalloc_ptr.
9401         (auto_load_expand_dir_vars): Return an std::vector of
9402         gdb::unique_xmalloc_ptr, adjust the code.
9403         (auto_load_safe_path_vec_update): Adjust.
9404         (filename_is_in_auto_load_safe_path_vec): Adjust.
9405         (auto_load_objfile_script_1): Adjust.
9406         * build-id.c (build_id_to_debug_bfd): Adjust.
9407         * linux-thread-db.c (thread_db_load_search): Adjust.
9408         * source.c (add_path): Adjust.
9409         (openp): Adjust.
9410         * symfile.c (find_separate_debug_file): Adjust.
9411         * utils.c (do_free_char_ptr_vec): Remove.
9412         (make_cleanup_free_char_ptr_vec): Remove.
9413
9414 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
9415
9416         PR gdb/22907
9417         * common/pathstuff.c: Conditionally include "<windows.h>".
9418
9419 2018-03-01  Georg Sauthoff  <mail@georg.so>
9420
9421         PR gdb/22888
9422         * gcore.in: Quote variables and switch interpreter to bash.
9423
9424 2018-03-01  Tom Tromey  <tom@tromey.com>
9425
9426         * dwarf2read.c (alloc_discriminant_info): Fix default_index
9427         assertion.  Add assertion for discriminant_index.
9428         (quirk_rust_enum): Use correct base type name in univariant case.
9429
9430 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
9431
9432         * record.c (get_call_history_modifiers): Return a
9433         record_print_flags.
9434         (cmd_record_call_history): Adjust.
9435         * record-btrace.c (record_btrace_call_history): Adjust.
9436         (record_btrace_call_history_range): Adjust.
9437         (record_btrace_call_history_from): Adjust.
9438         * target-debug.h (target_debug_print_record_print_flags): New.
9439         * target-delegates.c: Re-generate.
9440         * target.c (target_call_history): Change flags type.
9441         (target_call_history_from): Likewise.
9442         (target_call_history_range): Likewise.
9443         * target.h (struct target_ops) <target_call_history>: Likewise.
9444         (target_call_history_from): Likewise.
9445         (target_call_history_range): Likewise.
9446
9447 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
9448             Simon Marchi  <simon.marchi@polymtl.ca>
9449
9450         * common/common-utils.c: Include "sys/stat.h".
9451         (is_regular_file): Move here from "source.c"; change return
9452         type to "bool".
9453         * common/common-utils.h (is_regular_file): New prototype.
9454         * common/pathstuff.c (contains_dir_separator): New function.
9455         * common/pathstuff.h (contains_dir_separator): New prototype.
9456         * source.c: Don't include "sys/stat.h".
9457         (is_regular_file): Move to "common/common-utils.c".
9458
9459 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
9460
9461         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9462         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9463         * auto-load.c: Include "common/pathstuff.h".
9464         * common/common-def.h (current_directory): Move here.
9465         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9466         function.
9467         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9468         prototype.
9469         * common/pathstuff.c: New file.
9470         * common/pathstuff.h: New file.
9471         * compile/compile.c: Include "common/pathstuff.h".
9472         * defs.h (current_directory): Move to "common/common-defs.h".
9473         * dwarf2read.c: Include "common/pathstuff.h".
9474         * exec.c: Likewise.
9475         * guile/scm-safe-call.c: Likewise.
9476         * linux-thread-db.c: Likewise.
9477         * main.c: Likewise.
9478         * nto-tdep.c: Likewise.
9479         * objfiles.c: Likewise.
9480         * source.c: Likewise.
9481         * symtab.c: Likewise.
9482         * utils.c: Include "common/pathstuff.h".
9483         (gdb_realpath): Move to "common/pathstuff.c".
9484         (gdb_realpath_keepfile): Likewise.
9485         (gdb_abspath): Likewise.
9486         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9487         (gdb_realpath_keepfile): Likewise.
9488         (gdb_abspath): Likewise.
9489
9490 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
9491
9492         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9493         wildcard process pid for super_resume for kernels with a
9494         specific bug.
9495
9496 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
9497
9498         * compile/compile.c (get_args): Add additional comments
9499         explaining function.
9500
9501 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
9502             Tom Tromey  <tom@tromey.com>
9503
9504         * target.h (memory_write_request_s): Remove typedef.  Don't define
9505         VEC.
9506         (target_write_memory_blocks): Change argument to std::vector.
9507         (struct memory_write_request): Add constructor.
9508         * target-memory.c (compare_block_starting_address): Return bool.
9509         Change argument types.
9510         (claim_memory): Change arguments to use std::vector.
9511         (split_regular_and_flash_blocks, blocks_to_erase)
9512         (compute_garbled_blocks): Likewise.
9513         (cleanup_request_data, cleanup_write_requests_vector): Remove.
9514         (target_write_memory_blocks): Change argument to std::vector.
9515         * symfile.c (struct load_section_data): Add constructor and
9516         destructor.  Use std::vector for "requests".
9517         (struct load_progress_data): Add initializers.
9518         (load_section_callback): Update.  Use "new".
9519         (clear_memory_write_data): Remove.
9520         (generic_load): Update.
9521
9522 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
9523
9524         * arch/aarch64.h: Use common/tdesc.h.
9525
9526 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9527
9528         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9529         architecture with a 64-bit ABI.
9530
9531 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
9532
9533         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9534         ahead of target description loading.
9535
9536 2018-02-26  Tom Tromey  <tom@tromey.com>
9537
9538         * stack.c (backtrace_command_1): Update.
9539         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9540         of "flags".
9541         * python/py-framefilter.c (py_print_frame)
9542         (gdbpy_apply_frame_filter): Change type of "flags".
9543         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9544         of "flags".
9545         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9546         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9547         * extension.h (enum frame_filter_flag): Rename from
9548         frame_filter_flags.
9549         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9550         (apply_ext_lang_frame_filter): Change type of "flags".
9551         * extension.c (apply_ext_lang_frame_filter): Change type of
9552         "flags".
9553         * extension-priv.h (struct extension_language_ops)
9554         <apply_frame_filter>: Change type of "flags".
9555
9556 2018-02-26  Tom Tromey  <tom@tromey.com>
9557
9558         PR python/16497:
9559         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
9560         off-by-one in py_end computation.
9561         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9562         PRINT_MORE_FRAMES.
9563         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9564         constant.
9565
9566 2018-02-26  Tom Tromey  <tom@tromey.com>
9567
9568         * dwarf2read.c (struct variant_field): New.
9569         (struct nextfield) <variant>: New field.
9570         (dwarf2_add_field): Handle DW_TAG_variant_part.
9571         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9572         discriminated union.
9573         (read_structure_type): Handle DW_TAG_variant_part.
9574         (handle_struct_member_die): New function, extracted from
9575         process_structure_scope.  Handle DW_TAG_variant.
9576         (process_structure_scope): Handle discriminated unions.  Call
9577         handle_struct_member_die.
9578
9579 2018-02-26  Tom Tromey  <tom@tromey.com>
9580
9581         * rust-lang.h (rust_last_path_segment): Declare.
9582         * rust-lang.c (rust_last_path_segment): Now public.  Change
9583         contract.
9584         (struct disr_info): Remove.
9585         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9586         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9587         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9588         (rust_enum_p, rust_enum_variant): New function.
9589         (rust_underscore_fields): Remove "offset" parameter.
9590         (rust_print_enum): New function.
9591         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9592         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9593         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
9594         enums.
9595         (rust_internal_print_type): New function, from rust_print_type.
9596         Remove enum code.
9597         (rust_print_type): Call rust_internal_print_type.
9598         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9599         Update enum handling.
9600         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9601         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9602         (rust_union_quirks): New functions.
9603         (process_full_comp_unit, process_full_type_unit): Call
9604         rust_union_quirks.
9605         (process_structure_scope): Update rust_unions if necessary.
9606
9607 2018-02-26  Tom Tromey  <tom@tromey.com>
9608
9609         * value.h (value_union_variant): Declare.
9610         * valops.c (value_union_variant): New function.
9611         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9612         (struct discriminant_info): New.
9613         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9614         enumerator.
9615         (struct main_type) <flag_discriminated_union>: New field.
9616
9617 2018-02-26  Tom Tromey  <tom@tromey.com>
9618
9619         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9620         unittests/unpack-selftests.c.
9621         * unittests/unpack-selftests.c: New file.
9622         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9623
9624 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9625
9626         * dwarf2read.c (struct partial_die_info) <read>: New method.
9627         (read_partial_die): Remove the declaration.
9628         (load_partial_dies): Update.
9629         (partial_die_info::partial_die_info):
9630         (read_partial_die): Change it to partial_die_info::read.
9631
9632 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9633
9634         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9635         (fixup_partial_die): Remove declaration.
9636         (scan_partial_symbols): Update.
9637         (partial_die_parent_scope): Likewise.
9638         (partial_die_full_name): Likewise.
9639         (fixup_partial_die): Change it to partial_die_info::fixup.
9640
9641 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9642
9643         * dwarf2read.c (read_partial_die): Update the declaration.
9644         (load_partial_dies): Caller update.
9645         (read_partial_die): Remove one argument abbrev_len.
9646
9647 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9648
9649         * dwarf2read.c (struct partial_die_info): Add ctor, delete
9650         assignment operator.
9651         (load_partial_dies): Use ctor and copy ctor.
9652         (read_partial_die): Update.
9653         (dwarf2_cu::find_partial_die): Use ctor.
9654
9655 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9656
9657         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9658         (find_partial_die_in_comp_unit): Change it to
9659         dwarf2_cu::find_partial_die.
9660         (find_partial_die): Update.
9661
9662 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9663
9664         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9665         is NULL.
9666
9667 2018-02-26  Yao Qi  <yao.qi@linaro.org>
9668
9669         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9670
9671 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
9672
9673         * arch/amd64.h: Use common/tdesc.h.
9674         * arch/i386.c: Likewise.
9675         * arch/i386.h: Likewise.
9676         * arch/tic6x.c: Likewise.
9677         * arch/tdesc.h: Move file from here...
9678         * common/tdesc.h: ...to here.
9679         * features/aarch64-core.c: Regenerate.
9680         * features/aarch64-fpu.c: Regenerate.
9681         * features/i386/32bit-avx.c: Regenerate.
9682         * features/i386/32bit-avx512.c: Regenerate.
9683         * features/i386/32bit-core.c: Regenerate.
9684         * features/i386/32bit-linux.c: Regenerate.
9685         * features/i386/32bit-mpx.c: Regenerate.
9686         * features/i386/32bit-pkeys.c: Regenerate.
9687         * features/i386/32bit-sse.c: Regenerate.
9688         * features/i386/64bit-avx.c: Regenerate.
9689         * features/i386/64bit-avx512.c: Regenerate.
9690         * features/i386/64bit-core.c: Regenerate.
9691         * features/i386/64bit-linux.c: Regenerate.
9692         * features/i386/64bit-mpx.c: Regenerate.
9693         * features/i386/64bit-pkeys.c: Regenerate.
9694         * features/i386/64bit-segments.c: Regenerate.
9695         * features/i386/64bit-sse.c: Regenerate.
9696         * features/i386/x32-core.c: Regenerate.
9697         * features/tic6x-c6xp.c: Regenerate.
9698         * features/tic6x-core.c: Regenerate.
9699         * features/tic6x-gp.c: Regenerate.
9700         * target-descriptions.c: Use common/tdesc.h.
9701         * target-descriptions.h: Likewise.
9702
9703 2018-02-24  Tom Tromey  <tom@tromey.com>
9704
9705         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9706         (try_thread_db_load_from_dir, thread_db_load_search): Use
9707         std::string.
9708         (info_auto_load_libthread_db_compare): Return bool.  Change
9709         argument types.
9710         (info_auto_load_libthread_db): Use std::vector, std::string.
9711         Remove cleanups.
9712
9713 2018-02-24  Tom Tromey  <tom@tromey.com>
9714
9715         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9716         std::string.
9717         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9718         std::string*.
9719         * gdbarch.c: Rebuild.
9720         * gdbarch.h: Rebuild.
9721         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9722         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9723         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9724         std::string*.
9725
9726 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
9727
9728         * gdbtypes.h (sect_offset): Change type to uint64_t.
9729         (sect_offset_str): New function.
9730         * dwarf2read.c (create_addrmap_from_aranges): Use
9731         sect_offset_str.
9732         (error_check_comp_unit_head): Likewise.
9733         (create_debug_type_hash_table): Likewise.
9734         (read_cutu_die_from_dwo): Likewise.
9735         (init_cutu_and_read_dies): Likewise.
9736         (init_cutu_and_read_dies_no_follow): Likewise.
9737         (process_psymtab_comp_unit_reader): Likewise.
9738         (partial_die_parent_scope): Likewise.
9739         (peek_die_abbrev): Likewise.
9740         (process_queue): Likewise.
9741         (dwarf2_physname): Likewise.
9742         (read_namespace_alias): Likewise.
9743         (read_import_statement): Likewise.
9744         (create_dwo_cu_reader): Likewise.
9745         (create_cus_hash_table): Likewise.
9746         (lookup_dwo_cutu): Likewise.
9747         (inherit_abstract_dies): Likewise.
9748         (read_func_scope): Likewise.
9749         (read_call_site_scope): Likewise.
9750         (dwarf2_add_member_fn): Likewise.
9751         (read_common_block): Likewise.
9752         (read_module_type): Likewise.
9753         (read_typedef): Likewise.
9754         (read_subrange_type): Likewise.
9755         (load_partial_dies): Likewise.
9756         (read_partial_die): Likewise.
9757         (find_partial_die): Likewise.
9758         (read_str_index): Likewise.
9759         (dwarf2_string_attr): Likewise.
9760         (build_error_marker_type): Likewise.
9761         (lookup_die_type): Likewise.
9762         (dump_die_shallow): Likewise.
9763         (follow_die_ref): Likewise.
9764         (dwarf2_fetch_die_loc_sect_off): Likewise.
9765         (dwarf2_fetch_constant_bytes): Likewise.
9766         (follow_die_sig): Likewise.
9767         (get_signatured_type): Likewise.
9768         (get_DW_AT_signature_type): Likewise.
9769         (dwarf2_find_containing_comp_unit): Likewise.
9770         (set_die_type): Likewise.
9771
9772 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
9773
9774         * arch/aarch64.c: Include "common-defs.h".
9775         * arch/amd64.c: Likewise.
9776         * arch/i386.c: Likewise.
9777
9778 2018-02-21  Tom Tromey  <tom@tromey.com>
9779
9780         * value.h: (extract_field_op): Update.
9781         * eval.c (extract_field_op): Return a const char *.
9782         * expression.h (parse_expression_for_completion): Update.
9783         * completer.c (complete_expression): Update.
9784         (add_struct_fields): Make fieldname const.
9785         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9786         (mark_completion_tag, parse_exp_in_context_1): Update.
9787         (parse_expression_for_completion): Change "name" to
9788         unique_xmalloc_ptr*.
9789
9790 2018-02-21  Tom Tromey  <tom@tromey.com>
9791
9792         * infcall.c (call_function_by_hand_dummy): Use std::vector.
9793
9794 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9795
9796         * avr-tdep.c (avr_read_pc): Change parameter type to
9797         readable_regcache.
9798         * gdbarch.sh (read_pc): Likewise.
9799         * gdbarch.c: Re-generated.
9800         * gdbarch.h: Re-generated.
9801         * hppa-tdep.c (hppa_read_pc): Change parameter type to
9802         readable_regcache.
9803         * ia64-tdep.c (ia64_read_pc): Likewise.
9804         * mips-tdep.c (mips_read_pc): Likewise.
9805         * spu-tdep.c (spu_read_pc): Likewise.
9806
9807 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9808
9809         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9810         * regcache-dump.c: New file.
9811         * regcache.c: Move register_dump to regcache-dump.c.
9812         (maintenance_print_registers): Likewise.
9813         (maintenance_print_raw_registers): Likewise.
9814         (maintenance_print_cooked_registers): Likewise.
9815         (maintenance_print_register_groups): Likewise.
9816         (maintenance_print_remote_registers): Likewise.
9817         (_initialize_regcache): Likewise.
9818         * regcache.h (register_dump): Moved from regcache.c.
9819
9820 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9821
9822         * regcache.c (regcache::regcache): Update.
9823         (regcache::invalidate): Move it to detached_regcache::invalidate.
9824         (get_thread_arch_aspace_regcache): Update.
9825         (regcache::raw_update): Update.
9826         (regcache::cooked_read): Remove some code.
9827         (regcache::cooked_read_value): Likewise.
9828         (regcache::raw_write): Remove assert on m_readonly_p.
9829         (regcache::raw_supply_integer): Move it to
9830         detached_regcache::raw_supply_integer.
9831         (regcache::raw_supply_zeroed): Likewise.
9832         * regcache.h (detached_regcache) <raw_supply_integer>: New
9833         declaration.
9834         <raw_supply_zeroed, invalidate>: Likewise.
9835         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9836         <invalidate>: Likewise.
9837         <m_readonly_p>: Removed.
9838
9839 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9840
9841         * infcmd.c (get_return_value): Let stop_regs point to
9842         get_current_regcache.
9843         * regcache.c (regcache::regcache): Remove.
9844         (register_dump_reg_buffer): New class.
9845         (regcache_print): Adjust.
9846         * regcache.h (regcache): Remove constructors.
9847
9848 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9849
9850         * regcache.c (class register_dump): New class.
9851         (register_dump_regcache, register_dump_none): New class.
9852         (register_dump_remote, register_dump_groups): New class.
9853         (regcache_print): Update.
9854         * regcache.h (regcache_dump_what): Move it to regcache.c.
9855         (regcache) <dump>: Remove.
9856
9857 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9858
9859         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9860          reg_buffer_rw *.
9861         (jit_unwind_reg_set_impl): Call raw_supply.
9862         (jit_frame_sniffer): Use reg_buffer_rw.
9863         * record-full.c (record_full_core_regbuf): Change its type.
9864         (record_full_core_open_1): Use reg_buffer_rw.
9865         (record_full_close): Likewise.
9866         (record_full_core_fetch_registers): Use regcache->raw_supply.
9867         (record_full_core_store_registers): Likewise.
9868         * regcache.c (regcache::get_register_status): Move it to
9869         reg_buffer.
9870         (regcache_raw_set_cached_value): Remove.
9871         (regcache::raw_set_cached_value): Remove.
9872         (regcache::raw_write): Call raw_supply.
9873         (regcache::raw_supply): Move it to reg_buffer_rw.
9874         * regcache.h (regcache_raw_set_cached_value): Remove.
9875         (reg_buffer_rw): New class.
9876
9877 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9878
9879         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9880         readonly_detached_regcache.
9881         (dummy_frame_prev_register): Use regcache->cooked_read.
9882         * frame.c (frame_save_as_regcache): Change return type.
9883         (frame_pop): Update.
9884         * frame.h (frame_save_as_regcache): Update declaration.
9885         * inferior.h (get_infcall_suspend_state_regcache): Update
9886         declaration.
9887         * infrun.c (infcall_suspend_state) <registers>: use
9888         readonly_detached_regcache.
9889         (save_infcall_suspend_state): Don't use regcache_dup.
9890         (get_infcall_suspend_state_regcache): Change return type.
9891         * linux-fork.c (struct fork_info) <savedregs>: Change to
9892         readonly_detached_regcache.
9893         <pc>: New field.
9894         (fork_save_infrun_state): Don't use regcache_dup.
9895         (info_checkpoints_command): Adjust.
9896         * mi/mi-main.c (register_changed_p): Update declaration.
9897         (mi_cmd_data_list_changed_registers): Use
9898         readonly_detached_regcache.
9899         (register_changed_p): Change parameter type to
9900         readonly_detached_regcache.
9901         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9902         readonly_detached_regcache.
9903         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9904         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9905         New.
9906         (regcache::save): Move it to reg_buffer.
9907         (regcache::restore): Change parameter type.
9908         (regcache_dup): Remove.
9909         * regcache.h (reg_buffer) <save>: New method.
9910         (readonly_detached_regcache): New class.
9911         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9912         readonly_detached_regcache.
9913         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9914
9915 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9916
9917         * frame.c (frame_save_as_regcache): Use regcache method save.
9918         (frame_pop): Use regcache method restore.
9919         * infrun.c (restore_infcall_suspend_state): Likewise.
9920         * linux-fork.c (fork_load_infrun_state): Likewise.
9921         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9922         save.
9923         * regcache.c (regcache_save): Remove.
9924         (regcache::restore): More asserts.
9925         (regcache_cpy): Remove.
9926         * regcache.h (regcache_save): Remove the declaration.
9927         (regcache::restore): Move from private to public.
9928         Remove the friend declaration of regcache_cpy.
9929         (regcache_cpy): Remove declaration.
9930
9931 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9932
9933         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9934         parameter type to 'readable_regcache *'.
9935         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9936         * arm-tdep.c (arm_neon_quad_read): Likewise.
9937         (arm_pseudo_read): Likewise.
9938         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9939         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9940         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9941         * gdbarch.c: Re-generated.
9942         * gdbarch.h: Re-generated.
9943         * gdbarch.sh (pseudo_register_read): Change parameter type to
9944         'readable_regcache *'.
9945         (pseudo_register_read_value): Likewise.
9946         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9947         (h8300_pseudo_register_read): Likewise.
9948         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9949         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9950         (i386_pseudo_register_read_into_value): Likewise.
9951         (i386_pseudo_register_read_value): Likewise.
9952         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9953         declaration.
9954         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9955         * m32c-tdep.c (m32c_raw_read): Likewise.
9956         (m32c_read_flg): Likewise.
9957         (m32c_banked_register): Likewise.
9958         (m32c_banked_read): Likewise.
9959         (m32c_sb_read): Likewise.
9960         (m32c_part_read): Likewise.
9961         (m32c_cat_read): Likewise.
9962         (m32c_r3r2r1r0_read): Likewise.
9963         (m32c_pseudo_register_read): Likewise.
9964         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9965         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9966         (mep_pseudo_cr64_read): Likewise.
9967         (mep_pseudo_register_read): Likewise.
9968         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9969         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9970         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9971         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9972         (regcache::cooked_read): Likewise.
9973         (regcache::cooked_read_value): Likewise.
9974         (regcache_cooked_read_signed):
9975         (regcache::cooked_read): Likewise.
9976         * regcache.h (readable_regcache): New class.
9977         (regcache): Inherit readable_regcache.  Move some methods to
9978         readable_regcache.
9979         * rl78-tdep.c (rl78_pseudo_register_read): Change
9980         parameter type to 'readable_regcache *'.
9981         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9982         (e500_pseudo_register_read): Change parameter type to
9983         'readable_regcache *'.
9984         (dfp_pseudo_register_read): Likewise.
9985         (vsx_pseudo_register_read): Likewise.
9986         (efpr_pseudo_register_read): Likewise.
9987         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9988         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9989         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9990         (sh64_pseudo_register_read): Likewise.
9991         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9992         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9993         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9994         (spu_pseudo_register_read): Likewise.
9995         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9996         (xtensa_pseudo_register_read): Likewise.
9997
9998 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9999
10000         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10001         (regcache::arch): Move it to reg_buffer::arch.
10002         (regcache::register_buffer): Likewise.
10003         (regcache::assert_regnum): Likewise.
10004         (regcache::num_raw_registers): Likewise.
10005         * regcache.h (reg_buffer): New class.
10006         (regcache): Inherit reg_buffer.
10007
10008 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10009
10010         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10011         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10012
10013 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10014
10015         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10016
10017 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10018
10019         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10020         (SFILES): Remove common/*.c files.
10021         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10022         * common/common.host: Add common reference.
10023         * configure.ac: Likewise.
10024         * configure: Regenerate.
10025
10026 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10027
10028         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10029         (block_initialize_namespace): Use new.
10030         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10031         (dwarf2_free_objfile): Use delete.
10032         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10033         (copy_type_recursive): Use new.
10034         * gdb_obstack.h (allocate_on_obstack): New.
10035
10036 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10037
10038         PR gdb/22849
10039         * inferior.c (exit_inferior_1): Reset inf->control.
10040
10041 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10042
10043         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10044         declaration.
10045
10046 2018-02-14  Pedro Alves  <palves@redhat.com>
10047
10048         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10049         frame_cleanup_after_sniffer on exception.
10050
10051 2018-02-14  Tom Tromey  <tom@tromey.com>
10052
10053         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10054         const.
10055         (solib_bfd_open): Make pathname const.
10056         * solib.c (solib_bfd_open): Make pathname const.
10057         * solib-spu.c (spu_bfd_fopen): Make name const.
10058         (spu_bfd_open): Make pathname const.
10059         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10060         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10061
10062 2018-02-14  Tom Tromey  <tom@tromey.com>
10063
10064         * symfile.c (symfile_bfd_open): Update.
10065         * source.h (openp, source_full_path_of, find_and_open_source):
10066         Change argument type to unique_xmalloc_ptr.
10067         * source.c (openp): Take a unique_xmalloc_ptr.
10068         (source_full_path_of, find_and_open_source): Likewise.
10069         (open_source_file, symtab_to_fullname): Update.
10070         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10071         unique_xmalloc_ptr.
10072         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10073         (exec_file_find): Update.
10074         * psymtab.c (psymtab_to_fullname): Update.
10075         * nto-tdep.h (nto_find_and_open_solib): Update.
10076         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10077         unique_xmalloc_ptr.
10078         * exec.c (exec_file_attach): Update.
10079         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10080         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10081
10082 2018-02-14  Tom Tromey  <tom@tromey.com>
10083
10084         * solib.c: Include source.h.
10085         * nto-tdep.c: Include source.h.
10086         * mi/mi-cmd-env.c: Include source.h.
10087         * infcmd.c: Include source.h.
10088         * exec.c: Include source.h.
10089         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10090         (add_path, directory_switch, source_path, init_source_path): Move
10091         declarations...
10092         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10093         (add_path, directory_switch, source_path, init_source_path):
10094         ...here.
10095
10096 2018-02-14  Tom Tromey  <tom@tromey.com>
10097
10098         * solist.h (exec_file_find, solib_find): Return
10099         unique_xmalloc_ptr.
10100         (solib_bfd_fopen): Take a const char *.
10101         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10102         (exec_file_find, solib_find): Likewise.
10103         (solib_bfd_fopen): Do not take ownership of "pathname".
10104         (solib_bfd_open): Use unique_xmalloc_ptr.
10105         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10106         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10107         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10108         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10109
10110 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10111
10112         * ada-lang.c (name_match_type_from_name): Remove reference to
10113         ada_name_for_lookup in function's documentation.
10114         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10115
10116 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10117
10118         * defs.h (enum openp_flags): New enum.
10119         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10120         Move to enum openp_flags.
10121         (openp_flags): New enum flags.
10122         (openp): Change parameter type to openp_flags.
10123         * source.c (openp): Change parameter type to openp_flags.
10124         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10125         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10126
10127 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10128
10129         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10130         per-command.
10131
10132 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10133
10134         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10135         into...
10136         (class dwarf2_queue_guard): ...the destructor of this new class.
10137         (dw2_do_instantiate_symtab): Create instance of the new class
10138         dwarf2_queue_guard, remove cleanup.
10139
10140 2018-02-09  Tom Tromey  <tom@tromey.com>
10141
10142         * source.c (find_source_lines): Don't reference past the end of
10143         the vector.
10144
10145 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10146
10147         * remote.c (remote_btrace_maybe_reopen): Change error message.
10148         * btrace.c (btrace_enable): Likewise.
10149         (parse_xml_btrace): Likewise.
10150         (parse_xml_btrace_conf): Likewise.
10151
10152 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10153
10154         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10155         (linux_enable_pt, linux_enable_bts): Call
10156         diagnose_perf_event_open_fail.
10157
10158 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10159
10160         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10161         Remove parameter and change return type.  Update callers.  Move it.
10162         (linux_enable_bts, linux_enable_pt): Improve error message.
10163         (linux_enable_pt): Remove zero buffer size check.
10164         (linux_enable_btrace): Improve error messages.  Remove NULL return
10165         check.
10166
10167 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10168
10169         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10170         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10171         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10172         (linux_supports_pt, linux_supports_btrace): Remove.
10173         (linux_enable_bts): Call cpu_supports_bts.
10174         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10175         * remote.c (remote_supports_btrace): Remove.
10176         (init_remote_ops): Remove remote_supports_btrace.
10177         * target-delegates.c: Regenerated.
10178         * target.c (target_supports_btrace): Remove.
10179         * target.h (target_ops) <to_supports_btrace>: Remove
10180         (target_supports_btrace): Remove.
10181         * x86-linux-nat.c (x86_linux_create_target): Remove
10182         linux_supports_btrace.
10183
10184 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10185
10186         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10187         btrace failed.
10188         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10189         exception and use message in own exception.
10190
10191 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10192
10193         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10194         (perf_event_pt_event_type): Use gdb_file_up.
10195         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10196         scoped_fd, and scoped_mmap.
10197
10198 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10199
10200         * common/scoped_mmap.h: New.
10201         * unittests/scoped_mmap-selftest.c: New.
10202         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10203         unittests/scoped_mmap-selftest.c.
10204
10205 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10206
10207         * common/scoped_fd.h: New.
10208         * unittests/scoped_fd-selftest.c: New.
10209         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10210         unittests/scoped_fd-selftest.c.
10211
10212 2018-02-09  Tom Tromey  <tom@tromey.com>
10213
10214         * auto-load.c (auto_load_section_scripts): Use
10215         gdb::unique_xmalloc_ptr.
10216
10217 2018-02-09  Tom Tromey  <tom@tromey.com>
10218
10219         * auto-load.c (execute_script_contents): Use std::string.
10220
10221 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
10222
10223         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10224         Python function, rather than a new command.
10225
10226 2018-02-08  Tom Tromey  <tom@tromey.com>
10227
10228         * solib.c (solib_find_1): Use std::string.
10229         (solib_bfd_fopen): Use unique_xmalloc_ptr.
10230
10231 2018-02-08  Tom Tromey  <tom@tromey.com>
10232
10233         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10234
10235 2018-02-08  Tom Tromey  <tom@tromey.com>
10236
10237         * source.c (find_source_lines): Use gdb::def_vector.
10238
10239 2018-02-08  Tom Tromey  <tom@tromey.com>
10240
10241         * macrocmd.c (struct temporary_macro_definition): New.
10242         (macro_define_command): Use temporary_macro_definition.  Remove
10243         cleanups.
10244         (free_macro_definition_ptr): Remove.
10245
10246 2018-02-08  Tom Tromey  <tom@tromey.com>
10247
10248         * macroexp.c (maybe_expand): Use std::string.
10249
10250 2018-02-08  Tom Tromey  <tom@tromey.com>
10251
10252         * macroexp.c (struct macro_buffer): Add initializers for some
10253         members.
10254         (init_buffer, init_shared_buffer, free_buffer)
10255         (free_buffer_return_text): Remove.
10256         (macro_buffer): New constructors.
10257         (~macro_buffer): New destructor.
10258         (macro_buffer::set_shared): New method.
10259         (macro_buffer::resize_buffer, macro_buffer::appendc)
10260         (macro_buffer::appendmem): Now methods, not free functions.
10261         (set_token, append_tokens_without_splicing, stringify)
10262         (macro_stringify): Update.
10263         (gather_arguments): Change return type.  Remove argc_p argument,
10264         add args_ptr argument.  Use std::vector.
10265         (substitute_args): Remove argc argument.  Accept std::vector.
10266         (expand): Update.  Use std::vector.
10267         (scan, macro_expand, macro_expand_next): Update.
10268
10269 2018-02-08  Tom Tromey  <tom@tromey.com>
10270
10271         * symtab.c (default_collect_symbol_completion_matches_break_on):
10272         Use unique_xmalloc_ptr.
10273         * macroscope.h: (sal_macro_scope, user_macro_scope)
10274         (default_macro_scope): Return unique_xmalloc_ptr.
10275         * macroscope.c (sal_macro_scope, user_macro_scope)
10276         (default_macro_scope): Return unique_xmalloc_ptr.
10277         * macroexp.h (macro_expand, macro_expand_once): Return
10278         unique_xmalloc_ptr.
10279         * macroexp.c (macro_expand, macro_expand_once): Return
10280         unique_xmalloc_ptr.
10281         * macrocmd.c (macro_expand_command, macro_expand_once_command)
10282         (info_macro_command, info_macros_command): Use
10283         unique_xmalloc_ptr.
10284         * compile/compile-c-support.c (write_macro_definitions): Use
10285         unique_xmalloc_ptr.
10286         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10287
10288 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
10289
10290         * value.c (value_static_field): Assign field type instead of
10291         containing type when returning an optimized out value.
10292
10293 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10294
10295         * ft32-tdep.c (ft32_read_pc): Remove.
10296         (ft32_write_pc): Remove.
10297         (ft32_gdbarch_init): Update.
10298         * m32r-tdep.c (m32r_read_pc): Remove.
10299         (m32r_gdbarch_init): Update.
10300         * mep-tdep.c (mep_read_pc): Remove.
10301         (mep_gdbarch_init): Update.
10302         * microblaze-tdep.c (microblaze_write_pc): Remove.
10303         (microblaze_gdbarch_init): Update.
10304         * mn10300-tdep.c (mn10300_read_pc): Remove.
10305         (mn10300_write_pc): Remove.
10306         (mn10300_gdbarch_init): Update.
10307         * moxie-tdep.c (moxie_read_pc): Remove.
10308         (moxie_write_pc): Remove.
10309         (moxie_gdbarch_init): Update.
10310
10311 2018-02-06  Yao Qi  <yao.qi@linaro.org>
10312
10313         * expprint.c (print_subexp_standard): Handle
10314         OP_F77_UNDETERMINED_ARGLIST.
10315         (dump_subexp_body_standard): Likewise.
10316
10317 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
10318
10319         * target-descriptions.c (tdesc_element_visitor) Add empty
10320         implementations.
10321         (tdesc_type): Move make_gdb_type from here.
10322         (tdesc_type_builtin): Likewise.
10323         (tdesc_type_vector): Likewise.
10324         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10325         (make_gdb_type_struct): Move from tdesc_type_with_fields.
10326         (make_gdb_type_union): Likewise.
10327         (make_gdb_type_flags): Likewise.
10328         (make_gdb_type_enum): Likewise.
10329         (make_gdb_type): New function.
10330         (tdesc_register_type): Use static make_gdb_type.
10331
10332 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
10333
10334         * infcmd.c (default_print_one_register_info): Align natural-format
10335         column values consistently one under another.
10336         (pad_to_column): New function.
10337
10338 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
10339
10340         * dwarf2read.c (dwarf2_physname): Move commment.
10341
10342 2018-02-01  Leszek Swirski  <leszeks@google.com>
10343
10344         * varobj.c (varobj_formatted_print_options): Allow recursive
10345         pretty printing if pretty printing is enabled.
10346
10347 2018-02-01  Leszek Swirski  <leszeks@google.com>
10348
10349         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10350         names after a structop as a filename.
10351
10352 2018-02-01  Yao Qi  <yao.qi@linaro.org>
10353
10354         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10355         (arm_record_coproc_data_proc): Likewise.
10356
10357 2018-02-01  Yao Qi  <yao.qi@linaro.org>
10358
10359         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10360
10361 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
10362
10363         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10364         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10365
10366 2018-01-31  Pedro Alves  <palves@redhat.com>
10367
10368         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10369         * inflow.c (child_terminal_save_inferior): Wrap reference to
10370         tcgetpgrp in HAVE_TERMIOS_H.
10371         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10372         _WIN32.
10373         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10374         always iterate over all inferiors.
10375         (gdbsim_cntrl_c): Adjust.
10376         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10377
10378 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
10379
10380         * gdbtypes.c (lookup_array_range_type): Make sure the array's
10381         index type is objfile-owned if the element type is as well.
10382
10383 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
10384
10385         GDB 8.1 released.
10386
10387 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10388
10389         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10390         "features/s390x-linux64.c".
10391         (_initialize_s390_linux_tdep): Remove initialization of tdescs
10392         s390_linux32 and s390x_linux64.
10393         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10394         default tdesc.
10395         * s390-tdep.c: Include "features/s390-linux32.c" and
10396         "features/s390x-linux64.c".
10397         (s390_tdesc_valid): Add check for tdesc_has_registers.
10398         (s390_gdbarch_init): Make sure there is always a valid tdesc.
10399         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10400         tdesc_s390x_linux64.
10401         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10402         tdesc_s390x_linux64 to...
10403         * s390-tdep.h: ...here.
10404
10405 2018-01-30  Pedro Alves  <palves@redhat.com>
10406
10407         PR gdb/13211
10408         * config.in, configure: Regenerate.
10409         * configure.ac: Check for getpgid.
10410         * go32-nat.c (go32_pass_ctrlc): New.
10411         (go32_target): Install it.
10412         * inf-child.c (inf_child_target): Install
10413         child_terminal_save_inferior, child_pass_ctrlc and
10414         child_interrupt.
10415         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10416         (inf_ptrace_target): No longer install it.
10417         * infcmd.c (interrupt_target_1): Adjust.
10418         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10419         (child_interrupt): Declare.
10420         (inferior::terminal_state): New.
10421         * inflow.c (struct terminal_info): Update comments.
10422         (inferior_process_group): Delete.
10423         (terminal_is_ours): Delete.
10424         (gdb_tty_state): New.
10425         (child_terminal_init): Adjust.
10426         (is_gdb_terminal, sharing_input_terminal_1)
10427         (sharing_input_terminal): New functions.
10428         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
10429         Set the process's actual process group in the foreground if
10430         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
10431         mark terminal as the inferior's if not sharing GDB's terminal.
10432         Don't check attach_flag.
10433         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10434         pass down a target_terminal_state.
10435         (child_terminal_save_inferior): New, factored out from ...
10436         (child_terminal_ours_1): ... this.  Handle
10437         target_terminal_state::is_ours_for_output.
10438         (child_interrupt, child_pass_ctrlc): New.
10439         (inflow_inferior_exit): Clear the inferior's terminal_state.
10440         (copy_terminal_info): Copy the inferior's terminal state.
10441         (_initialize_inflow): Remove reference to terminal_is_ours.
10442         * inflow.h (inferior_process_group): Delete.
10443         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10444         * procfs.c (procfs_target): Don't install procfs_interrupt.
10445         (procfs_interrupt): Delete.
10446         * remote.c (remote_serial_quit_handler): Adjust.
10447         (remote_interrupt): Remove ptid parameter.  Adjust.
10448         * target-delegates.c: Regenerate.
10449         * target.c: Include "terminal.h".
10450         (target_terminal::terminal_state): Rename to ...
10451         (target_terminal::m_terminal_state): ... this.
10452         (target_terminal::init): Adjust.
10453         (target_terminal::inferior): Adjust to per-inferior
10454         terminal_state.
10455         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10456         (target_terminal::ours, target_terminal::ours_for_output): Use
10457         target_terminal_is_ours_kind.
10458         (target_interrupt): Remove ptid parameter.  Adjust.
10459         (default_target_pass_ctrlc): Adjust.
10460         * target.h (target_ops::to_terminal_save_inferior): New field.
10461         (target_ops::to_interrupt): Remove ptid_t parameter.
10462         (target_interrupt): Remove ptid_t parameter.  Update comment.
10463         (target_pass_ctrlc): Update comment.
10464         * target/target.h (target_terminal_state): New scoped enum,
10465         factored out of ...
10466         (target_terminal::terminal_state): ... here.
10467         (target_terminal::inferior): Update comments.
10468         (target_terminal::restore_inferior): New.
10469         (target_terminal::is_inferior, target_terminal::is_ours)
10470         (target_terminal::is_ours_for_output): Adjust.
10471         (target_terminal::scoped_restore_terminal_state): Adjust to
10472         rename, and call restore_inferior() instead of inferior().
10473         (target_terminal::scoped_restore_terminal_state::m_state): Change
10474         type.
10475         (target_terminal::terminal_state): Rename to ...
10476         (target_terminal::m_terminal_state): ... this and change type.
10477
10478 2018-01-30  Pedro Alves  <palves@redhat.com>
10479
10480         * linux-nat.c (wait_for_signal): New function.
10481         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10482         directly.
10483         (async_terminal_is_ours)
10484         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10485         (linux_nat_add_target): Don't override
10486         to_terminal_inferior/to_terminal_ours.
10487
10488 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
10489
10490         * remote.c (remote_follow_fork): Don't call "detach_inferior".
10491
10492 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
10493
10494         * dwarf2read.c (free_dwo_files): Add forward-declaration.
10495         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10496         dwarf2_per_objfile_free here.
10497         (dwarf2_per_objfile_free): Remove.
10498         (_initialize_dwarf2_read): Don't register
10499         dwarf2_per_objfile_free as a registry cleanup.
10500
10501 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
10502
10503         Avoid compilation errors in MinGW native builds
10504
10505         The error is triggered by including python-internal.h, and the
10506         error message is:
10507
10508              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10509                       from build-gnulib/import/math.h:27,
10510                       from d:/usr/Python26/include/pyport.h:235,
10511                       from d:/usr/Python26/include/Python.h:58,
10512                       from python/python-internal.h:94,
10513                       from python/py-arch.c:24:
10514              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10515         using ::hypot;
10516                 ^~~~~
10517
10518         This happens because Python headers define 'hypot' to expand t
10519         '_hypot' in the Windows builds.
10520         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10521         'hypoth'.  This avoids a compilation error.
10522
10523 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10524
10525         * MAINTAINERS (Write After Approval): Fix ordering.
10526
10527 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
10528
10529         * MAINTAINERS (Write After Approval): Add Alan Hayward.
10530
10531 2018-01-26  Alan Modra  <amodra@gmail.com>
10532
10533         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10534         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10535         Remove nop.  Make const.  Comment.
10536         (powerpc32_plt_stub_so_2): New.
10537         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10538         Correct count.  Update uses.
10539         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10540         Move common code reading PLT entry word.  Correct
10541         powerpc32_plt_stub PLT address calculation.
10542         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10543         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10544         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10545         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10546         (ppc64_standard_linkage8): Likewise.
10547         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10548         Correct insns description.
10549         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10550
10551 2018-01-24  Pedro Alves  <palves@redhat.com>
10552
10553         GCC PR libstdc++/83906
10554         * gdbtypes.c (operator==(const dynamic_prop &,
10555         const dynamic_prop &)): New.
10556         (operator==(const range_bounds &, const range_bounds &)): New.
10557         (check_types_equal): Use them instead of memcmp.
10558         * gdbtypes.h (operator==(const dynamic_prop &,
10559         const dynamic_prop &)): Declare.
10560         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10561         (operator==(const range_bounds &, const range_bounds &)): Declare.
10562         (operator!=(const range_bounds &, const range_bounds &)): Declare.
10563
10564 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10565
10566         * s390-linux-tdep.c (s390_record_address_mask)
10567         (s390_record_calc_disp_common, s390_record_calc_disp)
10568         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10569         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10570         (s390_process_record): Move to s390-tdep.c.
10571         (s390_linux_init_abi_any): Adjust.
10572         * s390-tdep.c (s390_record_address_mask)
10573         (s390_record_calc_disp_common, s390_record_calc_disp)
10574         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10575         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10576         (s390_process_record): Moved from s390-linux-tdep.c
10577         (s390_gdbarch_init): Adjust.
10578
10579 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10580
10581         * s390-linux-nat.c (s390-tdep.h): New include.
10582         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10583         (HFILES_NO_SRCDIR): Add s390-tdep.h.
10584         (ALLDEPFILES): Add s390-tdep.c.
10585         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10586         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10587         * s390-tdep.h: ...this.  New file.
10588         * s390-linux-tdep.c (s390-tdep.h): New include.
10589         (_initialize_s390_tdep): Rename to...
10590         (_initialize_s390_linux_tdep): ...this and adjust.
10591         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10592         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10593         s390-tdep.h.
10594         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10595         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10596         (s390_is_partial_instruction, s390_software_single_step)
10597         (is_non_branch_ril, s390_displaced_step_copy_insn)
10598         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10599         (s390_prologue_data, s390_addr, s390_store, s390_load)
10600         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10601         (s390_register_call_saved, s390_guess_tracepoint_registers)
10602         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10603         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10604         (s390_pseudo_register_name, s390_pseudo_register_type)
10605         (s390_pseudo_register_read, s390_pseudo_register_write)
10606         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10607         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10608         (s390_addr_bits_remove, s390_address_class_type_flags)
10609         (s390_address_class_type_flags_to_name)
10610         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10611         (s390_function_arg_float, s390_function_arg_vector)
10612         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10613         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10614         (s390_frame_align, s390_register_return_value, s390_return_value)
10615         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10616         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10617         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10618         (s390_trad_frame_prev_register, s390_unwind_cache)
10619         (s390_prologue_frame_unwind_cache)
10620         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10621         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10622         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10623         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10624         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10625         (s390_frame_base_address, s390_local_base_address)
10626         (s390_frame_base, s390_gcc_target_options)
10627         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10628         (s390_validate_reg_range, s390_tdesc_valid)
10629         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10630         * s390-tdep.c: ...this.  New file.
10631
10632 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10633
10634         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10635         (s390_process_record, s390_gdbarch_tdep_alloc)
10636         (s390_linux_init_abi_any): Use/set new hook.
10637
10638 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10639
10640         * s390-linux-tdep.c (osabi.h): New include.
10641         (s390_linux_init_abi_31, s390_linux_init_abi_64)
10642         (s390_linux_init_abi_any): New functions.
10643         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10644
10645 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10646
10647         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10648         tdesc_has_registers check
10649
10650 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10651
10652         * s390-linux-tdep.c (s390_tdesc_valid): New function.
10653         (s390_validate_reg_range): New macro.
10654         (s390_gdbarch_init): Adjust.
10655
10656 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10657
10658         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10659         (s390_gdbarch_tdep_alloc): Adjust.
10660         (s390_gdbarch_init): Adjust.
10661
10662 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10663
10664         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10665         <have_tdb>: Change type to bool.
10666         (s390_gdbarch_tdep_alloc): Adjust.
10667         (s390_gdbarch_init): Adjust.
10668
10669 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10670
10671         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10672         (gdbarch_tdep) <have_upper, have_vx>: New fields.
10673         (s390_gdbarch_tdep_alloc): New function.
10674         (s390_gdbarch_init): Allocate tdep at start and use its fields
10675         instead of separate variables.
10676
10677 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10678
10679         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10680         when looking for cached gdbarch and add comment for remaining.
10681
10682 2018-01-22  Pedro Alves  <palves@redhat.com>
10683             Sergio Durigan Junior  <sergiodj@redhat.com>
10684
10685         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10686         case.
10687
10688 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
10689
10690         * MAINTAINERS: Update my company e-mail address.
10691
10692 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10693
10694         * regcache.c (cooked_write_test): New function.
10695         (_initialize_regcache): Register the test.
10696
10697 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10698
10699         * ia64-tdep.c (ia64_pseudo_register_read): Call
10700         regcache->cooked_read instead of regcache_cooked_read_unsigned.
10701         * m32c-tdep.c (m32c_cat_read): Likewise.
10702         (m32c_r3r2r1r0_read): Likewise.
10703         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10704         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10705
10706 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10707
10708         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10709         method raw_read instead of regcache_raw_read.
10710         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10711         * arm-tdep.c (arm_neon_quad_read): Likewise.
10712         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10713         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10714         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10715         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10716         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10717         (i386_pseudo_register_read_into_value): Likewise.
10718         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10719         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10720         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10721         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10722         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10723         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
10724         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10725         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
10726         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10727
10728 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10729
10730         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10731         * configure.tgt: Remove target mt.
10732         * mt-tdep.c: Remove.
10733         * regcache.c (cooked_read_test): Remove the check for mt.
10734
10735 2018-01-22  Yao Qi  <yao.qi@linaro.org>
10736
10737         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10738         instead of gdbarch_pseudo_register_read_value.
10739
10740 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10741
10742         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10743         language is Ada.
10744
10745 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
10746
10747         * linespec.c (create_sals_line_offset): Remove code that preserved
10748         the symtab_and_line's line number.
10749
10750 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10751
10752         * varobj.c (varobj_create): Don't set valid_block when creating a
10753         floating varobj.
10754
10755 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10756
10757         * varobj.c (varobj_create): Remove out of date comment.
10758
10759 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10760
10761         PR mi/20395
10762         * ada-exp.y (write_var_from_sym): Pass extra parameter when
10763         updating innermost block.
10764         * parse.c (innermost_block_tracker::update): Take extra type
10765         parameter, and check types match before updating innermost block.
10766         (write_dollar_variable): Update innermost block for registers.
10767         * parser-defs.h (enum innermost_block_tracker_type): New enum.
10768         (innermost_block_tracker::innermost_block_tracker): Initialise
10769         m_types member.
10770         (innermost_block_tracker::reset): Take type parameter.
10771         (innermost_block_tracker::update): Take type parameter, and pass
10772         type through as needed.
10773         (innermost_block_tracker::m_types): New member.
10774         * varobj.c (varobj_create): Pass type when reseting innermost
10775         block.
10776
10777 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10778
10779         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10780         * ada-lang.c (resolve_subexp): Likewise.
10781         * breakpoint.c (set_breakpoint_condition) Likewise.
10782         (watch_command_1) Likewise.
10783         * c-exp.y (variable): Likewise.
10784         * d-exp.y (PrimaryExpression): Likewise.
10785         * f-exp.y (variable): Likewise.
10786         * go-exp.y (variable): Likewise.
10787         * m2-exp.y (variable): Likewise.
10788         * objfiles.c (objfile::~objfile): Likewise.
10789         * p-exp.y (variable): Likewise.
10790         * parse.c (innermost_block): Change type.
10791         * parser-defs.h (class innermost_block_tracker): New.
10792         (innermost_block): Change to innermost_block_tracker.
10793         * printcmd.c (display_command): Switch to innermost_block API.
10794         (do_one_display): Likewise.
10795         * rust-exp.y (do_one_display): Likewise.
10796         * symfile.c (clear_symtab_users): Likewise.
10797         * varobj.c (varobj_create): Switch to innermost_block API, replace
10798         use of innermost_block with block stored on varobj object.
10799
10800 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
10801
10802         * expression.h (innermost_block): Remove declaration.
10803         * varobj.c: Add 'parser-defs.h' include.
10804
10805 2018-01-19  Tom Tromey  <tom@tromey.com>
10806
10807         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10808         symbols in the static and global blocks.
10809
10810 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
10811
10812         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10813         gdb_ptrace.h, and move including gdb_wait.h ...
10814         * nat/linux-ptrace.h: ... to here.
10815
10816 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10817
10818         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10819         inf_ptrace_detach_success.
10820         (inf_ptrace_detach_success): Add inferior parameter, use it
10821         instead of inferior_ptid, pass it to detach_inferior.
10822         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10823         parameter.
10824         * inferior.c (detach_inferior): Add overload that takes an
10825         inferior object.
10826         * inferior.h (detach_inferior): Likewise.
10827         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10828         use inferior_ptid, adjust call to inf_ptrace_detach_success.
10829         * linux-thread-db.c (thread_db_detach): Use inf parameter.
10830
10831 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10832
10833         * target.h (struct target_ops) <to_detach>: Add inferior
10834         parameter.
10835         (target_detach): Likewise.
10836         * target.c (dispose_inferior): Pass inferior down.
10837         (target_detach): Pass inferior down.  Assert that it is equal to
10838         the current inferior.
10839         * aix-thread.c (aix_thread_detach): Pass inferior down.
10840         * corefile.c (core_file_command): Pass current_inferior() down.
10841         * corelow.c (core_detach): Add inferior parameter.
10842         * darwin-nat.c (darwin_detach): Likewise.
10843         * gnu-nat.c (gnu_detach): Likewise.
10844         * inf-ptrace.c (inf_ptrace_detach): Likewise.
10845         * infcmd.c (detach_command): Pass current_inferior() down to
10846         target_detach.
10847         * infrun.c (follow_fork_inferior): Pass parent_inf to
10848         target_detach.
10849         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10850         target_detach.
10851         * linux-nat.c (linux_nat_detach): Add inferior parameter.
10852         * linux-thread-db.c (thread_db_detach): Likewise.
10853         * nto-procfs.c (procfs_detach): Likewise.
10854         * procfs.c (procfs_detach): Likewise.
10855         * record.c (record_detach): Likewise.
10856         * record.h (struct inferior): Forward-declare.
10857         (record_detach): Add inferior parameter.
10858         * remote-sim.c (gdbsim_detach): Likewise.
10859         * remote.c (remote_detach_1): Likewise.
10860         (remote_detach): Likewise.
10861         (extended_remote_detach): Likewise.
10862         * sol-thread.c (sol_thread_detach): Likewise.
10863         * target-debug.h (target_debug_print_inferior_p): New macro.
10864         * target-delegates.c: Re-generate.
10865         * top.c (kill_or_detach): Pass inferior down to target_detach.
10866         * windows-nat.c (windows_detach): Add inferior parameter.
10867
10868 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
10869
10870         * target.h (struct target_ops) <to_detach>: Remove args
10871         parameter.
10872         (target_detach): Likewise.
10873         * target.c (dispose_inferior): Adjust.
10874         (target_detach): Remove args parameter, adjust.
10875         * aix-thread.c (aix_thread_detach): Adjust.
10876         * corefile.c (core_file_command): Adjust.
10877         * corelow.c (core_detach): Adjust.
10878         * darwin-nat.c (darwin_detach): Adjust.
10879         * gnu-nat.c (gnu_detach): Adjust.
10880         * inf-ptrace.c (inf_ptrace_detach): Adjust.
10881         * infcmd.c (detach_command): Adjust
10882         * infrun.c (follow_fork_inferior): Adjust.
10883         (handle_vfork_child_exec_or_exit): Adjust.
10884         * linux-fork.c (linux_fork_detach): Remove args parameter.
10885         * linux-fork.h (linux_fork_detach): Likewise.
10886         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10887         * linux-thread-db.c (thread_db_detach): Likewise.
10888         * nto-procfs.c (procfs_detach): Likewise.
10889         * procfs.c (procfs_detach): Likewise.
10890         (do_detach): Remove signo parameter.
10891         * record.c (record_detach): Remove args parameter.
10892         * record.h (record_detach): Likewise.
10893         * remote-sim.c (gdbsim_detach): Likewise.
10894         * remote.c (remote_detach_1): Likewise.
10895         (remote_detach): Likewise.
10896         (extended_remote_detach): Likewise.
10897         * sol-thread.c (sol_thread_detach): Likewise.
10898         * target-delegates.c: Re-generate.
10899         * top.c (struct qt_args) <args>: Remove field.
10900         (kill_or_detach): Don't pass args.
10901         (quit_force): Don't set args.
10902         * windows-nat.c (windows_detach): Remove args parameter.
10903
10904 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10905
10906         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10907         (arm_linux_init_abi): Install it.
10908
10909 2018-01-19  Yao Qi  <yao.qi@linaro.org>
10910
10911         * osabi.c (gdb_osabi_names): Extend the regexp for
10912         arm-linux-gnueabihf.
10913
10914 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10915
10916         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10917         m_abbrevs.
10918         (abbrev_table::add_abbrev): Update.
10919         (abbrev_table::lookup_abbrev): Update.
10920
10921 2018-01-18  Yao Qi  <yao.qi@linaro.org>
10922
10923         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10924
10925 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
10926
10927         * compile/compile.c (compile_to_object): Convert "triplet_rx"
10928         to "std::string".
10929
10930 2018-01-17  Tom Tromey  <tom@tromey.com>
10931
10932         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
10933
10934 2018-01-17  Tom Tromey  <tom@tromey.com>
10935
10936         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10937         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10938         (create_array_type_with_stride): Update.
10939         * dwarf2read.c (set_die_type): Update.
10940
10941 2018-01-17  Tom Tromey  <tom@tromey.com>
10942
10943         * dwarf2read.c (delayed_method_info): Remove typedef.
10944         (dwarf2_cu::method_info): Now a std::vector.
10945         (add_to_method_list): Update.
10946         (free_delayed_list): Remove.
10947         (compute_delayed_physnames): Update.
10948         (process_full_comp_unit, process_full_type_unit): Clear the method
10949         list.  Remove cleanups.
10950         (psymtab_include_file_name): Add name_holder parameter.  Use
10951         unique_xmalloc_ptr.
10952         (dwarf_decode_lines): Update.
10953
10954 2018-01-17  Tom Tromey  <tom@tromey.com>
10955             Simon Marchi  <simon.marchi@ericsson.com>
10956
10957         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10958         (dwarf2_per_objfile::free_cached_comp_units)
10959         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10960         (init_cutu_and_read_dies_no_follow): Update.
10961         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10962         (dwarf2_cu::~dwarf2_cu): New.
10963         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10964         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10965
10966 2018-01-17  Tom Tromey  <tom@tromey.com>
10967             Simon Marchi  <simon.marchi@ericsson.com>
10968
10969         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10970         (struct die_reader_specs) <abbrev_table>: New member.
10971         (struct abbrev_table): Add constructor.
10972         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10973         <abbrev_obstack>: Now an auto_obstack.
10974         (abbrev_table_up): New typedef.
10975         (init_cu_die_reader): Add abbrev_table parameter.
10976         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10977         Add result_dwo_abbrev_table.
10978         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10979         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10980         Update.
10981         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10982         parameter.
10983         (skip_children): Update.
10984         (abbrev_table::alloc_abbrev): Rename from
10985         abbrev_table_alloc_abbrev.
10986         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10987         (abbrev_table::lookup_abbrev): Rename from
10988         abbrev_table_lookup_abbrev.
10989         (abbrev_table_read_table): Return abbrev_table_up.
10990         (abbrev_table_free, abbrev_table_free_cleanup)
10991         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10992         (load_partial_dies): Update.
10993
10994 2018-01-17  Tom Tromey  <tom@tromey.com>
10995
10996         * dwarf2read.c (dwarf2_compute_name): Update comment.
10997         (read_func_scope, read_variable): Update.
10998         (new_symbol): Remove.
10999         (new_symbol_full): Rename to new_symbol.
11000
11001 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11002
11003         PR gdb/16577
11004         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11005         a warning instead of throwing an error, set section size to 0 and return
11006         NULL.
11007         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11008
11009 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11010
11011         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11012         std::string.
11013         (linux_ptrace_attach_fail_reason_string): Likewise.
11014         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11015         Likewise.
11016         (linux_ptrace_attach_fail_reason_string): Likewise.
11017         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11018
11019 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11020
11021         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11022
11023 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11024
11025         PR gdb/21559
11026         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11027         checking for fs_base/gs_base fields in struct user_regs_struct.
11028         * configure: Regenerate.
11029
11030 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11031
11032         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11033         function.
11034         (aarch64_linux_init_abi): Install it to gdbarch hook
11035         gcc_target_options.
11036
11037 2018-01-15  Pedro Alves  <palves@redhat.com>
11038
11039         * common/signals-state-save-restore.c
11040         (save_original_signals_state): Fix typos.
11041
11042 2017-01-12  Tom Tromey  <tom@tromey.com>
11043             Sergio Durigan Junior  <sergiodj@redhat.com>
11044
11045         * Makefile.in (install-only): Install gdb-add-index.
11046
11047 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11048
11049         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11050
11051 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11052
11053         * infrun.c (keep_going_pass_signal): Clear step-over info when
11054         insert_breakpoints fails.
11055
11056 2018-01-11  Pedro Alves  <palves@redhat.com>
11057
11058         PR gdb/22583
11059         * infrun.c (resume): Rename to ...
11060         (resume_1): ... this.
11061         (resume): Reimplement as wrapper around resume_1.
11062
11063 2018-01-11  Pedro Alves  <palves@redhat.com>
11064
11065         PR remote/22597
11066         * remote.c (remote_parse_stop_reply): Default to the last-set
11067         general thread instead of to 'magic_null_ptid'.
11068
11069 2018-01-10  Pedro Alves  <palves@redhat.com>
11070
11071         * language.h (language_get_symbol_name_matcher): Rename ...
11072         (get_symbol_name_matcher): ... this.
11073         * language.c (language_get_symbol_name_matcher): Ditto.
11074         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11075         callers adjusted.
11076
11077 2018-01-10  Pedro Alves  <palves@redhat.com>
11078
11079         PR gdb/22670
11080         * dwarf2read.c
11081         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11082         Adjust to use language_get_symbol_name_matcher instead of
11083         language_defn::la_get_symbol_name_matcher.
11084         * language.c (language_get_symbol_name_matcher): If in Ada mode
11085         and the lookup name is a verbatim match, return Ada's matcher.
11086         * language.h (language_get_symbol_name_matcher): Adjust comment.
11087         (ada_lookup_name_info::verbatim_p):: New method.
11088
11089 2018-01-10  Pedro Alves  <palves@redhat.com>
11090
11091         PR gdb/22670
11092         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11093         minsym's language is language_auto or language_cplus, pass down
11094         language_ada instead.
11095         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11096
11097 2018-01-10  Pedro Alves  <palves@redhat.com>
11098
11099         PR gdb/22670
11100         * minsyms.c (linkage_name_str): New function.
11101         (iterate_over_minimal_symbols): Use it.
11102
11103 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11104
11105         * NEWS: Document that 'info proc' now works on FreeBSD.
11106
11107 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11108
11109         * configure.ac: Check for kinfo_getfile in libutil.
11110         * configure: Regenerate.
11111         * config.in: Regenerate.
11112         * fbsd-nat.c: Include "fbsd-tdep.h".
11113         (fbsd_fetch_cmdline): New.
11114         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11115         rather than calling error.
11116         (fbsd_info_proc): New.
11117         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11118         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11119         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11120
11121 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11122
11123         * fbsd-nat.c (struct free_deleter): Remove.
11124         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11125
11126 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11127
11128         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11129         NULL for an empty pathname.
11130
11131 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11132
11133         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11134         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11135         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11136         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11137         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11138         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11139         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11140         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11141         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11142         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11143         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11144         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11145         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11146         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11147         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11148
11149 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11150
11151         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11152         (gnu_xfer_auxv): New function.
11153         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11154         TARGET_OBJECT_AUXV.
11155
11156 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11157             Simon Marchi  <simon.marchi@ericsson.com>
11158
11159         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11160         common/selftest.c.
11161         (COMMON_OBS): Remove selftest.o.
11162         * configure.ac: Append selftest-arch.c and common/selftest.c to
11163         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11164         * configure: Re-generated.
11165         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11166         GDB_SELF_TEST.
11167         (maintenance_info_selftests): Likewise.
11168
11169 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11170
11171         * ada-valprint.c (val_print_packed_array_elements): Use
11172         proper number of elements when printing an array indexed
11173         by an enumeration type.
11174
11175 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11176
11177         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11178         (dw2_get_file_names_reader): Adjust.
11179         (lookup_dwo_signatured_type): Adjust.
11180         (lookup_dwp_signatured_type): Adjust.
11181         (lookup_signatured_type): Adjust.
11182         (create_type_unit_group): Adjust.
11183         (get_type_unit_group): Adjust.
11184         (process_psymtab_comp_unit_reader): Adjust.
11185         (build_type_psymtabs_reader): Adjust.
11186         (scan_partial_symbols): Adjust.
11187         (add_partial_symbol): Adjust.
11188         (add_partial_subprogram): Adjust.
11189         (peek_die_abbrev): Adjust.
11190         (fixup_go_packaging): Adjust.
11191         (process_imported_unit_die): Adjust.
11192         (dwarf2_compute_name): Adjust.
11193         (dwarf2_physname): Adjust.
11194         (read_import_statement): Adjust.
11195         (handle_DW_AT_stmt_list): Adjust.
11196         (read_file_scope): Adjust.
11197         (read_func_scope): Adjust.
11198         (read_lexical_block_scope): Adjust.
11199         (read_call_site_scope): Adjust.
11200         (read_variable): Adjust.
11201         (dwarf2_rnglists_process): Adjust.
11202         (dwarf2_ranges_process): Adjust.
11203         (dwarf2_ranges_read): Adjust.
11204         (dwarf2_get_pc_bounds): Adjust.
11205         (dwarf2_record_block_ranges): Adjust.
11206         (dwarf2_add_field): Adjust.
11207         (dwarf2_add_member_fn): Adjust.
11208         (read_structure_type): Adjust.
11209         (process_structure_scope): Adjust.
11210         (read_enumeration_type): Adjust.
11211         (read_array_type): Adjust.
11212         (mark_common_block_symbol_computed): Adjust.
11213         (read_common_block): Adjust.
11214         (read_namespace_type): Adjust.
11215         (read_namespace): Adjust.
11216         (read_module_type): Adjust.
11217         (read_tag_pointer_type): Adjust.
11218         (read_tag_ptr_to_member_type): Adjust.
11219         (read_tag_string_type): Adjust.
11220         (read_subroutine_type): Adjust.
11221         (read_typedef): Adjust.
11222         (read_base_type): Adjust.
11223         (attr_to_dynamic_prop): Adjust.
11224         (read_subrange_type): Adjust.
11225         (read_unspecified_type): Adjust.
11226         (dwarf2_read_abbrevs): Adjust.
11227         (load_partial_dies): Adjust.
11228         (read_partial_die): Adjust.
11229         (find_partial_die): Adjust.
11230         (guess_partial_die_structure_name): Adjust.
11231         (fixup_partial_die): Adjust.
11232         (read_attribute_value): Adjust.
11233         (read_addr_index): Adjust.
11234         (read_addr_index_from_leb128): Adjust.
11235         (read_str_index): Adjust.
11236         (dwarf2_string_attr): Adjust.
11237         (get_debug_line_section): Adjust.
11238         (dwarf_decode_line_header): Adjust.
11239         (lnp_state_machine::check_line_address): Adjust.
11240         (dwarf_decode_lines_1): Adjust.
11241         (dwarf_decode_lines): Adjust.
11242         (dwarf2_start_symtab): Adjust.
11243         (var_decode_location): Adjust.
11244         (new_symbol_full): Adjust.
11245         (dwarf2_const_value_data): Adjust.
11246         (dwarf2_const_value_attr): Adjust.
11247         (dwarf2_const_value): Adjust.
11248         (die_type): Adjust.
11249         (die_containing_type): Adjust.
11250         (build_error_marker_type): Adjust.
11251         (lookup_die_type): Adjust.
11252         (guess_full_die_structure_name): Adjust.
11253         (anonymous_struct_prefix): Adjust.
11254         (determine_prefix): Adjust.
11255         (dwarf2_name): Adjust.
11256         (follow_die_ref_or_sig): Adjust.
11257         (follow_die_offset): Adjust.
11258         (follow_die_ref): Adjust.
11259         (follow_die_sig_1): Adjust.
11260         (follow_die_sig): Adjust.
11261         (get_signatured_type): Adjust.
11262         (get_DW_AT_signature_type): Adjust.
11263         (decode_locdesc): Adjust.
11264         (dwarf_decode_macros): Adjust.
11265         (cu_debug_loc_section): Adjust.
11266         (fill_in_loclist_baton): Adjust.
11267         (dwarf2_symbol_mark_computed): Adjust.
11268         (init_one_comp_unit): Don't assign
11269         dwarf2_cu::dwarf2_per_objfile.
11270         (set_die_type): Adjust.
11271
11272 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11273
11274         * dwarf2read.c (struct mapped_debug_names): Add constructor.
11275         <dwarf2_per_objfile>: New field.
11276         (dwarf2_per_objfile): Remove global.
11277         (get_dwarf2_per_objfile): New function.
11278         (set_dwarf2_per_objfile): New function.
11279         (dwarf2_build_psymtabs_hard): Change objfile parameter to
11280         dwarf2_per_objfile.
11281         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11282         (read_abbrev_offset): Likewise.
11283         (read_indirect_string): Likewise.
11284         (read_indirect_line_string): Likewise.
11285         (read_indirect_string_at_offset): Likewise.
11286         (read_indirect_string_from_dwz): Likewise.
11287         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11288         dwarf2_per_objfile.
11289         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11290         (create_all_comp_units): Change objfile parameter to
11291         dwarf2_per_objfile.
11292         (create_all_type_units): Likewise.
11293         (process_queue): Add dwarf2_per_objfile parameter.
11294         (read_and_check_comp_unit_head): Likewise.
11295         (lookup_dwo_unit_in_dwp): Likewise.
11296         (get_dwp_file): Likewise.
11297         (process_cu_includes): Likewise.
11298         (struct free_dwo_file_cleanup_data): New struct.
11299         (dwarf2_has_info): Use get_dwarf2_per_objfile and
11300         set_dwarf2_per_objfile.
11301         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11302         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11303         context, adjust calls.
11304         (dw2_instantiate_symtab): Likewise.
11305         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11306         (dw2_get_cu): Likewise.
11307         (create_cu_from_index_list): Change objfile parameter to
11308         dwarf2_per_objfile.
11309         (create_cus_from_index_list): Get dwarf2_per_objfile from
11310         context, adjust calls.
11311         (create_cus_from_index): Likewise.
11312         (create_signatured_type_table_from_index): Change objfile
11313         parameter to dwarf2_per_objfile.
11314         (create_signatured_type_table_from_debug_names): Change objfile
11315         parameter to dwarf2_per_objfile.
11316         (create_addrmap_from_index): Likewise.
11317         (create_addrmap_from_aranges): Likewise.
11318         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11319         (dw2_setup): Remove.
11320         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11321         context.
11322         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11323         get_dwarf2_per_objfile.
11324         (dw2_forget_cached_source_info): Likewise.
11325         (dw2_map_symtabs_matching_filename): Likewise.
11326         (struct dw2_symtab_iterator) <index>: Remove.
11327         <dwarf2_per_objfile>: New field.
11328         (dw2_symtab_iter_init): Replace index parameter with
11329         dwarf2_per_objfile.
11330         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11331         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11332         (dw2_print_stats): Likewise.
11333         (dw2_dump): Likewise.
11334         (dw2_expand_symtabs_for_function): Likewise.
11335         (dw2_expand_all_symtabs): Likewise.
11336         (dw2_expand_symtabs_with_fullname): Likewise.
11337         (dw2_expand_marked_cus): Replace index and objfile parameters
11338         with dwarf2_per_objfile.
11339         (dw_expand_symtabs_matching_file_matcher): Add
11340         dwarf2_per_objfile parameter and adjust calls.
11341         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11342         adjust calls.
11343         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11344         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11345         adjust calls.
11346         (create_cus_from_debug_names_list): Replace objfile parameter
11347         with dwarf2_per_objfile and adjust calls.
11348         (create_cus_from_debug_names): Likewise.
11349         (dwarf2_read_debug_names): Likewise.
11350         (mapped_debug_names::namei_to_name): Adjust call.
11351         (dw2_debug_names_iterator::next): Likewise.
11352         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11353         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11354         (dw2_debug_names_dump): Likewise.
11355         (dw2_debug_names_expand_symtabs_for_function): Likewise.
11356         (dw2_debug_names_expand_symtabs_matching): Likewise.
11357         (dwarf2_initialize_objfile): Likewise.
11358         (dwarf2_build_psymtabs): Likewise.
11359         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11360         this_cu.
11361         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11362         (read_and_check_comp_unit_head): Likewise.
11363         (read_abbrev_offset): Likewise.
11364         (create_debug_type_hash_table): Likewise.
11365         (create_debug_types_hash_table): Likewise.
11366         (create_all_type_units): Replace objfile parameter with
11367         dwarf2_per_objfile.
11368         (add_type_unit): Add dwarf2_per_objfile parameter.
11369         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11370         with dwarf2_per_objfile.
11371         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11372         (lookup_dwp_signatured_type): Likewise.
11373         (lookup_signatured_type): Likewise.
11374         (read_cutu_die_from_dwo): Likewise.
11375         (init_tu_and_read_dwo_dies): Likewise.
11376         (init_cutu_and_read_dies): Likewise.
11377         (init_cutu_and_read_dies_no_follow): Likewise.
11378         (allocate_type_unit_groups_table): Add objfile parameter.
11379         (create_type_unit_group): Use dwarf2_per_objfile from cu.
11380         (get_type_unit_group): Likewise.
11381         (process_psymtab_comp_unit): Update call.
11382         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11383         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11384         (print_tu_stats): Likewise.
11385         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11386         in void* parameter.
11387         (build_type_psymtabs): Change objfile parameter to
11388         dwarf2_per_objfile.
11389         (process_skeletonless_type_unit): Use dwarf2_per_objfile
11390         passed in void* parameter.
11391         (process_skeletonless_type_units): Change objfile parameter to
11392         dwarf2_per_objfile.
11393         (set_partial_user): Likewise.
11394         (dwarf2_build_psymtabs_hard): Likewise.
11395         (read_comp_units_from_section): Likewise.
11396         (create_all_comp_units): Likewise.
11397         (scan_partial_symbols): Update calls.
11398         (add_partial_symbol): Likewise.
11399         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11400         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11401         (process_queue): Add dwarf2_per_objfile parameter.
11402         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11403         (compute_compunit_symtab_includes): Likewise.
11404         (process_cu_includes): Add dwarf2_per_objfile parameter.
11405         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11406         (process_full_type_unit): Likewise.
11407         (process_imported_unit_die): Update call.
11408         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11409         (read_file_scope): Likewise.
11410         (allocate_dwo_file_hash_table): Add objfile parameter.
11411         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11412         (create_cus_hash_table): Likewise.
11413         (create_dwp_hash_table): Likewise.
11414         (create_dwo_unit_in_dwp_v1): Likewise.
11415         (create_dwp_v2_section): Likewise.
11416         (create_dwo_unit_in_dwp_v2): Likewise.
11417         (lookup_dwo_unit_in_dwp): Likewise.
11418         (try_open_dwop_file): Likewise.
11419         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11420         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11421         cleanup to include a reference to dwarf2_per_objfile.
11422         (open_dwp_file): Add dwarf2_per_objfile parameter.
11423         (open_and_init_dwp_file): Likewise.
11424         (get_dwp_file): Likewise.
11425         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11426         (queue_and_load_all_dwo_tus): Update call.
11427         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11428         data.
11429         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11430         (dwarf2_ranges_process): Likewise.
11431         (dwarf2_get_pc_bounds): Likewise.
11432         (mark_common_block_symbol_computed): Likewise.
11433         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11434         (dwarf2_read_abbrevs): Update call.
11435         (read_partial_die): Use dwarf2_per_objfile from cu.
11436         (find_partial_die): Likewise.
11437         (fixup_partial_die): Likewise.
11438         (read_attribute_value): Likewise.
11439         (read_indirect_string_at_offset_from): Add objfile parameter.
11440         (read_indirect_string_at_offset): Add dwarf2_per_objfile
11441         parameter.
11442         (read_indirect_string_from_dwz): Add objfile parameter.
11443         (read_indirect_string): Add objfile parameter.
11444         (read_addr_index_1): Add dwarf2_per_objfile parameter.
11445         (read_addr_index): Use dwarf2_per_objfile from cu.
11446         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11447         call dw2_setup.
11448         (read_str_index): Use dwarf2_per_objfile from cu.
11449         (get_debug_line_section): Likewise.
11450         (read_formatted_entries): Add dwarf2_per_objfile parameter.
11451         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11452         (new_symbol_full): Use dwarf2_per_objfile from cu.
11453         (build_error_marker_type): Likewise.
11454         (lookup_die_type): Likewise.
11455         (determine_prefix): Likewise.
11456         (follow_die_offset): Likewise.
11457         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11458         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11459         (dwarf2_fetch_die_type_sect_off): Likewise.
11460         (dwarf2_get_die_type): Likewise.
11461         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11462         (get_signatured_type): Likewise.
11463         (get_DW_AT_signature_type): Likewise.
11464         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11465         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11466         (cu_debug_loc_section): Likewise.
11467         (fill_in_loclist_baton): Likewise.
11468         (dwarf2_symbol_mark_computed): Likewise.
11469         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11470         dwarf2_per_objfile.
11471         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11472         parameter.
11473         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11474         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11475         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11476         (set_die_type): Use dwarf2_free_objfile from cu.
11477         (get_die_type_at_offset): Likewise.
11478         (dwarf2_per_objfile_free): Don't assign global variable.
11479         (debug_names) <constructor>: Add dwarf2_per_objfile
11480         parameter, update m_debugstrlookup construction.
11481         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11482         parameter.
11483         <m_dwarf2_per_objfile>: New field.
11484         <lookup>: Use m_dwarf2_per_objfile.
11485         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11486         (psyms_seen_size): Likewise.
11487         (write_gdbindex): Replace objfile parameter with
11488         dwarf2_per_objfile.
11489         (write_debug_names): Likewise.
11490         (write_psymtabs_to_index): Likewise.
11491         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11492         calls.
11493
11494 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11495
11496         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11497         <dwarf2_per_objfile>: New field.
11498         (struct dwarf2_per_cu_data) <objfile>: Remove.
11499         <dwarf2_per_objfile>: New field.
11500         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11501         of objfile.
11502         (create_signatured_type_table_from_index): Likewise.
11503         (create_debug_type_hash_table): Likewise.
11504         (fill_in_sig_entry_from_dwo_entry): Likewise.
11505         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11506         (create_type_unit_group): Assign dwarf2_per_objfile instead of
11507         objfile.
11508         (create_partial_symtab): Access objfile through
11509         dwarf2_per_objfile.
11510         (process_psymtab_comp_unit_reader): Likewise.
11511         (read_comp_units_from_section): Likewise.
11512         (scan_partial_symbols): Likewise.
11513         (add_partial_symbol): Likewise.
11514         (add_partial_subprogram): Likewise.
11515         (peek_die_abbrev): Likewise.
11516         (fixup_go_packaging): Likewise.
11517         (process_full_comp_unit): Likewise.
11518         (process_full_type_unit): Likewise.
11519         (process_imported_unit_die): Likewise.
11520         (dwarf2_compute_name): Likewise.
11521         (dwarf2_physname): Likewise.
11522         (read_import_statement): Likewise.
11523         (create_cus_hash_table): Assign dwarf2_physname instead of
11524         objfile.
11525         (read_func_scope): Access objfile through dwarf2_per_objfile.
11526         (read_lexical_block_scope): Likewise.
11527         (read_call_site_scope): Likewise.
11528         (read_variable): Likewise.
11529         (dwarf2_rnglists_process): Likewise.
11530         (dwarf2_ranges_process): Likewise.
11531         (dwarf2_ranges_read): Likewise.
11532         (dwarf2_record_block_ranges): Likewise.
11533         (dwarf2_add_field): Likewise.
11534         (dwarf2_add_member_fn): Likewise.
11535         (read_structure_type): Likewise.
11536         (process_structure_scope): Likewise.
11537         (read_enumeration_type): Likewise.
11538         (read_array_type): Likewise.
11539         (read_common_block): Likewise.
11540         (read_namespace_type): Likewise.
11541         (read_namespace): Likewise.
11542         (read_module_type): Likewise.
11543         (read_tag_pointer_type): Likewise.
11544         (read_tag_ptr_to_member_type): Likewise.
11545         (read_tag_string_type): Likewise.
11546         (read_subroutine_type): Likewise.
11547         (read_typedef): Likewise.
11548         (read_base_type): Likewise.
11549         (attr_to_dynamic_prop): Likewise.
11550         (read_subrange_type): Likewise.
11551         (read_unspecified_type): Likewise.
11552         (load_partial_dies): Likewise.
11553         (read_partial_die): Likewise.
11554         (find_partial_die): Likewise.
11555         (guess_partial_die_structure_name): Likewise.
11556         (fixup_partial_die): Likewise.
11557         (read_attribute_value): Likewise.
11558         (read_addr_index_from_leb128): Likewise.
11559         (dwarf2_read_addr_index): Likewise.
11560         (dwarf2_string_attr): Likewise.
11561         (lnp_state_machine::check_line_address): Likewise.
11562         (dwarf_decode_lines_1): Likewise.
11563         (dwarf_decode_lines): Likewise.
11564         (dwarf2_start_symtab): Likewise.
11565         (var_decode_location): Likewise.
11566         (new_symbol_full): Likewise.
11567         (dwarf2_const_value_data): Likewise.
11568         (dwarf2_const_value_attr): Likewise.
11569         (dwarf2_const_value): Likewise.
11570         (die_type): Likewise.
11571         (die_containing_type): Likewise.
11572         (lookup_die_type): Likewise.
11573         (guess_full_die_structure_name): Likewise.
11574         (anonymous_struct_prefix): Likewise.
11575         (dwarf2_name): Likewise.
11576         (follow_die_ref_or_sig): Likewise.
11577         (follow_die_offset): Likewise.
11578         (follow_die_ref): Likewise.
11579         (dwarf2_fetch_die_loc_sect_off): Likewise.
11580         (dwarf2_fetch_constant_bytes): Likewise.
11581         (dwarf2_fetch_die_type_sect_off): Likewise.
11582         (dwarf2_get_die_type): Likewise.
11583         (follow_die_sig): Likewise.
11584         (decode_locdesc): Likewise.
11585         (dwarf2_per_cu_objfile): Likewise.
11586         (dwarf2_per_cu_text_offset): Likewise.
11587         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11588         objfile.
11589         (set_die_type): Access objfile through
11590         dwarf2_per_objfile.
11591
11592 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11593
11594         * valprint.c (converted_character_d): Remove typedef.
11595         (DEF_VEC_O (converted_character_d)): Remove.
11596         (count_next_character): Use std::vector.
11597         (print_converted_chars_to_obstack): Likewise.
11598         (generic_printstr): Likewise.
11599
11600 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11601
11602         * xml-support.h (struct gdb_xml_value): Add constructor.
11603         <value>: Change type to unique_xmalloc_ptr.
11604         (gdb_xml_value_s): Remove typedef.
11605         (DEF_VEC_O (gdb_xml_value_s)): Remove.
11606         (gdb_xml_element_start_handler): Change parameter type to
11607         std::vector.
11608         (xml_find_attribute): Likewise.
11609         * xml-support.c (xml_find_attribute): Change parameter type to
11610         std::vector and adjust.
11611         (gdb_xml_values_cleanup): Remove.
11612         (gdb_xml_parser::start_element): Adjust to std::vector.
11613         (xinclude_start_include): Change paraeter type to std::vector
11614         and adjust.
11615         * btrace.c (check_xml_btrace_version): Likewise.
11616         (parse_xml_btrace_block): Likewise.
11617         (parse_xml_btrace_pt_config_cpu): Likewise.
11618         (parse_xml_btrace_pt): Likewise.
11619         (parse_xml_btrace_conf_bts): Likewise.
11620         (parse_xml_btrace_conf_pt): Likewise.
11621         * memory-map.c (memory_map_start_memory): Likewise.
11622         (memory_map_start_property): Likewise.
11623         * osdata.c (osdata_start_osdata): Likewise.
11624         (osdata_start_item): Likewise.
11625         (osdata_start_column): Likewise.
11626         * remote.c (start_thread): Likewise.
11627         * solib-aix.c (library_list_start_library): Likewise.
11628         (library_list_start_list): Likewise.
11629         * solib-svr4.c (library_list_start_library): Likewise.
11630         (svr4_library_list_start_list): Likewise.
11631         * solib-target.c (library_list_start_segment): Likewise.
11632         (library_list_start_section): Likewise.
11633         (library_list_start_library): Likewise.
11634         (library_list_start_list): Likewise.
11635         * tracepoint.c (traceframe_info_start_memory): Likewise.
11636         (traceframe_info_start_tvar): Likewise.
11637         * xml-syscall.c (syscall_start_syscall): Likewise.
11638         * xml-tdesc.c (tdesc_start_target): Likewise.
11639         (tdesc_start_feature): Likewise.
11640         (tdesc_start_reg): Likewise.
11641         (tdesc_start_union): Likewise.
11642         (tdesc_start_struct): Likewise.
11643         (tdesc_start_flags): Likewise.
11644         (tdesc_start_enum): Likewise.
11645         (tdesc_start_field): Likewise.
11646         (tdesc_start_enum_value): Likewise.
11647         (tdesc_start_vector): Likewise.
11648
11649 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11650
11651         * extension.h (struct xmethod_worker) <clone>: Remove.
11652         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11653         Remove.
11654         (python_xmethod_worker::clone): Remove.
11655         * valops.c (find_overload_match): Use std::move instead of
11656         clone.
11657
11658 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11659
11660         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11661         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11662         <free_xmethod_worker_data>: Remove.
11663         <get_matching_xmethod_workers>: Chance VEC to std::vector.
11664         <get_xmethod_arg_types>: Remove.
11665         <get_xmethod_result_type>: Remove.
11666         <invoke_xmethod>: Remove.
11667         * extension.c (new_xmethod_worker): Remove.
11668         (clone_xmethod_worker): Remove.
11669         (get_matching_xmethod_workers): Return void, pass std::vector by
11670         pointer.
11671         (get_xmethod_arg_types): Rename to...
11672         (xmethod_worker::get_arg_types): ... this, and adjust.
11673         (get_xmethod_result_type): Rename to...
11674         (xmethod_worker::get_result_type): ... this, and adjust.
11675         (invoke_xmethod): Remove.
11676         (free_xmethod_worker): Remove.
11677         (free_xmethod_worker_vec): Remove.
11678         * extension.h (enum ext_lang_rc): Move here from
11679         extension-priv.h.
11680         (struct xmethod_worker): Add constructor and destructor.
11681         <data>: Remove.
11682         <value>: Remove.
11683         <invoke, clone, do_get_result_type, do_get_arg_types>: New
11684         virtual pure methods.
11685         <get_arg_types, get_result_type>: New methods.
11686         (xmethod_worker_ptr): Remove typedef.
11687         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11688         (xmethod_worker_vec): Remove typedef.
11689         (xmethod_worker_up): New typedef.
11690         (invoke_xmethod): Remove.
11691         (clone_xmethod_worker): Remove.
11692         (free_xmethod_worker): Remove.
11693         (free_xmethod_worker_vec): Remove.
11694         (get_xmethod_arg_types): Remove.
11695         (get_xmethod_result_type): Remove.
11696         * valops.c (find_method_list): Use std::vector, don't use
11697         intermediate vector.
11698         (value_find_oload_method_list): Use std::vector.
11699         (find_overload_match): Use std::vector.
11700         (find_oload_champ): Use std::vector.
11701         * value.c (value_free): Use operator delete.
11702         (value_of_xmethod): Rename to...
11703         (value_from_xmethod): ... this.  Don't assign
11704         xmethod_worker::value, take rvalue-reference.
11705         (result_type_of_xmethod): Adjust.
11706         (call_xmethod): Adjust.
11707         * value.h: Include extension.h.
11708         (struct xmethod_worker): Don't forward-declare.
11709         (value_of_xmethod): Rename to...
11710         (value_from_xmethod): ... this, take rvalue-reference.
11711         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11712         (struct python_xmethod_worker): ... this, add constructor and
11713         destructor.
11714         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11715         (gdbpy_free_xmethod_worker_data): Rename to...
11716         (python_xmethod_worker::~python_xmethod_worker): ... this and
11717         adjust.
11718         (gdbpy_clone_xmethod_worker_data): Rename to...
11719         (python_xmethod_worker::clone): ... this and adjust.
11720         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11721         temporary vector.
11722         (gdbpy_get_xmethod_arg_types): Rename to...
11723         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11724         (gdbpy_get_xmethod_result_type): Rename to...
11725         (python_xmethod_worker::do_get_result_type): ... this and
11726         adjust.
11727         (gdbpy_invoke_xmethod): Rename to...
11728         (python_xmethod_worker::invoke): ... this and adjust.
11729         (new_python_xmethod_worker): Rename to...
11730         (python_xmethod_worker::python_xmethod_worker): ... this and
11731         adjust.
11732         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11733         Remove.
11734         (gdbpy_free_xmethod_worker_data): Remove.
11735         (gdbpy_get_matching_xmethod_workers): Use std::vector.
11736         (gdbpy_get_xmethod_arg_types): Remove.
11737         (gdbpy_get_xmethod_result_type): Remove.
11738         (gdbpy_invoke_xmethod): Remove.
11739         * python/python.c (python_extension_ops): Remove obsolete
11740         callbacks.
11741
11742 2018-01-05  Pedro Alves  <palves@redhat.com>
11743
11744         PR gdb/18653
11745         * common/signals-state-save-restore.c
11746         (save_original_signals_state): New parameter 'quiet'.  Warn if we
11747         find a custom handler preinstalled, instead of internal erroring.
11748         But only warn if !quiet.
11749         * common/signals-state-save-restore.h
11750         (save_original_signals_state): New parameter 'quiet'.
11751         * main.c (captured_main_1): Move save_original_signals_state call
11752         after option handling, and pass QUIET.
11753
11754 2018-01-05  Pedro Alves  <palves@redhat.com>
11755
11756         * spu-tdep.c (spu_catch_start): Pass
11757         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11758
11759 2018-01-05  Pedro Alves  <palves@redhat.com>
11760
11761         PR gdb/22670
11762         * ada-lang.c (literal_symbol_name_matcher): New function.
11763         (ada_get_symbol_name_matcher): Use it for
11764         symbol_name_match_type::SEARCH_NAME.
11765         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
11766         it down instead of assuming symbol_name_match_type::FULL.
11767         * block.h (block_lookup_symbol): New parameter 'match_type'.
11768         * c-valprint.c (print_unpacked_pointer): Use
11769         lookup_symbol_search_name instead of lookup_symbol.
11770         * compile/compile-object-load.c (get_out_value_type): Pass down
11771         symbol_name_match_type::SEARCH_NAME.
11772         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11773         symbol_name_match_type::FULL.
11774         * cp-support.c (cp_get_symbol_name_matcher): Handle
11775         symbol_name_match_type::SEARCH_NAME.
11776         * infrun.c (insert_exception_resume_breakpoint): Use
11777         lookup_symbol_search_name.
11778         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11779         * psymtab.c (maintenance_check_psymtabs): Use
11780         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11781         * stack.c (print_frame_args): Use lookup_symbol_search_name and
11782         SYMBOL_SEARCH_NAME.
11783         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11784         if symbol_name_match_type::SEARCH_NAME.
11785         (lookup_symbol_in_language): Pass down
11786         symbol_name_match_type::FULL.
11787         (lookup_symbol_search_name): New.
11788         (lookup_language_this): Pass down
11789         symbol_name_match_type::SEARCH_NAME.
11790         (lookup_symbol_aux, lookup_local_symbol): New parameter
11791         'match_type'.  Pass it down.
11792         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11793         (lookup_symbol_search_name): New declaration.
11794         (lookup_symbol_in_block): New 'match_type' parameter.
11795
11796 2018-01-05  Pedro Alves  <palves@redhat.com>
11797
11798         PR gdb/22670
11799         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11800         ada_lookup_symbol.
11801         (ada_lookup_symbol): Reimplement in terms of
11802         ada_lookup_symbol_list, bits factored out from
11803         ada_lookup_encoded_symbol.
11804
11805 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11806
11807         * ada-exp.y (write_object_renaming): When subscripting an array
11808         using a symbol as the index, pass the block in call to
11809         ada_lookup_encoded_symbol when looking that symbol up.
11810
11811 2018-01-05  Jerome Guitton  <guitton@adacore.com>
11812
11813         * ada-lang.c (ada_array_length): Use ada_index_type instead of
11814         TYPE_INDEX_TYPE.
11815
11816 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11817
11818         * ada-lang.c (ada_to_fixed_value_create): Add handling of
11819         the case where VALUE_LVAL (val0) is not lval_memory.
11820
11821 2018-01-05  Xavier Roirand  <roirand@adacore.com>
11822
11823         * ada-valprint.c (print_optional_low_bound): Handle
11824         character-indexed array printing like boolean-indexed array
11825         printing.
11826
11827 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11828
11829         * NEWS: Create a new section for the next release branch.
11830         Rename the section of the current branch, now that it has
11831         been cut.
11832
11833 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
11834
11835         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11836         * version.in: Bump version to 8.1.50.DATE-git.
11837
11838 2018-01-03  Xavier Roirand  <roirand@adacore.com>
11839
11840         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11841         Add field.
11842         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11843         Add field.
11844         (default_exception_support_info) <catch_handlers_sym>: Add field.
11845         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11846         (ada_exception_name_addr_1): Add "catch handlers" handling.
11847         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11848         Update all callers.
11849         (create_excep_cond_exprs) <ex>: Add parameter.
11850         (re_set_exception): Update create_excep_cond_exprs call.
11851         (print_it_exception, print_one_exception, print_mention_exception)
11852         (print_recreate_exception): Add "catch handler" handling.
11853         (allocate_location_catch_handlers, re_set_catch_handlers)
11854         (check_status_catch_handlers, print_it_catch_handlers)
11855         (print_one_catch_handlers, print_mention_catch_handlers)
11856         (print_recreate_catch_handlers): New function.
11857         (catch_handlers_breakpoint_ops): New variable.
11858         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11859         Add parameter.  Add "catch handler" handling.
11860         (ada_exception_sym_name, ada_exception_breakpoint_ops):
11861         Add "catch handler" handling.
11862         (ada_exception_catchpoint_cond_string): Add "catch handler"
11863         handling.
11864         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11865         call.
11866         (catch_ada_handlers_command): New function.
11867         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11868         operations structure.
11869         (_initialize_ada_language): Add "catch handlers" command entry.
11870         * NEWS: Document "catch handlers" feature.
11871
11872 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11873
11874         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11875         account when creating the array type of the slice.
11876         (ada_value_slice): Likewise.
11877
11878 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11879
11880         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11881         New enum value.
11882         (create_array_type_with_stride): Add byte_stride_prop parameter.
11883         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11884         New parameter.  Update all callers in this file.
11885         (array_type_has_dynamic_stride): New function.
11886         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11887         of arrays with dynamic byte strides.
11888         * dwarf2read.c (read_array_type): Add support for dynamic
11889         DW_AT_byte_stride attributes.
11890
11891 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
11892
11893         * dwarf2read.c (read_unspecified_type): Treat
11894         DW_TAG_enumeration_type DIEs from Ada units as stubs.
11895
11896 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11897
11898         Update copyright year range in all GDB files.
11899
11900 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11901
11902         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11903         and gdb/testsuite/gdb.base/step-line.c.
11904
11905 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11906
11907         * copyright.py (main): Dump the contents of
11908         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11909         even if BY_HAND is empty.
11910
11911 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11912
11913         * top.c (print_gdb_version): Update Copyright year in version
11914         message.
11915
11916 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
11917
11918         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11919
11920 For older changes see ChangeLog-2017.
11921 \f
11922 Local Variables:
11923 mode: change-log
11924 left-margin: 8
11925 fill-column: 74
11926 version-control: never
11927 coding: utf-8
11928 End: