Set CU language before processing any DIEs (symtab/23010 et al)
[external/binutils.git] / gdb / ChangeLog
1 2018-07-24  Keith Seitz  <keiths@redhat.comt
2
3         PR symtab/23010
4         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
6         instead of add_symbol_to_list.
7         (read_file_scope): Call prepare_one_comp_unit before reading
8         any other DIEs.
9
10 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
11
12         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
13
14 2018-07-24  Tom Tromey  <tom@tromey.com>
15
16         * utils.c (malloc, realloc, free): Don't declare.
17         * configure, config.in: Rebuild.
18         * configure.ac: Don't check for declarations of free, malloc, or
19         realloc.
20
21 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
22
23         * aarch64-linux-nat.c
24         (aarch64_linux_nat_target::stopped_data_address): Remove unused
25         variable.
26         * arm-linux-nat.c (fetch_regs): Likewise.
27         (store_regs): Likewise.
28         (fetch_vfp_regs): Likewise.
29         (store_vfp_regs): Likewise.
30         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
31         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
32         (arm_linux_nat_target::insert_watchpoint): Likewise.
33         (arm_linux_nat_target::remove_watchpoint): Likewise.
34         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
35         Likewise.
36         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
37         Likewise.
38         * ppc-linux-nat.c (fetch_register): Likewise.
39         (fetch_all_gp_regs): Likewise.
40         (fetch_ppc_registers): Likewise.
41         (store_all_gp_regs): Likewise.
42         (store_ppc_registers): Likewise.
43         (hwdebug_insert_point): Likewise.
44         (can_use_watchpoint_cond_accel): Likewise.
45         * remote-sim.c (gdb_os_write_stdout): Likewise.
46
47 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
48             Tom Tromey  <tom@tromey.com>
49
50         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
51         test for it.
52         * configure: Rebuild.
53
54 2018-07-22  Tom Tromey  <tom@tromey.com>
55
56         * regformats/regdat.sh: Define xmltarget_${name} inside
57         #ifndef IN_PROCESS_AGENT.
58
59 2018-07-22  Tom Tromey  <tom@tromey.com>
60
61         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
62
63 2018-07-22  Tom Tromey  <tom@tromey.com>
64
65         * symfile.c (reread_symbols): Notify iter, not objfile.
66
67 2018-07-22  Tom Tromey  <tom@tromey.com>
68
69         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
70         Use arch_ops.
71         (ravenscar_thread_target::prepare_to_store): Likewise.
72
73 2018-07-22  Tom Tromey  <tom@tromey.com>
74
75         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
76         unused variable.  Call value_fetch_lazy when needed.
77         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
78         Remove unused variable.  Call value_fetch_lazy when needed.
79
80 2018-07-22  Tom Tromey  <tom@tromey.com>
81
82         * m32c-tdep.c (mark_dma): Return void.
83         (make_regs): Remove unused declarations.
84
85 2018-07-22  Tom Tromey  <tom@tromey.com>
86
87         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
88         cmdscm_get_valid_command_smob_arg_unsafe for effect.
89         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
90         bkscm_get_valid_block_smob_arg_unsafe for effect.
91
92 2018-07-22  Tom Tromey  <tom@tromey.com>
93
94         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
95         value_type.
96
97 2018-07-22  Tom Tromey  <tom@tromey.com>
98
99         * windows-nat.c (saved_context): Conditionally define.
100         * remote.c (remote_target::remote_btrace_maybe_reopen):
101         Conditionally declare "warned".
102         * inflow.c (sigquit_ours): Conditionally define.
103         (new_tty): Move "tty" declaration inside #if.
104         * guile/guile.c (guile_datadir): Conditionally define.
105         * charset.c (set_be_le_names): Move some declarations inside #if.
106         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
107         #if.
108         (parse_xml_btrace_conf): Likewise.
109
110 2018-07-22  Tom Tromey  <tom@tromey.com>
111
112         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
113
114 2018-07-22  Tom Tromey  <tom@tromey.com>
115
116         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
117         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
118         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
119         * buildsym-legacy.c (get_macro_table): Remove unused variable.
120         * stack.c (frame_apply_level_command): Remove unused variable.
121         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
122         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
123         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
124         unused variable.
125         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
126         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
127         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
128         variable.
129         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
130         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
131         variable.
132         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
133         Remove unused variable.
134         * cli/cli-script.c (recurse_read_control_structure): Remove unused
135         variable.
136         * common/tdesc.c (print_xml_feature::visit): Remove unused
137         variable.
138         * compile/compile-object-load.c (store_regs): Remove unused
139         variables.
140         * complaints.c (clear_complaints): Remove unused variable.
141         * corelow.c (core_target_open): Remove unused variable.
142         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
143         variable.
144         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
145         variable.
146         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
147         variable.
148         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
149         variable.
150         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
151         variable.
152         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
153         variable.
154         * ia64-tdep.c (examine_prologue): Remove unused variable.
155         * infcall.c (run_inferior_call): Remove unused variable.
156         * inferior.c (exit_inferior): Remove unused variable.
157         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
158         * linespec.c (decode_line_2): Remove unused variable.
159         * linux-nat.c (super_close): Remove.
160         * linux-tdep.c (linux_info_proc): Remove unused variable.
161         * mi/mi-main.c (mi_execute_command): Remove unused variable.
162         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
163         Remove unused variable.
164         * parse.c (find_minsym_type_and_address): Remove unused variable.
165         * printcmd.c (info_symbol_command, printf_floating): Remove unused
166         variable.
167         * python/py-breakpoint.c (bppy_set_commands): Remove unused
168         variable.
169         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
170         variables.
171         * record-btrace.c (record_btrace_target::store_registers): Remove
172         unused variable.
173         (cmd_show_record_btrace_cpu): Remove unused variable.
174         * riscv-tdep.c (riscv_register_reggroup_p)
175         (riscv_push_dummy_call, riscv_return_value): Remove unused
176         variable.
177         * rust-exp.y (literal): Remove unused variable.
178         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
179         unused variable.
180         <STRUCTOP_ANONYMOUS>: Likewise.
181         * s390-linux-tdep.c (s390_linux_init_abi_31)
182         (s390_linux_init_abi_64): Remove unused variable.
183         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
184         (file_select_thread, net_windows_open, _initialize_ser_windows):
185         Remove unused variables.
186         * symtab.c (find_pc_sect_line): Remove unused variable.
187         * target-memory.c (compute_garbled_blocks): Remove unused
188         variable.
189         (target_write_memory_blocks): Remove unused variable.
190         * target.c (target_stack::unpush): Remove unused variables.
191         * tracepoint.c (start_tracing, all_tracepoint_actions)
192         (merge_uploaded_trace_state_variables)
193         (print_one_static_tracepoint_marker): Remove unused variable.
194         * unittests/basic_string_view/element_access/char/1.cc (test01):
195         Remove unused variable.
196         * windows-nat.c (windows_continue, windows_add_all_dlls)
197         (do_initial_windows_stuff, windows_nat_target::create_inferior):
198         Remove unused variables.
199
200 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
201
202         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
203         attr_profile in HAVE_ELF.
204         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
205         HAVE_ELF.
206
207 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
208
209         * frame.c (frame_register_unwind): Change parameter name.
210         (frame_unwind_register): Likewise.
211         (frame_unwind_register_value): Likewise.
212         (frame_unwind_register_signed): Likewise.
213         (frame_unwind_register_unsigned): Likewise.
214         * frame.h (frame_register_unwind): Likewise.
215         (frame_unwind_register): Likewise.
216         (frame_unwind_register_value): Likewise.
217         (frame_unwind_register_signed): Likewise.
218         (frame_unwind_register_unsigned): Likewise.
219         (frame_unwind_arch): Likewise.
220
221 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
222
223         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
224         ISA maintenance.
225
226 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
227
228         * mips-linux-nat.c (mips_linux_nat_target::read_description):
229         Call `get_ptrace_pid' rather than extracting the ptrace PID by
230         hand.
231
232 2018-07-20  Keith Seitz  <keiths@redhat.com>
233
234         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
235         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
236         m_compunit_symtab, m_language>: Add "m_" prefix.
237         Update all uses.
238         * buildsym.c: Update all uses.
239
240 2018-07-20  Tom Tromey  <tom@tromey.com>
241
242         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
243         * buildsym.h (record_line_ftype): Remove typedef.
244
245 2018-07-20  Tom Tromey  <tom@tromey.com>
246
247         * buildsym-legacy.h (augment_type_symtab): Don't declare.
248         (end_expandable_symtab): Likewise.
249         (end_symtab_get_static_block): Likewise.
250         (end_symtab_from_static_block): Likewise.
251         * buildsym-legacy.c (augment_type_symtab): Remove.
252         (end_expandable_symtab): Remove.
253         (end_symtab_get_static_block): Remove.
254         (end_symtab_from_static_block): Remove.
255
256 2018-07-20  Tom Tromey  <tom@tromey.com>
257
258         * dwarf2read.c: Include buildsym.h.
259         (struct dwarf2_cu) <builder>: New method.
260         (fixup_go_packaging): Update.
261         (process_full_comp_unit, process_full_type_unit): Update.  Don't
262         use scoped_free_pendings.
263         (using_directives): Add "cu" parameter, remove "language".
264         (read_import_statement, setup_type_unit_groups, )
265         (read_func_scope, read_lexical_block_scope)
266         (dwarf2_record_block_ranges, read_namespace): Update.
267         (lnp_state_machine::lnp_state_machine): Add cu parameter.
268         (lnp_state_machine::handle_end_sequence): Update.
269         (class lnp_state_machine) <m_cu>: New member.
270         <m_record_line_callback>: Remove.
271         <m_currently_recording_lines>: New member.
272         (lnp_state_machine::handle_set_file): Update.
273         (noop_record_line): Remove.
274         (dwarf_record_line_p): Add cu parameter.
275         (dwarf_record_line_1, dwarf_finish_line): Likewise.
276         (lnp_state_machine::record_line)
277         (lnp_state_machine::lnp_state_machine)
278         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
279         (dwarf_decode_lines): Update.
280         (dwarf2_start_subfile): Add cu parameter.
281         (dwarf2_start_symtab, new_symbol): Update.
282         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
283         Remove dwarf2_per_objfile parameter.
284         (dwarf_decode_macros): Update.
285
286 2018-07-20  Tom Tromey  <tom@tromey.com>
287
288         * stabsread.c (define_symbol): Update.
289         * buildsym-legacy.h (get_buildsym_compunit): Declare.
290         * dwarf2read.c (new_symbol): Update.
291         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
292         * cp-namespace.c: Include buildsym.h.
293         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
294         * buildsym-legacy.c (get_buildsym_compunit): New function.
295
296 2018-07-20  Tom Tromey  <tom@tromey.com>
297
298         * xcoffread.c: Include buildsym-legacy.h.
299         * windows-nat.c: Include buildsym-legacy.h.
300         * stabsread.c: Include buildsym-legacy.h.
301         * mdebugread.c: Include buildsym-legacy.h.
302         * buildsym-legacy.h: New file.
303         * buildsym-legacy.c: New file, from buildsym.c.
304         * go32-nat.c: Include buildsym-legacy.h.
305         * dwarf2read.c: Include buildsym-legacy.h.
306         * dbxread.c: Include buildsym-legacy.h.
307         * cp-namespace.c: Include buildsym-legacy.h.
308         * coffread.c: Include buildsym-legacy.h.
309         * buildsym.h: Move some contents to buildsym-legacy.h.
310         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
311         buildsym-legacy.c.
312         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
313
314 2018-07-20  Tom Tromey  <tom@tromey.com>
315
316         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
317         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
318         (buildsym_compunit::buildsym_compunit)
319         (buildsym_compunit::~buildsym_compunit)
320         (buildsym_compunit::get_macro_table): Define.
321
322 2018-07-20  Tom Tromey  <tom@tromey.com>
323
324         * buildsym.c (reset_symtab_globals): Remove.
325         (buildsym_compunit::end_symtab_from_static_block): Update.
326         (buildsym_compunit::augment_type_symtab): Update.
327         (end_symtab_from_static_block): Call free_buildsym_compunit.
328         (augment_type_symtab, end_symtab, end_expandable_symtab):
329         Likewise.
330
331 2018-07-20  Tom Tromey  <tom@tromey.com>
332
333         * arch-utils.c: Do not include buildsym.h.
334         * mipsread.c: Do not include buildsym.h.
335         * machoread.c: Do not include buildsym.h.
336         * elfread.c: Do not include buildsym.h.
337
338 2018-07-20  Tom Tromey  <tom@tromey.com>
339
340         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
341         initialization.
342         (buildsym_compunit): Add new constructor.
343         (struct buildsym_compunit) <get_last_source_file, finish_block,
344         record_block_range, start_subfile, patch_subfile_names,
345         push_subfile, pop_subfile, record_line, get_compunit_symtab,
346         set_last_source_start_addr, get_last_source_start_addr,
347         get_local_using_directives, set_local_using_directives,
348         get_global_using_directives, outermost_context_p,
349         get_current_context_stack, get_context_stack_depth,
350         get_current_subfile, get_local_symbols, get_file_symbols,
351         get_global_symbols, record_debugformat, record_producer,
352         push_context, pop_context, end_symtab_get_static_block,
353         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
354         New public methods.
355         <record_pending_block, finish_block_internal, make_blockvector,
356         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
357         private methods.
358         Update all users.
359
360 2018-05-22  Tom Tromey  <tom@tromey.com>
361
362         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
363         parameter.
364         (finish_block_internal): Update.
365
366 2018-07-20  Tom Tromey  <tom@tromey.com>
367
368         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
369         parameter.
370         (finish_block_internal): Update.
371
372 2018-07-20  Tom Tromey  <tom@tromey.com>
373
374         * buildsym.h (EXTERN): Don't define or undef.
375         * buildsym.c (EXTERN): Don't define.
376
377 2018-07-20  Tom Tromey  <tom@tromey.com>
378
379         * buildsym.c: Remove TODO comment.
380
381 2018-07-20  Tom Tromey  <tom@tromey.com>
382
383         * coffread.c (coff_symtab_read): Update.
384         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
385         (xcoff_new_init): Update.
386         * mipsread.c (mipscoff_new_init): Update.
387         * mdebugread.c (mdebug_build_psymtabs): Update.
388         * elfread.c (elf_new_init): Update.
389         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
390         Update.
391         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
392         (coffstab_build_psymtabs, elfstab_build_psymtabs)
393         (stabsect_build_psymtabs): Update.
394         * buildsym.h (buildsym_init): Don't declare.
395         * buildsym.c: Update comment.
396         (prepare_for_building): Remove.
397         (start_symtab, restart_symtab): Update.
398         (reset_symtab_globals): Update comment.
399         (buildsym_init): Remove.
400
401 2018-07-20  Tom Tromey  <tom@tromey.com>
402
403         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
404         * stabsread.c (patch_block_stabs, define_symbol, read_type)
405         (read_enum_type, common_block_start, common_block_end)
406         (cleanup_undefined_types_1, finish_global_stabs): Update.
407         * mdebugread.c (psymtab_to_symtab_1): Update.
408         * dwarf2read.c (fixup_go_packaging, read_func_scope)
409         (read_lexical_block_scope, new_symbol): Update.
410         * dbxread.c (process_one_symbol): Update.
411         * coffread.c (coff_symtab_read, process_coff_symbol)
412         (coff_read_enum_type): Update.
413         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
414         declare.
415         (get_local_symbols, get_file_symbols, get_global_symbols): New
416         functions.
417         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
418         m_global_symbols.
419         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
420         (~scoped_free_pendings): Update.
421         (finish_block, prepare_for_building, reset_symtab_globals)
422         (end_symtab_get_static_block, end_symtab_with_blockvector)
423         (augment_type_symtab, push_context): Update.
424         (get_local_symbols, get_file_symbols, get_global_symbols): New
425         functions.
426         (buildsym_init): Update.
427
428 2018-07-20  Tom Tromey  <tom@tromey.com>
429
430         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
431         (process_full_type_unit): Likewise.
432         (dwarf2_start_symtab): Set list_in_scope.
433
434 2018-07-20  Tom Tromey  <tom@tromey.com>
435
436         * dwarf2read.c (process_psymtab_comp_unit_reader)
437         (build_type_psymtabs_reader): Do not set list_in_scope.
438
439 2018-07-20  Tom Tromey  <tom@tromey.com>
440
441         * buildsym.c (free_pendings): Remove.
442         (add_symbol_to_list, scoped_free_pendings)
443         (finish_block_internal, buildsym_init): Update.
444
445 2018-07-20  Tom Tromey  <tom@tromey.com>
446
447         * xcoffread.c (read_xcoff_symtab): Update.
448         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
449         Update.
450         * dbxread.c (process_one_symbol): Update.
451         * coffread.c (coff_symtab_read): Update.
452         * buildsym.h (finish_block): Update.
453         * buildsym.c (finish_block): Remove "listhead" argument.
454         (end_symtab_get_static_block): Update.
455
456 2018-07-20  Tom Tromey  <tom@tromey.com>
457
458         * buildsym.h (class scoped_free_pendings): Remove constructor.
459         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
460         method.
461         <m_pending_block_obstack, m_pending_blocks>: New members.
462         (pending_block_obstack, pending_blocks): Remove.
463         (scoped_free_pendings::scoped_free_pendings): Default.
464         (~scoped_free_pendings): Update.
465         (free_pending_blocks): Remove.
466         (finish_block_internal, record_pending_block, make_blockvector)
467         (end_symtab_get_static_block, augment_type_symtab, push_context)
468         (buildsym_init): Update.
469
470 2018-07-20  Tom Tromey  <tom@tromey.com>
471
472         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
473         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
474         members.
475         (pending_addrmap, pending_addrmap_obstack)
476         (pending_addrmap_interesting): Remove.
477         (scoped_free_pendings, record_block_range, make_blockvector)
478         (prepare_for_building, reset_symtab_globals, buildsym_init):
479         Update.
480
481 2018-07-20  Tom Tromey  <tom@tromey.com>
482
483         * xcoffread.c (process_linenos): Update.
484         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
485         * mdebugread.c (psymtab_to_symtab_1): Update.
486         * dwarf2read.c (setup_type_unit_groups)
487         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
488         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
489         * dbxread.c (process_one_symbol): Update.
490         * coffread.c (coff_symtab_read, enter_linenos)
491         (process_coff_symbol): Update.
492         * buildsym.h (current_subfile): Don't declare.
493         (get_current_subfile): Declare.
494         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
495         member.
496         (start_subfile, free_buildsym_compunit, push_subfile)
497         (prepare_for_building, start_symtab): Update.
498         (get_current_subfile): New function.
499
500 2018-07-20  Tom Tromey  <tom@tromey.com>
501
502         * coffread.c (coff_symtab_read): Update.
503         * xcoffread.c (read_xcoff_symtab): Update.
504         * dwarf2read.c (new_symbol): Update.
505         (read_func_scope, read_lexical_block_scope): Update.
506         * dbxread.c (process_one_symbol): Update.
507         * buildsym.h (context_stack, context_stack_depth): Don't declare.
508         (outermost_context_p): Remove macro.
509         (outermost_context_p, get_current_context_stack)
510         (get_context_stack_depth): Declare.
511         (pop_context): Return struct context_stack.
512         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
513         member.
514         (context_stack_size): Remove.
515         (INITIAL_CONTEXT_STACK_SIZE): Remove.
516         (prepare_for_building, end_symtab_get_static_block)
517         (augment_type_symtab, push_context): Update.
518         (pop_context): Return struct context_stack.
519         (outermost_context_p, get_current_context_stack)
520         (get_context_stack_depth): New functions.
521         (buildsym_init): Update.
522
523 2018-07-20  Tom Tromey  <tom@tromey.com>
524
525         * rust-exp.y: Now a pure parser.  Update all rules.
526         (%union): Move earlier.
527         (current_parser, work_obstack): Remove globals.
528         (rust_parser, ~rust_parser): Update.
529         (class rust_parser) <copy_name, concat3, crate_name, super_name,
530         lex_character, lex_number, lex_string, lex_identifier,
531         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
532         convert_name, convert_params_to_expression,
533         convert_ast_to_expression, ast_basic_type, ast_operation,
534         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
535         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
536         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
537         ast_array_type, ast_slice_type, ast_reference_type,
538         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
539         (rust_parse): Update.
540         (rustyyerror, rustyylex): Add parser parameter.
541         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
542         (rust_lex_stringish_test, rust_lex_test_sequence)
543         (rust_lex_test_trailing_dot, rust_lex_test_completion)
544         (rust_lex_test_push_back, rust_lex_tests): Update.
545
546 2018-07-19  Pedro Alves  <palves@redhat.com>
547
548         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
549         gdb::unique_xmalloc_ptr.
550         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
551         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
552         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
553         copy-initialization.
554         * guile/scm-pretty-print.c (ppscm_print_children): Use
555         gdb::unique_xmalloc_ptr instead of cleanups.
556         (gdbscm_apply_val_pretty_printer): Remove cleanups.
557         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
558         gdb::unique_xmalloc_ptr.
559         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
560         Adjust to use gdb::unique_xmalloc_ptr.
561         * guile/scm-utils.c (extract_arg): Adjust.
562         * guile/scm-value.c (gdbscm_value_field): Adjust to use
563         gdb::unique_xmalloc_ptr instead of a cleanup.
564
565 2018-07-19  Tom Tromey  <tom@tromey.com>
566
567         * utils.c (do_value_free_to_mark)
568         (make_cleanup_value_free_to_mark): Remove.
569         * utils.h (make_cleanup_value_free_to_mark): Remove.
570
571 2018-07-19  Pedro Alves  <palves@redhat.com>
572
573         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
574         forwarding reference.
575
576 2018-07-18  Pedro Alves  <palves@redhat.com>
577
578         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
579         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
580         cleanup.
581
582 2018-07-18  Pedro Alves  <palves@redhat.com>
583
584         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
585         exceptions.
586         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
587         (gdbscm_wrap): New.
588         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
589         directly instead of a cleanup.
590         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
591         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
592         (vlscm_binop_gdbthrow): New, factored out from ...
593         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
594         (vlscm_rich_compare): Use gdbscm_wrap.
595         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
596         instead of a cleanup.
597         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
598         cleanup.
599         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
600         Use xfree directly instead of a cleanup.
601         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
602         Adjust to use gdbscm_wrap and scoped_value_mark.
603         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
604         (gdbscm_value_address, gdbscm_value_dereference)
605         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
606         scoped_value_mark.
607         (gdbscm_value_dynamic_type): Use scoped_value_mark.
608         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
609         scoped_value_mark.
610         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
611         gdbscm_wrap and scoped_value_mark.
612         (gdbscm_value_to_string): Use xfree directly instead of a
613         cleanup.  Move 'buffer' unique_ptr to TRY scope.
614         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
615         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
616         scoped_value_mark.
617         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
618         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
619         scoped_value_mark.
620         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
621         gdbscm_wrap.
622
623 2018-07-18  Tom de Vries  <tdevries@suse.de>
624
625         * findvar.c (default_read_var_value): Also resolve dynamic type for
626         LOC_OPTIMIZED_OUT vars.
627
628 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
629
630         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
631         decoding.
632
633 2018-07-17  Tom Tromey  <tom@tromey.com>
634
635         * guile/scm-param.c (pascm_set_func, pascm_show_func)
636         (compute_enum_list, pascm_set_param_value_x)
637         (gdbscm_parameter_value): Update.
638         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
639         (gdbscm_scm_to_host_string): Update.
640         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
641         Update.
642         * guile/scm-cmd.c (cmdscm_add_completion): Update.
643         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
644         * guile/scm-string.c (gdbscm_scm_to_string): Return
645         unique_xmalloc_ptr.
646         (gdbscm_scm_to_host_string): Likewise.
647
648 2018-07-17  Tom Tromey  <tom@tromey.com>
649
650         * guile/guile.c (gdbscm_eval_from_control_command): Update.
651         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
652         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
653         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
654         unique_xmalloc_ptr.
655
656 2018-07-17  Tom Tromey  <tom@tromey.com>
657
658         * guile/scm-param.c (pascm_signal_setshow_error): Update.
659         * guile/guile-internal.h (gdbscm_exception_message_to_string):
660         Update.
661         * guile/scm-cmd.c (cmdscm_function): Update.
662         * guile/scm-pretty-print.c
663         (ppscm_print_exception_unless_memory_error): Update.
664         * guile/scm-exception.c (gdbscm_exception_message_to_string):
665         Return unique_xmalloc_ptr.
666
667 2018-07-17  Tom Tromey  <tom@tromey.com>
668
669         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
670         Use string_printf.
671
672 2018-07-17  Jim Wilson  <jimw@sifive.com>
673
674         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
675         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
676         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
677         unecessary braces after EF_RISCV_RVC test.  Delete call to
678         set_gdbarch_decr_pc_after_break.
679
680         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
681         RISCV_LAST_FP_REGNUM + 1.
682         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
683
684 2018-07-17  Tom Tromey  <tom@tromey.com>
685
686         * configure.ac: Remove --disable-gdbcli.
687         * configure: Rebuild.
688         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
689         (SUBDIR_CLI_CFLAGS): Remove.
690         (SFILES): Use SUBDIR_CLI_SRCS.
691         (COMMON_OBS): Use SUBDIR_CLI_OBS.
692
693 2018-07-17  Tom Tromey  <tom@tromey.com>
694
695         PR gdb/18624:
696         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
697
698 2018-07-16  Jim Wilson  <jimw@sifive.com>
699
700         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
701
702 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
703
704         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
705         variable.
706         (libunwind_frame_sniffer): Likewise.
707         (libunwind_frame_prev_register): Likewise.
708         (libunwind_sigtramp_frame_sniffer): Likewise.
709         * ia64-tdep.c (ia64_access_reg): Likewise.
710         (ia64_access_rse_reg): Likewise.
711         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
712         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
713
714 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
715
716         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
717
718 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
719
720         * remote-sim.c (gdbsim_target::close,
721         gdbsim_target::mourn_inferior): Remove unused variables.
722
723 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
724
725         * ia64-tdep.c (ktab_buf): New global.
726         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
727         (get_kernel_table): Adjust.
728
729 2018-07-16  Tom Tromey  <tom@tromey.com>
730
731         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
732         * dwarf2read.c (using_directives, new_symbol): Use
733         outermost_context_p.
734         * dbxread.c (process_one_symbol): Use outermost_context_p.
735         * coffread.c (coff_symtab_read): Use outermost_context_p.
736
737 2018-07-16  Tom Tromey  <tom@tromey.com>
738
739         * dwarf2read.c (using_directives, read_func_scope)
740         (read_lexical_block_scope): Update.
741         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
742         * buildsym.h (local_using_directives, global_using_directives):
743         Don't declare.
744         (get_local_using_directives, set_local_using_directives)
745         (get_global_using_directives): Declare.
746         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
747         m_global_using_directives>: New members.
748         (finish_block_internal, prepare_for_building)
749         (reset_symtab_globals, end_symtab_get_static_block)
750         (push_context): Update.
751         (get_local_using_directives, set_local_using_directives)
752         (get_global_using_directives): New functions.
753         (buildsym_init): Update.
754
755 2018-07-16  Tom Tromey  <tom@tromey.com>
756
757         * xcoffread.c (xcoff_initial_scan): Don't call
758         free_pending_blocks.
759         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
760         * buildsym.h (class scoped_free_pendings): Add constructor.
761         (free_pending_blocks): Don't declare.
762         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
763         (free_pending_blocks): Now static.
764
765 2018-07-16  Tom Tromey  <tom@tromey.com>
766
767         * buildsym.h (push_subfile, pop_subfile): Update declarations.
768         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
769         member.
770         (struct subfile_stack): Remove.
771         (subfile_stack): Remove.
772         (push_subfile, pop_subfile, buildsym_init): Update.
773
774 2018-07-16  Tom Tromey  <tom@tromey.com>
775
776         * buildsym.c (push_subfile): Use gdb_assert.
777         (pop_subfile): Use gdb_assert.
778
779 2018-07-16  Tom Tromey  <tom@tromey.com>
780
781         * buildsym.h (merge_symbol_lists): Remove.
782         * buildsym.c (merge_symbol_lists): Remove.
783
784 2018-07-16  Tom Tromey  <tom@tromey.com>
785
786         * stabsread.c (scan_file_globals): Update comment.
787         * stabsread.h (scan_file_globals): Move from buildsym.h.
788         * buildsym.h (scan_file_globals): Move to stabsread.h.
789
790 2018-07-16  Tom Tromey  <tom@tromey.com>
791
792         * xcoffread.c (xcoff_new_init): Update.
793         * mipsread.c (mipscoff_new_init): Update.
794         * mdebugread.c (mdebug_build_psymtabs): Update.
795         * elfread.c (elf_new_init): Update.
796         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
797         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
798         * buildsym.h (buildsym_new_init): Don't declare.
799         * buildsym.c (buildsym_new_init): Remove.
800
801 2018-07-16  Tom Tromey  <tom@tromey.com>
802
803         * stabsread.h (within_function): Move from buildsym.h.
804         * stabsread.c (start_stabs): Clear within_function.
805         * coffread.c (coff_start_symtab): Clear within_function.
806         * buildsym.h (within_function): Move to stabsread.h.
807         * buildsym.c (prepare_for_building): Update.
808
809 2018-07-16  Tom Tromey  <tom@tromey.com>
810
811         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
812         * dwarf2read.c (dwarf2_start_symtab): Don't set
813         processing_gcc_compilation.
814         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
815
816 2018-07-16  Tom Tromey  <tom@tromey.com>
817
818         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
819         (next_symbol_text_func): Move from buildsym.h.
820         * stabsread.c (hashname): Move from buildsym.c.
821         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
822         (next_symbol_text_func, hashname): Move to stabsread.h.
823         * buildsym.c: Don't include bcache.h
824         (hashname): Move to stasbread.c.
825
826 2018-07-16  Tom Tromey  <tom@tromey.com>
827
828         * buildsym.h (context_stack_size): Don't declare.
829         * buildsym.c (context_stack_size): New global.
830
831 2018-07-16  Tom Tromey  <tom@tromey.com>
832
833         * dbxread.c (processing_acc_compilation): New global.
834         * buildsym.h (processing_acc_compilation): Don't declare.
835
836 2018-07-16  Tom Tromey  <tom@tromey.com>
837
838         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
839         * dbxread.c (read_ofile_symtab): Update.
840         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
841         * buildsym.h (last_source_start_addr): Remove.
842         (set_last_source_start_addr, get_last_source_start_addr):
843         Declare.
844         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
845         parameter.
846         (struct buildsym_compunit) <m_last_source_start_addr>: New
847         member.
848         (prepare_for_building): Remove start_addr parameter.
849         (start_symtab, restart_symtab, end_symtab_get_static_block)
850         (end_symtab_with_blockvector): Update.
851         (set_last_source_start_addr, get_last_source_start_addr): New
852         functions.
853
854 2018-07-16  Tom Tromey  <tom@tromey.com>
855
856         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
857         member.
858         (have_line_numbers): Remove.
859         (record_line, prepare_for_building, end_symtab_get_static_block)
860         (augment_type_symtab): Update.
861
862 2018-07-16  Tom Tromey  <tom@tromey.com>
863
864         * buildsym.c (~buildsym_compunit): Free the macro table.
865         (struct buildsym_compunit) <get_macro_table, release_macros>: New
866         methods.
867         <m_pending_macros>: New member.
868         (pending_macros): Remove.
869         (~scoped_free_pendings, get_macro_table, prepare_for_building)
870         (reset_symtab_globals, end_symtab_get_static_block)
871         (end_symtab_with_blockvector, augment_type_symtab)
872         (buildsym_init): Update.
873
874 2018-07-16  Tom Tromey  <tom@tromey.com>
875
876         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
877         parameter.
878         (buildsym_compunit::set_last_source_file): New method.
879         <m_last_source_file>: New member.
880         (prepare_for_building): Remove "name" parameter.
881         (start_symtab, restart_symtab, reset_symtab_globals): Update.
882         (last_source_file): Remove.
883         (set_last_source_file, get_last_source_file): Update.
884
885 2018-07-16  Tom Tromey  <tom@tromey.com>
886
887         * buildsym.c (prepare_for_building): Add assert.
888
889 2018-07-16  Tom Tromey  <tom@tromey.com>
890
891         * buildsym.c (~buildsym_compunit): Update.
892         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
893         (start_subfile, patch_subfile_names)
894         (end_symtab_with_blockvector): Update.
895
896 2018-07-16  Tom Tromey  <tom@tromey.com>
897
898         * buildsym.c (struct buildsym_compunit): Add constructor,
899         destructor, initializers.
900         (start_buildsym_compunit): Remove.
901         (free_buildsym_compunit): Use "delete".
902         (start_symtab, restart_symtab): Use "new".
903
904 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
905
906         * symfile.c (set_objfile_default_section_offset): Remove struct
907         keyword.
908
909 2018-07-14  Stafford Horne  <shorne@gmail.com>
910
911         * (Responsible Maintainers): Add myself as or1k maintainer.
912
913 2018-07-13  Tom Tromey  <tom@tromey.com>
914
915         * symfile.c (set_objfile_default_section_offset): Use extra braces
916         around initializer.
917
918 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
919
920         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
921         non-branching basr.
922
923 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
924
925         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
926         unittests/cli-utils-selftests.c
927         * unittests/cli-utils-selftests.c: New file.
928
929 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
930
931         * NEWS: Mention new commands. Mention change to 'thread apply'.
932
933 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
934
935         * thread.c (thr_try_catch_cmd): New function.
936         (thread_apply_all_command): Handle qcs flags.
937         (thread_apply_command): Handle qcs flags.
938         (taas_command): New function.
939         (tfaas_command): New function.
940         (_initialize_thread): Update to setup the new commands 'taas
941         and 'tfaas'. Change doc string for 'thread apply'.
942
943 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
944
945         * stack.c: (trailing_outermost_frame): New function, mostly
946         extracted from backtrace_command_1.
947         (leading_innermost_frame): New function.
948         (backtrace_command_1): Update to call trailing_outermost_frame.
949         (frame_apply_command_count): New function.
950         (frame_apply_level_command): New function.
951         (frame_apply_all_command): New function.
952         (frame_apply_command): New function.
953         (faas_command): New function.
954         (frame_cmd_list): New variable.
955         (_initialize_stack): Update to setup the new commands 'frame apply'
956         and 'faas'.
957
958 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
959
960         * cli-utils.c (number_or_range_parser::get_number): Only handle
961         numbers or convenience var as numbers.
962         (parse_flags): New function.
963         (parse_flags_qcs): New function.
964         (number_or_range_parser::finished): Ensure parsing end is detected
965         before end of string.
966         * cli-utils.h (parse_flags): New function.
967         (parse_flags_qcs): New function.
968         (number_or_range_parser): Remove m_finished bool.
969         (number_or_range_parser::skip_range): Set m_in_range to false.
970
971 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
972
973         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
974         on Windows.
975
976 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
977             Jan Kratochvil  <jan.kratochvil@redhat.com>
978             Paul Fertser  <fercerpav@gmail.com>
979             Tsutomu Seki  <sekiriki@gmail.com>
980             Pedro Alves  <palves@redhat.com>
981
982         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
983         'unittests/parse-connection-spec-selftests.c'.
984         (COMMON_SFILES): Add 'common/netstuff.c'.
985         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
986         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
987         * common/netstuff.c: New file.
988         * common/netstuff.h: New file.
989         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
990         (wait_for_connect): Update comment.  New parameter
991         'gdb::optional<int> sock' instead of 'struct serial *scb'.
992         Use 'sock' directly instead of 'scb->fd'.
993         (try_connect): New function, with code from 'net_open'.
994         (net_open): Rewrite main loop to deal with multiple
995         sockets/addresses.  Handle IPv6-style hostnames; implement
996         support for IPv6 connections.
997         * unittests/parse-connection-spec-selftests.c: New file.
998
999 2018-07-11  Pedro Alves  <palves@redhat.com>
1000
1001         PR gdb/23377
1002         * remote.c (remote_target::remote_detach_pid): Call
1003         set_current_process.
1004
1005 2018-07-11  Pedro Alves  <palves@redhat.com>
1006
1007         * h8300-tdep.c (h8300_gdbarch_init): Remove
1008         set_gdbarch_ecoff_reg_to_regnum calls.
1009
1010 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
1011
1012         PR c++/23373
1013         * c-typeprint.c (c_type_print_base_struct_union): Don't print
1014         offsets/sizes for static members of a class/struct.
1015
1016 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
1017
1018         * target-descriptions.c (tdesc_register_bitsize): Rename.
1019         * target-descriptions.h (tdesc_register_bitsize): Likewise.
1020         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1021         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1022
1023 2018-07-10  Tom Tromey  <tom@tromey.com>
1024
1025         * breakpoint.c (moribund_locations): Now static and a
1026         std::vector.
1027         (breakpoint_init_inferior, moribund_breakpoint_here_p)
1028         (build_bpstat_chain, update_global_location_list)
1029         (breakpoint_retire_moribund): Update.
1030         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
1031         VEC.
1032
1033 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1034
1035         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1036         (riscv_register_reggroup_p): Use new function, remove unneeded
1037         parenthesis.
1038         (riscv_push_dummy_call): Extend assert to compare against xlen or
1039         flen based on register type.
1040
1041 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1042
1043         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1044
1045 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1046
1047         * remote.c (show_hardware_watchpoint_limit): New function.
1048         (show_hardware_watchpoint_length_limit): New function.
1049         (show_hardware_breakpoint_limit): New function.
1050         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1051         where appropriate, update help text.
1052
1053 2018-07-09  Tom Tromey  <tom@tromey.com>
1054
1055         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1056         (CLIBS): Don't mention NAT_CLIBS.
1057
1058 2018-07-09  Tom Tromey  <tom@tromey.com>
1059
1060         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1061         (LIBGDB_OBS, clean mostlyclean): Update.
1062         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1063
1064 2018-07-09  Tom Tromey  <tom@tromey.com>
1065
1066         * Makefile.in (%.c: %.y): Use ECHO_YACC.
1067         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
1068         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1069
1070 2018-07-09  Tom Tromey  <tom@tromey.com>
1071
1072         * Makefile.in (ALLDEPFILES): Remove exec.c.
1073         (COMMON_OBS): Remove exec.o.
1074         (COMMON_SFILES): Add exec.c.
1075
1076 2018-07-09  Tom Tromey  <tom@tromey.com>
1077
1078         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1079
1080 2018-07-09  Tom Tromey  <tom@tromey.com>
1081
1082         * Makefile.in (clean mostlyclean): Remove stamp-version.
1083         (version.c): Depend on stamp-version.
1084         (stamp-version): New rule, from version.c rule.
1085
1086 2018-07-09  Tom Tromey  <tom@tromey.com>
1087
1088         * Makefile.in (init.c): Depend on stamp-init.
1089         (stamp-init): New rule, from init.c rule.
1090         (clean mostlyclean): Remove stamp-init.
1091
1092 2018-07-09  Tom Tromey  <tom@tromey.com>
1093
1094         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1095         SUBDIR_GCC_COMPILE_SRCS.
1096
1097 2018-07-09  Tom Tromey  <tom@tromey.com>
1098
1099         * Makefile.in (init.c): Remove some unused sed rules.
1100
1101 2018-07-09  Tom Tromey  <tom@tromey.com>
1102
1103         * Makefile.in (TSOBS): Remove.
1104         (INIT_FILES): Update.
1105         (LIBGDB_OBS): Update.
1106         (COMMON_SFILES): Add inflow.c.
1107         (SFILES): Remove inflow.c.
1108
1109 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1110
1111         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1112
1113 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
1114
1115         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1116         get_saveloc_name, is_signal_frame_name, step_name,
1117         init_remote_name, create_addr_space_name,
1118         destroy_addr_space_name, search_unwind_table_name,
1119         find_dyn_list_name): Constify.
1120
1121 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
1122
1123         * darwin-nat.c (darwin_pthread_kill): New function.
1124         (darwin_resume_thread): Use darwin_pthread_kill.
1125
1126 2018-07-05  Tom de Vries  <tdevries@suse.de>
1127
1128         * macroexp.c (macro_buffer) <operator=>: New member function.
1129
1130 2018-07-04  Tom Tromey  <tom@tromey.com>
1131
1132         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1133
1134 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
1135
1136         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1137         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1138         * maint.c: Likewise.
1139         * top.c: Likewise.
1140
1141 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1142
1143         * NEWS: Create a new section for the next release branch.
1144         Rename the section of the current branch, now that it has
1145         been cut.
1146
1147 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
1148
1149         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1150         * version.in: Bump version to 8.2.50.DATE-git.
1151
1152 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
1153             Pedro Alves  <palves@redhat.com>
1154
1155         * linux-nat.c (linux_init_ptrace): Rename to ...
1156         (linux_init_ptrace_procfs): ... this.  Call
1157         linux_proc_init_warnings.
1158         (linux_nat_target::post_attach)
1159         (linux_nat_target::post_startup_inferior): Adjust.
1160         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1161         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1162
1163 2018-07-04  Tom de Vries  <tdevries@suse.de>
1164
1165         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1166         check ...
1167         (read_comp_unit_head): ... here.
1168
1169 2018-07-03  Tom Tromey  <tom@tromey.com>
1170
1171         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1172         (stop_tracing, tstatus_command)
1173         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1174         (print_one_static_tracepoint_marker): Update.
1175         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1176         std::vector.
1177         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
1178         VEC.
1179         (all_tracepoints, static_tracepoints_here): Return std::vector.
1180
1181 2018-07-03  Tom Tromey  <tom@tromey.com>
1182
1183         * common/ptid.c (ptid_equal): Remove.
1184         * common/ptid.h (ptid_equal): Don't declare.
1185         * ada-tasks.c: Update.
1186         * breakpoint.c: Update.
1187         * common/agent.c: Update.
1188         * corelow.c: Update.
1189         * darwin-nat-info.c: Update.
1190         * darwin-nat.c: Update.
1191         * dcache.c: Update.
1192         * dtrace-probe.c: Update.
1193         * dummy-frame.c: Update.
1194         * fbsd-nat.c: Update.
1195         * frame.c: Update.
1196         * gdbthread.h: Update.
1197         * gnu-nat.c: Update.
1198         * go32-nat.c: Update.
1199         * inf-loop.c: Update.
1200         * inf-ptrace.c: Update.
1201         * infcall.c: Update.
1202         * infcmd.c: Update.
1203         * inflow.c: Update.
1204         * infrun.c: Update.
1205         * linux-fork.c: Update.
1206         * linux-nat.c: Update.
1207         * linux-thread-db.c: Update.
1208         * mi/mi-cmd-var.c: Update.
1209         * mi/mi-interp.c: Update.
1210         * mi/mi-main.c: Update.
1211         * nto-procfs.c: Update.
1212         * ppc-linux-tdep.c: Update.
1213         * procfs.c: Update.
1214         * python/py-inferior.c: Update.
1215         * python/py-record-btrace.c: Update.
1216         * python/py-record.c: Update.
1217         * ravenscar-thread.c: Update.
1218         * regcache.c: Update.
1219         * remote-sim.c: Update.
1220         * remote.c: Update.
1221         * sol-thread.c: Update.
1222         * solib.c: Update.
1223         * target.c: Update.
1224         * tui/tui-stack.c: Update.
1225         * varobj.c: Update.
1226         * windows-nat.c: Update.
1227         * windows-tdep.c: Update.
1228
1229 2018-07-03  Tom Tromey  <tom@tromey.com>
1230
1231         * common/ptid.c (ptid_match): Remove.
1232         * common/ptid.h (ptid_match): Don't declare.
1233         * fbsd-nat.c: Update.
1234         * infcmd.c: Update.
1235         * infrun.c: Update.
1236         * linux-nat.c: Update.
1237         * record-btrace.c: Update.
1238         * regcache.c: Update.
1239         * remote.c: Update.
1240
1241 2018-07-03  Tom Tromey  <tom@tromey.com>
1242
1243         * common/ptid.c (ptid_tid_p): Remove.
1244         * common/ptid.h (ptid_tid_p): Don't declare.
1245         * sol-thread.c: Update.
1246
1247 2018-07-03  Tom Tromey  <tom@tromey.com>
1248
1249         * common/ptid.c (ptid_lwp_p): Remove.
1250         * common/ptid.h (ptid_lwp_p): Don't declare.
1251         * fbsd-nat.c: Update.
1252         * linux-nat.c: Update.
1253         * nat/linux-procfs.c: Update.
1254         * nat/x86-linux-dregs.c: Update.
1255         * sol-thread.c: Update.
1256
1257 2018-07-03  Tom Tromey  <tom@tromey.com>
1258
1259         * common/ptid.c (ptid_is_pid): Remove.
1260         * common/ptid.h (ptid_is_pid): Don't declare.
1261         * infrun.c: Update.
1262         * linux-nat.c: Update.
1263         * mi/mi-interp.c: Update.
1264         * remote.c: Update.
1265         * thread.c: Update.
1266
1267 2018-07-03  Tom Tromey  <tom@tromey.com>
1268
1269         * common/ptid.c (ptid_get_tid): Remove.
1270         * common/ptid.h (ptid_get_tid): Don't declare.
1271         * ada-tasks.c: Update.
1272         * aix-thread.c: Update.
1273         * bsd-uthread.c: Update.
1274         * darwin-nat.c: Update.
1275         * fbsd-nat.c: Update.
1276         * i386-darwin-nat.c: Update.
1277         * infrun.c: Update.
1278         * linux-tdep.c: Update.
1279         * nto-procfs.c: Update.
1280         * ppc-ravenscar-thread.c: Update.
1281         * python/py-infthread.c: Update.
1282         * ravenscar-thread.c: Update.
1283         * sol-thread.c: Update.
1284         * sparc-ravenscar-thread.c: Update.
1285         * windows-nat.c: Update.
1286
1287 2018-07-03  Tom Tromey  <tom@tromey.com>
1288
1289         * common/ptid.c (ptid_get_lwp): Remove.
1290         * common/ptid.h (ptid_get_lwp): Don't declare.
1291         * aarch64-linux-nat.c: Update.
1292         * ada-tasks.c: Update.
1293         * aix-thread.c: Update.
1294         * amd64-linux-nat.c: Update.
1295         * arm-linux-nat.c: Update.
1296         * corelow.c: Update.
1297         * fbsd-nat.c: Update.
1298         * fbsd-tdep.c: Update.
1299         * gnu-nat.c: Update.
1300         * i386-cygwin-tdep.c: Update.
1301         * i386-gnu-nat.c: Update.
1302         * i386-linux-nat.c: Update.
1303         * ia64-linux-nat.c: Update.
1304         * inf-ptrace.c: Update.
1305         * infrun.c: Update.
1306         * linux-fork.c: Update.
1307         * linux-nat.c: Update.
1308         * linux-tdep.c: Update.
1309         * linux-thread-db.c: Update.
1310         * mips-linux-nat.c: Update.
1311         * nat/aarch64-linux-hw-point.c: Update.
1312         * nat/aarch64-linux.c: Update.
1313         * nat/linux-btrace.c: Update.
1314         * nat/linux-osdata.c: Update.
1315         * nat/linux-procfs.c: Update.
1316         * nat/x86-linux-dregs.c: Update.
1317         * obsd-nat.c: Update.
1318         * ppc-fbsd-nat.c: Update.
1319         * ppc-linux-nat.c: Update.
1320         * procfs.c: Update.
1321         * python/py-infthread.c: Update.
1322         * ravenscar-thread.c: Update.
1323         * remote.c: Update.
1324         * s390-linux-nat.c: Update.
1325         * sol-thread.c: Update.
1326         * sol2-tdep.c: Update.
1327         * spu-linux-nat.c: Update.
1328         * x86-linux-nat.c: Update.
1329         * xtensa-linux-nat.c: Update.
1330
1331 2018-07-03  Tom Tromey  <tom@tromey.com>
1332
1333         * common/ptid.c (ptid_get_pid): Remove.
1334         * common/ptid.h (ptid_get_pid): Don't declare.
1335         * aarch64-linux-nat.c: Update.
1336         * ada-lang.c: Update.
1337         * aix-thread.c: Update.
1338         * alpha-bsd-nat.c: Update.
1339         * amd64-fbsd-nat.c: Update.
1340         * amd64-linux-nat.c: Update.
1341         * arm-linux-nat.c: Update.
1342         * arm-nbsd-nat.c: Update.
1343         * auxv.c: Update.
1344         * break-catch-syscall.c: Update.
1345         * breakpoint.c: Update.
1346         * bsd-uthread.c: Update.
1347         * corelow.c: Update.
1348         * ctf.c: Update.
1349         * darwin-nat.c: Update.
1350         * fbsd-nat.c: Update.
1351         * fbsd-tdep.c: Update.
1352         * gcore.c: Update.
1353         * gnu-nat.c: Update.
1354         * hppa-nbsd-nat.c: Update.
1355         * hppa-obsd-nat.c: Update.
1356         * i386-fbsd-nat.c: Update.
1357         * ia64-linux-nat.c: Update.
1358         * inf-ptrace.c: Update.
1359         * infcmd.c: Update.
1360         * inferior.c: Update.
1361         * inferior.h: Update.
1362         * inflow.c: Update.
1363         * infrun.c: Update.
1364         * linux-fork.c: Update.
1365         * linux-nat.c: Update.
1366         * linux-tdep.c: Update.
1367         * linux-thread-db.c: Update.
1368         * m68k-bsd-nat.c: Update.
1369         * mi/mi-interp.c: Update.
1370         * mi/mi-main.c: Update.
1371         * mips-linux-nat.c: Update.
1372         * mips-nbsd-nat.c: Update.
1373         * mips64-obsd-nat.c: Update.
1374         * nat/aarch64-linux-hw-point.c: Update.
1375         * nat/aarch64-linux.c: Update.
1376         * nat/linux-btrace.c: Update.
1377         * nat/linux-osdata.c: Update.
1378         * nat/linux-procfs.c: Update.
1379         * nat/x86-linux-dregs.c: Update.
1380         * nto-procfs.c: Update.
1381         * obsd-nat.c: Update.
1382         * ppc-linux-nat.c: Update.
1383         * ppc-nbsd-nat.c: Update.
1384         * ppc-obsd-nat.c: Update.
1385         * proc-service.c: Update.
1386         * procfs.c: Update.
1387         * python/py-inferior.c: Update.
1388         * python/py-infthread.c: Update.
1389         * ravenscar-thread.c: Update.
1390         * record.c: Update.
1391         * remote-sim.c: Update.
1392         * remote.c: Update.
1393         * rs6000-nat.c: Update.
1394         * s390-linux-nat.c: Update.
1395         * sh-nbsd-nat.c: Update.
1396         * sol-thread.c: Update.
1397         * sparc-nat.c: Update.
1398         * sparc64-tdep.c: Update.
1399         * spu-linux-nat.c: Update.
1400         * spu-tdep.c: Update.
1401         * target-debug.h: Update.
1402         * target.c: Update.
1403         * thread.c: Update.
1404         * tid-parse.c: Update.
1405         * tracefile-tfile.c: Update.
1406         * vax-bsd-nat.c: Update.
1407         * windows-nat.c: Update.
1408         * x86-linux-nat.c: Update.
1409         * x86-nat.c: Update.
1410
1411 2018-07-03  Tom Tromey  <tom@tromey.com>
1412
1413         * common/ptid.c (pid_to_ptid): Remove.
1414         * common/ptid.h (pid_to_ptid): Don't declare.
1415         * aix-thread.c: Update.
1416         * arm-linux-nat.c: Update.
1417         * common/ptid.c: Update.
1418         * common/ptid.h: Update.
1419         * corelow.c: Update.
1420         * ctf.c: Update.
1421         * darwin-nat.c: Update.
1422         * fbsd-nat.c: Update.
1423         * fork-child.c: Update.
1424         * gnu-nat.c: Update.
1425         * go32-nat.c: Update.
1426         * inf-ptrace.c: Update.
1427         * infcmd.c: Update.
1428         * inferior.c: Update.
1429         * infrun.c: Update.
1430         * linux-fork.c: Update.
1431         * linux-nat.c: Update.
1432         * nat/aarch64-linux-hw-point.c: Update.
1433         * nat/fork-inferior.c: Update.
1434         * nat/x86-linux-dregs.c: Update.
1435         * nto-procfs.c: Update.
1436         * obsd-nat.c: Update.
1437         * procfs.c: Update.
1438         * progspace.c: Update.
1439         * remote.c: Update.
1440         * rs6000-nat.c: Update.
1441         * s390-linux-nat.c: Update.
1442         * sol-thread.c: Update.
1443         * spu-linux-nat.c: Update.
1444         * target.c: Update.
1445         * top.c: Update.
1446         * tracefile-tfile.c: Update.
1447         * windows-nat.c: Update.
1448
1449 2018-07-03  Tom Tromey  <tom@tromey.com>
1450
1451         * common/ptid.h (ptid_build): Don't declare.
1452         * common/ptid.c (ptid_build): Remove.
1453         * aix-thread.c: Update.
1454         * bsd-kvm.c: Update.
1455         * bsd-uthread.c: Update.
1456         * common/agent.c: Update.
1457         * common/ptid.c: Update.
1458         * common/ptid.h: Update.
1459         * corelow.c: Update.
1460         * darwin-nat.c: Update.
1461         * fbsd-nat.c: Update.
1462         * gnu-nat.c: Update.
1463         * linux-fork.c: Update.
1464         * linux-nat.c: Update.
1465         * linux-thread-db.c: Update.
1466         * nat/linux-osdata.c: Update.
1467         * nat/linux-procfs.c: Update.
1468         * nto-procfs.c: Update.
1469         * obsd-nat.c: Update.
1470         * proc-service.c: Update.
1471         * procfs.c: Update.
1472         * ravenscar-thread.c: Update.
1473         * remote-sim.c: Update.
1474         * remote.c: Update.
1475         * sol-thread.c: Update.
1476         * target.c: Update.
1477         * windows-nat.c: Update.
1478
1479 2018-07-03  Tom Tromey  <tom@tromey.com>
1480
1481         * infrun.c (follow_exec): Use exit_inferior_silent.
1482         * inferior.c (exit_inferior_num_silent): Remove.
1483         * inferior.h (exit_inferior_num_silent): Don't declare.
1484
1485 2018-07-03  Tom Tromey  <tom@tromey.com>
1486
1487         PR cli/23340:
1488         * darwin-nat.c (darwin_attach_pid): Reset inferior and
1489         inferior_ptid on error.
1490
1491 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
1492             Simon Marchi  <simon.marchi@polymtl.ca>
1493
1494         PR tdep/8282
1495         * disasm.h (gdb_disassembler): Add
1496         `m_disassembler_options_holder'. member
1497         * disasm.c (get_all_disassembler_options): New function.
1498         (gdb_disassembler::gdb_disassembler): Use it.
1499         (gdb_buffered_insn_length_init_dis): Likewise.
1500         (gdb_buffered_insn_length): Adjust accordingly.
1501         (set_disassembler_options): Handle options with arguments.
1502         (show_disassembler_options_sfunc): Likewise.  Add a leading new
1503         line if showing options with descriptions.
1504         (disassembler_options_completer): Adapt to using the
1505         `disasm_options_and_args_t' structure.
1506         * mips-tdep.c (mips_disassembler_options): New variable.
1507         (mips_disassembler_options_o32): Likewise.
1508         (mips_disassembler_options_n32): Likewise.
1509         (mips_disassembler_options_n64): Likewise.
1510         (gdb_print_insn_mips): Don't set `disassembler_options'.
1511         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1512         functions.
1513         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1514         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
1515         `gdbarch_disassembler_options_implicit' and
1516         `gdbarch_valid_disassembler_options'.
1517         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1518         `disasm_options_and_args_t' structure.
1519         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
1520         method.
1521         (valid_disassembler_options): Switch from `disasm_options_t' to
1522         the `disasm_options_and_args_t' structure.
1523         * NEWS: Document `set disassembler-options' support for the MIPS
1524         target.
1525         * gdbarch.h: Regenerate.
1526         * gdbarch.c: Regenerate.
1527
1528 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1529
1530         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
1531
1532 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
1533
1534         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
1535         parameter in call to amd64_target_description.
1536         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
1537         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
1538         (amd64fbsd_init_abi): Likewise.
1539         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
1540         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1541         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1542         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
1543
1544 2018-06-29  Pedro Alves  <palves@redhat.com>
1545
1546         * gdb/amd64-tdep.h (amd64_create_target_description): Add
1547         "segments" parameter.
1548         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
1549         (_initialize_amd64_tdep): Update call to
1550         amd64_create_target_description.
1551         (amd64_target_description): Add "segments" parameter.  Adjust
1552         the implementation to use it.
1553         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
1554         call to amd64_create_target_description.
1555         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
1556         * gdb/arch/amd64.h (amd64_create_target_description): Add
1557         "segments" register.
1558         * gdb/arch/amd64.c (amd64_create_target_description): Add
1559         "segments" parameter.  Call create_feature_i386_64bit_segments
1560         only if SEGMENTS is true.
1561         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
1562         call to amd64_create_target_description.
1563
1564 2018-06-29  Pedro Alves  <palves@redhat.com>
1565
1566         * thread.c (thread_target_id_str): New, factored out from ...
1567         (print_thread_info_1): ... here.  Use it to compute the max
1568         "Target Id" column width.
1569
1570 2018-06-29  Pedro Alves  <palves@redhat.com>
1571
1572         * remote.c (remote_target::extra_thread_info): Delete
1573         'display_buf' and 'n' locals.  from the cache, regardless of
1574         packet mechanims is in use.  Use cache for qThreadExtra and qP
1575         methods too.
1576
1577 2018-06-29  Pedro Alves  <palves@redhat.com>
1578
1579         * blockframe.c (find_pc_sect_containing_function): New function.
1580         * breakpoint.c (print_breakpoint_location): Don't call
1581         find_pc_sect_function.
1582         * linespec.c (create_sals_line_offset): Record the location's
1583         symbol in the sal.
1584         * linespec.c (convert_address_location_to_sals): Fill in sal's
1585         symbol with find_pc_sect_containing_function.
1586         * symtab.c (find_function_start_sal): Rename to ...
1587         (find_function_start_sal_1): ... this.
1588         (find_function_start_sal): Reimplement as wrapper around
1589         find_function_start_sal_1, and use
1590         find_pc_sect_containing_function to fill in the sal's symbol.
1591         (find_function_start_sal(symbol*, bool)): Adjust.
1592         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
1593         comments.
1594         (find_pc_sect_containing_function): Declare.
1595
1596 2018-06-29  Pedro Alves  <palves@redhat.com>
1597
1598         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
1599         true if the the location has no symbol.
1600
1601 2018-06-28  Tom Tromey  <tom@tromey.com>
1602
1603         * NEWS: Mention --enable-codesign.
1604         * silent-rules.mk (ECHO_SIGN): New variable.
1605         * configure.ac: Add --enable-codesign.
1606         * configure: Rebuild.
1607         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
1608         (gdb$(EXEEXT)): Optionally invoke codesign.
1609
1610 2018-06-28  Pedro Alves  <palves@redhat.com>
1611
1612         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
1613         comments.
1614         (switch_to_thread_no_regs): Adjust comment.
1615         * infcmd.c (stop_pc): Delete.
1616         (post_create_inferior, info_program_command): Replace references
1617         to stop_pc with references to thread_info->suspend.stop_pc.
1618         * inferior.h (stop_pc): Delete declaration.
1619         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
1620         (handle_inferior_event_1, handle_signal_stop)
1621         (process_event_stop_test, keep_going_stepped_thread)
1622         (handle_step_into_function, handle_step_into_function_backward)
1623         (print_stop_location): Replace references to stop_pc with
1624         references to thread_info->suspend.stop_pc.
1625         (struct infcall_suspend_state) <stop_pc>: Delete field.
1626         (save_infcall_suspend_state, restore_infcall_suspend_state):
1627         Remove references to inf_stat->stop_pc.
1628         * linux-fork.c (fork_load_infrun_state): Likewise.
1629         * record-btrace.c (record_btrace_set_replay): Likewise.
1630         * record-full.c (record_full_goto_entry): Likewise.
1631         * remote.c (print_one_stopped_thread): Likewise.
1632         * target.c (target_resume): Extend comment.
1633         * thread.c (set_executing_thread): New.
1634         (set_executing): Use it.
1635         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
1636         Remove references to stop_pc.
1637
1638 2018-06-28  Pedro Alves  <palves@redhat.com>
1639
1640         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
1641         Moving fetching stop_pc until after ecs->event_thread is refreshed.
1642
1643 2018-06-28  Tom Tromey  <tom@tromey.com>
1644
1645         * coffread.c (coff_symfile_finish): Update.
1646         * xcoffread.c (xcoff_symfile_finish): Update.
1647         * elfread.c (elf_symfile_finish): Update.
1648         * symfile.h (dwarf2_free_objfile): Don't declare.
1649         * dwarf2read.c (_initialize_dwarf2_read): Use
1650         register_objfile_data_with_cleanup.
1651         (dwarf2_free_objfile): Now static.  Change signature.
1652
1653 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1654
1655         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
1656         option "-o" to add-symbol-file-load to add an offset to each
1657         section's load address.
1658         * symfile.c (set_objfile_default_section_offset): New function.
1659
1660 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1661
1662         * symfile.c (add_symbol_file_command): Make sure that sections
1663         with the same name are sorted in the same order.
1664
1665 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1666
1667         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
1668         require the second argument.  If omitted, load sections at the
1669         addresses specified in the file.
1670
1671 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1672
1673         * symfile.c (symbol_file_command, symbol_file_add_main_1)
1674         (_initialize_symfile): Add option "-o" to symbol-file to add an
1675         offset to each section of the symbol file.
1676
1677 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
1678
1679         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
1680
1681 2018-06-27  Tom Tromey  <tom@tromey.com>
1682
1683         * stack.c (_initialize_stack): Update "func" help text.
1684
1685 2018-06-27  Tom Tromey  <tom@tromey.com>
1686
1687         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
1688         std::vector.
1689         (unwind_infopy_str, pyuw_create_unwind_info)
1690         (unwind_infopy_add_saved_register, pyuw_sniffer)
1691         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
1692         Update.
1693         (struct saved_reg): Add constructor.
1694         <value>: Now a gdbpy_ref<>.
1695
1696 2018-06-27  Tom Tromey  <tom@tromey.com>
1697
1698         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
1699
1700 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1701
1702         * gdb-gdb.py.in: Format using autopep8.
1703
1704 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1705
1706         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
1707         (type_lookup_function): Recognize CORE_ADDR values.
1708
1709 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1710
1711         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
1712         print tag_name.
1713
1714 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1715
1716         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
1717         <__lt__>: Add.
1718
1719 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1720
1721         * gdb-gdb.py: Move to...
1722         * gdb-gdb.py.in: ... here.
1723         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
1724         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
1725         dependencies.
1726         (distclean): Remove gdb-gdb.py when cleaning.
1727         (gdb-gdb.py, gdb-gdb.gdb): New rules.
1728         * configure: Re-generate.
1729
1730 2018-06-27  Pedro Alves  <palves@redhat.com>
1731
1732         * proc-service.c (get_ps_regcache): New.
1733         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1734         (ps_lsetfpregs): Use it.
1735
1736 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
1737
1738         PR gdb/21695
1739         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
1740         (dwarf_decode_lines_1): Adjust.
1741
1742 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
1743
1744         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
1745         override.
1746         <info_proc>: Likewise.
1747
1748 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
1749
1750         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
1751         to windows_fetch_one_register, and only handle the case of
1752         fetching one register.  Move the code that reloads the context
1753         and iterates over all registers if R is negative to...
1754         (windows_nat_target::fetch_registers): ... here.
1755         (do_windows_store_inferior_registers): Rename to
1756         windows_store_one_register, and only handle the case of storing
1757         one register.  Move the code that handles the case where r is
1758         negative to...
1759         (windows_nat_target::store_registers) ... here.
1760
1761 2018-06-26  Tom Tromey  <tom@tromey.com>
1762
1763         PR rust/22574:
1764         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
1765         * rust-lang.c (rust_print_struct_def): Add podata parameter.
1766         Update.
1767         (rust_internal_print_type): Add podata parameter.
1768         (rust_print_type): Update.
1769
1770 2018-06-26  Tom Tromey  <tom@tromey.com>
1771
1772         * typeprint.h (struct print_offset_data) <update, finish,
1773         maybe_print_hole>: New methods.
1774         <indentation>: New constant.
1775         * typeprint.c (print_offset_data::indentation): Define.
1776         (print_offset_data::maybe_print_hole, print_offset_data::update)
1777         (print_offset_data::finish): Move from c-typeprint.c and rename.
1778         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
1779         (print_spaces_filtered_with_print_options): Update.
1780         (c_print_type_union_field_offset, maybe_print_hole)
1781         (c_print_type_struct_field_offset): Move to typeprint.c and
1782         rename.
1783         (c_type_print_base_struct_union): Update.
1784
1785 2018-06-25  Pedro Alves  <palves@redhat.com>
1786
1787         * gdbthread.h (thread_info_ref, delete_thread)
1788         (delete_thread_silent, first_thread_of_inferior)
1789         (any_thread_of_inferior, switch_to_thread)
1790         (enable_thread_stack_temporaries)
1791         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1792         (get_last_thread_stack_temporary)
1793         (value_in_thread_stack_temporaries, can_access_registers_thread):
1794         Spell out "struct thread_info" instead of just "thread_info".
1795         * inferior.h (notice_new_inferior): Likewise.
1796
1797 2018-06-25  Pedro Alves  <palves@redhat.com>
1798
1799         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1800         pass thread_info pointer to delete_thread.
1801         (windows_nat_target::detach): Pass inferior pointer to
1802         detach_inferior.
1803         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1804         delete_thread.
1805         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1806         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1807         and pass a thread_info pointer to delete_thread.
1808         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1809         pass thread_info pointer to delete_thread.
1810         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1811         delete_thread_silent call.
1812         * procfs.c (procfs_target::detach): Pass inferior pointer to
1813         detach_inferior.
1814         (procfs_target::wait): Pass thread_info pointer to delete_thread.
1815         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1816         delete_thread_silent call.
1817         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1818         pass thread_info pointer to delete_thread.
1819         (windows_nat_target::detach): Pass inferior pointer to
1820         delete_inferior.
1821
1822 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
1823
1824         * regcache.c (readable_regcache::read_part): Fix asserts.
1825         (reg_buffer::raw_collect_part): New function.
1826         (regcache::write_part): Fix asserts.
1827         (reg_buffer::raw_supply_part): New function.
1828         (regcache::transfer_regset_register): New helper function.
1829         (regcache::transfer_regset): Call new functions.
1830         (regcache_supply_regset): Use gdb_byte*.
1831         (regcache::supply_regset): Likewise.
1832         (regcache_collect_regset): Likewise.
1833         (regcache::collect_regset): Likewise.
1834         * regcache.h (reg_buffer::raw_collect_part): New declaration.
1835         (reg_buffer::raw_supply_part): Likewise.
1836         (regcache::transfer_regset_register): Likewise.
1837         (regcache::transfer_regset): Use gdb_byte*.
1838
1839 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
1840
1841         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1842
1843 2018-06-21  Pedro Alves  <palves@redhat.com>
1844
1845         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1846         instead of a ptid_t.  All callers adjusted.
1847         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
1848         adjusted.
1849         (print_ada_task_info, display_current_task_id, task_command_1):
1850         Adjust.
1851         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1852         inferior_thread.
1853         (breakpoint_kind): Adjust.
1854         (remove_breakpoints_pid): Rename to ...
1855         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
1856         pointer.  All callers adjusted.
1857         (bpstat_clear_actions): Use inferior_thread.
1858         (get_bpstat_thread): New.
1859         (bpstat_do_actions): Use it.
1860         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1861         to take a thread_info pointer.  All callers adjusted.
1862         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1863         (breakpoint_re_set_thread): Use inferior_thread.
1864         * breakpoint.h (struct inferior): Forward declare.
1865         (bpstat_stop_status): Update.
1866         (remove_breakpoints_pid): Delete.
1867         (remove_breakpoints_inf): New.
1868         * bsd-uthread.c (bsd_uthread_target::wait)
1869         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1870         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1871         (maint_btrace_packet_history_cmd)
1872         (maint_btrace_clear_packet_history_cmd): Adjust.
1873         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1874         inferior_thread.
1875         * cli/cli-interp.c: Include "inferior.h".
1876         * common/refcounted-object.h (struct
1877         refcounted_object_ref_policy): New.
1878         * compile/compile-object-load.c: Include gdbthread.h.
1879         (store_regs): Use inferior_thread.
1880         * corelow.c (core_target::close): Use current_inferior.
1881         (core_target_open): Adjust to use first_thread_of_inferior and use
1882         the current inferior.
1883         * ctf.c (ctf_target::close): Adjust to use current_inferior.
1884         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1885         <thread>: ... this new field.  All references adjusted.
1886         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1887         Take a thread_info pointer instead of a ptid_t.
1888         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1889         (dummy_frame_discard, register_dummy_frame_dtor): Take a
1890         thread_info pointer instead of a ptid_t.
1891         * elfread.c: Include "inferior.h".
1892         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1893         Use inferior_thread.
1894         * eval.c (evaluate_subexp): Likewise.
1895         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1896         inferior_thread.
1897         * gdb_proc_service.h (struct thread_info): Forward declare.
1898         (struct ps_prochandle) <ptid>: Delete, replaced by ...
1899         <thread>: ... this new field.  All references adjusted.
1900         * gdbarch.h, gdbarch.c: Regenerate.
1901         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1902         'thread' parameter.  All implementations and callers adjusted.
1903         * gdbthread.h (thread_info) <set_running>: New method.
1904         (delete_thread, delete_thread_silent): Take a thread_info pointer
1905         instead of a ptid.
1906         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1907         (first_thread_of_process): Delete, replaced by ...
1908         (first_thread_of_inferior): ... this new function.  All callers
1909         adjusted.
1910         (any_live_thread_of_process): Delete, replaced by ...
1911         (any_live_thread_of_inferior): ... this new function.  All callers
1912         adjusted.
1913         (switch_to_thread, switch_to_no_thread): Declare.
1914         (is_executing): Delete.
1915         (enable_thread_stack_temporaries): Update comment.
1916         <enable_thread_stack_temporaries>: Take a thread_info pointer
1917         instead of a ptid_t.  Incref the thread.
1918         <~enable_thread_stack_temporaries>: Decref the thread.
1919         <m_ptid>: Delete
1920         <m_thr>: New.
1921         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1922         (get_last_thread_stack_temporary)
1923         (value_in_thread_stack_temporaries, can_access_registers_thread):
1924         Take a thread_info pointer instead of a ptid_t.  All callers
1925         adjusted.
1926         * infcall.c (get_call_return_value): Use inferior_thread.
1927         (run_inferior_call): Work with thread pointers instead of ptid_t.
1928         (call_function_by_hand_dummy): Work with thread pointers instead
1929         of ptid_t.  Use thread_info_ref.
1930         * infcmd.c (proceed_thread_callback): Access thread's state
1931         directly.
1932         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1933         access thread's state directly.
1934         (continue_command): Use inferior_thread.
1935         (info_program_command): Use find_thread_ptid and access thread
1936         state directly.
1937         (proceed_after_attach_callback): Use thread state directly.
1938         (notice_new_inferior): Take a thread_info pointer instead of a
1939         ptid_t.  All callers adjusted.
1940         (exit_inferior): Take an inferior pointer instead of a pid.  All
1941         callers adjusted.
1942         (exit_inferior_silent): New.
1943         (detach_inferior): Delete.
1944         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1945         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1946         (detach_inferior_command, kill_inferior_command): Use
1947         find_inferior_id instead of valid_gdb_inferior_id and
1948         gdb_inferior_id_to_pid.
1949         (inferior_command): Use inferior and thread pointers.
1950         * inferior.h (struct thread_info): Forward declare.
1951         (notice_new_inferior): Take a thread_info pointer instead of a
1952         ptid_t.  All callers adjusted.
1953         (detach_inferior): Delete declaration.
1954         (exit_inferior, exit_inferior_silent): Take an inferior pointer
1955         instead of a pid.  All callers adjusted.
1956         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1957         (valid_gdb_inferior_id): Delete.
1958         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1959         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1960         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1961         ...
1962         <inf>: ... this new field.
1963         <step_ptid>: Delete, replaced by ...
1964         <step_thread>: ... this new field.
1965         (get_displaced_stepping_state): Take an inferior pointer instead
1966         of a pid.  All callers adjusted.
1967         (displaced_step_in_progress_any_inferior): Adjust.
1968         (displaced_step_in_progress_thread): Take a thread pointer instead
1969         of a ptid_t.  All callers adjusted.
1970         (displaced_step_in_progress, add_displaced_stepping_state): Take
1971         an inferior pointer instead of a pid.  All callers adjusted.
1972         (get_displaced_step_closure_by_addr): Adjust.
1973         (remove_displaced_stepping_state): Take an inferior pointer
1974         instead of a pid.  All callers adjusted.
1975         (displaced_step_prepare_throw, displaced_step_prepare)
1976         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1977         All callers adjusted.
1978         (start_step_over): Adjust.
1979         (infrun_thread_ptid_changed): Remove bit updating ptids in the
1980         displaced step queue.
1981         (do_target_resume): Adjust.
1982         (fetch_inferior_event): Use inferior_thread.
1983         (context_switch, get_inferior_stop_soon): Take an
1984         execution_control_state pointer instead of a ptid_t.  All callers
1985         adjusted.
1986         (switch_to_thread_cleanup): Delete.
1987         (stop_all_threads): Use scoped_restore_current_thread.
1988         * inline-frame.c: Include "gdbthread.h".
1989         (inline_state) <inline_state>: Take a thread pointer instead of a
1990         ptid_t.  All callers adjusted.
1991         <ptid>: Delete, replaced by ...
1992         <thread>: ... this new field.
1993         (find_inline_frame_state): Take a thread pointer instead of a
1994         ptid_t.  All callers adjusted.
1995         (skip_inline_frames, step_into_inline_frame)
1996         (inline_skipped_frames, inline_skipped_symbol): Take a thread
1997         pointer instead of a ptid_t.  All callers adjusted.
1998         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1999         (inline_skipped_frames, inline_skipped_symbol): Likewise.
2000         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2001         pointers directly.
2002         * linux-nat.c (get_detach_signal): Likewise.
2003         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2004         (thread_db_notice_clone): Adjust.
2005         (thread_db_find_new_threads_silently)
2006         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2007         a thread pointer instead of a ptid_t.  All callers adjusted.
2008         * mi/mi-cmd-var.c: Include "inferior.h".
2009         (mi_cmd_var_update_iter): Update to use thread pointers.
2010         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2011         inferior directly.
2012         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2013         out to ...
2014         (mi_output_running): ... this new function.
2015         (mi_on_resume_1): Adjust to use it.
2016         (mi_user_selected_context_changed): Adjust to use inferior_thread.
2017         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2018         directly.
2019         (interrupt_thread_callback): : Adjust to use thread and inferior
2020         pointers.
2021         * proc-service.c: Include "gdbthread.h".
2022         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2023         * progspace-and-thread.c: Include "inferior.h".
2024         * progspace.c: Include "inferior.h".
2025         * python/py-exitedevent.c (create_exited_event_object): Adjust to
2026         hold a reference to an inferior_object.
2027         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2028         inferior_thread.
2029         * python/py-inferior.c (struct inferior_object): Give the type a
2030         tag name instead of a typedef.
2031         (python_on_normal_stop): No need to check if the current thread is
2032         listed.
2033         (inferior_to_inferior_object): Change return type to
2034         inferior_object.  All callers adjusted.
2035         (find_thread_object): Delete, bits factored out to ...
2036         (thread_to_thread_object): ... this new function.
2037         * python/py-infthread.c (create_thread_object): Use
2038         inferior_to_inferior_object.
2039         (thpy_is_stopped): Use thread pointer directly.
2040         (gdbpy_selected_thread): Use inferior_thread.
2041         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2042         field, replaced with ...
2043         <thread>: ... this new field.  All users adjusted.
2044         (btpy_insn_or_gap_new): Drop const.
2045         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
2046         callers adjusted.
2047         * python/py-record.c: Include "gdbthread.h".
2048         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2049         a ptid_t.  All callers adjusted.
2050         (gdbpy_current_recording): Use inferior_thread.
2051         * python/py-record.h (recpy_record_object) <ptid>: Delete
2052         field, replaced with ...
2053         <thread>: ... this new field.  All users adjusted.
2054         (recpy_element_object) <ptid>: Delete
2055         field, replaced with ...
2056         <thread>: ... this new field.  All users adjusted.
2057         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2058         a ptid_t.  All callers adjusted.
2059         * python/py-threadevent.c: Include "gdbthread.h".
2060         (get_event_thread): Use thread_to_thread_object.
2061         * python/python-internal.h (struct inferior_object): Forward
2062         declare.
2063         (find_thread_object, find_inferior_object): Delete declarations.
2064         (thread_to_thread_object, inferior_to_inferior_object): New
2065         declarations.
2066         * record-btrace.c: Include "inferior.h".
2067         (require_btrace_thread): Use inferior_thread.
2068         (record_btrace_frame_sniffer)
2069         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2070         (get_thread_current_frame): Use scoped_restore_current_thread and
2071         switch_to_thread.
2072         (get_thread_current_frame): Use thread pointer directly.
2073         (record_btrace_replay_at_breakpoint): Use thread's inferior
2074         pointer directly.
2075         * record-full.c: Include "inferior.h".
2076         * regcache.c: Include "gdbthread.h".
2077         (get_thread_arch_regcache): Use the inferior's address space
2078         directly.
2079         (get_thread_regcache, registers_changed_thread): New.
2080         * regcache.h (get_thread_regcache(thread_info *thread)): New
2081         overload.
2082         (registers_changed_thread): New.
2083         (remote_target) <remote_detach_1>: Swap order of parameters.
2084         (remote_add_thread): <remote_add_thread>: Return the new thread.
2085         (get_remote_thread_info(ptid_t)): New overload.
2086         (remote_target::remote_notice_new_inferior): Use thread pointers
2087         directly.
2088         (remote_target::process_initial_stop_replies): Use
2089         thread_info::set_running.
2090         (remote_target::remote_detach_1, remote_target::detach)
2091         (extended_remote_target::detach): Adjust.
2092         * stack.c (frame_show_address): Use inferior_thread.
2093         * target-debug.h (target_debug_print_thread_info_pp): New.
2094         * target-delegates.c: Regenerate.
2095         * target.c (default_thread_address_space): Delete.
2096         (memory_xfer_partial_1): Use current_inferior.
2097         (target_detach): Use current_inferior.
2098         (target_thread_address_space): Delete.
2099         (generic_mourn_inferior): Use current_inferior.
2100         * target.h (struct target_ops) <thread_address_space>: Delete.
2101         (target_thread_address_space): Delete.
2102         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
2103         pointers directly.
2104         (delete_thread_1, delete_thread, delete_thread_silent): Take a
2105         thread pointer instead of a ptid_t.  Adjust all callers.
2106         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2107         (first_thread_of_process): Delete, replaced by ...
2108         (first_thread_of_inferior): ... this new function.  All callers
2109         adjusted.
2110         (any_thread_of_process): Rename to ...
2111         (any_thread_of_inferior): ... this, and take an inferior pointer.
2112         (any_live_thread_of_process): Rename to ...
2113         (any_live_thread_of_inferior): ... this, and take an inferior
2114         pointer.
2115         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2116         (value_in_thread_stack_temporaries)
2117         (get_last_thread_stack_temporary): Take a thread pointer instead
2118         of a ptid_t.  Adjust all callers.
2119         (thread_info::set_running): New.
2120         (validate_registers_access): Use inferior_thread.
2121         (can_access_registers_ptid): Rename to ...
2122         (can_access_registers_thread): ... this, and take a thread
2123         pointer.
2124         (print_thread_info_1): Adjust to compare thread pointers instead
2125         of ptids.
2126         (switch_to_no_thread, switch_to_thread): Make extern.
2127         (scoped_restore_current_thread::~scoped_restore_current_thread):
2128         Use m_thread pointer directly.
2129         (scoped_restore_current_thread::scoped_restore_current_thread):
2130         Use inferior_thread.
2131         (thread_command): Use thread pointer directly.
2132         (thread_num_make_value_helper): Use inferior_thread.
2133         * top.c (execute_command): Use inferior_thread.
2134         * tui/tui-interp.c: Include "inferior.h".
2135         * varobj.c (varobj_create): Use inferior_thread.
2136         (value_of_root_1): Use find_thread_global_id instead of
2137         global_thread_id_to_ptid.
2138
2139 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
2140
2141         * regcache.c (readable_regcache::read_part): Avoid memcpy when
2142         possible.
2143         (regcache::write_part): Likewise.
2144         (readable_regcache::cooked_read_part): Update comment.
2145         (readable_regcache::cooked_write_part): Likewise.
2146         * regcache.h: (readable_regcache::read_part): Likewise.
2147         (regcache::write_part): Likewise.
2148
2149 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
2150             Dirk Schubert  <dirk.schubert@arm.com>
2151
2152         * aarch64-linux-nat.c (post_attach): New.
2153         (aarch64_linux_nat_target::post_attach): Override post_attach to
2154         record the number of hardware debug registers.
2155
2156 2018-06-20  Tom Tromey  <tom@tromey.com>
2157
2158         * python/py-param.c (add_setshow_generic): Make parameters const.
2159         (parmpy_init): Update.
2160
2161 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2162
2163         * regcache.h (regcache_cooked_read_ftype): Rename to...
2164         (register_read_ftype): ...this, change type to function_view.
2165         (class reg_buffer) <save>: Remove src parameter.
2166         (readonly_detached_regcache) <readonly_detached_regcache>: Make
2167         parameter non-const in first overload.  Remove src parameter in
2168         second overload.
2169         * regcache.c (do_cooked_read): Remove.
2170         (readonly_detached_regcache::readonly_detached_regcache): Make
2171         parameter non-const, adjust call to other constructor.
2172         (reg_buffer::save): Remove src parameter.
2173         * frame.c (do_frame_register_read): Remove.
2174         (frame_save_as_regcache): Use lambda function.
2175         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2176         parameter to ppu2spu_data *.
2177         (ppu2spu_sniffer): Use lambda function.
2178
2179 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
2180
2181         * record-full.c (record_full_target::insert_breakpoint): Remove
2182         "struct" keyword, add const.
2183
2184 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
2185
2186         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2187         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2188         * configure.ac: Remove AC_PREREQ, add missing quoting.
2189         * gnulib/configure.ac: Modernize usage of
2190         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
2191         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2192         (AUTOMAKE_VERSION): Bump to 1.15.1.
2193         * configure: Re-generate.
2194         * config.in: Re-generate.
2195         * aclocal.m4: Re-generate.
2196         * gnulib/aclocal.m4: Re-generate.
2197         * gnulib/config.in: Re-generate.
2198         * gnulib/configure: Re-generate.
2199         * gnulib/import/Makefile.in: Re-generate.
2200
2201 2018-06-19  Pedro Alves  <palves@redhat.com>
2202
2203         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2204         (lookup_minimal_symbol_by_pc_section): ... here with
2205         gdb_assert_not_reached added.
2206
2207 2018-06-19  Pedro Alves  <palves@redhat.com>
2208
2209         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2210         parameter with a block parameter.  Compare location's block symbol
2211         with the frame's block instead of addresses.
2212         (skip_inline_frames): Pass the current block instead of the
2213         frame's address.  Break out as soon as we determine the frame
2214         should not be skipped.
2215
2216 2018-06-18  Tom Tromey  <tom@tromey.com>
2217
2218         * solib-aix.c (solib_aix_get_section_offsets): Return
2219         unique_xmalloc_ptr.
2220         (solib_aix_solib_create_inferior_hook): Update.
2221
2222 2018-06-18  Tom Tromey  <tom@tromey.com>
2223
2224         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2225
2226 2018-06-18  Tom Tromey  <tom@tromey.com>
2227
2228         * solib-frv.c (frv_relocate_main_executable): Use
2229         unique_xmalloc_ptr.
2230         * solib-dsbt.c (dsbt_relocate_main_executable): Use
2231         unique_xmalloc_ptr.
2232
2233 2018-06-18  Tom Tromey  <tom@tromey.com>
2234
2235         * objfiles.h (inhibit_section_map_updates): Update.
2236         (resume_section_map_updates, resume_section_map_updates_cleanup):
2237         Remove.
2238         * solib-svr4.c (svr4_handle_solib_event): Update.
2239         * objfiles.c (inhibit_section_map_updates): Return
2240         scoped_restore_tmpl<int>.
2241         (resume_section_map_updates, resume_section_map_updates_cleanup):
2242         Remove.
2243
2244 2018-06-18  Tom Tromey  <tom@tromey.com>
2245
2246         * valprint.h (read_string): Update.
2247         * valprint.c (read_string): Change type of "buffer".
2248         (val_print_string): Update.
2249         * python/py-value.c (valpy_string): Update.
2250         * language.h (struct language_defn) <la_get_string>: Change
2251         type of "buffer".
2252         (default_get_string, c_get_string): Update.
2253         * language.c (default_get_string): Change type of "buffer".
2254         * guile/scm-value.c (gdbscm_value_to_string): Update.
2255         * c-lang.c (c_get_string): Change type of "buffer".
2256
2257 2018-06-18  Tom Tromey  <tom@tromey.com>
2258
2259         * ser-mingw.c (struct pipe_state_destroyer): New.
2260         (pipe_state_up): New typedef.
2261         (cleanup_pipe_state): Remove.
2262         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
2263
2264 2018-06-18  Tom Tromey  <tom@tromey.com>
2265
2266         * rust-lang.h (rust_yyerror): Don't declare.
2267         * rust-lang.c (rust_language_defn): Update.
2268         * rust-exp.y (yyerror): Now static.
2269         * parse.c (parse_exp_in_context_1): Update.
2270         * p-lang.h (p_yyerror): Don't declare.
2271         * p-lang.c (p_language_defn): Update.
2272         * p-exp.y (yyerror): Now static.
2273         * opencl-lang.c (opencl_language_defn): Update.
2274         * objc-lang.c (objc_language_defn): Update.
2275         * m2-lang.h (m2_yyerror): Don't declare.
2276         * m2-lang.c (m2_language_defn): Update.
2277         * m2-exp.y (yyerror): Now static.
2278         * language.h (struct language_defn) <la_error>: Remove.
2279         * language.c (unk_lang_error): Remove.
2280         (unknown_language_defn, auto_language_defn): Remove.
2281         * go-lang.h (go_yyerror): Don't declare.
2282         * go-lang.c (go_language_defn): Update.
2283         * go-exp.y (yyerror): Now static.
2284         * f-lang.h (f_yyerror): Don't declare.
2285         * f-lang.c (f_language_defn): Update.
2286         * f-exp.y (yyerror): Now static.
2287         * d-lang.h (d_yyerror): Don't declare.
2288         * d-lang.c (d_language_defn): Update.
2289         * d-exp.y (yyerror): Now static.
2290         * c-lang.h (c_yyerror): Don't declare.
2291         * c-lang.c (c_language_defn, cplus_language_defn)
2292         (asm_language_defn, minimal_language_defn): Update.
2293         * c-exp.y (yyerror): Now static.
2294         * ada-lang.h (ada_yyerror): Don't declare.
2295         * ada-lang.c (ada_language_defn): Update.
2296         * ada-exp.y (yyerror): Now static.
2297
2298 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2299
2300         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2301         (store_sveregs_to_thread): Likewise.
2302         (aarch64_linux_fetch_inferior_registers): Check for SVE.
2303         (aarch64_linux_store_inferior_registers): Likewise.
2304         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2305         function.
2306         (aarch64_sve_regs_copy_to_regcache): Likewise.
2307         (aarch64_sve_regs_copy_from_regcache): Likewise.
2308         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2309         declaration.
2310         (aarch64_sve_regs_copy_to_regcache): Likewise.
2311         (aarch64_sve_regs_copy_from_regcache): Likewise.
2312         (sve_context): Structure from Linux headers.
2313         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2314         (SVE_SIG_ZREG_SIZE): Likewise.
2315         (SVE_SIG_PREG_SIZE): Likewise.
2316         (SVE_SIG_FFR_SIZE): Likewise.
2317         (SVE_SIG_REGS_OFFSET): Likewise.
2318         (SVE_SIG_ZREGS_OFFSET): Likewise.
2319         (SVE_SIG_ZREG_OFFSET): Likewise.
2320         (SVE_SIG_ZREGS_SIZE): Likewise.
2321         (SVE_SIG_PREGS_OFFSET): Likewise.
2322         (SVE_SIG_PREG_OFFSET): Likewise.
2323         (SVE_SIG_PREGS_SIZE): Likewise.
2324         (SVE_SIG_FFR_OFFSET): Likewise.
2325         (SVE_SIG_REGS_SIZE): Likewise.
2326         (SVE_SIG_CONTEXT_SIZE): Likewise.
2327         (SVE_PT_REGS_MASK): Likewise.
2328         (SVE_PT_REGS_FPSIMD): Likewise.
2329         (SVE_PT_REGS_SVE): Likewise.
2330         (SVE_PT_VL_INHERIT): Likewise.
2331         (SVE_PT_VL_ONEXEC): Likewise.
2332         (SVE_PT_REGS_OFFSET): Likewise.
2333         (SVE_PT_FPSIMD_OFFSET): Likewise.
2334         (SVE_PT_FPSIMD_SIZE): Likewise.
2335         (SVE_PT_SVE_ZREG_SIZE): Likewise.
2336         (SVE_PT_SVE_PREG_SIZE): Likewise.
2337         (SVE_PT_SVE_FFR_SIZE): Likewise.
2338         (SVE_PT_SVE_FPSR_SIZE): Likewise.
2339         (SVE_PT_SVE_FPCR_SIZE): Likewise.
2340         (__SVE_SIG_TO_PT): Likewise.
2341         (SVE_PT_SVE_OFFSET): Likewise.
2342         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2343         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2344         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2345         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2346         (SVE_PT_SVE_PREG_OFFSET): Likewise.
2347         (SVE_PT_SVE_PREGS_SIZE): Likewise.
2348         (SVE_PT_SVE_FFR_OFFSET): Likewise.
2349         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2350         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2351         (SVE_PT_SVE_SIZE): Likewise.
2352         (SVE_PT_SIZE): Likewise.
2353         (HAS_SVE_STATE): New define.
2354
2355 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
2356
2357         * nat/aarch64-sve-linux-sigcontext.h: New file.
2358         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2359         new files.
2360         (SVE_VQ_MIN): Likewise.
2361         (SVE_VQ_MAX): Likewise.
2362         (SVE_VL_MIN): Likewise.
2363         (SVE_VL_MAX): Likewise.
2364         (SVE_NUM_ZREGS): Likewise.
2365         (SVE_NUM_PREGS): Likewise.
2366         (sve_vl_valid): Likewise.
2367         (struct user_sve_header): Likewise.
2368
2369 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
2370             Richard Bunt <Richard.Bunt@arm.com>
2371
2372         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2373         was requested by GDB.
2374
2375 2018-06-15  Tom de Vries  <tdevries@suse.de>
2376
2377         * MAINTAINERS (Write After Approval): Add Tom de Vries.
2378
2379 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
2380
2381         * gnulib/update-gnulib.sh: Print expected versions of
2382         autoconf/aclocal.
2383
2384 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
2385
2386         * arch-utils.c (default_type_align): Use type_length_units.
2387         * gdbtypes.c (type_align): Use type_length_units.
2388
2389 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2390
2391         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2392         of 'define' command.
2393
2394 2018-06-14  Tom de Vries  <tdevries@suse.de>
2395
2396         PR cli/22573
2397         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2398         get_no_prettyformat_print_options.
2399
2400 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2401
2402         * sparc-nat.h: Include target.h.
2403         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2404         <fetch_registers>: Remove this argument in function call.
2405         <store_registers>: Remove this argument in function call, remove
2406         extra semicolon.
2407         <low_forget_process>: Call sparc64_forget_process instead of
2408         sparc_forget_process.
2409
2410 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2411
2412         * procfs.c (_initialize_procfs): Use add_inf_child_target.
2413         (procfs_target::make_corefile_notes): Adjust to new
2414         target_read_alloc return type.
2415
2416 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2417             Stephen Roberts  <stephen.roberts@arm.com>
2418
2419         PR gdb/22882
2420         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2421         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2422         Move should_notify_stop local into more inner scope.
2423
2424 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2425             Stephen Roberts  <stephen.roberts@arm.com>
2426
2427         PR gdb/22882
2428         * infrun.c (resume_1): Add call to mark_async_event_handler.
2429
2430 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
2431
2432         * infrun.c (do_target_wait): Change old version of $pc printed.
2433
2434 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
2435
2436         * dwarf2read.c (read_index_from_section): Rename to...
2437         (read_gdb_index_from_section): ... this, update all callers.
2438         (dwarf2_read_index): Rename to...
2439         (dwarf2_read_gdb_index): ... this, update all callers.
2440
2441 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
2442
2443         * gdb/hppa-linux-nat.c
2444         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2445         hppa_linux_nat_target::fetch_registers.
2446
2447 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2448
2449         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2450         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2451         (AARCH64_DWARF_SVE_FFR): Likewise.
2452         (AARCH64_DWARF_SVE_P0): Likewise.
2453         (AARCH64_DWARF_SVE_Z0): Likewise.
2454
2455 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2456
2457         * common/common-regcache.h (raw_compare): New function.
2458         * regcache.c (regcache::raw_compare): Likewise.
2459         * regcache.h (regcache::raw_compare): New declaration.
2460
2461 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
2462
2463         * common/common-regcache.h (reg_buffer_common): New structure.
2464         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2465         (reg_buffer::raw_supply): Likewise.
2466         (reg_buffer::raw_supply_integer): Likewise.
2467         (reg_buffer::raw_supply_zeroed): Likewise.
2468         (reg_buffer::raw_collect): Likewise.
2469         (reg_buffer::raw_collect_integer): Likewise.
2470         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2471         (reg_buffer::raw_supply): Likewise.
2472         (reg_buffer::raw_supply_integer): Likewise.
2473         (reg_buffer::raw_supply_zeroed): Likewise.
2474         (reg_buffer::raw_collect): Likewise.
2475         (reg_buffer::raw_collect_integer): Likewise.
2476
2477 2018-06-10  Tom Tromey  <tom@tromey.com>
2478
2479         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
2480         (class remote_state) <stop_reply_queue>: Now std::vector.
2481         (remote_state::~remote_state)
2482         (remote_target::stop_reply_queue_length): Update.
2483         (struct queue_iter_param, remove_child_of_pending_fork)
2484         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2485         (check_pending_event_prevents_wildcard_vcont_callback)
2486         (remove_stop_reply_for_inferior)
2487         (remove_stop_reply_of_remote_state)
2488         (remote_notif_remove_once_on_match)
2489         (stop_reply_match_ptid_and_ws)
2490         (remote_kill_child_of_pending_fork): Remove.
2491         (remote_target::remove_new_fork_children)
2492         (remote_target::check_pending_events_prevent_wildcard_vcont)
2493         (remote_target::discard_pending_stop_replies)
2494         (remote_target::discard_pending_stop_replies_in_queue)
2495         (remote_target::remote_notif_remove_queued_reply)
2496         (remote_target::queued_stop_reply)
2497         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2498         (remote_target::wait, remote_target::kill_new_fork_children)
2499         (remote_target::async): Update.
2500
2501 2018-06-10  Tom Tromey  <tom@tromey.com>
2502
2503         * record-full.c (record_full_arch_list_cleanups): Remove.
2504         (record_full_message): Use try/catch.
2505         (record_full_wait_cleanups): Remove.
2506         (record_full_wait_1): Use try/catch.
2507         (record_full_restore): Likewise.
2508
2509 2018-06-10  Tom Tromey  <tom@tromey.com>
2510
2511         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
2512         declare VEC.  Add constructor.
2513         <in_target_beneath>: Now bool.
2514         (record_full_breakpoints): Now a std::vector, static.
2515         (record_full_sync_record_breakpoints)
2516         (record_full_init_record_breakpoints)
2517         (record_full_target::insert_breakpoint)
2518         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
2519
2520 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
2521
2522         * dwarf2read.c (process_cu_includes): Remove struct keyword.
2523         * serial.c (serial_interface_lookup): Remove struct keyword.
2524
2525 2018-06-10  Tom Tromey  <tom@tromey.com>
2526
2527         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
2528         method.
2529         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
2530         a method.
2531         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
2532         method.
2533         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
2534         "beneath" as a method.
2535         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
2536         Use "beneath" as a method.
2537
2538 2018-06-10  Tom Tromey  <tom@tromey.com>
2539
2540         * tracefile.c (struct trace_file_writer_deleter): New.
2541         <operator()>: Rename from trace_file_writer_xfree.
2542         (trace_file_writer_up): New typedef.
2543         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
2544
2545 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
2546
2547         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
2548         <m_registers, m_register_status>: Change type to
2549         std::unique_ptr.
2550         * regcache.c (reg_buffer::reg_buffer): Use new instead of
2551         XCNEWVEC.
2552
2553 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
2554
2555         * common/common-regcache.h (enum register_status): Add
2556         underlying type "signed char".
2557         * regcache.h (reg_buffer) <m_register_status>: Change type to
2558         register_status *.
2559         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
2560         register_status instead of signed char.
2561         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
2562         (reg_buffer::get_register_status): Remove cast.
2563         (readable_regcache::raw_read): Remove cast.
2564         (readable_regcache::cooked_read): Remove cast.
2565
2566 2018-06-09  Tom Tromey  <tom@tromey.com>
2567
2568         * source.c (reverse_search_command, forward_search_command): Use
2569         scoped_fd.
2570
2571 2018-06-09  Tom Tromey  <tom@tromey.com>
2572
2573         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
2574         (serial_ops_list): Now static, std::vector.
2575         (serial_interface_lookup, serial_add_interface): Update.
2576
2577 2018-06-09  Tom Tromey  <tom@tromey.com>
2578
2579         * dwarf2read.c (process_cu_includes): Update.
2580         (process_full_comp_unit): Update.
2581         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
2582         std::vector.
2583
2584 2018-06-08  Paul Koning  <paul_koning@dell.com>
2585
2586         PR gdb/23252
2587
2588         * python/python.c (do_start_initialization):
2589         Avoid call to internal Python API.
2590         (init__gdb_module): New function.
2591
2592 2018-06-08  Gary Benson <gbenson@redhat.com>
2593
2594         * linux-thread-db.c (valprint.h): New include.
2595         (struct check_thread_db_info): New structure.
2596         (check_thread_db_on_load, tdb_testinfo): New static globals.
2597         (check_thread_db, check_thread_db_callback): New functions.
2598         (try_thread_db_load_1): Run integrity checks if requested.
2599         (maintenance_check_libthread_db): New function.
2600         (_initialize_thread_db): Register "maint check libthread-db"
2601         and "maint set/show check-libthread-db".
2602         * NEWS: Mention the above new commands.
2603
2604 2018-06-08  Tom Tromey  <tom@tromey.com>
2605
2606         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
2607         now a method.
2608
2609 2018-06-08  Tom Tromey  <tom@tromey.com>
2610
2611         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
2612
2613 2018-06-08  Tom Tromey  <tom@tromey.com>
2614
2615         * common/btrace-common.h (struct btrace_data): Add constructor,
2616         destructor, move assignment operator.
2617         <empty, clear, fini>: New methods.
2618         <format>: Initialize.
2619         (btrace_data_init, btrace_data_fini, btrace_data_clear)
2620         (btrace_data_empty): Don't declare.
2621         * common/btrace-common.c (btrace_data_init): Remove.
2622         (btrace_data::fini): Rename from btrace_data_fini.
2623         (btrace_data::empty): Rename from btrace_data_empty.
2624         (btrace_data::clear): Rename from btrace_data_clear.  Return
2625         bool.
2626         * btrace.h (make_cleanup_btrace_data): Don't declare.
2627         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
2628         (parse_xml_btrace): Update.
2629         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
2630         (maint_btrace_clear_packet_history_cmd): Update.
2631
2632 2018-06-07  Pedro Alves  <palves@redhat.com>
2633
2634         * target.h (target_ops) <beneath>: Now a method.  All references
2635         updated.
2636         (class target_stack): New.
2637         * target.c (g_target_stack): New.
2638         (g_current_top_target): Delete.
2639         (current_top_target): Get the top target out of g_target_stack.
2640         (target_stack::push, target_stack::unpush): New.
2641         (push_target, unpush_target): Reimplement.
2642         (target_is_pushed): Reimplement in terms of g_target_stack.
2643         (target_ops::beneath, target_stack::find_beneath): New.
2644
2645 2018-06-07  Pedro Alves  <palves@redhat.com>
2646
2647         * target.h (find_target_beneath): Delete declaration.
2648         * target.c (find_target_beneath): Delete definition.
2649         * aix-thread.c: All callers of find_target_beneath adjusted to
2650         call target_ops::beneath instead.
2651         * bsd-uthread.c: Likewise.
2652         * linux-thread-db.c: Likewise.
2653         * ravenscar-thread.c: Likewise.
2654         * sol-thread.c: Likewise.
2655         * spu-multiarch.c: Likewise.
2656
2657 2018-06-07  Pedro Alves  <palves@redhat.com>
2658
2659         * target.h (target_ops) <beneath>: Now a method.  All references
2660         updated.
2661         (target_ops) <m_beneath>: New.
2662         * target.c (target_ops::beneath): New.
2663         * corelow.c: Adjust all references to target_ops::beneath.
2664         * linux-thread-db.c: Likewise.
2665         * make-target-delegates: Likewise.
2666         * record-btrace.c: Likewise.
2667         * record-full.c: Likewise.
2668         * remote.c: Likewise.
2669         * target.c: Likewise.
2670         * target-delegates.c: Regenerate.
2671
2672 2018-06-07  Pedro Alves  <palves@redhat.com>
2673
2674         * target.h (target_stack): Delete.
2675         (current_top_target): Declare function.
2676         * target.c (target_stack): Delete.
2677         (g_current_top_target): New.
2678         (current_top_target): New function.
2679         * auxv.c: Use current_top_target instead of target_stack
2680         throughout.
2681         * avr-tdep.c: Likewise.
2682         * breakpoint.c: Likewise.
2683         * corefile.c: Likewise.
2684         * elfread.c: Likewise.
2685         * eval.c: Likewise.
2686         * exceptions.c: Likewise.
2687         * frame.c: Likewise.
2688         * gdbarch-selftests.c: Likewise.
2689         * gnu-v3-abi.c: Likewise.
2690         * ia64-tdep.c: Likewise.
2691         * ia64-vms-tdep.c: Likewise.
2692         * infcall.c: Likewise.
2693         * infcmd.c: Likewise.
2694         * infrun.c: Likewise.
2695         * linespec.c: Likewise.
2696         * linux-tdep.c: Likewise.
2697         * minsyms.c: Likewise.
2698         * ppc-linux-nat.c: Likewise.
2699         * ppc-linux-tdep.c: Likewise.
2700         * procfs.c: Likewise.
2701         * regcache.c: Likewise.
2702         * remote.c: Likewise.
2703         * rs6000-tdep.c: Likewise.
2704         * s390-linux-nat.c: Likewise.
2705         * s390-tdep.c: Likewise.
2706         * solib-aix.c: Likewise.
2707         * solib-darwin.c: Likewise.
2708         * solib-dsbt.c: Likewise.
2709         * solib-spu.c: Likewise.
2710         * solib-svr4.c: Likewise.
2711         * solib-target.c: Likewise.
2712         * sparc-tdep.c: Likewise.
2713         * sparc64-tdep.c: Likewise.
2714         * spu-tdep.c: Likewise.
2715         * symfile.c: Likewise.
2716         * symtab.c: Likewise.
2717         * target-descriptions.c: Likewise.
2718         * target-memory.c: Likewise.
2719         * target.c: Likewise.
2720         * target.h: Likewise.
2721         * tracefile-tfile.c: Likewise.
2722         * tracepoint.c: Likewise.
2723         * valops.c: Likewise.
2724         * valprint.c: Likewise.
2725         * value.c: Likewise.
2726         * windows-tdep.c: Likewise.
2727         * mi/mi-main.c: Likewise.
2728
2729 2018-06-07  Tom Tromey  <tom@tromey.com>
2730
2731         * valprint.h (build_address_symbolic): Declare.
2732         * printcmd.c (print_address_symbolic): Update.
2733         (build_address_symbolic): Change "name" and "filename" to
2734         std::string.
2735         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
2736         Update.
2737         * defs.h (build_address_symbolic): Remove declaration.
2738
2739 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
2740
2741         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
2742         (aarch64_vnv_type): Add function.
2743         (aarch64_pseudo_register_name): Add V regs for SVE.
2744         (aarch64_pseudo_register_type): Likewise.
2745         (aarch64_pseudo_register_reggroup_p): Likewise.
2746         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
2747         (aarch64_pseudo_read_value): Add V regs for SVE.
2748         (aarch64_pseudo_write_2): Use V0 offset for SVE
2749         (aarch64_pseudo_write): Add V regs for SVE.
2750         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
2751
2752 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2753
2754         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
2755         (sve_vl_from_vq): Likewise.
2756
2757 2018-06-05  Tom Tromey  <tom@tromey.com>
2758
2759         * cli/cli-cmds.c (show_version): Update.
2760         * top.c (print_gdb_version): Add "interactive" parameter.
2761         Update.
2762         * main.c (captured_main_1): Update.
2763         * top.h (print_gdb_version): Add "interactive" parameter and a
2764         comment.
2765
2766 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
2767
2768         * common/enum-flags.h: Add trailing semicolon to example in
2769         comment.
2770
2771 2018-06-05  Tom Tromey  <tom@tromey.com>
2772
2773         PR cli/12326:
2774         * NEWS: Add entry about pager.
2775         * utils.c (pagination_disabled_for_command): New global.
2776         (prompt_for_continue): Allow "c" response to prompt.
2777         (reinitialize_more_filter): Clear
2778         pagination_disabled_for_command.
2779         (fputs_maybe_filtered): Check pagination_disabled_for_command.
2780
2781 2018-06-04  Tom Tromey  <tom@tromey.com>
2782
2783         * ada-lang.h (ada_lookup_symbol_list): Update.
2784         * ada-lang.c (resolve_subexp): Update.
2785         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
2786         parameter.
2787         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
2788         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
2789         results parameter to std::vector.
2790         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
2791         Update.
2792         * ada-exp.y (block_lookup): Update.
2793         (select_possible_type_sym): Change type of syms.  Remove nsyms
2794         parameter.
2795         (write_var_or_type, write_name_assoc): Update.
2796
2797 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
2798
2799         * windows-nat.c (windows_nat_target::xfer_partial): Return
2800         TARGET_XFER_E_IO if we need to delegate to the target beneath
2801         but BENEATH is NULL.
2802
2803 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
2804
2805         * Makefile.in (config.status): Add configure.nat as a
2806         dependency.
2807
2808 2018-06-04  Tom Tromey  <tom@tromey.com>
2809
2810         * cp-name-parser.y (cpname_state): Add method declarations.
2811         (HANDLE_QUAL): Update.
2812         (cpname_state::d_grab, cpname_state::fill_comp)
2813         (cpname_state::make_operator, cpname_state::make_dtor)
2814         (cpname_state::make_builtin_type, cpname_state::make_name)
2815         (cpname_state::d_qualify, cpname_state::d_int_type)
2816         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2817         (%union): Move earlier.
2818
2819 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2820
2821         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2822
2823 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2824
2825         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2826         (aarch64_pseudo_write_1): Likewise.
2827         (aarch64_pseudo_read_value): Use helper.
2828         (aarch64_pseudo_write): Likewise.
2829
2830 2018-06-04  Pedro Alves  <palves@redhat.com>
2831
2832         * darwin-nat.c (darwin_ops): Delete.
2833         (darwin_attach_pid): Use get_native_target.
2834
2835 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2836
2837         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2838         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2839
2840 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2841
2842         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2843         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2844         (aarch64_gdbarch_init): Check for SVE.
2845         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2846
2847 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
2848
2849         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2850         * aarch64-tdep.h (aarch64_read_description): Likewise.
2851         * arch/aarch64.c (aarch64_create_target_description): Likewise.
2852         * arch/aarch64.h (aarch64_create_target_description): Likewise.
2853         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2854         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2855         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2856
2857 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
2858
2859         * value.c (value_fetch_lazy_bitfield): New.
2860         (value_fetch_lazy_memory): New.
2861         (value_fetch_lazy_register): New.
2862         (value_fetch_lazy): Factor out to smaller functions.
2863
2864 2018-06-01  Tom Tromey  <tom@tromey.com>
2865
2866         * cp-name-parser.y (backslashable, represented): Now const.
2867
2868 2018-06-01  Tom Tromey  <tom@tromey.com>
2869
2870         * cp-name-parser.y: Include parser-defs.h.
2871         (parser_fprintf): Remove declaration.
2872
2873 2018-06-01  Tom Tromey  <tom@tromey.com>
2874
2875         * cp-name-parser.y: Use %pure-parser, %lex-param, and
2876         %parse-param.
2877         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2878         (global_result): Remove globals.
2879         (struct cpname_state): New.
2880         (yyparse): Don't declare.
2881         (yylex, yyerror): Move declarations after %union.
2882         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2883         (make_name): Add state parameter.
2884         Update all callers.
2885         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2886         parameter.
2887         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2888         Update.
2889         (yylex): Add lvalp, state parameters.
2890         (yyerror): Add state parameter.
2891         (cp_demangled_name_to_comp): Update.
2892
2893 2018-06-01  Tom Tromey  <tom@tromey.com>
2894
2895         * cp-name-parser.y (parser_fprintf): Declare.
2896         (GDB_YY_REMAP_PREFIX): Define.
2897         Include yy-remap.h.  Don't redefine yy* identifiers.
2898
2899 2018-06-01  Tom Tromey  <tom@tromey.com>
2900
2901         * python/py-type.c (typy_legacy_template_argument): Update.
2902         * cp-support.h (cp_demangled_name_to_comp): Update.
2903         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2904         parameter to be a "std::string *".
2905         (main): Update.
2906
2907 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
2908
2909         * ada-lex.l: Include "diagnostics.h" instead of
2910         "common/diagnostics.h".
2911         * unittests/environ-selftests.c: Likewise.
2912         * common/diagnostics.h: Moved to ../include.
2913
2914 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
2915
2916         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2917         to language_mode_manual while calling breakpoint_re_set_one.
2918
2919 2018-06-01  Tom Tromey  <tom@tromey.com>
2920
2921         * valops.c (value_cast_structs, destructor_name_p): Update.
2922         * symtab.c (gdb_mangle_name): Update.
2923         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2924         Update.
2925         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2926         (pascal_object_print_value_fields, pascal_object_print_value):
2927         Update.
2928         * p-typeprint.c (pascal_type_print_derivation_info): Update.
2929         * linespec.c (find_methods): Update.
2930         * gdbtypes.h (type_name_no_tag): Remove.
2931         (type_name_or_error): Rename from type_name_no_tag_or_error.
2932         * gdbtypes.c (type_name_no_tag): Remove.
2933         (type_name_or_error): Rename from type_name_no_tag_or_error.
2934         (lookup_struct_elt_type, check_typedef): Update.
2935         * expprint.c (print_subexp_standard): Update.
2936         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2937         * d-namespace.c (d_lookup_nested_symbol): Update.
2938         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2939         (cp_print_class_member): Update.
2940         * cp-namespace.c (cp_lookup_nested_symbol): Update.
2941         * completer.c (add_struct_fields): Update.
2942         * c-typeprint.c (cp_type_print_derivation_info)
2943         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2944         Update.
2945         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2946         (ada_prefer_type, ada_is_exception_sym): Update.
2947
2948 2018-06-01  Tom Tromey  <tom@tromey.com>
2949
2950         * valops.c (enum_constant_from_type, value_namespace_elt)
2951         (value_maybe_namespace_elt): Update.
2952         * valarith.c (find_size_for_pointer_math): Update.
2953         * target-descriptions.c (make_gdb_type): Update.
2954         * symmisc.c (print_symbol): Update.
2955         * stabsread.c (define_symbol, read_type)
2956         (complain_about_struct_wipeout, add_undefined_type)
2957         (cleanup_undefined_types_1): Update.
2958         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2959         (rust_range_type_p, val_print_struct, rust_print_struct_def)
2960         (rust_internal_print_type, rust_composite_type)
2961         (rust_evaluate_funcall, rust_evaluate_subexp)
2962         (rust_inclusive_range_type_p): Update.
2963         * python/py-type.c (typy_get_tag): Update.
2964         * p-typeprint.c (pascal_type_print_base): Update.
2965         * mdebugread.c (parse_symbol, parse_type): Update.
2966         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2967         Update.
2968         * guile/scm-type.c (gdbscm_type_tag): Update.
2969         * go-lang.c (sixg_string_p): Update.
2970         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2971         Update.
2972         * gdbtypes.h (struct main_type) <tag_name>: Remove.
2973         (TYPE_TAG_NAME): Remove.
2974         * gdbtypes.c (type_name_no_tag): Simplify.
2975         (check_typedef, check_types_equal, recursive_dump_type)
2976         (copy_type_recursive, arch_composite_type): Update.
2977         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
2978         in summary mode when needed.
2979         * eval.c (evaluate_funcall): Update.
2980         * dwarf2read.c (fixup_go_packaging, read_structure_type)
2981         (process_structure_scope, read_enumeration_type)
2982         (read_namespace_type, read_module_type, determine_prefix): Update.
2983         * cp-support.c (inspect_type): Update.
2984         * coffread.c (process_coff_symbol, decode_base_type): Update.
2985         * c-varobj.c (c_is_path_expr_parent): Update.
2986         * c-typeprint.c (c_type_print_base_struct_union): Update.
2987         (c_type_print_base_1): Update.  Print struct/class/union/enum in
2988         summary when using C language.
2989         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2990         (gen_maybe_namespace_elt): Update.
2991         * ada-lang.c (ada_type_name): Simplify.
2992         (empty_record, ada_template_to_fixed_record_type_1)
2993         (template_to_static_fixed_type)
2994         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2995
2996 2018-06-01  Tom Tromey  <tom@tromey.com>
2997
2998         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2999         c_print_type.
3000         * c-typeprint.c (c_print_type_1): Add "language" parameter.
3001         (c_print_type): Update.
3002         (c_print_type): New overload.
3003         (c_type_print_varspec_prefix, c_type_print_args)
3004         (c_type_print_varspec_suffix, c_print_type_no_offsets)
3005         (c_type_print_base_struct_union, c_type_print_base_1)
3006         (cp_type_print_method_args): Add "language" parameter.
3007         (c_type_print_base): Update.
3008         * c-lang.h (c_print_type): Add new overload.
3009
3010 2018-06-01  Tom Tromey  <tom@tromey.com>
3011
3012         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3013         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3014
3015 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
3016
3017         * aarch64-tdep.c (aarch64_sve_register_names): New const
3018         var.
3019         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3020         (AARCH64_SVE_Z_REGS_NUM): New define.
3021         (AARCH64_SVE_P_REGS_NUM): Likewise.
3022         (AARCH64_SVE_NUM_REGS): Likewise.
3023
3024 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3025
3026         * nat/linux-ptrace.h [__alpha__]
3027         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3028         definitions.
3029
3030 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
3031
3032         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3033         the endianness selected.
3034         * NEWS: Document `set endian auto' mode operation update.
3035
3036 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3037
3038         * Makefile.in: Add new header.
3039         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3040         (sve_vl_from_vg): Likewise.
3041         (sve_vq_from_vl): Likewise.
3042         (sve_vl_from_vq): Likewise.
3043         (sve_vq_from_vg): Likewise.
3044         (sve_vg_from_vq): Likewise.
3045         * configure.nat: Add new c file.
3046         * nat/aarch64-sve-linux-ptrace.c: New file.
3047         * nat/aarch64-sve-linux-ptrace.h: New file.
3048
3049 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
3050
3051         * aarch64-linux-nat.c (aarch64_linux_read_description):
3052         Add parmeter zero.
3053         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3054         Likewise.
3055         * aarch64-tdep.c (tdesc_aarch64_list): Add.
3056         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3057         (aarch64_gdbarch_init): Add parmeter zero.
3058         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3059         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3060         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3061         parmeter.
3062         * doc/gdb.texinfo: Describe SVE feature
3063         * features/aarch64-sve.c: New file.
3064
3065 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
3066
3067         PR gdb/23210
3068         * gdbarch.sh (significant_addr_bit): Default to zero when
3069         not set by target architecture.
3070         * gdbarch.c: Re-generated.
3071         * utils.c (address_significant): Update.
3072
3073 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
3074
3075         * stack.c (func_command): Remove trailing newline in call to error.
3076
3077 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3078
3079         * regcache.h (regcache_raw_collect): Remove, update callers to
3080         use regcache::raw_collect.
3081         * regcache.c (regcache_raw_collect): Remove.
3082
3083 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3084
3085         * regcache.h (regcache_raw_supply): Remove, update callers to
3086         use detached_regcache::raw_supply.
3087         * regcache.c (regcache_raw_supply): Remove.
3088
3089 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3090
3091         * regcache.h (regcache_cooked_write_part): Remove, update
3092         callers to use regcache::cooked_write_part.
3093         * regcache.c (regcache_cooked_write_part): Remove.
3094
3095 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3096
3097         * regcache.h (regcache_cooked_read_part): Remove, update callers
3098         to use readable_regcache::cooked_read_part.
3099         * regcache.c (regcache_cooked_read_part): Remove.
3100
3101 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3102
3103         * regcache.h (regcache_cooked_read_value): Remove, update
3104         callers to use readable_regcache::cooked_read_value.
3105         * regcache.c (regcache_cooked_read_value): Remove.
3106
3107 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3108
3109         * regcache.h (regcache_cooked_write): Remove, update callers to
3110         use regcache::cooked_write.
3111         * regcache.c (regcache_cooked_write): Remove.
3112
3113 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3114
3115         * regcache.h (regcache_invalidate): Remove, update callers to
3116         use detached_regcache::invalidate instead.
3117         * regcache.c (regcache_invalidate): Remove.
3118
3119 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3120
3121         * regcache.h (regcache_raw_write_part): Remove, update callers
3122         to use regcache::raw_write_part instead.
3123         * regcache.c (regcache_raw_write_part): Remove.
3124
3125 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3126
3127         * regcache.h (regcache_raw_read_part): Remove, update callers to
3128         use readable_regcache::raw_read_part instead.
3129         * regcache.c (regcache_raw_read_part): Remove.
3130
3131 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3132
3133         * regcache.h (regcache_cooked_read): Remove, update callers to
3134         use readable_regcache::cooked_read instead.
3135         * regcache.c (regcache_cooked_read): Remove.
3136
3137 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3138
3139         * regcache.h (regcache_raw_write): Remove, update callers to use
3140         regcache::raw_write instead.
3141         * regcache.c (regcache_raw_write): Remove.
3142
3143 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3144
3145         * regcache.h (regcache_raw_read): Remove, update callers to use
3146         readable_regcache::raw_read instead.
3147         * regcache.c (regcache_raw_read): Remove.
3148
3149 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3150
3151         * regcache.h (regcache_raw_update): Remove, update callers to
3152         use readable_regcache::raw_update instead.
3153         * regcache.c (regcache_raw_update): Remove.
3154
3155 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3156
3157         * regcache.h (regcache_register_status): Remove, update callers
3158         to use reg_buffer::get_register_status directly instead.
3159         * regcache.c (regcache_register_status): Remove.
3160
3161 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3162
3163         * regcache.h (regcache_get_ptid): Remove, update all callers to
3164         call regcache::ptid instead.
3165         * regcache.c (regcache_get_ptid): Remove.
3166
3167 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3168
3169         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3170
3171 2018-05-30  Pedro Alves  <palves@redhat.com>
3172
3173         * common/common-exceptions.h (exception_rethrow): Use
3174         ATTRIBUTE_NORETURN.
3175
3176 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
3177
3178         * breakpoint.c (print_solib_event, check_status_catch_solib):
3179         Remove struct keyword in range-based for loops.
3180         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3181         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3182         Likewise.
3183         * linespec.c (find_superclass_methods, search_minsyms_for_name):
3184         Likewise.
3185         * symfile.c (addr_info_make_relative): Likewise.
3186         * thread.c (value_in_thread_stack_temporaries): Likewise.
3187
3188 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
3189
3190         PR gdb/16841
3191         * valops.c (value_struct_elt_for_reference): Call check_typedef on
3192         aggregate type to get its real type before accessing it.
3193
3194 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
3195
3196         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3197         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3198         * coff-pe-read.c (add_pe_forwarded_sym): Replace
3199         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3200         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3201         * jit.c (jit_breakpoint_re_set_internal): Likewise.
3202         * printcmd.c (info_address_command): Likewise.
3203
3204 2018-05-29  Tom Tromey  <tom@tromey.com>
3205
3206         * windows-nat.c (handle_exception): Update fall-through comment.
3207
3208 2018-05-29  Tom Tromey  <tom@tromey.com>
3209
3210         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
3211         (struct program_space) <added_solibs>: Now a std::vector.
3212         * breakpoint.c (print_solib_event): Update.
3213         (check_status_catch_solib): Update.
3214         * progspace.c (clear_program_space_solib_cache): Update.
3215         * solib.c (update_solib_list): Update.
3216
3217 2018-05-29  Tom Tromey  <tom@tromey.com>
3218
3219         * python/py-type.c (typy_richcompare): Update.
3220         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3221         * gdbtypes.h (types_deeply_equal): Return bool.
3222         (types_equal): Likewise.
3223         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
3224         declare VEC.
3225         (check_types_equal): Change worklist to std::vector.  Return
3226         bool.
3227         (struct type_equality_entry): Add constructor.
3228         (compare_maybe_null_strings): Return bool.
3229         (check_types_worklist): Return bool.  Change worklist to
3230         std::vector.
3231         (types_deeply_equal): Use std::vector.
3232         (types_equal): Return bool.
3233         (compare_maybe_null_strings): Simplify.
3234
3235 2018-05-29  Tom Tromey  <tom@tromey.com>
3236
3237         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
3238
3239 2018-05-29  Tom Tromey  <tom@tromey.com>
3240
3241         * objc-lang.h: Don't include cp-support.h.
3242         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
3243         declare VEC.
3244
3245 2018-05-27  Tom Tromey  <tom@tromey.com>
3246
3247         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3248
3249 2018-05-25  Tom Tromey  <tom@tromey.com>
3250
3251         * value.c (value::location): Initialize.
3252
3253 2018-05-25  Tom Tromey  <tom@tromey.com>
3254
3255         * dbxread.c (init_bincl_list): Remove.
3256         (bincl_list): Now a std::vector.
3257         (bincls_allocated, next_bincl): Remove.
3258         (free_bincl_list, do_free_bincl_list_cleanup)
3259         (make_cleanup_free_bincl_list): Remove.
3260         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3261         unique_xmalloc_ptr.
3262         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3263         (struct header_file_location): Add constructor.
3264         (add_bincl_to_list): Remove.
3265
3266 2018-05-25  Tom Tromey  <tom@tromey.com>
3267
3268         * tui/tui.c (tui_enable): Update.
3269         * mi/mi-interp.c (mi_interp::init): Update.
3270         * interps.h (class interp) <name>: New method.
3271         <m_name>: Rename from name.
3272         (~scoped_restore_interp): Update.
3273         * interps.c (interp::interp): Update.
3274         (interp_add, interp_set, interp_lookup_existing)
3275         (current_interp_named_p): Update.
3276
3277 2018-05-25  Tom Tromey  <tom@tromey.com>
3278
3279         * interps.c (interp_name): Remove.
3280         * mi/mi-interp.c (mi_interp::init): Update.
3281         * interps.h (interp_name): Remove.
3282         (~scoped_restore_interp): Update.
3283         * tui/tui.c (tui_enable): Update.
3284
3285 2018-05-25  Tom Tromey  <tom@tromey.com>
3286
3287         * utils.c (fputs_maybe_filtered): Update.
3288         * linespec.c (decode_line_full): Update.
3289         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3290         (mi_print_breakpoint_for_event, mi_solib_loaded)
3291         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3292         (mi_user_selected_context_changed): Update.
3293         * mi/mi-main.c (mi_execute_command): Update.
3294         * cli/cli-script.c (execute_control_command): Update.
3295         * python/python.c (execute_gdb_command): Update.
3296         * solib.c (info_sharedlibrary_command): Update.
3297         * interps.c (interp_ui_out): Remove.
3298         * interps.h (interp_ui_out): Remove.
3299
3300 2018-05-25  Tom Tromey  <tom@tromey.com>
3301
3302         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3303         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3304         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3305
3306 2018-05-25  Tom Tromey  <tom@tromey.com>
3307
3308         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3309         * interps.c (interp_exec): Use scoped_restore.
3310
3311 2018-05-25  Tom Tromey  <tom@tromey.com>
3312
3313         * remote.c (remote_target::remote_file_get): Use
3314         gdb::byte_vector.
3315         (remote_target::remote_file_put): Likewise.
3316
3317 2018-05-25  Tom Tromey  <tom@tromey.com>
3318
3319         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3320         a std::string.
3321         (get_pe_section_index, add_pe_exported_sym): Update.
3322         (read_pe_exported_syms): Use gdb::def_vector.
3323
3324 2018-05-25  Tom Tromey  <tom@tromey.com>
3325
3326         * frame.c (remove_prev_frame): Remove.
3327         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3328
3329 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
3330
3331         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3332         Remove prototypes.
3333         * mips-linux-nat.c (supply_fpregset): Always call
3334         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3335         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3336         `mips_fill_fpregset'.
3337         * mips-linux-tdep.c (mips_supply_fpregset)
3338         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3339         (mips_fill_fpregset_wrapper): Remove functions.
3340         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3341         (mips_linux_fpregset): Remove variable.
3342         (mips_linux_iterate_over_regset_sections): Use
3343         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3344         (mips_linux_o32_sigframe_init): Remove comment.
3345
3346 2018-05-25  Pedro Alves  <palves@redhat.com>
3347
3348         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3349         (struct readahead_cache, struct packet_reg, struct
3350         remote_arch_state, class remote_state): Move higher up in the
3351         file.
3352         (remote_target::m_remote_state): Now an object instead of a pointer.
3353         (remote_target::get_remote_state): Adjust.
3354
3355 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3356
3357         * stack.c (select_and_print_frame): Delete.
3358         (struct function_bounds): Move struct within function.
3359         (func_command): Most content moved into new function
3360         find_frame_for_function, use new function, print result, add
3361         function comment.
3362         (find_frame_for_function): New function, now returns a result.
3363
3364 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3365
3366         * stack.c (iterate_over_block_arg_vars): Fix comment.
3367         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3368
3369 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
3370
3371         PR gdb/23203
3372         * frame.c
3373         (scoped_restore_selected_frame::scoped_restore_selected_frame):
3374         Define.
3375         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3376         Define.
3377         * frame.h (class scoped_restore_selected_frame): New class.
3378         * stack.c (print_frame_local_vars): Remove catching and rethrowing
3379         of any exception, use scoped_restore_selected_frame to restore the
3380         frame instead.
3381
3382 2018-05-24  Pedro Alves  <palves@redhat.com>
3383
3384         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3385         override.
3386
3387 2018-05-23  Tom Tromey  <tom@tromey.com>
3388
3389         * complaints.c (struct complaints): Remove.
3390         (symfile_complaint_book): Remove.
3391         (series): New global.
3392         (complaint_internal): Update.
3393         (clear_complaints): Update.
3394
3395 2018-05-23  Tom Tromey  <tom@tromey.com>
3396
3397         * complaints.c (counters): New global.
3398         (struct complain): Remove.
3399         (struct complaints) <root>: Remove.
3400         (complaint_sentinel): Remove.
3401         (symfile_complaint_book): Update.
3402         (find_complaint) Remove.
3403         (complaint_internal, clear_complaints): Update.
3404
3405 2018-05-23  Tom Tromey  <tom@tromey.com>
3406
3407         * complaints.c (struct complain) <file, line>: Remove.
3408         (find_complaint): Remove file, line parameters.
3409         (complaint_internal): Update.
3410
3411 2018-05-23  Tom Tromey  <tom@tromey.com>
3412
3413         * complaints.c (vcomplaint): Remove.
3414         (complaint_internal) Merge in contents of vcomplaint.
3415
3416 2018-05-23  Tom Tromey  <tom@tromey.com>
3417
3418         * complaints.c (struct complaints) <explanation>: Remove.
3419         (symfile_explanations): Remove.
3420         (symfile_complaint_book): Update.
3421         (vcomplaint): Update.
3422         (struct explanation): Remove.
3423
3424 2018-05-23  Tom Tromey  <tom@tromey.com>
3425
3426         * complaints.c (symfile_complaints): Remove.
3427         (complaint_internal): Remove "complaints" parameter.
3428         (clear_complaints, vcomplaint): Remove "c" parameter.
3429         (get_complaints): Remove.
3430         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3431         (dwarf2_debug_line_missing_file_complaint)
3432         (dwarf2_debug_line_missing_end_sequence_complaint)
3433         (dwarf2_complex_location_expr_complaint)
3434         (dwarf2_const_value_length_mismatch_complaint)
3435         (dwarf2_section_buffer_overflow_complaint)
3436         (dwarf2_macro_malformed_definition_complaint)
3437         (dwarf2_invalid_attrib_class_complaint)
3438         (create_addrmap_from_index, dw2_symtab_iter_next)
3439         (dw2_expand_marked_cus)
3440         (dw2_debug_names_iterator::find_vec_in_debug_names)
3441         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3442         (create_debug_type_hash_table, init_cutu_and_read_dies)
3443         (partial_die_parent_scope, add_partial_enumeration)
3444         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3445         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3446         (read_import_statement, read_file_scope, create_dwo_cu_reader)
3447         (create_cus_hash_table, create_dwp_hash_table)
3448         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3449         (dwarf2_rnglists_process, dwarf2_ranges_process)
3450         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3451         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3452         (handle_struct_member_die, process_structure_scope)
3453         (read_array_type, read_common_block, read_module_type)
3454         (read_tag_pointer_type, read_typedef, read_base_type)
3455         (read_subrange_type, load_partial_dies, partial_die_info::read)
3456         (partial_die_info::read, partial_die_info::read)
3457         (partial_die_info::read, read_checked_initial_length_and_offset)
3458         (dwarf2_string_attr, read_formatted_entries)
3459         (dwarf_decode_line_header)
3460         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3461         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3462         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3463         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3464         (get_signatured_type, get_DW_AT_signature_type)
3465         (decode_locdesc, file_file_name, consume_improper_spaces)
3466         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3467         (dwarf_decode_macro_bytes, dwarf_decode_macros)
3468         (dwarf2_symbol_mark_computed, set_die_type)
3469         (read_attribute_value): Update.
3470         * stap-probe.c (handle_stap_probe, get_stap_base_address):
3471         Update.
3472         * dbxread.c (unknown_symtype_complaint)
3473         (lbrac_mismatch_complaint, repeated_header_complaint)
3474         (set_namestring, function_outside_compilation_unit_complaint)
3475         (read_dbx_symtab, process_one_symbol): Update.
3476         * gdbtypes.c (stub_noname_complaint): Update.
3477         * windows-nat.c (handle_unload_dll): Update.
3478         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3479         (decode_base_type): Update.
3480         * xcoffread.c (bf_notfound_complaint, ef_complaint)
3481         (eb_complaint, record_include_begin, record_include_end)
3482         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3483         (process_xcoff_symbol, read_symbol)
3484         (function_outside_compilation_unit_complaint)
3485         (scan_xcoff_symtab): Update.
3486         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3487         * buildsym.c (finish_block_internal, make_blockvector)
3488         (end_symtab_get_static_block, augment_type_symtab): Update.
3489         * dtrace-probe.c (dtrace_process_dof)
3490         (dtrace_static_probe_ops::get_probes): Update.
3491         * complaints.h (struct complaint): Don't declare.
3492         (symfile_complaints): Remove.
3493         (complaint_internal): Remove "complaints" parameter.
3494         (complaint): Likewise.
3495         (clear_complaints): Likewise.
3496         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3497         (reread_symbols): Update.
3498         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3499         (dwarf2_frame_cache, decode_frame_entry): Update.
3500         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3501         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3502         (info_selectors_command): Update.
3503         * macrotab.c (macro_include, check_for_redefinition)
3504         (macro_undef): Update.
3505         * objfiles.c (filter_overlapping_sections): Update.
3506         * stabsread.c (invalid_cpp_abbrev_complaint)
3507         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3508         (define_symbol, error_type, read_type, rs6000_builtin_type)
3509         (stabs_method_name_from_physname, read_member_functions)
3510         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3511         (attach_fields_to_type, complain_about_struct_wipeout)
3512         (read_range_type, read_args, common_block_start)
3513         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3514         Update.
3515         * mdebugread.c (index_complaint, unknown_ext_complaint)
3516         (basic_type_complaint, bad_tag_guess_complaint)
3517         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3518         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
3519         (parse_procedure, parse_lines)
3520         (function_outside_compilation_unit_complaint)
3521         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
3522         (bad_tag_guess_complaint, reg_value_complaint): Update.
3523         * cp-support.c (demangled_name_complaint): Update.
3524         * macroscope.c (sal_macro_scope): Update.
3525         * dwarf-index-write.c (class debug_names): Update.
3526
3527 2018-05-23  Tom Tromey  <tom@tromey.com>
3528
3529         * complaints.c (clear_complaints): Remove "noisy" parameter.
3530         * complaints.h (clear_complaints): Update.
3531         * symfile.c (syms_from_objfile_1, finish_new_objfile)
3532         (reread_symbols): Update.
3533
3534 2018-05-23  Tom Tromey  <tom@tromey.com>
3535
3536         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
3537         SUBSEQUENT_MESSAGE.
3538         (vcomplaint, clear_complaints): Update.
3539         (symfile_explanations): Remove some messages.
3540
3541 2018-05-23  Tom Tromey  <tom@tromey.com>
3542
3543         * complaints.c (internal_complaint): Remove.
3544         * complaints.h (internal_complaint): Remove.
3545
3546 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
3547
3548         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
3549
3550 2018-05-22  Pedro Alves  <palves@redhat.com>
3551
3552         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
3553         (remote_fileio_badfd, remote_fileio_return_errno)
3554         (remote_fileio_return_success, remote_fileio_func_open)
3555         (remote_fileio_func_open, remote_fileio_func_close)
3556         (remote_fileio_func_read, remote_fileio_func_write)
3557         (remote_fileio_func_lseek, remote_fileio_func_rename)
3558         (remote_fileio_func_unlink, remote_fileio_func_stat)
3559         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
3560         (remote_fileio_func_isatty, remote_fileio_func_system): Add
3561         remote_target parameter.
3562         (remote_fio_func_map) <func>: Add remote_target parameter.
3563         (do_remote_fileio_request, remote_fileio_request):
3564         * remote-fileio.h (remote_fileio_request):
3565         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
3566         remote_target parameter.
3567         (remote_notif_process, handle_notification): Adjust to pass down
3568         the remote.
3569         (remote_notif_state_allocate): Add remote_target parameter.  Save
3570         it.
3571         * remote-notif.h (struct remote_target): Forward declare.
3572         (struct notif_client) <parse, ack, can_get_pending_events>: Add
3573         remote_target parameter.
3574         (struct remote_notif_state) <remote>: New field.
3575         (remote_notif_ack, remote_notif_parse): Add remote_target
3576         parameter.
3577         (remote_notif_state_allocate, remote_notif_state_allocate): Add
3578         remote_target parameter.
3579         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
3580         (threads_listing_context, rmt_thread_action, protocol_feature)
3581         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
3582         (packet_result, struct threads_listing_context, remote_state):
3583         Move definitions and declarations higher up.
3584         (remote_target) <~remote_target>: Declare.
3585         (remote_download_command_source, remote_file_put, remote_file_get)
3586         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
3587         (remote_hostio_pread_vFile, remote_hostio_send_command)
3588         (remote_hostio_set_filesystem, remote_hostio_open)
3589         (remote_hostio_close, remote_hostio_unlink, remote_state)
3590         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
3591         (get_memory_write_packet_size, get_memory_read_packet_size)
3592         (append_pending_thread_resumptions, remote_detach_1)
3593         (append_resumption, remote_resume_with_vcont)
3594         (add_current_inferior_and_thread, wait_ns, wait_as)
3595         (process_stop_reply, remote_notice_new_inferior)
3596         (process_initial_stop_replies, remote_add_thread)
3597         (btrace_sync_conf, remote_btrace_maybe_reopen)
3598         (remove_new_fork_children, kill_new_fork_children)
3599         (discard_pending_stop_replies, stop_reply_queue_length)
3600         (check_pending_events_prevent_wildcard_vcont)
3601         (discard_pending_stop_replies_in_queue, stop_reply)
3602         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
3603         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
3604         (remote_interrupt_as, remote_interrupt_ns)
3605         (remote_get_noisy_reply, remote_query_attached)
3606         (remote_add_inferior, remote_current_thread, get_current_thread)
3607         (set_thread, set_general_thread, set_continue_thread)
3608         (set_general_process, write_ptid)
3609         (remote_unpack_thread_info_response, remote_get_threadinfo)
3610         (parse_threadlist_response, remote_get_threadlist)
3611         (remote_threadlist_iterator, remote_get_threads_with_ql)
3612         (remote_get_threads_with_qxfer)
3613         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
3614         (get_offsets, remote_check_symbols, remote_supported_packet)
3615         (remote_query_supported, remote_packet_size)
3616         (remote_serial_quit_handler, remote_detach_pid)
3617         (remote_vcont_probe, remote_resume_with_hc)
3618         (send_interrupt_sequence, interrupt_query)
3619         (remote_notif_get_pending_events, fetch_register_using_p)
3620         (send_g_packet, process_g_packet, fetch_registers_using_g)
3621         (store_register_using_P, store_registers_using_G)
3622         (set_remote_traceframe, check_binary_download)
3623         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
3624         (remote_xfer_live_readonly_partial, remote_read_bytes)
3625         (remote_send_printf, remote_flash_write, readchar)
3626         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
3627         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
3628         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
3629         (extended_remote_disable_randomization, extended_remote_run)
3630         (send_environment_packet, extended_remote_environment_support)
3631         (extended_remote_set_inferior_cwd, remote_write_qxfer)
3632         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
3633         (packet_command): Now methods of ...
3634         (remote_target): ... this class.
3635         (m_remote_state) <remote_target>: New field.
3636         (struct remote_state) <stop_reply_queue,
3637         remote_async_inferior_event_token, wait_forever_enabled_p>: New
3638         fields.
3639         (remote_state::remote_state): Allocate stop_reply_queue.
3640         (remote_state): Delete global.
3641         (get_remote_state_raw): Delete.
3642         (remote_target::get_remote_state): Allocate m_remote_state on
3643         demand.
3644         (get_current_remote_target): New.
3645         (remote_ops, extended_remote_ops): Delete.
3646         (wait_forever_enabled_p, remote_async_inferior_event_token):
3647         Delete, moved to struct remote_state.
3648         (remote_target::close): Delete self.  Destruction bits split to
3649         ...
3650         (remote_target::~remote_target): ... this.
3651         (show_memory_packet_size): Adjust to use
3652         get_current_remote_target.
3653         (struct protocol_feature) <func>: Add remote_target parameter.
3654         All callers adjusted.
3655         (curr_quit_handler_target): New.
3656         (remote_serial_quit_handler): Reimplement.
3657         (remote_target::open_1): Adjust to use get_current_remote_target.
3658         Heap-allocate remote_target/extended_remote_target instances.
3659         (vcont_builder::vcont_builder): Add remote_target parameter, and
3660         save it in m_remote.  All callers adjusted.
3661         (vcont_builder::m_remote): New field.
3662         (vcont_builder::restart, vcont_builder::flush)
3663         (vcont_builder::push_action): Use it.
3664         (remote_target::commit_resume): Use it.
3665         (struct queue_iter_param) <remote>: New field.
3666         (remote_target::remove_new_fork_children): Fill in 'remote' field.
3667         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
3668         (check_pending_event_prevents_wildcard_vcont_callback)
3669         (remote_target::check_pending_events_prevent_wildcard_vcont)
3670         (remote_target::discard_pending_stop_replies)
3671         (remote_target::discard_pending_stop_replies_in_queue)
3672         (remote_target::remote_notif_remove_queued_reply): Fill in
3673         'remote' field.
3674         (remote_notif_get_pending_events): New.
3675         (remote_target::readchar, remote_target::remote_serial_write):
3676         Save/restore curr_quit_handler_target.
3677         (putpkt): New.
3678         (kill_new_fork_children): Fill in 'remote' field.
3679         (packet_command): Use get_current_remote_target, defer to
3680         remote_target method of same name.
3681         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
3682         parameter, and save it in m_remote.  All callers adjusted.
3683         (scoped_remote_fd::release): Use m_remote.
3684         (scoped_remote_fd::m_remote): New field.
3685         (remote_file_put, remote_file_get, remote_file_delete): Use
3686         get_current_remote_target, defer to remote_target method of same
3687         name.
3688         (remote_btrace_reset): Add remote_state paremeter.  Update all
3689         callers.
3690         (remote_async_inferior_event_handler). Pass down 'data'.
3691         (remote_new_objfile): Use get_current_remote_target.
3692         (remote_target::vcont_r_supported): New.
3693         (set_range_stepping): Use get_current_remote_target and
3694         remote_target::vcont_r_supported.
3695         (_initialize_remote): Don't allocate 'remote_state' and
3696         'stop_reply_queue' globals.
3697         * remote.h (struct remote_target): Forward declare.
3698         (getpkt, putpkt, remote_notif_get_pending_events): Add
3699         'remote_target' parameter.
3700
3701 2018-05-22  Pedro Alves  <palves@redhat.com>
3702
3703         * remote.c (vcont_builder): Now a class.  Make all data members
3704         private.
3705         (vcont_builder) <vcont_builder, restart, flush, push_action>:
3706         Declare methods.
3707         (vcont_builder_restart): Rename to ...
3708         (vcont_builder::restart): ... this.
3709         (vcont_builder_flush): Rename to ...
3710         (vcont_builder::flush): ... this.
3711         (vcont_builder_push_action): Rename to ...
3712         (vcont_builder::push_action): ... this.
3713         (remote_target::commit_resume): Adjust.
3714
3715 2018-05-22  Pedro Alves  <palves@redhat.com>
3716
3717         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
3718         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
3719         (get_fixed_memory_packet_size): New.
3720         (get_memory_packet_size): Use it.
3721         (set_memory_packet_size): Don't override the config size with
3722         DEFAULT_MAX_MEMORY_PACKET_SIZE.
3723         (show_memory_packet_size): Use get_fixed_memory_packet_size.
3724         Don't refer to get_memory_packet_size if not connected to a remote
3725         target.  Show "(default)" if configured size is 0.
3726
3727 2018-05-22  Pedro Alves  <palves@redhat.com>
3728
3729         * remote.c (remote_target::mourn_inferior): Move
3730         discard_pending_stop_replies call here from ...
3731         (_initialize_remote): ... here.
3732
3733 2018-05-22  Pedro Alves  <palves@redhat.com>
3734
3735         * remote.c (compare_section_command): Remove set_general_process
3736         call.
3737
3738 2018-05-22  Pedro Alves  <palves@redhat.com>
3739
3740         * remote.c (struct packet_reg, struct remote_arch_state):
3741         Move higher up in the file.
3742         (remote_state) <m_arch_states>: Store remote_arch_state values
3743         instead of remote_arch_state pointers.
3744         (remote_state::get_remote_arch_state): Adjust.
3745
3746 2018-05-22  Pedro Alves  <palves@redhat.com>
3747
3748         * remote.c: Include <unordered_map>.
3749         (remote_state): Now a class.
3750         (remote_state) <get_remote_arch_state>: Declare method.
3751         <get_remote_arch_state>: New field.
3752         (remote_arch_state) <remote_arch_state>: Declare ctor.
3753         <regs>: Now a unique_ptr.
3754         (remote_gdbarch_data_handle): Delete.
3755         (get_remote_arch_state): Delete.
3756         (remote_state::get_remote_arch_state): New.
3757         (get_remote_state): Adjust to call remote_state's
3758         get_remote_arch_state method.
3759         (init_remote_state): Delete, bits factored out to ...
3760         (remote_arch_state::remote_arch_state): ... this new method.
3761         (get_remote_packet_size, get_memory_packet_size)
3762         (process_g_packet, remote_target::fetch_registers)
3763         (remote_target::prepare_to_store, store_registers_using_G)
3764         (remote_target::store_registers, remote_target::get_trace_status):
3765         Adjust to call remote_state's method.
3766         (_initialize_remote): Remove reference to
3767         remote_gdbarch_data_handle.
3768
3769 2018-05-22  Pedro Alves  <palves@redhat.com>
3770
3771         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
3772         pread>: New method declarations.
3773         (remote_target::open_1): Adjust.
3774         (readahead_cache_invalidate): Rename to ...
3775         (readahead_cache::invalidate): ... this, and adjust to be a class
3776         method.
3777         (readahead_cache_invalidate_fd): Rename to ...
3778         (readahead_cache::invalidate_fd): ... this, and adjust to be a
3779         class method.
3780         (remote_hostio_pwrite): Adjust.
3781         (remote_hostio_pread_from_cache): Rename to ...
3782         (readahead_cache::pread): ... this, and adjust to be a class
3783         method.
3784         (remote_hostio_close): Adjust.
3785
3786 2018-05-22  Pedro Alves  <palves@redhat.com>
3787
3788         * remote.c (remote_hostio_close_cleanup): Delete.
3789         (class scoped_remote_fd): New.
3790         (remote_file_put, remote_file_get): Use it.
3791
3792 2018-05-22  Pedro Alves  <palves@redhat.com>
3793
3794         (struct vCont_action_support): Use bool and initialize all fields.
3795         (struct readahead_cache): Initialize all fields.
3796         (remote_state): Use bool and initialize all fields.
3797         (remote_state::remote_state, remote_state::~remote_state): New.
3798         (new_remote_state): Delete.
3799         (_initialize_remote): Use new to allocate remote_state.
3800
3801 2018-05-22  Pedro Alves  <palves@redhat.com>
3802             張俊芝  <zjz@zjz.name>
3803
3804         PR gdb/22973
3805         * c-exp.y: Include "c-support.h".
3806         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3807         of tolower.  Use c_ident_is_alpha to scan names.
3808         * c-lang.c: Include "c-support.h".
3809         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3810         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3811         * c-support.h: New file, with bits factored out from ...
3812         * cp-name-parser.y: ... this file.
3813         Include "c-support.h".
3814         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3815         c-support.h and renamed.
3816         (symbol_end, yylex): Adjust.
3817
3818 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3819
3820         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3821         parameter type to CORE_ADDR.
3822         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3823         parameter type in declaration to CORE_ADDR.
3824         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3825         target_auxv_search to get AT_HWCAP and use the result to get the
3826         target description.
3827         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3828         to CORE_ADDR. Remove the cast of the return value to unsigned
3829         long. Fix error predicate of target_auxv_search.
3830         (ppc_linux_nat_target::read_description): Change the type of the
3831         hwcap variable to CORE_ADDR.
3832
3833 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3834
3835         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3836         if the size of fpscr is larger than 32 bits.
3837
3838 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3839
3840         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3841         (ppc32_linux_vsxregmap): New global.
3842         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3843         regcache_supply_regset, and regcache_collect_regset.
3844         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3845         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3846         (fetch_vsx_register, store_vsx_register): Remove.
3847         (fetch_vsx_registers): Add regno parameter. Get regset using
3848         ppc_linux_vsxregset. Use regset to supply registers.
3849         (store_vsx_registers): Add regno parameter. Get regset using
3850         ppc_linux_vsxregset. Use regset to collect registers.
3851         (fetch_register): Call fetch_vsx_registers instead of
3852         fetch_vsx_register.
3853         (store_register): Call store_vsx_registers instead of
3854         store_vsx_register.
3855         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3856         new regno parameter.
3857         (store_ppc_registers): Call store_vsx_registers with -1 for the
3858         new regno parameter.
3859         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3860         (ppc_collect_vsxregset): Remove.
3861
3862 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3863
3864         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3865         offset fields.
3866         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3867         for vector register offset fields.
3868         (ppc64_fbsd_reg_offsets): Likewise.
3869         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3870         to vector register offset fields.
3871         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3872         to vector register offset fields.
3873         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3874         vector register offset fields.
3875         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3876         initializers for vector register offset fields.
3877         (rs6000_aix64_reg_offsets): Likewise.
3878         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3879         (ppc_supply_vrregset): Remove.
3880         (ppc_collect_vrregset): Remove.
3881         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3882         (ppc_linux_vrregset) : New function.
3883         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3884         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3885         (ppc32_linux_vrregset): Remove.
3886         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3887         and use result instead of ppc32_linux_vrregset.
3888         (ppc32_linux_reg_offsets): Remove initializers for vector register
3889         offset fields.
3890         (ppc64_linux_reg_offsets): Likewise.
3891         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3892         * ppc-linux-nat.c: Include regset.h.
3893         (gdb_vrregset_t): Adjust comment to account for little-endian
3894         mode.
3895         (supply_vrregset, fill_vrregset): Remove.
3896         (fetch_altivec_register, store_altivec_register): Remove.
3897         (fetch_altivec_registers): Add regno parameter. Get regset using
3898         ppc_linux_vrregset. Use regset to supply registers.
3899         (store_altivec_registers): Add regno parameter. Get regset using
3900         ppc_linux_vrregset. Use regset to collect registers.
3901         (fetch_register): Call fetch_altivec_registers instead of
3902         fetch_altivec_register.
3903         (store_register): Call store_altivec_registers instead of
3904         store_altivec_register.
3905         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3906         the new regno parameter.
3907         (store_ppc_registers): Call store_altivec_registers with -1 for
3908         the new regno parameter.
3909
3910 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3911
3912         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3913         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3914         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3915         (gdb_vrregset_t): Change array type size to
3916         PPC_LINUX_SIZEOF_VRREGSET.
3917         (gdb_vsxregset_t): Change array type size to
3918         PPC_LINUX_SIZEOF_VSXREGSET.
3919         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3920         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3921         PPC_LINUX_SIZEOF_VSXREGSET.
3922
3923 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3924
3925         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3926         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3927         nat/ppc-linux.c.
3928         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3929         ppc_linux_target_wordsize with tid.
3930         (ppc_linux_nat_target::read_description): Call ppc_linux_target
3931         wordsize with tid.
3932         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3933         (ppc64_64bit_inferior_p): Add static and inline specifiers.
3934         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3935         tid parameter. Remove static specifier.
3936         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3937         (ppc_linux_target_wordsize): New declaration.
3938
3939 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
3940
3941         * arch/ppc-linux-common.c: New file.
3942         * arch/ppc-linux-common.h: New file.
3943         * arch/ppc-linux-tdesc.h: New file.
3944         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3945         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3946         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3947         arch/ppc-linux-tdesc.h.
3948         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3949         arch/ppc-linux-tdesc.h.
3950         (ppc_linux_nat_target::read_description): Remove target
3951         description matching code. Fill a ppc_linux_features struct and
3952         call ppc_linux_match_description with it. Move comment about ISA
3953         2.05 to ppc-linux-common.c.
3954         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3955         arch/ppc-linux-tdesc.h.
3956         (ppc_linux_core_read_description): Remove target description
3957         matching code. Fill a ppc_linux_features struct and call
3958         ppc_linux_match_description with it.
3959         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3960         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3961         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3962         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3963         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3964         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3965         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3966         (tdesc_powerpc_e500l): Remove.
3967
3968 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
3969
3970         * ada-lang.c (catch_assert_command): Pass empty string instead
3971         of NULL for excep_string argument.
3972
3973 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
3974
3975         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3976         the width of the requested register exceeds the width of the
3977         `ptrace' data type.
3978
3979 2018-05-21  Tom Tromey  <tom@tromey.com>
3980
3981         * printcmd.c (output_command): Remove.
3982         (output_command_const): Rename to output_command.
3983         * valprint.h (output_command): Rename from output_command_const.
3984         * tracepoint.c (trace_dump_actions): Call output_command.
3985
3986 2018-05-21  Tom Tromey  <tom@tromey.com>
3987
3988         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3989         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3990         * ada-lang.h (create_ada_exception_catchpoint): Update.
3991         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3992         std::string.
3993         (create_excep_cond_exprs, ~ada_catchpoint)
3994         (should_stop_exception, print_one_exception)
3995         (print_mention_exception, print_recreate_exception): Update.
3996         (ada_get_next_arg): Remove.
3997         (catch_ada_exception_command_split): Use std::string.  Change type
3998         of "excep_string", "cond_string".
3999         (catch_ada_exception_command): Update.
4000         (create_ada_exception_catchpoint): Change type of excep_string.
4001         (ada_exception_sal): Remove excep_string parameter.
4002         (~ada_catchpoint): Remove.
4003
4004 2018-05-21  Tom Tromey  <tom@tromey.com>
4005
4006         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4007         cleanup.
4008
4009 2018-05-21  Tom Tromey  <tom@tromey.com>
4010
4011         * ada-lang.c (ada_exception_message_1, ada_exception_message):
4012         Return unique_xmalloc_ptr.
4013         (print_it_exception): Update.
4014
4015 2018-05-21  Tom Tromey  <tom@tromey.com>
4016
4017         * tracepoint.c (trace_dump_actions): Use std::string.
4018
4019 2018-05-21  Tom Tromey  <tom@tromey.com>
4020
4021         * symfile.c (reread_symbols): Use std::string for original_name.
4022
4023 2018-05-21  Tom Tromey  <tom@tromey.com>
4024
4025         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4026         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
4027         constructor.
4028
4029 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
4030
4031         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4032         instance to...
4033         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4034         * objfiles.c (get_objfile_bfd_data): Allocate
4035         objfile_per_bfd_storage with obstack_new when allocating on
4036         obstack.
4037
4038 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4039
4040         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4041         OBSTACK_ZALLOC.
4042         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4043         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4044         * mdebugread.c (mdebug_build_psymtabs): Likewise.
4045         (add_pending): Likewise.
4046         (parse_symbol): Likewise.
4047         (parse_partial_symbols): Likewise.
4048         (psymtab_to_symtab_1): Likewise.
4049         (new_psymtab): Likewise.
4050         (elfmdebug_build_psymtabs): Likewise.
4051         * minsyms.c (terminate_minimal_symbol_table): Likewise.
4052         * objfiles.c (get_objfile_bfd_data): Likewise.
4053         (objfile_register_static_link): Likewise.
4054         * psymtab.c (allocate_psymtab): Likewise.
4055         * stabsread.c (read_member_functions): Likewise.
4056         * xcoffread.c (xcoff_end_psymtab): Likewise.
4057
4058 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
4059
4060         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4061         compiler supports std::is_trivially_constructible.
4062         * common/poison.h: Include obstack.h.
4063         (IsMallocable): Define to is_trivially_constructible if the
4064         compiler supports it, define to true_type otherwise.
4065         (xobnew): New.
4066         (XOBNEW): Redefine.
4067         (xobnewvec): New.
4068         (XOBNEWVEC): Redefine.
4069         * gdb_obstack.h (obstack_zalloc): New.
4070         (OBSTACK_ZALLOC): Redefine.
4071         (obstack_calloc): New.
4072         (OBSTACK_CALLOC): Redefine.
4073         (obstack_new): New.
4074         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4075         (gdbarch_obstack): New declaration in gdbarch.h, definition in
4076         gdbarch.c.
4077         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4078         obstack_calloc/obstack_zalloc.
4079         (gdbarch_obstack_zalloc): Remove.
4080         * target-descriptions.c (tdesc_data_init): Use obstack_new.
4081
4082 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4083
4084         * stack.c (backtrace_command_1): Remove useless variable int i.
4085
4086 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4087
4088         * stack.c (print_frame_info): Fix comment.
4089
4090 2018-05-18  Tom Tromey  <tom@tromey.com>
4091
4092         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4093         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4094         (~dwarf2_per_objfile): Update
4095         (dwarf2_get_dwz_file): Use new.
4096         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4097         unique_ptr.
4098
4099 2018-05-18  Tom Tromey  <tom@tromey.com>
4100
4101         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4102         unique_ptr.
4103         * dwarf2read.c (struct dwp_file): Add constructor and
4104         initializers.
4105         (open_and_init_dwp_file): Return a unique_ptr.
4106         (dwarf2_per_objfile, create_dwp_hash_table)
4107         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4108         (lookup_dwo_unit_in_dwp): Update.
4109         (open_and_init_dwp_file, get_dwp_file): Update.
4110
4111 2018-05-18  Tom Tromey  <tom@tromey.com>
4112
4113         * dwarf2read.c (dwarf2_per_objfile): Update.
4114         (struct mapped_index): Add initializers.
4115         (dwarf2_read_index): Use new.
4116         (dw2_symtab_iter_init): Update.
4117         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4118         unique_ptr.
4119
4120 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4121
4122         * dwarf2read.c (mapped_index) <total_size>: Remove.
4123
4124 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
4125
4126         * unittests/format_pieces-selftests.c (test_format_specifier):
4127         Add ARI comments.
4128
4129 2018-05-18  Tom Tromey  <tom@tromey.com>
4130
4131         * c-typeprint.c (maybe_print_hole): New function.
4132         (c_print_type_struct_field_offset): Update.
4133         (c_type_print_base_struct_union): Call maybe_print_hole.
4134
4135 2018-05-17  Keith Seitz  <keiths@redhat.com>
4136
4137         * breakpoint.c (build_bpstat_chain): New function, moved from
4138         bpstat_stop_status.
4139         (bpstat_stop_status): Add optional parameter, `stop_chain'.
4140         If no stop chain is passed, call build_bpstat_chain to build it.
4141         * breakpoint.h (build_bpstat_chain): Declare.
4142         (bpstat_stop_status): Move documentation here from breakpoint.c.
4143         * infrun.c (handle_signal_stop): Before eliding inlined frames,
4144         build the stop chain and pass it to skip_inline_frames.
4145         Pass this stop chain to bpstat_stop_status.
4146         * inline-frame.c: Include breakpoint.h.
4147         (stopped_by_user_bp_inline_frame): New function.
4148         (skip_inline_frames): Add parameter `stop_chain'.
4149         Move documention to inline-frame.h.
4150         If non-NULL, use stopped_by_user_bp_inline_frame to determine
4151         whether the frame should be elided.
4152         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4153         Add moved documentation and update for new parameter.
4154
4155 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4156
4157         PR cli/14975
4158         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4159         unittests/format_pieces-selftests.c.
4160         * common/format.h (format_piece) <operator==>: New.
4161         (format_pieces) <operator[]>: Remove.
4162         * common/format.c (format_pieces::format_pieces): Handle \e.
4163         * unittests/format_pieces-selftests.c: New.
4164
4165 2018-05-17  Tom Tromey  <tom@tromey.com>
4166
4167         PR symtab/23010:
4168         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4169         (dw2_instantiate_symtab): Add skip_partial parameter.
4170         (dw2_find_last_source_symtab, dw2_map_expand_apply)
4171         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4172         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4173         (dw2_expand_symtabs_matching_one)
4174         (dw2_find_pc_sect_compunit_symtab)
4175         (dw2_debug_names_lookup_symbol)
4176         (dw2_debug_names_expand_symtabs_for_function): Update.
4177         (init_cutu_and_read_dies): Add skip_partial parameter.
4178         (process_psymtab_comp_unit, build_type_psymtabs_1)
4179         (process_skeletonless_type_unit, load_partial_comp_unit)
4180         (psymtab_to_symtab_1): Update.
4181         (load_full_comp_unit): Add skip_partial parameter.
4182         (process_imported_unit_die, dwarf2_read_addr_index)
4183         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4184         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4185         (read_signatured_type): Update.
4186
4187 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
4188
4189         * value.c (release_value): Remove unused variable.
4190         (record_latest_value): Likewise.
4191         (access_value_history): Likewise.
4192         (preserve_values): Likewise.
4193
4194 2018-05-17  Tom Tromey  <tom@tromey.com>
4195
4196         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4197         Initialize.
4198
4199 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
4200
4201         PR gdb/22286
4202         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4203         Also handle registers whose width is not a multiple of
4204         PTRACE_TYPE_RET.
4205         (linux_nat_trad_target::store_register): Likewise.
4206
4207 2018-05-16  Tom Tromey  <tom@tromey.com>
4208
4209         * gdbcore.h (core_bfd): Redefine.
4210         * corelow.c (core_target::close): Update.
4211         (core_target_open): Update.
4212         * progspace.h (struct program_space) <cbfd>: Now a
4213         gdb_bfd_ref_ptr.
4214
4215 2018-05-16  Tom Tromey  <tom@tromey.com>
4216
4217         PR cli/19551:
4218         * symfile-add-flags.h (enum symfile_add_flags)
4219         <SYMFILE_NOT_FILENAME>: New constant.
4220         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
4221         objfile name from BFD.
4222         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4223         * minidebug.c (find_separate_debug_file_in_section): Put
4224         ".gnu_debugdata" into BFD's file name.
4225
4226 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
4227
4228         * regcache.c (regcache_read_ftype, regcache_write_ftype):
4229         Remove.
4230
4231 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
4232
4233         PR binutils/21446
4234         * aarch64-tdep.c (aarch64_analyze_prologue,
4235         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4236         Indicate not interested in errors.
4237
4238 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4239
4240         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4241         Supply the MIPS_ZERO_REGNUM register.
4242
4243 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
4244
4245         * mips-tdep.c (mask_address_var): Make variable static.
4246
4247 2018-05-14  Tom Tromey  <tom@tromey.com>
4248
4249         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4250
4251 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
4252
4253         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4254         FXSAVE_ADDR for the mxcsr register.
4255
4256 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
4257
4258         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4259
4260 2018-05-11  Pedro Alves  <palves@redhat.com>
4261
4262         * corelow.c (core_target) <core_target>: No longer inline.
4263         Initialize m_core_gdbarch, m_core_vec and build the section table
4264         here.
4265         <~core_target>: New.
4266         <core_gdbarch, get_core_register_section>: New methods.
4267         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4268         factored out from ...
4269         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4270         (core_ops): Delete.
4271         (sniff_core_bfd): Add gdbarch parameter.
4272         (core_close): Delete, merged into ...
4273         (core_target::close): ... here.  Delete self.
4274         (core_close_cleanup): Delete.
4275         (core_target_open): Allocate a core_target on the heap.  Use a
4276         unique_ptr instead of a cleanup.  Bits moved into the core_target
4277         ctor.  Adjust to use core_target methods instead of globals.
4278         (get_core_register_section): Rename to ...
4279         (core_target::get_core_register_section): ... this and adjust.
4280         (struct get_core_registers_cb_data): New.
4281         (get_core_registers_cb): Use it.  Use bool.
4282         (core_target::fetch_registers, core_target::files_info)
4283         (core_target::xfer_partial, core_target::read_description)
4284         (core_target::pid_to, core_target::thread_name): Adjust to
4285         reference class fields instead of globals.
4286         * target.h (struct target_ops_deleter, target_ops_up): New.
4287
4288 2018-05-11  Pedro Alves  <palves@redhat.com>
4289
4290         * corefile.c (core_file_command): Move to corelow.c.
4291         * corelow.c (the_core_target): Delete.
4292         (core_file_command): Moved from corefile.c.  Check exec_bfd
4293         instead of the_core_target.  Use target_detach instead of calling
4294         into the_core_target directly.
4295         (maybe_say_no_core_file_now): New.
4296         (core_target::detach): Use it.
4297         (_initialize_corelow): Remove references to the_core_target.
4298         * gdbcore.h (the_core_target): Delete.
4299
4300 2018-05-11  Tom Tromey  <tromey@redhat.com>
4301             Pedro Alves  <palves@redhat.com>
4302
4303         * corefile.c (core_bfd): Remove.
4304         * gdbcore.h (core_bfd): Now a macro.
4305         * progspace.h (struct program_space) <cbfd>: New field.
4306
4307 2018-05-11  Tom Tromey  <tom@tromey.com>
4308
4309         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4310         gdb::def_vector.
4311
4312 2018-05-10  Tom Tromey  <tom@tromey.com>
4313
4314         * configure: Rebuild.
4315         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4316
4317 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
4318
4319         PR server/23158:
4320         * regformats/regdat.sh: Adjust script, following the addition
4321         of the new expedite_regs parameter to init_target_desc.
4322
4323 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
4324     
4325         PR gdb/23127
4326         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4327         set_gdbarch_significant_addr_bit.
4328         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4329         set_gdbarch_significant_addr_bit.
4330         * utils.c (address_significant): Update to sign extend addr.
4331
4332 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
4333
4334         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4335         (xtensa_linux_init_abi): Limit tdep->num_regs by
4336         tdep->num_nopriv_regs.
4337         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4338         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4339         not initialized.
4340
4341 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
4342
4343         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4344
4345 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4346
4347         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4348         (I387_MXCSR_INIT_VAL): New constant.
4349         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4350         buffer if it was supplied by the inferior.
4351         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4352         (i387_xsave_get_clear_bv): New function.
4353         (i387_supply_xsave): Only read x87 control registers from the
4354         xsave buffer if the feature is enabled, and the state will have
4355         been written, otherwise, provide a suitable default.
4356         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4357         including x87 control registers.  Update control registers if they
4358         have changed from the default value, and mark features as enabled
4359         as required.
4360         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4361
4362 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
4363
4364         * spu-tdep.c (info_spu_event_command): Fix output formatting.
4365
4366 2018-05-07  Tom Tromey  <tom@tromey.com>
4367
4368         * configure: Rebuild.
4369         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4370
4371 2018-05-07  Tom Tromey  <tom@tromey.com>
4372
4373         PR tdep/20362:
4374         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4375         bit.  Use correct value for VDIV.
4376
4377 2018-05-04  Tom Tromey  <tom@tromey.com>
4378
4379         * configure: Rebuild.
4380         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4381
4382 2018-05-04  Tom Tromey  <tom@tromey.com>
4383
4384         * linux-record.c (record_linux_system_call) <case
4385         RECORD_SYS_RECVFROM>: Add "break".
4386
4387 2018-05-04  Tom Tromey  <tom@tromey.com>
4388
4389         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4390         Add missing "break".
4391         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4392         Add missing "break".
4393
4394 2018-05-04  Tom Tromey  <tom@tromey.com>
4395
4396         * rs6000-tdep.c (ppc_process_record_op4)
4397         (ppc_process_record_op63): Add fall-through comment.
4398
4399 2018-05-04  Tom Tromey  <tom@tromey.com>
4400
4401         * i386-tdep.c (i386_process_record): Add fall-through comment.
4402
4403 2018-05-04  Tom Tromey  <tom@tromey.com>
4404
4405         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4406         comment.
4407
4408 2018-05-04  Tom Tromey  <tom@tromey.com>
4409
4410         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4411         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4412         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4413         comment.
4414         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4415         comment.
4416         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4417         comment.
4418
4419 2018-05-04  Tom Tromey  <tom@tromey.com>
4420
4421         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4422
4423 2018-05-04  Tom Tromey  <tom@tromey.com>
4424
4425         * s390-tdep.c (s390_process_record): Fix fall-through comments.
4426         * xcoffread.c (scan_xcoff_symtab): Move comment later.
4427         * symfile.c (section_is_mapped): Fix fall-through comment.
4428         * stabsread.c (define_symbol, read_member_functions): Fix
4429         fall-through comment.
4430         * s390-linux-tdep.c (s390_process_record): Fix fall-through
4431         comment.
4432         * remote.c (remote_wait_as): Fix fall-through comment.
4433         * p-exp.y (yylex): Fix fall-through comment.
4434         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4435         comment.
4436         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4437         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4438         * jv-exp.y (yylex): Fix fall-through comment.
4439         * go-exp.y (lex_one_token): Fix fall-through comment.
4440         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4441         fall-through comment.
4442         * f-exp.y (yylex): Fix fall-through comment.
4443         * dwarf2read.c (process_die): Fix fall-through comments.
4444         * dbxread.c (process_one_symbol): Fix fall-through comment.
4445         * d-exp.y (lex_one_token): Fix fall-through comment.
4446         * cp-name-parser.y (yylex): Fix fall-through comment.
4447         * coffread.c (coff_symtab_read): Fix fall-through comment.
4448         * c-exp.y (lex_one_token): Fix fall-through comment.
4449         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4450         comment.
4451         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4452         comment.
4453
4454 2018-05-04  Tom Tromey  <tom@tromey.com>
4455
4456         PR python/22730:
4457         * NEWS: Mention gdb.execute change.
4458         * gdbcmd.h (execute_control_command): Don't declare.
4459         * python/python.c (execute_gdb_command): Use read_command_lines_1,
4460         execute_control_commands, execute_control_commands_to_string.
4461         * cli/cli-script.h (execute_control_commands)
4462         (execute_control_commands_to_string): Declare.
4463         (execute_control_command): Add from_tty parameter.
4464         * cli/cli-script.c (execute_control_commands)
4465         (execute_control_commands_to_string): New functions.
4466         (execute_user_command): Use execute_control_commands.
4467         (execute_control_command_1): Add "from_tty" parameter.  Update.
4468         (execute_control_command): Likewise.
4469
4470 2018-05-04  Tom Tromey  <tom@tromey.com>
4471
4472         PR python/22731:
4473         * NEWS: Mention that breakpoint commands are writable.
4474         * python/py-breakpoint.c (bppy_set_commands): New function.
4475         (breakpoint_object_getset) <"commands">: Use it.
4476
4477 2018-05-04  Tom Tromey  <tom@tromey.com>
4478
4479         * tracepoint.c (actions_command): Update.
4480         * mi/mi-cmd-break.c (mi_command_line_array)
4481         (mi_command_line_array_cnt, mi_command_line_array_ptr)
4482         (mi_read_next_line): Remove.
4483         (mi_cmd_break_commands): Update.
4484         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4485         function_view.
4486         * cli/cli-script.c (get_command_line): Update.
4487         (process_next_line): Use function_view.  Constify.
4488         (recurse_read_control_structure, read_command_lines)
4489         (read_command_lines_1): Change argument types to function_view.
4490         (do_define_command, document_command): Update.
4491         * breakpoint.h (check_tracepoint_command): Don't declare.
4492         * breakpoint.c (check_tracepoint_command): Remove.
4493         (commands_command_1, create_tracepoint_from_upload): Update.
4494
4495 2018-05-04  Tom Tromey  <tom@tromey.com>
4496
4497         PR gdb/11750:
4498         * cli/cli-script.h (enum command_control_type) <define_control>:
4499         New constant.
4500         * cli/cli-script.c (multi_line_command_p): Handle define_control.
4501         (build_command_line, execute_control_command_1)
4502         (process_next_line): Likewise.
4503         (do_define_command): New function, extracted from define_command.
4504         (define_command): Use it.
4505
4506 2018-05-04  Tom Tromey  <tom@tromey.com>
4507
4508         * tracepoint.c (actions_command): Update.
4509         * cli/cli-script.h (read_command_lines): Update.
4510         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4511         (MAX_TMPBUF): Remove define.
4512         (define_command): Use string_printf.
4513         (document_command): Likewise.
4514         * breakpoint.c (commands_command_1): Update.
4515
4516 2018-05-04  Tom Tromey  <tom@tromey.com>
4517
4518         * top.c (execute_command): Update.
4519         * cli/cli-script.h (print_command_lines): Now varargs.
4520         * cli/cli-script.c (print_command_lines): Now varargs.
4521         (execute_control_command_1) <case while_control, case if_control>:
4522         Update.
4523
4524 2018-05-04  Tom Tromey  <tom@tromey.com>
4525
4526         * tracepoint.c (all_tracepoint_actions): Rename from
4527         all_tracepoint_actions_and_cleanup.  Change return type.
4528         (actions_command, encode_actions_1, encode_actions)
4529         (trace_dump_actions, tdump_command): Update.
4530         * remote.c (remote_download_command_source): Update.
4531         * python/python.c (gdbpy_eval_from_control_command)
4532         (python_command, python_interactive_command): Update.
4533         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4534         * guile/guile.c (guile_command)
4535         (gdbscm_eval_from_control_command, guile_command): Update.
4536         * compile/compile.c (compile_code_command)
4537         (compile_print_command, compile_to_object): Update.
4538         * cli/cli-script.h (struct command_lines_deleter): New.
4539         (counted_command_line): New typedef.
4540         (struct command_line): Add constructor, destructor.
4541         <body_list>: Remove.
4542         <body_list_0, body_list_1>: New members.
4543         (command_line_up): Remove typedef.
4544         (read_command_lines, read_command_lines_1, get_command_line):
4545         Update.
4546         (copy_command_lines): Don't declare.
4547         * cli/cli-script.c (build_command_line): Use "new".
4548         (get_command_line): Return counted_command_line.
4549         (print_command_lines, execute_user_command)
4550         (execute_control_command_1, while_command, if_command): Update.
4551         (realloc_body_list): Remove.
4552         (process_next_line, recurse_read_control_structure): Update.
4553         (read_command_lines, read_command_lines_1): Return counted_command_line.
4554         (free_command_lines): Use "delete".
4555         (copy_command_lines): Remove.
4556         (define_command, document_command, show_user_1): Update.
4557         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
4558         a counted_command_line.
4559         * breakpoint.h (counted_command_line): Remove typedef.
4560         (breakpoint_set_commands): Update.
4561         * breakpoint.c (check_no_tracepoint_commands)
4562         (validate_commands_for_breakpoint): Update.
4563         (breakpoint_set_commands): Change commands to be a
4564         counted_command_line.
4565         (commands_command_1, update_dprintf_command_list)
4566         (create_tracepoint_from_upload): Update.
4567
4568 2018-05-04  Tom Tromey  <tom@tromey.com>
4569
4570         * cli/cli-decode.h (cmd_list_element): New constructor.
4571         (~cmd_list_element): New destructor.
4572         (struct cmd_list_element): Add initializers.
4573         * cli/cli-decode.c (do_add_cmd): Use "new".
4574         (delete_cmd): Use "delete".
4575
4576 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
4577             Pedro Alves <palves@redhat.com>
4578
4579         PR breakpoints/19806 and support for PR external/20207.
4580         * NEWS: Mention Aarch64 watchpoint improvements.
4581         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
4582         watchpoints and PR external/20207 watchpoints.
4583         * nat/aarch64-linux-hw-point.c
4584         (kernel_supports_any_contiguous_range): New.
4585         (aarch64_watchpoint_offset): New.
4586         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
4587         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
4588         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
4589         (aarch64_align_watchpoint): New parameters aligned_offset_p and
4590         next_addr_orig_p.  Support PR external/20207 watchpoints.
4591         (aarch64_downgrade_regs): New.
4592         (aarch64_dr_state_insert_one_point): New parameters offset and
4593         addr_orig.
4594         (aarch64_dr_state_remove_one_point): Likewise.
4595         (aarch64_handle_breakpoint): Update caller.
4596         (aarch64_handle_aligned_watchpoint): Likewise.
4597         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
4598         aligned_offset.
4599         (aarch64_linux_set_debug_regs): Remove const from state.  Call
4600         aarch64_downgrade_regs.
4601         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
4602         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
4603         (DR_CONTROL_MASK): ... this.
4604         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
4605         (unsigned int aarch64_watchpoint_offset): New prototype.
4606         (aarch64_linux_set_debug_regs): Remove const from state.
4607         * utils.c (align_up, align_down): Move to ...
4608         * common/common-utils.c (align_up, align_down): ... here.
4609         * utils.h (align_up, align_down): Move to ...
4610         * common/common-utils.h (align_up, align_down): ... here.
4611
4612 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
4613
4614         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
4615         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
4616         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
4617         Re-implement to match the ABI as summarized in GCC's
4618         gcc/config/sparc/sparc.c.  All callers updated.
4619         (sparc32_store_arguments): Remove assertion.
4620
4621 2018-05-04  Tom Tromey  <tom@tromey.com>
4622
4623         * printcmd.c: Don't include tui.h.
4624         (decode_format): Use skip_spaces.
4625
4626 2018-05-04  Tom Tromey  <tom@tromey.com>
4627
4628         PR gdb/22619:
4629         * printcmd.c (last_count): New global.
4630         (x_command): Use saved count when repeating.
4631
4632 2018-05-04  Tom Tromey  <tom@tromey.com>
4633
4634         * nto-procfs.c (do_closedir_cleanup): Remove.
4635         (procfs_pidlist): Use gdb_dir_up.
4636         * procfs.c (do_closedir_cleanup): Remove.
4637         (proc_update_threads): Use gdb_dir_up.
4638         * common/filestuff.h (struct gdb_dir_deleter): New.
4639         (gdb_dir_up): New typedef.
4640
4641 2018-05-04  Tom Tromey  <tom@tromey.com>
4642
4643         * ada-lang.c (print_mention_exception): Use std::string.
4644
4645 2018-05-04  Tom Tromey  <tom@tromey.com>
4646
4647         * ada-lang.c (create_excep_cond_exprs): Update.
4648         (ada_exception_catchpoint_cond_string): Use std::string.
4649
4650 2018-05-04  Tom Tromey  <tom@tromey.com>
4651
4652         * ada-lang.c (xget_renaming_scope): Return std::string.
4653         (old_renaming_is_invisible): Update.
4654
4655 2018-05-04  Tom Tromey  <tom@tromey.com>
4656
4657         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
4658         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
4659
4660 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
4661
4662         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
4663
4664 2018-05-04  Tom Tromey  <tom@tromey.com>
4665
4666         * remote.c (remote_query_supported_append): Change type.
4667         (remote_check_symbols): Update.
4668
4669 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
4670
4671         PR gdb/11420
4672         * configure.ac: Prepend libpython.
4673         * python/python-config.py: Likewise.
4674         * configure: Regenerate.
4675
4676 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
4677
4678         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
4679
4680 2018-05-03  Pedro Alves  <palves@redhat.com>
4681
4682         * s390-linux-nat.c
4683         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
4684         override.  Write 'true' instead of '1'.
4685         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
4686         declaration.
4687
4688 2018-05-02  Pedro Alves  <palves@redhat.com>
4689
4690         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
4691         add_inf_child_target.
4692         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
4693         add_inf_child_target.
4694         * aix-thread.c (aix_thread_target_info): New.
4695         (aix_thread_target) <shortname, longname, doc>: Delete.
4696         <info>: New.
4697         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
4698         add_inf_child_target.
4699         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
4700         add_inf_child_target.
4701         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
4702         add_inf_child_target.
4703         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
4704         add_inf_child_target.
4705         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
4706         add_inf_child_target.
4707         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
4708         add_inf_child_target.
4709         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
4710         add_inf_child_target.
4711         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
4712         add_inf_child_target.
4713         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
4714         add_inf_child_target.
4715         * bfd-target.c (target_bfd_target_info): New.
4716         (target_bfd) <shortname, longname, doc>: Delete.
4717         <info>: New.
4718         * bsd-kvm.c (bsd_kvm_target_info): New.
4719         (bsd_kvm_target) <shortname, longname, doc>: Delete.
4720         <info>: New.
4721         (bsd_kvm_target::open): Rename to ...
4722         (bsd_kvm_target_open): ... this.  Adjust.
4723         * bsd-uthread.c (bsd_uthread_target_info): New.
4724         (bsd_uthread_target) <shortname, longname, doc>: Delete.
4725         <info>: New.
4726         * corefile.c (core_file_command): Adjust.
4727         * corelow.c (core_target_info): New.
4728         (core_target) <shortname, longname, doc>: Delete.
4729         <info>: New.
4730         (core_target::open): Rename to ...
4731         (core_target_open): ... this.  Adjust.
4732         * ctf.c (ctf_target_info): New.
4733         (ctf_target) <shortname, longname, doc>: Delete.
4734         <info>: New.
4735         (ctf_target::open): Rename to ...
4736         (ctf_target_open): ... this.
4737         (_initialize_ctf): Adjust.
4738         * exec.c (exec_target_info): New.
4739         (exec_target) <shortname, longname, doc>: Delete.
4740         <info>: New.
4741         (exec_target::open): Rename to ...
4742         (exec_target_open): ... this.
4743         * gdbcore.h (core_target_open): Declare.
4744         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
4745         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
4746         add_inf_child_target.
4747         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
4748         add_inf_child_target.
4749         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
4750         add_inf_child_target.
4751         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
4752         add_inf_child_target.
4753         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
4754         add_inf_child_target.
4755         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
4756         add_inf_child_target.
4757         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
4758         add_inf_child_target.
4759         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
4760         add_inf_child_target.
4761         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
4762         add_inf_child_target.
4763         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
4764         add_inf_child_target.
4765         * inf-child.c (inf_child_target_info): New.
4766         (inf_child_target::info): New.
4767         (inf_child_open_target): Remove 'target' parameter.  Use
4768         get_native_target instead.
4769         (inf_child_target::open): Delete.
4770         (add_inf_child_target): New.
4771         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
4772         Delete.
4773         <info>: New.
4774         (add_inf_child_target): Declare.
4775         (inf_child_open_target): Declare.
4776         * linux-thread-db.c (thread_db_target_info): New.
4777         (thread_db_target) <shortname, longname, doc>: Delete.
4778         <info>: New.
4779         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
4780         add_inf_child_target.
4781         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
4782         add_inf_child_target.
4783         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
4784         add_inf_child_target.
4785         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
4786         add_inf_child_target.
4787         * make-target-delegates (print_class): Adjust.
4788         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
4789         add_inf_child_target.
4790         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
4791         add_inf_child_target.
4792         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
4793         add_inf_child_target.
4794         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
4795         add_inf_child_target.
4796         * nto-procfs.c (nto_native_target_info): New.
4797         (nto_procfs_target_native) <shortname, longname, doc>:
4798         Delete.
4799         <info>: New.
4800         (nto_procfs_target_info): New.
4801         (nto_procfs_target_procfs) <shortname, longname, doc>:
4802         Delete.
4803         <info>: New.
4804         (init_procfs_targets): Adjust.
4805         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4806         add_inf_child_target.
4807         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4808         add_inf_child_target.
4809         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4810         add_inf_child_target.
4811         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4812         add_inf_child_target.
4813         * ravenscar-thread.c (ravenscar_target_info): New.
4814         (ravenscar_thread_target) <shortname, longname, doc>:
4815         Delete.
4816         <info>: New.
4817         * record-btrace.c (record_btrace_target_info):
4818         (record_btrace_target) <shortname, longname, doc>: Delete.
4819         <info>: New.
4820         (record_btrace_target::open): Rename to ...
4821         (record_btrace_target_open): ... this.  Adjust.
4822         * record-full.c (record_longname, record_doc): New.
4823         (record_full_base_target) <shortname, longname, doc>: Delete.
4824         <info>: New.
4825         (record_full_target_info): New.
4826         (record_full_target): <shortname>: Delete.
4827         <info>: New.
4828         (record_full_core_open_1, record_full_open_1): Update comments.
4829         (record_full_base_target::open): Rename to ...
4830         (record_full_open): ... this.
4831         (cmd_record_full_restore): Update.
4832         (_initialize_record_full): Update.
4833         * remote-sim.c (remote_sim_target_info): New.
4834         (gdbsim_target) <shortname, longname, doc>: Delete.
4835         <info>: New.
4836         (gdbsim_target::open): Rename to ...
4837         (gdbsim_target_open): ... this.
4838         (_initialize_remote_sim): Adjust.
4839         * remote.c (remote_doc): New.
4840         (remote_target_info): New.
4841         (remote_target) <shortname, longname, doc>: Delete.
4842         <info>: New.
4843         (extended_remote_target_info): New.
4844         (extended_remote_target) <shortname, longname, doc>: Delete.
4845         <info>: New.
4846         (remote_target::open_1): Make static.  Adjust.
4847         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4848         * s390-linux-nat.c (_initialize_s390_nat): Use
4849         add_inf_child_target.
4850         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4851         add_inf_child_target.
4852         * sol-thread.c (thread_db_target_info): New.
4853         (sol_thread_target) <shortname, longname, doc>: Delete.
4854         <info>: New.
4855         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4856         add_inf_child_target.
4857         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4858         add_inf_child_target.
4859         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4860         add_inf_child_target.
4861         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4862         add_inf_child_target.
4863         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4864         add_inf_child_target.
4865         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4866         add_inf_child_target.
4867         * spu-linux-nat.c (_initialize_spu_nat): Use
4868         add_inf_child_target.
4869         * spu-multiarch.c (spu_multiarch_target_info): New.
4870         (spu_multiarch_target) <shortname, longname, doc>: Delete.
4871         <info>: New.
4872         * target-delegates.c: Regenerate.
4873         * target.c: Include <unordered_map>.
4874         (target_ops_p): Delete.
4875         (DEF_VEC_P(target_ops_p)): Delete.
4876         (target_factories): New.
4877         (test_target_info): New.
4878         (test_target_ops::info): New.
4879         (open_target): Adjust to use target_factories.
4880         (add_target_with_completer): Rename to ...
4881         (add_target): ... this.  Change prototype.  Register target_info
4882         and open callback in target_factories.  Register target_info in
4883         command context instead of target_ops.
4884         (add_target): Delete old implementation.
4885         (add_deprecated_target_alias): Change prototype.  Adjust.
4886         (the_native_target): New.
4887         (set_native_target, get_native_target): New.
4888         (find_default_run_target): Use the_native_target.
4889         (find_attach_target, find_run_target): Simplify.
4890         (target_ops::open): Delete.
4891         (dummy_target_info): New.
4892         (dummy_target::shortname, dummy_target::longname)
4893         (dummy_target::doc): Delete.
4894         (dummy_target::info): New.
4895         (debug_target::shortname, debug_target::longname)
4896         (debug_target::doc): Delete.
4897         (debug_target::info): New.
4898         * target.h (struct target_info): New.
4899         (target_ops::~target_ops): Add comment.
4900         (target_ops::info): New.
4901         (target_ops::shortname, target_ops::longname, target_ops::doc): No
4902         longer virtual.  Implement in terms of target_info.
4903         (set_native_target, get_native_target): Declare.
4904         (target_open_ftype): New.
4905         (add_target, add_target_with_completer)
4906         (add_deprecated_target_alias): Change prototype.
4907         (test_target) <shortname, longname, doc>: Delete.
4908         <info>: New.
4909         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4910         add_inf_child_target.
4911         * tracefile-tfile.c (tfile_target_info): New.
4912         (tfile_target) <shortname, longname, doc>: Delete.
4913         <info>: New.
4914         (tfile_target::open): Rename to ...
4915         (tfile_target_open): ... this.
4916         (_initialize_tracefile_tfile): Adjust.
4917         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4918         add_inf_child_target.
4919         * windows-nat.c (_initialize_windows_nat): Use
4920         add_inf_child_target.
4921         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4922         add_inf_child_target.
4923
4924 2018-05-02  Pedro Alves  <palves@redhat.com>
4925
4926         * linux-nat.h (linux_nat_target) <low_new_thread,
4927         low_delete_thread, low_new_fork, low_forget_process,
4928         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4929         New virtual methods.
4930         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4931         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4932         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4933         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4934         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4935         Delete.
4936         * linux-fork.c (delete_fork): Adjust to call low method.
4937         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4938         (linux_nat_new_fork, linux_nat_forget_process_hook)
4939         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4940         (linux_nat_status_is_event):
4941         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4942         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4943         to call low method.
4944         (sigtrap_is_event): Rename to ...
4945         (linux_nat_target::low_status_is_event): ... this.
4946         (linux_nat_set_status_is_event): Delete.
4947         (save_stop_reason, linux_nat_wait_1)
4948         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4949         low methods.
4950         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4951         (linux_nat_set_new_fork, linux_nat_set_forget_process)
4952         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4953         (linux_nat_set_prepare_to_resume): Delete.
4954         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4955         low virtual methods.
4956         * amd64-linux-nat.c: Likewise.
4957         * arm-linux-nat.c: Likewise.
4958         * i386-linux-nat.c: Likewise.
4959         * ia64-linux-nat.c: Likewise.
4960         * mips-linux-nat.c: Likewise.
4961         * ppc-linux-nat.c: Likewise.
4962         * s390-linux-nat.c: Likewise.
4963         * sparc64-linux-nat.c: Likewise.
4964         * x86-linux-nat.c: Likewise.
4965         * x86-linux-nat.h: Include "nat/x86-linux.h".
4966         (x86_linux_nat_target) <low_new_fork, low_forget_process,
4967         low_prepare_to_resume, low_new_thread, low_delete_thread>:
4968         Override methods.
4969
4970 2018-05-02  Pedro Alves  <palves@redhat.com>
4971
4972         * target.h (target_ops)
4973         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4974         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4975         stopped_by_watchpoint, have_continuable_watchpoint,
4976         stopped_data_address, watchpoint_addr_within_range,
4977         can_accel_watchpoint_condition, can_run, thread_alive,
4978         has_all_memory, has_memory, has_stack, has_registers,
4979         has_execution, can_async_p, is_async_p, supports_non_stop,
4980         always_non_stop_p, can_execute_reverse, supports_multi_process,
4981         supports_enable_disable_tracepoint,
4982         supports_disable_randomization, supports_string_tracing,
4983         supports_evaluation_of_breakpoint_conditions,
4984         can_run_breakpoint_commands, filesystem_is_local,
4985         can_download_tracepoint, get_trace_state_variable_value,
4986         set_trace_notes, get_tib_address, use_agent, can_use_agent,
4987         record_is_replaying, record_will_replay,
4988         augmented_libraries_svr4_read>: Adjust to return bool.
4989         * aarch64-linux-nat.c: All implementations adjusted.
4990         * aix-thread.c: All implementations adjusted.
4991         * arm-linux-nat.c: All implementations adjusted.
4992         * breakpoint.c: All implementations adjusted.
4993         * bsd-kvm.c: All implementations adjusted.
4994         * bsd-uthread.c: All implementations adjusted.
4995         * corelow.c: All implementations adjusted.
4996         * ctf.c: All implementations adjusted.
4997         * darwin-nat.c: All implementations adjusted.
4998         * darwin-nat.h: All implementations adjusted.
4999         * exec.c: All implementations adjusted.
5000         * fbsd-nat.c: All implementations adjusted.
5001         * fbsd-nat.h: All implementations adjusted.
5002         * gnu-nat.c: All implementations adjusted.
5003         * gnu-nat.h: All implementations adjusted.
5004         * go32-nat.c: All implementations adjusted.
5005         * ia64-linux-nat.c: All implementations adjusted.
5006         * inf-child.c: All implementations adjusted.
5007         * inf-child.h: All implementations adjusted.
5008         * inf-ptrace.c: All implementations adjusted.
5009         * inf-ptrace.h: All implementations adjusted.
5010         * linux-nat.c: All implementations adjusted.
5011         * linux-nat.h: All implementations adjusted.
5012         * mips-linux-nat.c: All implementations adjusted.
5013         * nto-procfs.c: All implementations adjusted.
5014         * ppc-linux-nat.c: All implementations adjusted.
5015         * procfs.c: All implementations adjusted.
5016         * ravenscar-thread.c: All implementations adjusted.
5017         * record-btrace.c: All implementations adjusted.
5018         * record-full.c: All implementations adjusted.
5019         * remote-sim.c: All implementations adjusted.
5020         * remote.c: All implementations adjusted.
5021         * s390-linux-nat.c: All implementations adjusted.
5022         * sol-thread.c: All implementations adjusted.
5023         * spu-multiarch.c: All implementations adjusted.
5024         * target-delegates.c: All implementations adjusted.
5025         * target.c: All implementations adjusted.
5026         * target.h: All implementations adjusted.
5027         * tracefile-tfile.c: All implementations adjusted.
5028         * tracefile.c: All implementations adjusted.
5029         * tracefile.h: All implementations adjusted.
5030         * windows-nat.c: All implementations adjusted.
5031         * x86-linux-nat.h: All implementations adjusted.
5032         * x86-nat.h: All implementations adjusted.
5033
5034 2018-05-02  Pedro Alves  <palves@redhat.com>
5035
5036         * make-target-delegates (scan_target_h): Don't trim lines here.
5037         Replace sequences of tabs and/or whitespace with a single
5038         whitespace.
5039         (top level, parsing methods): Trim each line before processing it
5040         here.
5041
5042 2018-05-02  Pedro Alves  <palves@redhat.com>
5043             John Baldwin  <jhb@freebsd.org>
5044
5045         * target.h (enum strata) <debug_stratum>: New.
5046         (struct target_ops) <all delegation methods>: Replace by C++
5047         virtual methods, and drop "to_" prefix.  All references updated
5048         throughout.
5049         <to_shortname, to_longname, to_doc, to_data,
5050         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5051         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5052         virtual methods.  All references updated throughout.
5053         <can_attach, supports_terminal_ours, can_create_inferior,
5054         get_thread_control_capabilities, attach_no_wait>: New
5055         virtual methods.
5056         <insert_breakpoint, remove_breakpoint>: Now
5057         TARGET_DEFAULT_NORETURN methods.
5058         <info_proc>: Now returns bool.
5059         <to_magic>: Delete.
5060         (OPS_MAGIC): Delete.
5061         (current_target): Delete.  All references replaced by references
5062         to ...
5063         (target_stack): ... this.  New.
5064         (target_shortname, target_longname): Adjust.
5065         (target_can_run): Now a function declaration.
5066         (default_child_has_all_memory, default_child_has_memory)
5067         (default_child_has_stack, default_child_has_registers)
5068         (default_child_has_execution): Remove target_ops parameter.
5069         (complete_target_initialization): Delete.
5070         (memory_breakpoint_target): New template class.
5071         (test_target_ops): Refactor as a C++ class with virtual methods.
5072         * make-target-delegates (NAME_PART): Tighten.
5073         (POINTER_PART, CP_SYMBOL): New.
5074         (SIMPLE_RETURN_PART): Reimplement.
5075         (VEC_RETURN_PART): Expect less.
5076         (RETURN_PART, VIRTUAL_PART): New.
5077         (METHOD): Adjust to C++ virtual methods.
5078         (scan_target_h): Remove reference to C99.
5079         (dname): Output "target_ops::" prefix.
5080         (write_function_header): Adjust to output a C++ class method.
5081         (write_declaration): New.
5082         (write_delegator): Adjust to output a C++ class method.
5083         (tdname): Output "dummy_target::" prefix.
5084         (write_tdefault, write_debugmethod): Adjust to output a C++ class
5085         method.
5086         (tdefault_names, debug_names): Delete.
5087         (return_types, tdefaults, styles, argtypes_array): New.
5088         (top level): All methods are delegators.
5089         (print_class): New.
5090         (top level): Print dummy_target and debug_target classes.
5091         * target-delegates.c: Regenerate.
5092         * target-debug.h (target_debug_print_enum_info_proc_what)
5093         (target_debug_print_thread_control_capabilities)
5094         (target_debug_print_thread_info_p): New.
5095         * target.c (dummy_target): Delete.
5096         (the_dummy_target, the_debug_target): New.
5097         (target_stack): Now extern.
5098         (set_targetdebug): Push/unpush debug target.
5099         (default_child_has_all_memory, default_child_has_memory)
5100         (default_child_has_stack, default_child_has_registers)
5101         (default_child_has_execution): Remove target_ops parameter.
5102         (complete_target_initialization): Delete.
5103         (add_target_with_completer): No longer call
5104         complete_target_initialization.
5105         (target_supports_terminal_ours): Use regular delegation.
5106         (update_current_target): Delete.
5107         (push_target): No longer check magic number.  Don't call
5108         update_current_target.
5109         (unpush_target): Don't call update_current_target.
5110         (target_is_pushed): No longer check magic number.
5111         (target_require_runnable): Skip for all stratums over
5112         process_stratum.
5113         (target_ops::info_proc): New.
5114         (target_info_proc): Use find_target_at and
5115         find_default_run_target.
5116         (target_supports_disable_randomization): Use regular delegation.
5117         (target_get_osdata): Use find_target_at.
5118         (target_ops::open, target_ops::close, target_ops::can_attach)
5119         (target_ops::attach, target_ops::can_create_inferior)
5120         (target_ops::create_inferior, target_ops::can_run)
5121         (target_can_run): New.
5122         (default_fileio_target): Use regular delegation.
5123         (target_ops::fileio_open, target_ops::fileio_pwrite)
5124         (target_ops::fileio_pread, target_ops::fileio_fstat)
5125         (target_ops::fileio_close, target_ops::fileio_unlink)
5126         (target_ops::fileio_readlink): New.
5127         (target_fileio_open_1, target_fileio_unlink)
5128         (target_fileio_readlink): Always call the target method.  Handle
5129         FILEIO_ENOSYS.
5130         (return_zero, return_zero_has_execution): Delete.
5131         (init_dummy_target): Delete.
5132         (dummy_target::dummy_target, dummy_target::shortname)
5133         (dummy_target::longname, dummy_target::doc)
5134         (debug_target::debug_target, debug_target::shortname)
5135         (debug_target::longname, debug_target::doc): New.
5136         (target_supports_delete_record): Use regular delegation.
5137         (setup_target_debug): Delete.
5138         (maintenance_print_target_stack): Skip debug_stratum.
5139         (initialize_targets): Instantiate the_dummy_target and
5140         the_debug_target.
5141         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
5142         use target_stack.
5143         (target_auxv_search, fprint_target_auxv): Adjust.
5144         (info_auxv_command): Adjust to use target_stack.
5145         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5146         * exceptions.c (print_flush): Handle a NULL target_stack.
5147         * regcache.c (target_ops_no_register): Refactor as class with
5148         virtual methods.
5149
5150         * exec.c (exec_target): New class.
5151         (exec_ops): Now an exec_target.
5152         (exec_open, exec_close_1, exec_get_section_table)
5153         (exec_xfer_partial, exec_files_info, exec_has_memory)
5154         (exec_make_note_section): Refactor as exec_target methods.
5155         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5156         Delete.
5157         (exec_target::find_memory_regions): New.
5158         (_initialize_exec): Don't call init_exec_ops.
5159         * gdbcore.h (exec_file_clear): Delete.
5160
5161         * corefile.c (core_target): Delete.
5162         (core_file_command): Adjust.
5163         * corelow.c (core_target): New class.
5164         (the_core_target): New.
5165         (core_close): Remove target_ops parameter.
5166         (core_close_cleanup): Adjust.
5167         (core_target::close): New.
5168         (core_open, core_detach, get_core_registers, core_files_info)
5169         (core_xfer_partial, core_thread_alive, core_read_description)
5170         (core_pid_to_str, core_thread_name, core_has_memory)
5171         (core_has_stack, core_has_registers, core_info_proc): Rework as
5172         core_target methods.
5173         (ignore, core_remove_breakpoint, init_core_ops): Delete.
5174         (_initialize_corelow): Initialize the_core_target.
5175         * gdbcore.h (core_target): Delete.
5176         (the_core_target): New.
5177
5178         * ctf.c: (ctf_target): New class.
5179         (ctf_ops): Now a ctf_target.
5180         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5181         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5182         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5183         methods.
5184         (init_ctf_ops): Delete.
5185         (_initialize_ctf): Don't call it.
5186         * tracefile-tfile.c (tfile_target): New class.
5187         (tfile_ops): Now a tfile_target.
5188         (tfile_open, tfile_close, tfile_files_info)
5189         (tfile_get_tracepoint_status, tfile_trace_find)
5190         (tfile_fetch_registers, tfile_xfer_partial)
5191         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5192         Refactor as tfile_target methods.
5193         (tfile_xfer_partial_features): Remove target_ops parameter.
5194         (init_tfile_ops): Delete.
5195         (_initialize_tracefile_tfile): Don't call it.
5196         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5197         (tracefile_has_stack, tracefile_has_registers)
5198         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5199         tracefile_target methods.
5200         (init_tracefile_ops): Delete.
5201         (tracefile_target::tracefile_target): New.
5202         * tracefile.h: Include "target.h".
5203         (tracefile_target): New class.
5204         (init_tracefile_ops): Delete.
5205
5206         * spu-multiarch.c (spu_multiarch_target): New class.
5207         (spu_ops): Now a spu_multiarch_target.
5208         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5209         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5210         (spu_search_memory, spu_mourn_inferior): Refactor as
5211         spu_multiarch_target methods.
5212         (init_spu_ops): Delete.
5213         (_initialize_spu_multiarch): Remove references to init_spu_ops,
5214         complete_target_initialization.
5215
5216         * ravenscar-thread.c (ravenscar_thread_target): New class.
5217         (ravenscar_ops): Now a ravenscar_thread_target.
5218         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5219         (ravenscar_thread_alive, ravenscar_pid_to_str)
5220         (ravenscar_fetch_registers, ravenscar_store_registers)
5221         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5222         (ravenscar_stopped_by_hw_breakpoint)
5223         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5224         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5225         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5226         methods.
5227         (init_ravenscar_thread_ops): Delete.
5228         (_initialize_ravenscar): Remove references to
5229         init_ravenscar_thread_ops and complete_target_initialization.
5230
5231         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5232         (bsd_uthread_target): New class.
5233         (bsd_uthread_ops): Now a bsd_uthread_target.
5234         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5235         (bsd_uthread_close, bsd_uthread_mourn_inferior)
5236         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5237         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5238         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5239         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5240         (bsd_uthread_target): Delete function.
5241         (_initialize_bsd_uthread): Remove reference to
5242         complete_target_initialization.
5243
5244         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
5245         (target_bfd): ... this new class.
5246         (target_bfd_xfer_partial, target_bfd_get_section_table)
5247         (target_bfd_close): Refactor as target_bfd methods.
5248         (target_bfd::~target_bfd): New.
5249         (target_bfd_reopen): Adjust.
5250         (target_bfd::close): New.
5251
5252         * record-btrace.c (record_btrace_target): New class.
5253         (record_btrace_ops): Now a record_btrace_target.
5254         (record_btrace_open, record_btrace_stop_recording)
5255         (record_btrace_disconnect, record_btrace_close)
5256         (record_btrace_async, record_btrace_info)
5257         (record_btrace_insn_history, record_btrace_insn_history_range)
5258         (record_btrace_insn_history_from, record_btrace_call_history)
5259         (record_btrace_call_history_range)
5260         (record_btrace_call_history_from, record_btrace_record_method)
5261         (record_btrace_is_replaying, record_btrace_will_replay)
5262         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5263         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5264         (record_btrace_store_registers, record_btrace_prepare_to_store)
5265         (record_btrace_to_get_unwinder)
5266         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5267         (record_btrace_commit_resume, record_btrace_wait)
5268         (record_btrace_stop, record_btrace_can_execute_reverse)
5269         (record_btrace_stopped_by_sw_breakpoint)
5270         (record_btrace_supports_stopped_by_sw_breakpoint)
5271         (record_btrace_stopped_by_hw_breakpoint)
5272         (record_btrace_supports_stopped_by_hw_breakpoint)
5273         (record_btrace_update_thread_list, record_btrace_thread_alive)
5274         (record_btrace_goto_begin, record_btrace_goto_end)
5275         (record_btrace_goto, record_btrace_stop_replaying_all)
5276         (record_btrace_execution_direction)
5277         (record_btrace_prepare_to_generate_core)
5278         (record_btrace_done_generating_core): Refactor as
5279         record_btrace_target methods.
5280         (init_record_btrace_ops): Delete.
5281         (_initialize_record_btrace): Remove reference to
5282         init_record_btrace_ops.
5283         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5284         the execution_direction global.
5285         (record_full_base_target, record_full_target)
5286         (record_full_core_target): New classes.
5287         (record_full_ops): Now a record_full_target.
5288         (record_full_core_ops): Now a record_full_core_target.
5289         (record_full_target::detach, record_full_target::disconnect)
5290         (record_full_core_target::disconnect)
5291         (record_full_target::mourn_inferior, record_full_target::kill):
5292         New.
5293         (record_full_open, record_full_close, record_full_async): Refactor
5294         as methods of the record_full_base_target class.
5295         (record_full_resume, record_full_commit_resume): Refactor
5296         as methods of the record_full_target class.
5297         (record_full_wait, record_full_stopped_by_watchpoint)
5298         (record_full_stopped_data_address)
5299         (record_full_stopped_by_sw_breakpoint)
5300         (record_full_supports_stopped_by_sw_breakpoint)
5301         (record_full_stopped_by_hw_breakpoint)
5302         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5303         methods of the record_full_base_target class.
5304         (record_full_store_registers, record_full_xfer_partial)
5305         (record_full_insert_breakpoint, record_full_remove_breakpoint):
5306         Refactor as methods of the record_full_target class.
5307         (record_full_can_execute_reverse, record_full_get_bookmark)
5308         (record_full_goto_bookmark, record_full_execution_direction)
5309         (record_full_record_method, record_full_info, record_full_delete)
5310         (record_full_is_replaying, record_full_will_replay)
5311         (record_full_goto_begin, record_full_goto_end, record_full_goto)
5312         (record_full_stop_replaying): Refactor as methods of the
5313         record_full_base_target class.
5314         (record_full_core_resume, record_full_core_kill)
5315         (record_full_core_fetch_registers)
5316         (record_full_core_prepare_to_store)
5317         (record_full_core_store_registers, record_full_core_xfer_partial)
5318         (record_full_core_insert_breakpoint)
5319         (record_full_core_remove_breakpoint)
5320         (record_full_core_has_execution): Refactor
5321         as methods of the record_full_core_target class.
5322         (record_full_base_target::supports_delete_record): New.
5323         (init_record_full_ops): Delete.
5324         (init_record_full_core_ops): Delete.
5325         (record_full_save): Refactor as method of the
5326         record_full_base_target class.
5327         (_initialize_record_full): Remove references to
5328         init_record_full_ops and init_record_full_core_ops.
5329
5330         * remote.c (remote_target, extended_remote_target): New classes.
5331         (remote_ops): Now a remote_target.
5332         (extended_remote_ops): Now an extended_remote_target.
5333         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5334         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5335         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5336         (remote_pass_signals, remote_set_syscall_catchpoint)
5337         (remote_program_signals, )
5338         (remote_thread_always_alive): Remove target_ops parameter.
5339         (remote_thread_alive, remote_thread_name)
5340         (remote_update_thread_list, remote_threads_extra_info)
5341         (remote_static_tracepoint_marker_at)
5342         (remote_static_tracepoint_markers_by_strid)
5343         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5344         (remote_open): Refactor as methods of remote_target.
5345         (extended_remote_open, extended_remote_detach)
5346         (extended_remote_attach, extended_remote_post_attach):
5347         (extended_remote_supports_disable_randomization)
5348         (extended_remote_create_inferior): : Refactor as method of
5349         extended_remote_target.
5350         (remote_set_permissions, remote_open_1, remote_detach)
5351         (remote_follow_fork, remote_follow_exec, remote_disconnect)
5352         (remote_resume, remote_commit_resume, remote_stop)
5353         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5354         (remote_terminal_ours, remote_wait, remote_fetch_registers)
5355         (remote_prepare_to_store, remote_store_registers)
5356         (remote_flash_erase, remote_flash_done, remote_files_info)
5357         (remote_kill, remote_mourn, remote_insert_breakpoint)
5358         (remote_remove_breakpoint, remote_insert_watchpoint)
5359         (remote_watchpoint_addr_within_range)
5360         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5361         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5362         (remote_supports_stopped_by_sw_breakpoint)
5363         (remote_stopped_by_hw_breakpoint)
5364         (remote_supports_stopped_by_hw_breakpoint)
5365         (remote_stopped_by_watchpoint, remote_stopped_data_address)
5366         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5367         (remote_verify_memory): Refactor as methods of remote_target.
5368         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5369         parameter.
5370         (remote_xfer_partial, remote_get_memory_xfer_limit)
5371         (remote_search_memory, remote_rcmd, remote_memory_map)
5372         (remote_pid_to_str, remote_get_thread_local_address)
5373         (remote_get_tib_address, remote_read_description): Refactor as
5374         methods of remote_target.
5375         (remote_target::fileio_open, remote_target::fileio_pwrite)
5376         (remote_target::fileio_pread, remote_target::fileio_close): New.
5377         (remote_hostio_readlink, remote_hostio_fstat)
5378         (remote_filesystem_is_local, remote_can_execute_reverse)
5379         (remote_supports_non_stop, remote_supports_disable_randomization)
5380         (remote_supports_multi_process, remote_supports_cond_breakpoints)
5381         (remote_supports_enable_disable_tracepoint)
5382         (remote_supports_string_tracing)
5383         (remote_can_run_breakpoint_commands, remote_trace_init)
5384         (remote_download_tracepoint, remote_can_download_tracepoint)
5385         (remote_download_trace_state_variable, remote_enable_tracepoint)
5386         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5387         (remote_trace_start, remote_get_trace_status)
5388         (remote_get_tracepoint_status, remote_trace_stop)
5389         (remote_trace_find, remote_get_trace_state_variable_value)
5390         (remote_save_trace_data, remote_get_raw_trace_data)
5391         (remote_set_disconnected_tracing, remote_core_of_thread)
5392         (remote_set_circular_trace_buffer, remote_traceframe_info)
5393         (remote_get_min_fast_tracepoint_insn_len)
5394         (remote_set_trace_buffer_size, remote_set_trace_notes)
5395         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5396         (remote_disable_btrace, remote_teardown_btrace)
5397         (remote_read_btrace, remote_btrace_conf)
5398         (remote_augmented_libraries_svr4_read, remote_load)
5399         (remote_pid_to_exec_file, remote_can_do_single_step)
5400         (remote_execution_direction, remote_thread_handle_to_thread_info):
5401         Refactor as methods of remote_target.
5402         (init_remote_ops, init_extended_remote_ops): Delete.
5403         (remote_can_async_p, remote_is_async_p, remote_async)
5404         (remote_thread_events, remote_upload_tracepoints)
5405         (remote_upload_trace_state_variables): Refactor as methods of
5406         remote_target.
5407         (_initialize_remote): Remove references to init_remote_ops and
5408         init_extended_remote_ops.
5409
5410         * remote-sim.c (gdbsim_target): New class.
5411         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5412         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5413         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5414         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5415         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5416         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5417         Refactor as methods of gdbsim_target.
5418         (gdbsim_ops): Now a gdbsim_target.
5419         (init_gdbsim_ops): Delete.
5420         (gdbsim_cntrl_c): Adjust.
5421         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5422
5423         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5424         (the_amd64_linux_nat_target): New.
5425         (amd64_linux_fetch_inferior_registers)
5426         (amd64_linux_store_inferior_registers): Refactor as methods of
5427         amd64_linux_nat_target.
5428         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
5429         * i386-linux-nat.c: Don't include "linux-nat.h".
5430         (i386_linux_nat_target): New class.
5431         (the_i386_linux_nat_target): New.
5432         (i386_linux_fetch_inferior_registers)
5433         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5434         as methods of i386_linux_nat_target.
5435         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
5436         * inf-child.c (inf_child_ops): Delete.
5437         (inf_child_fetch_inferior_registers)
5438         (inf_child_store_inferior_registers): Delete.
5439         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5440         methods of inf_child_target.
5441         (inf_child_target::supports_terminal_ours)
5442         (inf_child_target::terminal_init)
5443         (inf_child_target::terminal_inferior)
5444         (inf_child_target::terminal_ours_for_output)
5445         (inf_child_target::terminal_ours, inf_child_target::interrupt)
5446         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5447         New.
5448         (inf_child_open, inf_child_disconnect, inf_child_close)
5449         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5450         (inf_child_post_startup_inferior, inf_child_can_run)
5451         (inf_child_pid_to_exec_file): Refactor as methods of
5452         inf_child_target.
5453         (inf_child_follow_fork): Delete.
5454         (inf_child_target::can_create_inferior)
5455         (inf_child_target::can_attach): New.
5456         (inf_child_target::has_all_memory, inf_child_target::has_memory)
5457         (inf_child_target::has_stack, inf_child_target::has_registers)
5458         (inf_child_target::has_execution): New.
5459         (inf_child_fileio_open, inf_child_fileio_pwrite)
5460         (inf_child_fileio_pread, inf_child_fileio_fstat)
5461         (inf_child_fileio_close, inf_child_fileio_unlink)
5462         (inf_child_fileio_readlink, inf_child_use_agent)
5463         (inf_child_can_use_agent): Refactor as methods of
5464         inf_child_target.
5465         (return_zero, inf_child_target): Delete.
5466         (inf_child_target::inf_child_target): New.
5467         * inf-child.h: Include "target.h".
5468         (inf_child_target): Delete function prototype.
5469         (inf_child_target): New class.
5470         (inf_child_open_target, inf_child_mourn_inferior)
5471         (inf_child_maybe_unpush_target): Delete.
5472         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5473         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5474         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5475         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5476         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5477         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5478         (inf_ptrace_wait, inf_ptrace_xfer_partial)
5479         (inf_ptrace_thread_alive, inf_ptrace_files_info)
5480         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5481         methods of inf_ptrace_target.
5482         (inf_ptrace_target): Delete function.
5483         * inf-ptrace.h: Include "inf-child.h".
5484         (inf_ptrace_target): Delete function declaration.
5485         (inf_ptrace_target): New class.
5486         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5487         * linux-nat.c (linux_target): New.
5488         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5489         (linux_nat_target::~linux_nat_target): New.
5490         (linux_child_post_attach, linux_child_post_startup_inferior)
5491         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5492         (linux_child_remove_fork_catchpoint)
5493         (linux_child_insert_vfork_catchpoint)
5494         (linux_child_remove_vfork_catchpoint)
5495         (linux_child_insert_exec_catchpoint)
5496         (linux_child_remove_exec_catchpoint)
5497         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5498         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5499         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5500         (linux_nat_stopped_data_address)
5501         (linux_nat_stopped_by_sw_breakpoint)
5502         (linux_nat_supports_stopped_by_sw_breakpoint)
5503         (linux_nat_stopped_by_hw_breakpoint)
5504         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5505         (linux_nat_kill, linux_nat_mourn_inferior)
5506         (linux_nat_xfer_partial, linux_nat_thread_alive)
5507         (linux_nat_update_thread_list, linux_nat_pid_to_str)
5508         (linux_nat_thread_name, linux_child_pid_to_exec_file)
5509         (linux_child_static_tracepoint_markers_by_strid)
5510         (linux_nat_is_async_p, linux_nat_can_async_p)
5511         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5512         (linux_nat_supports_multi_process)
5513         (linux_nat_supports_disable_randomization, linux_nat_async)
5514         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5515         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5516         (linux_nat_fileio_open, linux_nat_fileio_readlink)
5517         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5518         methods of linux_nat_target.
5519         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
5520         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
5521         parameter.
5522         (check_stopped_by_watchpoint): Adjust.
5523         (linux_xfer_partial): Delete.
5524         (linux_target_install_ops, linux_target, linux_nat_add_target):
5525         Delete.
5526         (linux_nat_target::linux_nat_target): New.
5527         * linux-nat.h: Include "inf-ptrace.h".
5528         (linux_nat_target): New.
5529         (linux_target, linux_target_install_ops, linux_nat_add_target):
5530         Delete function declarations.
5531         (linux_target): Declare global.
5532         * linux-thread-db.c (thread_db_target): New.
5533         (thread_db_target::thread_db_target): New.
5534         (thread_db_ops): Delete.
5535         (the_thread_db_target): New.
5536         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
5537         (thread_db_update_thread_list, thread_db_pid_to_str)
5538         (thread_db_extra_thread_info)
5539         (thread_db_thread_handle_to_thread_info)
5540         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
5541         (thread_db_resume): Refactor as methods of thread_db_target.
5542         (init_thread_db_ops): Delete.
5543         (_initialize_thread_db): Remove reference to init_thread_db_ops.
5544         * x86-linux-nat.c: Don't include "linux-nat.h".
5545         (super_post_startup_inferior): Delete.
5546         (x86_linux_nat_target::~x86_linux_nat_target): New.
5547         (x86_linux_child_post_startup_inferior)
5548         (x86_linux_read_description, x86_linux_enable_btrace)
5549         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
5550         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
5551         methods of x86_linux_nat_target.
5552         (x86_linux_create_target): Delete.  Bits folded ...
5553         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
5554         pointer.
5555         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
5556         (x86_linux_nat_target): New class.
5557         (x86_linux_create_target): Delete.
5558         (x86_linux_add_target): Now takes a linux_nat_target pointer.
5559         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
5560         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
5561         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
5562         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
5563         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
5564         make extern.
5565         (x86_use_watchpoints): Delete.
5566         * x86-nat.h: Include "breakpoint.h" and "target.h".
5567         (x86_use_watchpoints): Delete.
5568         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
5569         (x86_stopped_by_watchpoint, x86_stopped_data_address)
5570         (x86_insert_watchpoint, x86_remove_watchpoint)
5571         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
5572         (x86_stopped_by_hw_breakpoint): New declarations.
5573         (x86_nat_target): New template class.
5574
5575         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
5576         (the_ppc_linux_nat_target): New.
5577         (ppc_linux_fetch_inferior_registers)
5578         (ppc_linux_can_use_hw_breakpoint)
5579         (ppc_linux_region_ok_for_hw_watchpoint)
5580         (ppc_linux_ranged_break_num_registers)
5581         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
5582         (ppc_linux_insert_mask_watchpoint)
5583         (ppc_linux_remove_mask_watchpoint)
5584         (ppc_linux_can_accel_watchpoint_condition)
5585         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
5586         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
5587         (ppc_linux_watchpoint_addr_within_range)
5588         (ppc_linux_masked_watch_num_registers)
5589         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
5590         (ppc_linux_read_description): Refactor as methods of
5591         ppc_linux_nat_target.
5592         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
5593
5594         * procfs.c (procfs_xfer_partial): Delete forward declaration.
5595         (procfs_target): New class.
5596         (the_procfs_target): New.
5597         (procfs_target): Delete function.
5598         (procfs_auxv_parse, procfs_attach, procfs_detach)
5599         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
5600         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
5601         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
5602         (procfs_create_inferior, procfs_update_thread_list)
5603         (procfs_thread_alive, procfs_pid_to_str)
5604         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
5605         (procfs_stopped_data_address, procfs_insert_watchpoint)
5606         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
5607         (proc_find_memory_regions, procfs_info_proc)
5608         (procfs_make_note_section): Refactor as methods of procfs_target.
5609         (_initialize_procfs): Adjust.
5610         * sol-thread.c (sol_thread_target): New class.
5611         (sol_thread_ops): Now a sol_thread_target.
5612         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5613         (sol_thread_fetch_registers, sol_thread_store_registers)
5614         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
5615         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
5616         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
5617         (init_sol_thread_ops): Delete.
5618         (_initialize_sol_thread): Adjust.  Remove references to
5619         init_sol_thread_ops and complete_target_initialization.
5620
5621         * windows-nat.c (windows_nat_target): New class.
5622         (windows_fetch_inferior_registers)
5623         (windows_store_inferior_registers, windows_resume, windows_wait)
5624         (windows_attach, windows_detach, windows_pid_to_exec_file)
5625         (windows_files_info, windows_create_inferior)
5626         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
5627         (windows_close, windows_pid_to_str, windows_xfer_partial)
5628         (windows_get_tib_address, windows_get_ada_task_ptid)
5629         (windows_thread_name, windows_thread_alive): Refactor as
5630         windows_nat_target methods.
5631         (do_initial_windows_stuff): Adjust.
5632         (windows_target): Delete function.
5633         (_initialize_windows_nat): Adjust.
5634
5635         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
5636         (darwin_mourn_inferior, darwin_kill_inferior)
5637         (darwin_create_inferior, darwin_attach, darwin_detach)
5638         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
5639         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
5640         (darwin_supports_multi_process): Refactor as darwin_nat_target
5641         methods.
5642         (darwin_resume_to, darwin_files_info): Delete.
5643         (_initialize_darwin_inferior): Rename to ...
5644         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
5645         * darwin-nat.h: Include "inf-child.h".
5646         (darwin_nat_target): New class.
5647         (darwin_complete_target): Delete.
5648         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
5649         (darwin_target): New.
5650         (i386_darwin_fetch_inferior_registers)
5651         (i386_darwin_store_inferior_registers): Refactor as methods of
5652         darwin_nat_target.
5653         (darwin_complete_target): Delete, with ...
5654         (_initialize_i386_darwin_nat): ... bits factored out here.
5655
5656         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
5657         (the_alpha_linux_nat_target): New.
5658         (alpha_linux_register_u_offset): Refactor as
5659         alpha_linux_nat_target method.
5660         (_initialize_alpha_linux_nat): Adjust.
5661         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
5662         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5663         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
5664         methods of linux_nat_trad_target.
5665         (linux_trad_target): Delete.
5666         * linux-nat-trad.h (linux_trad_target): Delete function.
5667         (linux_nat_trad_target): New class.
5668         * mips-linux-nat.c (mips_linux_nat_target): New class.
5669         (super_fetch_registers, super_store_registers, super_close):
5670         Delete.
5671         (the_mips_linux_nat_target): New.
5672         (mips64_linux_regsets_fetch_registers)
5673         (mips64_linux_regsets_store_registers)
5674         (mips64_linux_fetch_registers, mips64_linux_store_registers)
5675         (mips_linux_register_u_offset, mips_linux_read_description)
5676         (mips_linux_can_use_hw_breakpoint)
5677         (mips_linux_stopped_by_watchpoint)
5678         (mips_linux_stopped_data_address)
5679         (mips_linux_region_ok_for_hw_watchpoint)
5680         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5681         (mips_linux_close): Refactor as methods of mips_linux_nat.
5682         (_initialize_mips_linux_nat): Adjust to C++ification.
5683
5684         * aix-thread.c (aix_thread_target): New class.
5685         (aix_thread_ops): Now an aix_thread_target.
5686         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5687         (aix_thread_fetch_registers, aix_thread_store_registers)
5688         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5689         (aix_thread_thread_alive, aix_thread_pid_to_str)
5690         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
5691         Refactor as methods of aix_thread_target.
5692         (init_aix_thread_ops): Delete.
5693         (_initialize_aix_thread): Remove references to init_aix_thread_ops
5694         and complete_target_initialization.
5695         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
5696         (rs6000_nat_target): New class.
5697         (the_rs6000_nat_target): New.
5698         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
5699         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
5700         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
5701         (super_create_inferior): Delete.
5702         (_initialize_rs6000_nat): Adjust to C++ification.
5703
5704         * arm-linux-nat.c (arm_linux_nat_target): New class.
5705         (the_arm_linux_nat_target): New.
5706         (arm_linux_fetch_inferior_registers)
5707         (arm_linux_store_inferior_registers, arm_linux_read_description)
5708         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
5709         (arm_linux_remove_hw_breakpoint)
5710         (arm_linux_region_ok_for_hw_watchpoint)
5711         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
5712         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
5713         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
5714         arm_linux_nat_target.
5715         (_initialize_arm_linux_nat): Adjust to C++ification.
5716
5717         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
5718         (the_aarch64_linux_nat_target): New.
5719         (aarch64_linux_fetch_inferior_registers)
5720         (aarch64_linux_store_inferior_registers)
5721         (aarch64_linux_child_post_startup_inferior)
5722         (aarch64_linux_read_description)
5723         (aarch64_linux_can_use_hw_breakpoint)
5724         (aarch64_linux_insert_hw_breakpoint)
5725         (aarch64_linux_remove_hw_breakpoint)
5726         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
5727         (aarch64_linux_region_ok_for_hw_watchpoint)
5728         (aarch64_linux_stopped_data_address)
5729         (aarch64_linux_stopped_by_watchpoint)
5730         (aarch64_linux_watchpoint_addr_within_range)
5731         (aarch64_linux_can_do_single_step): Refactor as methods of
5732         aarch64_linux_nat_target.
5733         (super_post_startup_inferior): Delete.
5734         (_initialize_aarch64_linux_nat): Adjust to C++ification.
5735
5736         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
5737         (the_hppa_linux_nat_target): New.
5738         (hppa_linux_fetch_inferior_registers)
5739         (hppa_linux_store_inferior_registers): Refactor as methods of
5740         hppa_linux_nat_target.
5741         (_initialize_hppa_linux_nat): Adjust to C++ification.
5742
5743         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
5744         (the_ia64_linux_nat_target): New.
5745         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
5746         (ia64_linux_stopped_data_address)
5747         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
5748         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
5749         ia64_linux_nat_target methods.
5750         (super_xfer_partial): Delete.
5751         (_initialize_ia64_linux_nat): Adjust to C++ification.
5752
5753         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
5754         (the_m32r_linux_nat_target): New.
5755         (m32r_linux_fetch_inferior_registers)
5756         (m32r_linux_store_inferior_registers): Refactor as
5757         m32r_linux_nat_target methods.
5758         (_initialize_m32r_linux_nat): Adjust to C++ification.
5759
5760         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
5761         (the_m68k_linux_nat_target): New.
5762         (m68k_linux_fetch_inferior_registers)
5763         (m68k_linux_store_inferior_registers): Refactor as
5764         m68k_linux_nat_target methods.
5765         (_initialize_m68k_linux_nat): Adjust to C++ification.
5766
5767         * s390-linux-nat.c (s390_linux_nat_target): New class.
5768         (the_s390_linux_nat_target): New.
5769         (s390_linux_fetch_inferior_registers)
5770         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
5771         (s390_insert_watchpoint, s390_remove_watchpoint)
5772         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
5773         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
5774         (s390_auxv_parse, s390_read_description): Refactor as methods of
5775         s390_linux_nat_target.
5776         (_initialize_s390_nat): Adjust to C++ification.
5777
5778         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
5779         (the_sparc_linux_nat_target): New.
5780         (_initialize_sparc_linux_nat): Adjust to C++ification.
5781         * sparc-nat.c (sparc_fetch_inferior_registers)
5782         (sparc_store_inferior_registers): Remove target_ops parameter.
5783         * sparc-nat.h (sparc_fetch_inferior_registers)
5784         (sparc_store_inferior_registers): Remove target_ops parameter.
5785         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
5786         (the_sparc64_linux_nat_target): New.
5787         (_initialize_sparc64_linux_nat): Adjust to C++ification.
5788
5789         * spu-linux-nat.c (spu_linux_nat_target): New class.
5790         (the_spu_linux_nat_target): New.
5791         (spu_child_post_startup_inferior, spu_child_post_attach)
5792         (spu_child_wait, spu_fetch_inferior_registers)
5793         (spu_store_inferior_registers, spu_xfer_partial)
5794         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
5795         methods.
5796         (_initialize_spu_nat): Adjust to C++ification.
5797
5798         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5799         (the_tilegx_linux_nat_target): New.
5800         (fetch_inferior_registers, store_inferior_registers):
5801         Refactor as methods.
5802         (_initialize_tile_linux_nat): Adjust to C++ification.
5803
5804         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5805         (the_xtensa_linux_nat_target): New.
5806         (xtensa_linux_fetch_inferior_registers)
5807         (xtensa_linux_store_inferior_registers): Refactor as
5808         xtensa_linux_nat_target methods.
5809         (_initialize_xtensa_linux_nat): Adjust to C++ification.
5810
5811         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5812         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5813         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5814         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5815         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5816         (fbsd_stopped_by_sw_breakpoint)
5817         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5818         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5819         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5820         (fbsd_post_startup_inferior, fbsd_post_attach)
5821         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5822         (fbsd_set_syscall_catchpoint)
5823         (super_xfer_partial, super_resume, super_wait)
5824         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5825         (fbsd_handle_debug_trap): Remove target_ops parameter.
5826         (fbsd_nat_add_target): Delete.
5827         * fbsd-nat.h: Include "inf-ptrace.h".
5828         (fbsd_nat_add_target): Delete.
5829         (USE_SIGTRAP_SIGINFO): Define.
5830         (fbsd_nat_target): New class.
5831
5832         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5833         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5834         (amd64bsd_target): Delete.
5835         * amd64-bsd-nat.h: New file.
5836         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5837         "x86-bsd-nat.h".
5838         (amd64_fbsd_nat_target): New class.
5839         (the_amd64_fbsd_nat_target): New.
5840         (amd64fbsd_read_description): Refactor as method of
5841         amd64_fbsd_nat_target.
5842         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5843         (_initialize_amd64fbsd_nat): Adjust to C++ification.
5844         * amd64-nat.h (amd64bsd_target): Delete function declaration.
5845         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5846         (i386bsd_store_inferior_registers): Remove target_ops parameter.
5847         (i386bsd_target): Delete.
5848         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5849         (i386bsd_fetch_inferior_registers)
5850         (i386bsd_store_inferior_registers): Declare.
5851         (i386_bsd_nat_target): New class.
5852         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5853         (the_i386_fbsd_nat_target): New.
5854         (i386fbsd_resume, i386fbsd_read_description): Refactor as
5855         i386_fbsd_nat_target methods.
5856         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5857         (_initialize_i386fbsd_nat): Adjust to C++ification.
5858         * x86-bsd-nat.c (super_mourn_inferior): Delete.
5859         (x86bsd_mourn_inferior, x86bsd_target): Delete.
5860         (_initialize_x86_bsd_nat): Adjust to C++ification.
5861         * x86-bsd-nat.h: Include "x86-nat.h".
5862         (x86bsd_target): Delete declaration.
5863         (x86bsd_nat_target): New class.
5864
5865         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5866         (the_aarch64_fbsd_nat_target): New.
5867         (aarch64_fbsd_fetch_inferior_registers)
5868         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5869         aarch64_fbsd_nat_target.
5870         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5871         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5872         (the_alpha_bsd_nat_target): New.
5873         (alphabsd_fetch_inferior_registers)
5874         (alphabsd_store_inferior_registers): Refactor as
5875         alpha_bsd_nat_target methods.
5876         (_initialize_alphabsd_nat): Refactor as methods of
5877         alpha_bsd_nat_target.
5878         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5879         (the_amd64_nbsd_nat_target): New.
5880         (_initialize_amd64nbsd_nat): Adjust to C++ification.
5881         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5882         (the_amd64_obsd_nat_target): New.
5883         (_initialize_amd64obsd_nat): Adjust to C++ification.
5884         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5885         (the_arm_fbsd_nat_target): New.
5886         (arm_fbsd_fetch_inferior_registers)
5887         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5888         (_initialize_arm_fbsd_nat): Refactor as methods of
5889         arm_fbsd_nat_target.
5890         (_initialize_arm_fbsd_nat): Adjust to C++ification.
5891         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5892         (the_arm_netbsd_nat_target): New.
5893         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5894         arm_netbsd_nat_target.
5895         (_initialize_arm_netbsd_nat): Adjust to C++ification.
5896         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5897         (the_hppa_nbsd_nat_target): New.
5898         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5899         hppa_nbsd_nat_target methods.
5900         (_initialize_hppanbsd_nat): Adjust to C++ification.
5901         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5902         (the_hppa_obsd_nat_target): New.
5903         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5904         methods of hppa_obsd_nat_target.
5905         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
5906         add_target.
5907         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5908         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
5909         add_target.
5910         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5911         (_initialize_i386obsd_nat): Use add_target.
5912         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5913         (the_m68k_bsd_nat_target): New.
5914         (m68kbsd_fetch_inferior_registers)
5915         (m68kbsd_store_inferior_registers): Refactor as methods of
5916         m68k_bsd_nat_target.
5917         (_initialize_m68kbsd_nat): Adjust to C++ification.
5918         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5919         (the_mips_fbsd_nat_target): New.
5920         (mips_fbsd_fetch_inferior_registers)
5921         (mips_fbsd_store_inferior_registers): Refactor as methods of
5922         mips_fbsd_nat_target.
5923         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
5924         add_target.
5925         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5926         (the_mips_nbsd_nat_target): New.
5927         (mipsnbsd_fetch_inferior_registers)
5928         (mipsnbsd_store_inferior_registers): Refactor as methods of
5929         mips_nbsd_nat_target.
5930         (_initialize_mipsnbsd_nat): Adjust to C++ification.
5931         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5932         (the_mips64_obsd_nat_target): New.
5933         (mips64obsd_fetch_inferior_registers)
5934         (mips64obsd_store_inferior_registers): Refactor as methods of
5935         mips64_obsd_nat_target.
5936         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
5937         add_target.
5938         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5939         nbsd_nat_target.
5940         * nbsd-nat.h: Include "inf-ptrace.h".
5941         (nbsd_nat_target): New class.
5942         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5943         (obsd_wait): Refactor as methods of obsd_nat_target.
5944         (obsd_add_target): Delete.
5945         * obsd-nat.h: Include "inf-ptrace.h".
5946         (obsd_nat_target): New class.
5947         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5948         (the_ppc_fbsd_nat_target): New.
5949         (ppcfbsd_fetch_inferior_registers)
5950         (ppcfbsd_store_inferior_registers): Refactor as methods of
5951         ppc_fbsd_nat_target.
5952         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
5953         add_target.
5954         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5955         (the_ppc_nbsd_nat_target): New.
5956         (ppcnbsd_fetch_inferior_registers)
5957         (ppcnbsd_store_inferior_registers): Refactor as methods of
5958         ppc_nbsd_nat_target.
5959         (_initialize_ppcnbsd_nat): Adjust to C++ification.
5960         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5961         (the_ppc_obsd_nat_target): New.
5962         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5963         methods of ppc_obsd_nat_target.
5964         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
5965         add_target.
5966         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5967         (the_sh_nbsd_nat_target): New.
5968         (shnbsd_fetch_inferior_registers)
5969         (shnbsd_store_inferior_registers): Refactor as methods of
5970         sh_nbsd_nat_target.
5971         (_initialize_shnbsd_nat): Adjust to C++ification.
5972         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5973         (inf_ptrace_xfer_partial): Delete.
5974         (sparc_xfer_partial, sparc_target): Delete.
5975         * sparc-nat.h (sparc_fetch_inferior_registers)
5976         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5977         (sparc_target): Delete function declaration.
5978         (sparc_target): New template class.
5979         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5980         (_initialize_sparcnbsd_nat): Adjust to C++ification.
5981         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5982         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
5983         add_target.
5984         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5985         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5986         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5987         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
5988         add_target.
5989         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5990         (the_vax_bsd_nat_target): New.
5991         (vaxbsd_fetch_inferior_registers)
5992         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5993         methods.
5994         (_initialize_vaxbsd_nat): Adjust to C++ification.
5995
5996         * bsd-kvm.c (bsd_kvm_target): New class.
5997         (bsd_kvm_ops): Now a bsd_kvm_target.
5998         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5999         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6000         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6001         bsd_kvm_target.
6002         (bsd_kvm_return_one): Delete.
6003         (bsd_kvm_add_target): Adjust to C++ification.
6004
6005         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6006         (nto_procfs_target_procfs): New classes.
6007         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6008         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6009         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6010         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6011         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6012         (procfs_remove_hw_breakpoint, procfs_resume)
6013         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6014         (procfs_kill_inferior, procfs_store_registers)
6015         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6016         as methods of nto_procfs_target.
6017         (nto_procfs_ops): Now an nto_procfs_target_procfs.
6018         (nto_native_ops): Delete.
6019         (procfs_open, procfs_native_open): Delete.
6020         (nto_native_ops): Now an nto_procfs_target_native.
6021         (init_procfs_targets): Adjust to C++ification.
6022         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6023         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6024         Refactor as methods of nto_procfs_target.
6025
6026         * go32-nat.c (go32_nat_target): New class.
6027         (the_go32_nat_target): New.
6028         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6029         (go32_store_registers, go32_xfer_partial, go32_files_info)
6030         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6031         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6032         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6033         (go32_pid_to_str): Refactor as methods of go32_nat_target.
6034         (go32_target): Delete.
6035         (_initialize_go32_nat): Adjust to C++ification.
6036
6037         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6038         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6039         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6040         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6041         gnu_nat_target.
6042         (gnu_target): Delete.
6043         * gnu-nat.h (gnu_target): Delete.
6044         (gnu_nat_target): New class.
6045         * i386-gnu-nat.c (gnu_base_target): New.
6046         (i386_gnu_nat_target): New class.
6047         (the_i386_gnu_nat_target): New.
6048         (_initialize_i386gnu_nat): Adjust to C++ification.
6049
6050 2018-05-02  Pedro Alves  <palves@redhat.com>
6051
6052         * bfd-target.c (target_bfd_xclose): Rename to ...
6053         (target_bfd_close): ... this.
6054         (target_bfd_reopen): Adjust.
6055         * target.c (target_close): Remove references to to_xclose.
6056         * target.h (target_ops::to_xclose): Delete.
6057         (target_ops::to_close): Update comments.
6058
6059 2018-05-02  Pedro Alves  <palves@redhat.com>
6060
6061         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6062         "linux-nat.h".
6063         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6064         * inf-ptrace.c (inf_ptrace_register_u_offset)
6065         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6066         (inf_ptrace_store_register, inf_ptrace_store_registers)
6067         (inf_ptrace_trad_target): Move to ...
6068         * linux-nat-trad.c: ... this new file.
6069         * linux-nat-trad.h: New file.
6070         * linux-nat.c (linux_target_install_ops): Make extern.
6071         (linux_trad_target): Delete.
6072         * linux-nat.h (linux_trad_target): Delete declaration.
6073         (linux_target_install_ops): Declare.
6074         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6075         "linux-nat.h".
6076
6077 2018-05-02  Pedro Alves  <palves@redhat.com>
6078
6079         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6080         procfs_target/add_target here.
6081         * procfs.c (procfs_target): Make static.
6082         (_initialize_procfs): Call add_target here.
6083         * procfs.h (struct target_ops): Remove forward declaration.
6084         (procfs_target): Remove declaration.
6085         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6086
6087 2018-05-02  Pedro Alves  <palves@redhat.com>
6088
6089         * procfs.c (procfs_stopped_by_watchpoint)
6090         (procfs_insert_watchpoint, procfs_remove_watchpoint)
6091         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6092         Forward declare.
6093         (procfs_use_watchpoints): Delete, move contents...
6094         (procfs_target): ... here.
6095         * procfs.h (procfs_use_watchpoints): Delete declaration.
6096         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6097         procfs_use_watchpoints.
6098         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6099         procfs_use_watchpoints.
6100
6101 2018-05-02  Tom Tromey  <tom@tromey.com>
6102
6103         PR python/20084:
6104         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6105         and var_zuinteger_unlimited.
6106         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6107         and PARAM_ZUINTEGER_UNLIMITED.
6108         (set_parameter_value): Handle var_zuinteger and
6109         var_zuinteger_unlimited.
6110         (add_setshow_generic): Likewise.
6111         (parmpy_init): Likewise.
6112
6113 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
6114
6115         PR rust/23124
6116         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6117         pointer is not null before dereferencing it.
6118
6119 2018-04-30  Tom Tromey  <tom@tromey.com>
6120
6121         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6122         is_mi_like_p.
6123
6124 2018-04-30  Tom Tromey  <tom@tromey.com>
6125
6126         * breakpoint.c (mention): Remove use of is_mi_like_p.
6127         (print_mention_ranged_breakpoint): Likewise.
6128         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6129         of is_mi_like_p.
6130
6131 2018-04-30  Tom Tromey  <tom@tromey.com>
6132
6133         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6134
6135 2018-04-30  Tom Tromey  <tom@tromey.com>
6136
6137         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6138         (info_spu_event_command): Remove some uses of is_mi_like_p.
6139
6140 2018-04-30  Tom Tromey  <tom@tromey.com>
6141
6142         * python/py-framefilter.c (py_print_single_arg)
6143         (enumerate_locals, py_print_args, py_print_frame): Remove some
6144         uses of is_mi_like_p.
6145
6146 2018-04-30  Tom Tromey  <tom@tromey.com>
6147
6148         * ui-out.c: Update.
6149         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6150         * ui-out.h (ui_out::is_mi_like_p): Now const.
6151         (ui_out::do_is_mi_like_p): Now const.
6152         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6153
6154 2018-04-30  Tom Tromey  <tom@tromey.com>
6155
6156         * varobj.c (varobj_set_visualizer): Use new_reference.
6157         * python/python.c (gdbpy_decode_line): Use new_reference.
6158         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6159         new_reference.
6160
6161 2018-04-30  Tom Tromey  <tom@tromey.com>
6162
6163         * varobj.c (install_new_value): Use new_reference.
6164         * value.h (value_incref): Return void.  Swap intro comment with
6165         value_decref.
6166         * value.c (set_value_parent): Use new_reference.
6167         (value_incref): Return void.  Update intro comment.
6168         (release_value): Use new_reference.
6169         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6170
6171 2018-04-30  Tom Tromey  <tom@tromey.com>
6172
6173         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6174         * gdb_bfd.h (new_bfd_ref): Remove.
6175         (gdb_bfd_open): Update comment.
6176         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6177         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6178         (gdb_bfd_fdopenr): Use new_reference.
6179         * exec.c (exec_file_attach): Use new_reference.
6180
6181 2018-04-30  Tom Tromey  <tom@tromey.com>
6182
6183         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6184         method.
6185
6186 2018-04-30  Tom Tromey  <tom@tromey.com>
6187
6188         * jit.c (jit_read_code_entry): Use type_align.
6189         * i386-tdep.c (i386_gdbarch_init): Don't call
6190         set_gdbarch_long_long_align_bit.
6191         * gdbarch.sh: Remove long_long_align_bit.
6192         * gdbarch.c, gdbarch.h: Rebuild.
6193         * arc-tdep.c (arc_type_align): New function.
6194         (arc_gdbarch_init): Use arc_type_align.  Don't call
6195         set_gdbarch_long_long_align_bit.
6196
6197 2018-04-30  Tom Tromey  <tom@tromey.com>
6198
6199         * rust-lang.c (rust_type_alignment): Remove.
6200         (rust_composite_type): Use type_align.
6201
6202 2018-04-30  Tom Tromey  <tom@tromey.com>
6203
6204         * NEWS: Mention Type.align.
6205         * python/py-type.c (typy_get_alignof): New function.
6206         (type_object_getset): Add "alignof".
6207
6208 2018-04-30  Tom Tromey  <tom@tromey.com>
6209
6210         PR exp/17095:
6211         * NEWS: Update.
6212         * std-operator.def (UNOP_ALIGNOF): New operator.
6213         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6214         New.
6215         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6216         * c-lang.c (c_op_print_tab): Add alignof.
6217         * c-exp.y (ALIGNOF): New token.
6218         (exp): Add "ALIGNOF" production.
6219         (ident_tokens): Add _Alignof and alignof.
6220
6221 2018-04-30  Tom Tromey  <tom@tromey.com>
6222
6223         * i386-tdep.c (i386_type_align): New function.
6224         (i386_gdbarch_init): Update.
6225         * gdbarch.sh (type_align): New method.
6226         * gdbarch.c, gdbarch.h: Rebuild.
6227         * arch-utils.h (default_type_align): Declare.
6228         * arch-utils.c (default_type_align): New function.
6229         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6230         (struct type) <align_log2>: New field.
6231         <instance_flags>: Now a bitfield.
6232         (TYPE_RAW_ALIGN): New macro.
6233         (type_align, type_raw_align, set_type_align): Declare.
6234         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6235         functions.
6236         * dwarf2read.c (quirk_rust_enum): Set type alignment.
6237         (get_alignment, maybe_set_alignment): New functions.
6238         (read_structure_type, read_enumeration_type, read_array_type)
6239         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6240         (read_subrange_type, read_base_type): Set type alignment.
6241
6242 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
6243
6244         * dwarf2read.c (read_index_from_section): Use bool.
6245
6246 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
6247
6248         PR gdb/22950
6249         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6250         with #ifdef.
6251
6252 2018-04-29  John Reiser  <jreiser@BitWagon.com>
6253
6254         PR build/22873
6255         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6256         last step, and do it atomically.
6257
6258 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
6259
6260         * compile/compile-c-types.c (convert_int, convert_float):
6261         Update for C FE v1.
6262
6263 2018-04-27  Tom Tromey  <tom@tromey.com>
6264
6265         PR rust/22545:
6266         * rust-lang.c (rust_inclusive_range_type_p): New function.
6267         (rust_range): Handle inclusive ranges.
6268         (rust_compute_range): Likewise.
6269         * rust-exp.y (struct rust_op) <inclusive>: New field.
6270         (DOTDOTEQ): New constant.
6271         (range_expr): Add "..=" productions.
6272         (operator_tokens): Add "..=" token.
6273         (ast_range): Add "inclusive" parameter.
6274         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6275         ranges.
6276         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6277         bounds values.
6278         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6279         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6280         Update comments.
6281         * expprint.c (print_subexp_standard): Handle new bounds values.
6282         (dump_subexp_body_standard): Likewise.
6283
6284 2018-04-27  Tom Tromey  <tom@tromey.com>
6285
6286         * configure: Rebuild.
6287         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6288         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6289         "OVERRIDE".
6290         (class symbol_needs_eval_context): Likewise.
6291         * dwarf2read.c (mock_mapped_index::symbol_name_count)
6292         (mock_mapped_index::symbol_name_at): Use "override".  Remove
6293         "virtual".
6294         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6295         "override".
6296         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6297         * aarch64-tdep.c (instruction_reader::read): Use "override".
6298         (instruction_reader_test::read): Likewise.
6299         * arm-tdep.c (instruction_reader::read): Use "override".
6300         (instruction_reader_thumb::read): Likewise.
6301
6302 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
6303
6304         PR remote/9665
6305         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6306         instead of remote_send.
6307         (remote_send): Remove.
6308
6309 2018-04-26  Pedro Alves  <palves@redhat.com>
6310
6311         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6312         find_function_start_sal instead of find_pc_line.
6313
6314 2018-04-26  Pedro Alves  <palves@redhat.com>
6315
6316         * breakpoint.c (set_breakpoint_location_function): Handle
6317         mst_data_gnu_ifunc.
6318         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6319         * elfread.c (elf_symtab_read): Give data symbols with
6320         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6321         (elf_rel_plt_read): Update comment.
6322         * linespec.c (convert_linespec_to_sals): Handle
6323         mst_data_gnu_ifunc.
6324         (minsym_found): Handle mst_data_gnu_ifunc.
6325         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6326         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6327         * parse.c (find_minsym_type_and_address): Handle
6328         mst_data_gnu_ifunc.
6329         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6330         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6331         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6332         comment.
6333         <mst_data_gnu_ifunc>: New enumerator.
6334
6335 2018-04-26  Pedro Alves  <palves@redhat.com>
6336
6337         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6338         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
6339         'want_trampoline' parameter by a lookup_msym_prefer parameter.
6340         Handle it.
6341         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6342         (lookup_minimal_symbol_by_pc): Adjust.
6343         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6344         (lookup_solib_trampoline_symbol_by_pc): Adjust.
6345         * minsyms.h (lookup_msym_prefer): New enum.
6346         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6347         parameter by a lookup_msym_prefer parameter.
6348
6349 2018-04-26  Pedro Alves  <palves@redhat.com>
6350
6351         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6352         ends in "@plt" instead of looking at the symbol's section.
6353
6354 2018-04-26  Pedro Alves  <palves@redhat.com>
6355
6356         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
6357         all references.
6358         (find_pc_partial_function_gnu_ifunc): Rename to ...
6359         (find_pc_partial_function): ... this, and remove references to
6360         'is_gnu_ifunc_p'.
6361         (find_pc_partial_function): Delete old implementation.
6362         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6363
6364 2018-04-26  Pedro Alves  <palves@redhat.com>
6365
6366         * linespec.c (struct bound_minimal_symbol_search_key): New.
6367         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
6368         skip first line if we found a GNU ifunc minimal symbol by name.
6369         (compare_msymbols): Change parameters to work with a destructured
6370         lhs minsym.
6371         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6372         functions.
6373
6374 2018-04-26  Pedro Alves  <palves@redhat.com>
6375
6376         * breakpoint.c (set_breakpoint_location_function): Don't resolve
6377         ifunc targets here.  Instead, if we have an ifunc minsym, use its
6378         address/name.
6379         (add_location_to_breakpoint): Store the minsym and the objfile in
6380         the breakpoint location.
6381         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6382         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6383         Record the minsym in the sal.
6384         * symtab.h (symtab_and_line) <msymbol>: New field.
6385
6386 2018-04-26  Pedro Alves  <palves@redhat.com>
6387
6388         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6389         unless we actually resolved the ifunc.
6390
6391 2018-04-26  Pedro Alves  <palves@redhat.com>
6392
6393         * c-exp.y (variable production): Prefer ifunc minsyms over
6394         regular function symbols.
6395         * symtab.c (find_gnu_ifunc): New function.
6396         * minsyms.h (lookup_msym_prefer): New enum.
6397         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6398         parameter by a lookup_msym_prefer parameter.
6399         * symtab.h (find_gnu_ifunc): New declaration.
6400
6401 2018-04-26  Pedro Alves  <palves@redhat.com>
6402
6403         * blockframe.c (find_gnu_ifunc_target_type): New function.
6404         (find_function_type): New.
6405         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6406         return a value with a memory address.
6407         (eval_call): For calls to GNU ifunc functions, try to find the
6408         type of the target function from the type that the resolver
6409         returns.
6410         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6411         symbols.
6412         * infcall.c (find_function_return_type): Delete.
6413         (find_function_addr): Add 'function_type' parameter.  For calls to
6414         GNU ifunc functions, try to find the type of the target function
6415         from the type that the resolver returns, and return it via
6416         FUNCTION_TYPE.
6417         (call_function_by_hand_dummy): Adjust to use the function type
6418         returned by find_function_addr.
6419         (find_function_addr): Add 'function_type' parameter and move
6420         description here.
6421         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6422         declarations.
6423
6424 2018-04-26  Pedro Alves  <palves@redhat.com>
6425
6426         * c-exp.y (variable production): Skip finding an alias for ifunc
6427         symbols.
6428
6429 2018-04-26  Pedro Alves  <palves@redhat.com>
6430
6431         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6432
6433 2018-04-25  Pedro Alves  <palves@redhat.com>
6434
6435         * infcmd.c (kill_command): Print the pid as string, not the whole
6436         thread's ptid.  Add comment.  s/has been killed/killed/ in output
6437         message.
6438         * remote.c (remote_detach_1): Print the pid as string, not the
6439         whole thread's ptid.
6440
6441 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6442             Sergio Durigan Junior  <sergiodj@redhat.com>
6443             Pedro Alves  <palves@redhat.com>
6444
6445         * infcmd.c (kill_command): Print message when inferior has
6446         been killed.
6447         * inferior.c (print_inferior_events): Remove 'static'.  Set as
6448         '1'.
6449         (add_inferior): Improve message printed when
6450         'print_inferior_events' is on.
6451         (exit_inferior): Remove message printed when
6452         'print_inferior_events' is on.
6453         (detach_inferior): Improve message printed when
6454         'print_inferior_events' is on.
6455         (initialize_inferiors): Use 'add_inferior_silent' to set
6456         'current_inferior_'.
6457         * inferior.h (print_inferior_events): Declare here as
6458         'extern'.
6459         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6460         '[Detaching...]' messages when 'print_inferior_events' is on.
6461         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
6462         as prefix/suffix for messages.  Remove periods.  Fix erroneous
6463         'Detaching after fork from child...', replace it by '... from
6464         parent...'.
6465         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6466         prefix/suffix when printing 'Detaching...' messages.  Print
6467         them when 'print_inferior_events' is on.
6468         * remote.c (remote_detach_1): Print message when detaching
6469         from inferior and '!is_fork_parent'.
6470
6471 2018-04-24  Tom Tromey  <tom@tromey.com>
6472
6473         * cli-out.h: Reindent.
6474
6475 2018-04-24  Tom Tromey  <tom@tromey.com>
6476
6477         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6478         (cli_ui_out::do_field_string): Use fputs_filtered.
6479         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6480
6481 2018-04-23  Tom Tromey  <tom@tromey.com>
6482
6483         * guile/scm-frame.c (gdbscm_frame_read_var): Use
6484         gdb::unique_xmalloc_ptr.
6485
6486 2018-04-23  Tom Tromey  <tom@tromey.com>
6487
6488         * configure: Rebuild.
6489
6490 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
6491
6492         PR gdb/23095
6493         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6494         prepare_for_testing.  Set normal_bp to r_debug_state if target
6495         is bsd.
6496
6497 2018-04-21  Pedro Alves  <palves@redhat.com>
6498             Rajendra SY  <rajendra.sy@gmail.com>
6499
6500         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6501         * remote.c (extended_remote_attach): In all-stop mode, mark the
6502         thread as executing.
6503
6504 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6505
6506         * thread.c (thread_apply_all_command): Fix comment.
6507         (thread_command): Fix comment.
6508
6509 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
6510
6511         * common/tdesc.h (tdesc_create_feature): Remove xml filename
6512         parameter.
6513         * features/aarch64-core.c (create_feature_aarch64_core):
6514         Regenerate.
6515         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6516         Likewise.
6517         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6518         Likewise.
6519         * features/i386/32bit-avx512.c
6520         (create_feature_i386_32bit_avx512): Likewise.
6521         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
6522         Likewise.
6523         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
6524         Likewise.
6525         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
6526         Likewise.
6527         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
6528         Likewise.
6529         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
6530         Likewise.
6531         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
6532         Likewise.
6533         * features/i386/64bit-avx512.c
6534         (create_feature_i386_64bit_avx512): Likewise.
6535         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
6536         Likewise.
6537         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
6538         Likewise.
6539         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
6540         Likewise.
6541         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
6542         Likewise.
6543         * features/i386/64bit-segments.c
6544         (create_feature_i386_64bit_segments): Likewise.
6545         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
6546         Likewise.
6547         * features/i386/x32-core.c
6548         (create_feature_i386_x32_core): Likewise.
6549         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
6550         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
6551         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
6552         * target-descriptions.c: In generated code, don't pass xml
6553         filename.
6554
6555 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6556
6557         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
6558         (print_xml_feature::visit_post): Likewise.
6559         (print_xml_feature::visit): Likewise.
6560         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
6561         (print_xml_feature): Add new class.
6562         * regformats/regdat.sh: Null xmltarget on feature targets.
6563         * target-descriptions.c (struct target_desc): Add xmltarget.
6564         (maintenance_check_tdesc_xml_convert): Add unittest function.
6565         (tdesc_get_features_xml): Add function to get xml.
6566         (maintenance_check_xml_descriptions): Test xml generation.
6567         * xml-tdesc.c (string_read_description_xml): Add function.
6568         * xml-tdesc.h (string_read_description_xml): Add declaration.
6569
6570 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6571
6572         * features/Makefile: Add feature marker to targets with new style
6573         target descriptions.
6574         * regformats/aarch64.dat: Regenerate.
6575         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
6576         * regformats/i386/amd64-avx-linux.dat: Likewise.
6577         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
6578         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
6579         * regformats/i386/amd64-linux.dat: Likewise.
6580         * regformats/i386/amd64-mpx-linux.dat: Likewise.
6581         * regformats/i386/amd64.dat: Likewise.
6582         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
6583         * regformats/i386/i386-avx-linux.dat: Likewise.
6584         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
6585         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
6586         * regformats/i386/i386-linux.dat: Likewise.
6587         * regformats/i386/i386-mmx-linux.dat: Likewise.
6588         * regformats/i386/i386-mpx-linux.dat: Likewise.
6589         * regformats/i386/i386.dat: Likewise.
6590         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
6591         * regformats/i386/x32-avx-linux.dat: Likewise.
6592         * regformats/i386/x32-linux.dat: Likewise.
6593         * regformats/tic6x-c62x-linux.dat: Likewise.
6594         * regformats/tic6x-c64x-linux.dat: Likewise.
6595         * regformats/tic6x-c64xp-linux.dat: Likewise.
6596         * regformats/regdat.sh: Parse feature marker.
6597
6598 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6599
6600         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
6601         (tdesc_osabi_name): Likewise.
6602         * target-descriptions.c (tdesc_architecture_name): Add new
6603         function.
6604         (tdesc_osabi_name): Likewise.
6605
6606 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6607
6608         * common/tdesc.c (tdesc_predefined_type): Move to here.
6609         (tdesc_named_type): Likewise.
6610         (tdesc_create_vector): Likewise.
6611         (tdesc_create_struct): Likewise.
6612         (tdesc_set_struct_size): Likewise.
6613         (tdesc_create_union): Likewise.
6614         (tdesc_create_flags): Likewise.
6615         (tdesc_create_enum): Likewise.
6616         (tdesc_add_field): Likewise.
6617         (tdesc_add_typed_bitfield): Likewise.
6618         (tdesc_add_bitfield): Likewise.
6619         (tdesc_add_flag): Likewise.
6620         (tdesc_add_enum_value): Likewise.
6621         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
6622         (struct tdesc_type_vector): Likewise.
6623         (struct tdesc_type_field): Likewise.
6624         (struct tdesc_type_with_fields): Likewise.
6625         (tdesc_create_enum): Add declaration.
6626         (tdesc_add_typed_bitfield): Likewise.
6627         (tdesc_add_enum_value): Likewise.
6628         * target-descriptions.c (tdesc_type_field): Move from here.
6629         (tdesc_type_builtin): Likewise.
6630         (tdesc_type_vector): Likewise.
6631         (tdesc_type_with_fields): Likewise.
6632         (tdesc_predefined_types): Likewise.
6633         (tdesc_named_type): Likewise.
6634         (tdesc_create_vector): Likewise.
6635         (tdesc_create_struct): Likewise.
6636         (tdesc_set_struct_size): Likewise.
6637         (tdesc_create_union): Likewise.
6638         (tdesc_create_flags): Likewise.
6639         (tdesc_create_enum): Likewise.
6640         (tdesc_add_field): Likewise.
6641         (tdesc_add_typed_bitfield): Likewise.
6642         (tdesc_add_bitfield): Likewise.
6643         (tdesc_add_flag): Likewise.
6644         (tdesc_add_enum_value): Likewise.
6645         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
6646         (tdesc_add_typed_bitfield): Likewise.
6647         (tdesc_add_enum_value): Likewise.
6648
6649 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6650
6651         * common/tdesc.c (tdesc_feature::accept): Move to here.
6652         (tdesc_feature::operator==): Likewise.
6653         (tdesc_create_reg): Likewise.
6654         * common/tdesc.h (tdesc_type_kind): Likewise.
6655         (struct tdesc_type): Likewise.
6656         (struct tdesc_feature): Likewise.
6657         * regformats/regdat.sh: Create a feature.
6658         * target-descriptions.c (tdesc_type_kind): Move from here.
6659         (tdesc_type): Likewise.
6660         (tdesc_type_up): Likewise.
6661         (tdesc_feature): Likewise.
6662         (tdesc_create_reg): Likewise.
6663
6664 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
6665
6666         * Makefile.in: Add arch/tdesc.c
6667         * common/tdesc.c: New file.
6668         * common/tdesc.h (tdesc_element_visitor): Move to here.
6669         (tdesc_element): Likewise.
6670         (tdesc_reg): Likewise.
6671         (tdesc_reg_up): Likewise.
6672         * regformats/regdef.h (reg): Add offset to constructors.
6673         * target-descriptions.c (tdesc_element_visitor): Move from here.
6674         (tdesc_element): Likewise.
6675         (tdesc_reg): Likewise.
6676         (tdesc_reg_up): Likewise.
6677
6678 2018-04-17  Tom Tromey  <tom@tromey.com>
6679
6680         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
6681         discriminant field.
6682
6683 2018-04-17  Tom Tromey  <tom@tromey.com>
6684
6685         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
6686
6687 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6688
6689         * symtab.c (print_symbol_info): Skip printing filename and line
6690         number when `last' is NULL.
6691         (symtab_symbol_info): Use empty string instead of NULL for first
6692         invocation of print_symbol_info.
6693         (rbreak_command): Pass NULL to `last' parameter of
6694         print_symbol_info.
6695
6696 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
6697
6698         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
6699         instead of nullptr.
6700
6701 2018-04-16  Pedro Alves  <palves@redhat.com>
6702
6703         * MAINTAINERS (sh): Remove.
6704         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
6705         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
6706         (ALLDEPFILES): Remove sh64-tdep.c.
6707         * NEWS: Mentions that support for SH-5/SH64 is removed.
6708         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
6709         (sh*-*-openbsd*): Ditto.
6710         (sh64-*-elf*): Remove.
6711         (sh*): Remove.
6712         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
6713         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
6714         * sh-tdep.c: No longer include "sh64-tdep.h".
6715         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
6716         * sh64-tdep.c, sh64-tdep.h: Remove files.
6717
6718 2018-04-16  Pedro Alves  <palves@redhat.com>
6719
6720         * MAINTAINERS: Remove m88k.
6721         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
6722         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
6723         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
6724         * NEWS: Mention that support for m88k was removed.
6725         * configure.host (m88*-*-*): Remove support.
6726         * configure.nat (m88k-*-*): Remove support.
6727         * configure.tgt (m88*-*-openbsd*): Remove.
6728         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
6729
6730 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
6731
6732         * configure.tgt (x86_tobjs): New variable.
6733         (amd64_tobjs, i386_tobjs): Use it.
6734
6735 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6736
6737         * symtab.c (print_symbol_info): Precede the symbol definition by
6738         the line number when available.
6739         * NEWS: Advertise this enhancement.
6740
6741 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
6742
6743         * NEWS (New options): announce set/show record btrace cpu.
6744         * btrace.c: Include record-btrace.h.
6745         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
6746         the vendor is unknown.
6747         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
6748         Maybe overwrite the btrace configuration's cpu.
6749         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
6750         (btrace_fetch): Add cpu parameter.  Update callers.
6751         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
6752         Maybe overwrite the btrace configuration's cpu.  Skip enabling
6753         errata workarounds if the vendor is unknown.
6754         * python/py-record-btrace.c: Include record-btrace.h.
6755         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
6756         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
6757         * record-btrace.c (record_btrace_cpu_state_kind): New.
6758         (record_btrace_cpu): New.
6759         (set_record_btrace_cpu_cmdlist): New.
6760         (record_btrace_get_cpu): New.
6761         (require_btrace_thread, record_btrace_info)
6762         (record_btrace_resume_thread): Call record_btrace_get_cpu.
6763         (cmd_set_record_btrace_cpu_none): New.
6764         (cmd_set_record_btrace_cpu_auto): New.
6765         (cmd_set_record_btrace_cpu): New.
6766         (cmd_show_record_btrace_cpu): New.
6767         (_initialize_record_btrace): Initialize set/show record btrace cpu
6768         commands.
6769         * record-btrace.h (record_btrace_get_cpu): New.
6770
6771 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
6772
6773         * record.c (set_record_command): Fix typo in message.
6774
6775 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
6776
6777         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
6778
6779 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
6780
6781         * infrun.c (process_event_stop_test): Call
6782         gdbarch_in_indirect_branch_thunk.
6783         * gdbarch.sh (in_indirect_branch_thunk): New.
6784         * gdbarch.c: Regenerated.
6785         * gdbarch.h: Regenerated.
6786         * x86-tdep.h: New.
6787         * x86-tdep.c: New.
6788         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
6789         (HFILES_NO_SRCDIR): Add x86-tdep.h.
6790         (ALLDEPFILES): Add x86-tdep.c.
6791         * arch-utils.h (default_in_indirect_branch_thunk): New.
6792         * arch-utils.c (default_in_indirect_branch_thunk): New.
6793         * i386-tdep: Include x86-tdep.h.
6794         (i386_in_indirect_branch_thunk): New.
6795         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6796         function.
6797         * amd64-tdep: Include x86-tdep.h.
6798         (amd64_in_indirect_branch_thunk): New.
6799         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6800
6801 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6802
6803         PR gdb/23053
6804         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6805         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6806         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6807         regression.
6808
6809 2018-04-12  Tom Tromey  <tom@tromey.com>
6810
6811         * rust-lang.c (rust_print_struct_def): Remove univariant code.
6812         (rust_evaluate_subexp): Likewise.
6813
6814 2018-04-12  Pedro Alves  <palves@redhat.com>
6815
6816         * procfs.c (procfs_detach): Make forward declaration's prototype
6817         match definition's protototype.
6818         (proc_get_LDT_entry): Remove stale do_cleanups call.
6819
6820 2018-04-12  Pedro Alves  <palves@redhat.com>
6821
6822         * target.h (target_ops::to_has_exited): Delete.
6823         (target_has_exited): Delete.
6824         * target-delegates.c: Regenerate.
6825
6826 2018-04-11  Pedro Alves  <palves@redhat.com>
6827
6828         * target.c (fileio_fh_t::t): Add comment.
6829         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6830         (target_fileio_close): Handle a NULL target.
6831         (invalidate_fileio_fh): New.
6832         (target_close): Call it.
6833         * remote.c (remote_hostio_send_command): No longer check whether
6834         remote_desc is open.
6835
6836 2018-04-11  Pedro Alves  <palves@redhat.com>
6837
6838         * target.c (fileio_fh_t): Make it a named struct instead of a
6839         typedef.
6840         (fileio_fh_t::is_closed): New method.
6841         (DEF_VEC_O (fileio_fh_t)): Remove.
6842         (fileio_fhandles): Now a std::vector.
6843         (is_closed_fileio_fh): Delete.
6844         (acquire_fileio_fd): Adjust.  Rename parameters.
6845         (release_fileio_fd): Adjust.
6846         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6847         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6848         (target_fileio_close): Adjust.
6849
6850 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
6851
6852         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6853         index.
6854
6855 2018-04-10  Pedro Alves  <palves@redhat.com>
6856
6857         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6858         (scoped_finish_thread_state): New class.
6859         * infcmd.c (run_command_1): Use it instead of finish_thread_state
6860         cleanup.
6861         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6862         (fetch_inferior_event, normal_stop): Likewise.
6863         * thread.c (finish_thread_state_cleanup): Delete.
6864
6865 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6866             Pedro Alves  <palves@redhat.com>
6867
6868         * value.c: Include "selftest.h" and "common/array-view.h".
6869         (struct range) <operator ==>: New.
6870         (test_ranges_contain): New.
6871         (check_ranges_vector): New.
6872         (test_insert_into_bit_range_vector): New.
6873         (_initialize_values): Register selftests.
6874         * common/array-view.h (operator==, operator!=): New.
6875
6876 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6877
6878         * common/gdb_vecs.h (unordered_remove): Add overload that takes
6879         an iterator.
6880         * inline-frame.c: Include <algorithm>.
6881         (struct inline_state): Add constructor.
6882         (inline_state_s): Remove.
6883         (DEF_VEC_O(inline_state_s)): Remove.
6884         (inline_states): Change type to std::vector.
6885         (find_inline_frame_state): Adjust to std::vector.
6886         (allocate_inline_frame_state): Remove.
6887         (clear_inline_frame_state): Adjust to std::vector.
6888         (skip_inline_frames): Adjust to std::vector.
6889
6890 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6891
6892         * tracepoint.h (struct trace_state_variable): Add constructor.
6893         <name>: Change type to std::string.
6894         * tracepoint.c (tsv_s): Remove.
6895         (DEF_VEC_O(tsv_s)): Remove.
6896         (tvariables): Change to std::vector.
6897         (create_trace_state_variable): Adjust to std::vector.
6898         (find_trace_state_variable): Likewise.
6899         (find_trace_state_variable_by_number): Likewise.
6900         (delete_trace_state_variable): Likewise.
6901         (trace_variable_command): Adjust to std::string.
6902         (delete_trace_variable_command): Likewise.
6903         (tvariables_info_1): Adjust to std::vector.
6904         (save_trace_state_variables): Likewise.
6905         (start_tracing): Likewise.
6906         (merge_uploaded_trace_state_variables): Adjust to std::vector
6907         and std::string.
6908         * target.h (struct target_ops)
6909         <to_download_trace_state_variable>: Pass reference to
6910         trace_state_variable.
6911         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6912         * target-delegates.c: Re-generate.
6913         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6914         (mi_tsv_deleted): Likewise.
6915         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6916         * remote.c (remote_download_trace_state_variable): Change
6917         pointer to reference and adjust.
6918         * make-target-delegates (parse_argtypes): Handle references.
6919         (write_function_header): Likewise.
6920         (munge_type): Likewise.
6921
6922 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6923
6924         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6925         string_view-selftests.c.
6926         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6927         testsuite.
6928         * unittests/basic_string_view/cons/char/1.cc: Likewise.
6929         * unittests/basic_string_view/cons/char/2.cc: Likewise.
6930         * unittests/basic_string_view/cons/char/3.cc: Likewise.
6931         * unittests/basic_string_view/element_access/char/1.cc:
6932         Likewise.
6933         * unittests/basic_string_view/element_access/char/empty.cc:
6934         Likewise.
6935         * unittests/basic_string_view/element_access/char/front_back.cc:
6936         Likewise.
6937         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6938         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6939         Likewise.
6940         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6941         Likewise.
6942         * unittests/basic_string_view/modifiers/swap/char/1.cc:
6943         Likewise.
6944         * unittests/basic_string_view/operations/compare/char/1.cc:
6945         Likewise.
6946         * unittests/basic_string_view/operations/compare/char/13650.cc:
6947         Likewise.
6948         * unittests/basic_string_view/operations/copy/char/1.cc:
6949         Likewise.
6950         * unittests/basic_string_view/operations/data/char/1.cc:
6951         Likewise.
6952         * unittests/basic_string_view/operations/find/char/1.cc:
6953         Likewise.
6954         * unittests/basic_string_view/operations/find/char/2.cc:
6955         Likewise.
6956         * unittests/basic_string_view/operations/find/char/3.cc:
6957         Likewise.
6958         * unittests/basic_string_view/operations/find/char/4.cc:
6959         Likewise.
6960         * unittests/basic_string_view/operations/rfind/char/1.cc:
6961         Likewise.
6962         * unittests/basic_string_view/operations/rfind/char/2.cc:
6963         Likewise.
6964         * unittests/basic_string_view/operations/rfind/char/3.cc:
6965         Likewise.
6966         * unittests/basic_string_view/operations/substr/char/1.cc:
6967         Likewise.
6968         * unittests/basic_string_view/operators/char/2.cc: Likewise.
6969         * unittests/string_view-selftests.c: New file.
6970
6971 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6972
6973         * unittests/basic_string_view/capacity/1.cc: New file.
6974         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6975         * unittests/basic_string_view/cons/char/1.cc: New file.
6976         * unittests/basic_string_view/cons/char/2.cc: New file.
6977         * unittests/basic_string_view/cons/char/3.cc: New file.
6978         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6979         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6980         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6981         * unittests/basic_string_view/element_access/char/1.cc: New file.
6982         * unittests/basic_string_view/element_access/char/2.cc: New file.
6983         * unittests/basic_string_view/element_access/char/empty.cc: New file.
6984         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6985         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6986         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6987         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6988         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6989         * unittests/basic_string_view/include.cc: New file.
6990         * unittests/basic_string_view/inserters/char/1.cc: New file.
6991         * unittests/basic_string_view/inserters/char/2.cc: New file.
6992         * unittests/basic_string_view/inserters/char/3.cc: New file.
6993         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6994         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6995         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6996         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6997         * unittests/basic_string_view/literals/types.cc: New file.
6998         * unittests/basic_string_view/literals/values.cc: New file.
6999         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7000         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7001         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7002         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7003         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7004         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7005         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7006         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7007         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7008         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7009         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7010         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7011         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7012         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7013         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7014         * unittests/basic_string_view/operations/data/char/1.cc: New file.
7015         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7016         * unittests/basic_string_view/operations/find/char/1.cc: New file.
7017         * unittests/basic_string_view/operations/find/char/2.cc: New file.
7018         * unittests/basic_string_view/operations/find/char/3.cc: New file.
7019         * unittests/basic_string_view/operations/find/char/4.cc: New file.
7020         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7021         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7022         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7023         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7024         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7025         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7026         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7027         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7028         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7029         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7030         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7031         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7032         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7033         * unittests/basic_string_view/operators/char/2.cc: New file.
7034         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7035         * unittests/basic_string_view/range_access/char/1.cc: New file.
7036         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7037         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7038         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7039         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7040         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7041         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7042         * unittests/basic_string_view/requirements/typedefs.cc: New file.
7043         * unittests/basic_string_view/typedefs.cc: New file.
7044         * unittests/basic_string_view/types/1.cc: New file.
7045
7046 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7047
7048         * common/gdb_string_view.h: Remove libstdc++ implementation
7049         details, adjust to gdb reality.
7050         * common/gdb_string_view.tcc: Likewise.
7051         * cli/cli-script.c (struct string_view): Remove.
7052         (user_args) <m_args>: Change element type to gdb::string_view.
7053         (user_args::insert_args): Adjust.
7054
7055 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7056
7057         * common/gdb_string_view.h: New file.
7058         * common/gdb_string_view.tcc: New file.
7059
7060 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7061
7062         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7063         * configure: Re-generate.
7064
7065 2018-04-09  Pedro Alves  <palves@redhat.com>
7066
7067         * gdbarch.sh: Include "observable.h" instead of "observer.h".
7068         (set_target_gdbarch): Call
7069         gdb::observers::architecture_changed.notify instead of
7070         observer_notify_architecture_changed.
7071
7072 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7073
7074         * tracepoint.c (struct current_traceframe_cleanup): Remove.
7075         (do_restore_current_traceframe_cleanup): Remove.
7076         (restore_current_traceframe_cleanup_dtor): Remove.
7077         (make_cleanup_restore_current_traceframe): Remove.
7078         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7079         New.
7080         * tracepoint.h (struct scoped_restore_current_traceframe): New.
7081         * infrun.c (fetch_inferior_event): Use
7082         scoped_restore_current_traceframe.
7083
7084 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7085
7086         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7087         Remove.
7088         <n_allocated_type_units>: Remove.
7089         <all_type_units>: Change to std::vector.
7090         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7091         to std::vector change.
7092         (dwarf2_per_objfile::get_cutu): Likewise.
7093         (dwarf2_per_objfile::get_tu): Likewise.
7094         (create_signatured_type_table_from_index): Likewise.
7095         (create_signatured_type_table_from_debug_names): Likewise.
7096         (dw2_symtab_iter_next): Likewise.
7097         (dw2_print_stats): Likewise.
7098         (dw2_expand_all_symtabs): Likewise.
7099         (dw2_expand_marked_cus): Likewise.
7100         (dw2_debug_names_iterator::next): Likewise.
7101         (dwarf2_initialize_objfile): Likewise.
7102         (add_signatured_type_cu_to_table): Likewise.
7103         (create_all_type_units): Likewise.
7104         (add_type_unit): Likewise.
7105         (struct tu_abbrev_offset): Add constructor.
7106         (build_type_psymtabs_1): Adjust to std::vector change.
7107         (print_tu_stats): Likewise.
7108         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7109         (write_debug_names): Likewise.
7110
7111 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7112
7113         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7114         Make an std::vector.
7115         <n_comp_units>: Remove.
7116         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7117         to std::vector change.
7118         (dwarf2_per_objfile::get_cutu): Likewise.
7119         (dwarf2_per_objfile::get_cu): Likewise.
7120         (create_cus_from_index): Likewise.
7121         (create_addrmap_from_index): Likewise.
7122         (create_addrmap_from_aranges): Likewise.
7123         (dwarf2_read_index): Likewise.
7124         (dw2_find_last_source_symtab): Likewise.
7125         (dw2_map_symtabs_matching_filename): Likewise.
7126         (dw2_symtab_iter_next): Likewise.
7127         (dw2_print_stats): Likewise.
7128         (dw2_expand_all_symtabs): Likewise.
7129         (dw2_expand_symtabs_with_fullname): Likewise.
7130         (dw2_expand_marked_cus): Likewise.
7131         (dw2_map_symbol_filenames): Likewise.
7132         (create_cus_from_debug_names): Likewise.
7133         (dwarf2_read_debug_names): Likewise.
7134         (dw2_debug_names_iterator::next): Likewise.
7135         (dwarf2_initialize_objfile): Likewise.
7136         (set_partial_user): Likewise.
7137         (dwarf2_build_psymtabs_hard): Likewise.
7138         (read_comp_units_from_section): Remove arguments, adjust to
7139         std::vector change.
7140         (create_all_comp_units): Adjust to std::vector and
7141         read_comp_units_from_section changes.
7142         (dwarf2_find_containing_comp_unit): Adjust to std::vector
7143         change.
7144         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7145         (psyms_seen_size): Likewise.
7146         (write_gdbindex): Likewise.
7147         (write_debug_names): Likewise.
7148
7149 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7150
7151         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7152         with dwarf2_per_objfile.
7153         (create_cus_from_index): Likewise.
7154         (create_signatured_type_table_from_index): Likewise.
7155         (dwarf2_read_index): Likewise.
7156         (dwarf2_initialize_objfile): Likewise.
7157         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
7158         per_cu rather than get_dwarf2_per_objfile.
7159
7160 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7161
7162         * dwarf2read.h (struct signatured_type): Forward declare.
7163         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7164         New methods.
7165         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7166         (dw2_get_cutu): ...this.
7167         (dwarf2_per_objfile::get_cu): Rename from...
7168         (dw2_get_cu): ...this.
7169         (dwarf2_per_objfile::get_tu): New.
7170         (create_addrmap_from_index): Adjust.
7171         (create_addrmap_from_aranges): Adjust.
7172         (dw2_find_last_source_symtab): Adjust.
7173         (dw2_map_symtabs_matching_filename): Adjust.
7174         (dw2_symtab_iter_next): Adjust.
7175         (dw2_print_stats): Adjust.
7176         (dw2_expand_all_symtabs): Adjust.
7177         (dw2_expand_symtabs_with_fullname): Adjust.
7178         (dw2_expand_marked_cus): Adjust.
7179         (dw_expand_symtabs_matching_file_matcher): Adjust.
7180         (dw2_map_symbol_filenames): Adjust.
7181         (dw2_debug_names_iterator::next): Adjust.
7182         (dwarf2_initialize_objfile): Adjust.
7183         (set_partial_user): Adjust.
7184         (dwarf2_build_psymtabs_hard): Adjust.
7185
7186 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7187
7188         * dwarf2read.c (create_signatured_type_table_from_debug_names):
7189         Remove unused variables.
7190         (dw2_map_symtabs_matching_filename): Likewise.
7191         (dwarf2_record_block_ranges): Likewise.
7192         (dwarf2_read_addr_index): Likewise.
7193         (follow_die_offset): Likewise.
7194
7195 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7196
7197         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7198         to symbol_file_add_main.
7199
7200 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7201
7202         PR mi/22299
7203         * mi/mi-console.c (do_fputc_async_safe): New.
7204         (mi_console_file::write_async_safe): New.
7205         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7206         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7207         New.
7208         * ui-file.c (ui_file::putstrn): Adjust call to
7209         fputstrn_unfiltered.
7210         * utils.c (printchar): Replace do_fputs and do_fprintf
7211         parameters by do_fputc.
7212         (fputstr_filtered): Adjust call to printchar.
7213         (fputstr_unfiltered): Likewise.
7214         (fputstrn_filtered): Likewise.
7215         (fputstrn_unfiltered): Add do_fputc parameter, pass to
7216         printchar.
7217         * utils.h (do_fputc_ftype): New typedef.
7218         (fputstrn_unfiltered): Add do_fputc parameter.
7219
7220 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
7221
7222         * regformats/i386/i386-avx.dat: Remove.
7223
7224 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7225
7226         PR gdb/22979
7227         * amd64-tdep.c (amd64_none_init_abi): New function.
7228         (amd64_x32_none_init_abi): New function.
7229         (_initialize_amd64_tdep): Register handlers for x86-64 and
7230         x64_32 with GDB_OSABI_NONE.
7231         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7232         GDB_OSABI_NONE osabi.
7233
7234 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7235
7236         PR gdb/22980
7237         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7238         GDB_OSABI_NONE.
7239         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7240         * osabi.c (gdb_osabi_names): Add "unknown" entry.
7241
7242 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7243
7244         * common/byte-vector.h (char_vector): New type.
7245         * target.h (target_read_alloc): Return
7246         gdb::optional<byte_vector>.
7247         (target_read_stralloc): Return gdb::optional<char_vector>.
7248         (target_get_osdata): Return gdb::optional<char_vector>.
7249         * target.c (target_read_alloc_1): Templatize.  Replacement
7250         manual memory management with vector.
7251         (target_read_alloc): Change return type, adjust.
7252         (target_read_stralloc): Change return type, adjust.
7253         (target_get_osdata): Change return type, adjust.
7254         * auxv.c (struct auxv_info) <length>: Remove.
7255         <data>: Change type to gdb::optional<byte_vector>.
7256         (auxv_inferior_data_cleanup): Free auxv_info with delete.
7257         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7258         (target_auxv_search): Adjust.
7259         (fprint_target_auxv): Adjust.
7260         * avr-tdep.c (avr_io_reg_read_command): Adjust.
7261         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7262         (linux_make_corefile_notes): Adjust.
7263         * osdata.c (get_osdata): Adjust.
7264         * remote.c (remote_get_threads_with_qxfer): Adjust.
7265         (remote_memory_map): Adjust.
7266         (remote_traceframe_info): Adjust.
7267         (btrace_read_config): Adjust.
7268         (remote_read_btrace): Adjust.
7269         (remote_pid_to_exec_file): Adjust.
7270         * solib-aix.c (solib_aix_get_library_list): Adjust.
7271         * solib-dsbt.c (decode_loadmap): Don't free buf.
7272         (dsbt_get_initial_loadmaps): Adjust.
7273         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7274         * solib-target.c (solib_target_current_sos): Adjust.
7275         * tracepoint.c (sdata_make_value): Adjust.
7276         * xml-support.c (xinclude_start_include): Adjust.
7277         (xml_fetch_content_from_file): Adjust.
7278         * xml-support.h (xml_fetch_another): Change return type.
7279         (xml_fetch_content_from_file): Change return type.
7280         * xml-syscall.c (xml_init_syscalls_info): Adjust.
7281         * xml-tdesc.c (file_read_description_xml): Adjust.
7282         (fetch_available_features_from_target): Change return type.
7283         (target_fetch_description_xml): Adjust.
7284         (target_read_description_xml): Adjust.
7285
7286 2018-04-06  Tom Tromey  <tom@tromey.com>
7287
7288         * value.c (~value): Update.
7289         (struct value) <contents>: Now unique_xmalloc_ptr.
7290         (value_contents_bits_eq, allocate_value_contents)
7291         (value_contents_raw, value_contents_all_raw)
7292         (value_contents_for_printing, value_contents_for_printing_const)
7293         (set_value_enclosing_type): Update.
7294
7295 2018-04-06  Tom Tromey  <tom@tromey.com>
7296
7297         * value.c (range_s): Remove typedef, VEC.
7298         (struct range): Add operator<.
7299         (range_lessthan): Remove.
7300         (ranges_contain): Change type.
7301         (~value): Update.
7302         (struct value) <unavailable, optimized_out>: Now std::vector.
7303         (value_entirely_available)
7304         (value_entirely_covered_by_range_vector)
7305         (value_entirely_unavailable, value_entirely_optimized_out):
7306         Update.
7307         (insert_into_bit_range_vector): Change argument type.
7308         (find_first_range_overlap): Likewise.
7309         (struct ranges_and_idx, value_contents_bits_eq)
7310         (require_not_optimized_out, require_available): Update.
7311         (ranges_copy_adjusted): Change argument types.
7312         (value_optimized_out, value_copy, value_fetch_lazy): Update.
7313
7314 2018-04-06  Tom Tromey  <tom@tromey.com>
7315
7316         * value.c (~value): Update.
7317         (struct value) <parent>: Now a value_ref_ptr.
7318         (value_parent, set_value_parent, value_address, value_copy):
7319         Update.
7320
7321 2018-04-06  Tom Tromey  <tom@tromey.com>
7322
7323         * value.c (struct value): Add constructor, destructor, and member
7324         initializers.
7325         (allocate_value_lazy, value_decref): Update.
7326
7327 2018-04-06  Tom Tromey  <tom@tromey.com>
7328
7329         * value.c (struct value) <released, next>: Remove.
7330         (all_values): Now a std::vector.
7331         (allocate_value_lazy): Update.
7332         (value_next): Remove.
7333         (value_mark, value_free_to_mark, release_value)
7334         (value_release_to_mark): Update.
7335
7336 2018-04-06  Tom Tromey  <tom@tromey.com>
7337
7338         * value.h (fetch_subexp_value, value_release_to_mark): Update.
7339         (free_value_chain): Remove.
7340         * value.c (free_value_chain): Remove.
7341         (value_release_to_mark): Return a std::vector.
7342         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7343         std::vector.
7344         (check_condition): Update.
7345         * eval.c (fetch_subexp_value): Change "val_chain" to a
7346         std::vector.
7347         * breakpoint.c (update_watchpoint): Update.
7348         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7349
7350 2018-04-06  Tom Tromey  <tom@tromey.com>
7351
7352         * value.h (free_all_values): Remove.
7353         * value.c (free_all_values): Remove.
7354
7355 2018-04-06  Tom Tromey  <tom@tromey.com>
7356
7357         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7358         (value_history_chain, value_history_count): Remove.
7359         (value_history): New global.
7360         (record_latest_value, access_value_history, show_values)
7361         (preserve_values): Update.
7362
7363 2018-04-06  Tom Tromey  <tom@tromey.com>
7364
7365         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7366         * varobj.c (varobj_set_display_format, varobj_set_value)
7367         (install_default_visualizer, construct_visualizer)
7368         (install_new_value, ~varobj, varobj_get_value_type)
7369         (my_value_of_variable, varobj_editable_p): Update.
7370         * c-varobj.c (c_describe_child, c_value_of_variable)
7371         (cplus_number_of_children, cplus_describe_child): Update.
7372         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7373         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7374         (ada_value_of_variable, ada_value_is_changeable_p): Update.
7375
7376 2018-04-06  Tom Tromey  <tom@tromey.com>
7377
7378         * printcmd.c (last_examine_address): Change type to
7379         value_ref_ptr.
7380         (do_examine, x_command): Update.
7381
7382 2018-04-06  Tom Tromey  <tom@tromey.com>
7383
7384         * value.c (release_value): Update.
7385         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7386         (struct bpstats) <val>: Now a value_ref_ptr.
7387         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7388         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7389         (~watchpoint, print_it_watchpoint, watch_command_1)
7390         (invalidate_bp_value_on_memory_change): Update.
7391
7392 2018-04-06  Tom Tromey  <tom@tromey.com>
7393
7394         * varobj.c (varobj_clear_saved_item)
7395         (update_dynamic_varobj_children, install_new_value, ~varobj):
7396         Update.
7397         * value.h (value_incref): Move declaration earlier.
7398         (value_decref): Rename from value_free.
7399         (struct value_ref_policy): New.
7400         (value_ref_ptr): New typedef.
7401         (struct value_deleter): Remove.
7402         (gdb_value_up): Remove typedef.
7403         (release_value): Change return type.
7404         (release_value_or_incref): Remove.
7405         * value.c (set_value_parent): Update.
7406         (value_incref): Change return type.
7407         (value_decref): Rename from value_free.
7408         (value_free_to_mark, free_all_values, free_value_chain): Update.
7409         (release_value): Return value_ref_ptr.
7410         (release_value_or_incref): Remove.
7411         (record_latest_value, set_internalvar, clear_internalvar):
7412         Update.
7413         * stack.c (info_frame_command): Don't call value_free.
7414         * python/py-value.c (valpy_dealloc, valpy_new)
7415         (value_to_value_object): Update.
7416         * printcmd.c (do_examine): Update.
7417         * opencl-lang.c (lval_func_free_closure): Update.
7418         * mi/mi-main.c (register_changed_p): Don't call value_free.
7419         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7420         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7421         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7422         value_free.
7423         * guile/scm-value.c (vlscm_free_value_smob)
7424         (vlscm_scm_from_value): Update.
7425         * frame.c (frame_register_unwind, frame_unwind_register_signed)
7426         (frame_unwind_register_unsigned, get_frame_register_bytes)
7427         (put_frame_register_bytes): Don't call value_free.
7428         * findvar.c (address_from_register): Don't call value_free.
7429         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7430         * dwarf2loc.c (entry_data_value_free_closure)
7431         (value_of_dwarf_reg_entry, free_pieced_value_closure)
7432         (dwarf2_evaluate_loc_desc_full): Update.
7433         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7434         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7435         (~watchpoint, watch_command_1)
7436         (invalidate_bp_value_on_memory_change): Update.
7437         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7438
7439 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
7440
7441         PR gdb/23022
7442         * warning.m4: Add -Wno-error=deprecated-register.
7443         * configure: Re-generate.
7444
7445 2018-04-05  Tom Tromey  <tom@tromey.com>
7446
7447         * linespec.h: Remove include of "vec.h".
7448
7449 2018-04-05  Tom Tromey  <tom@tromey.com>
7450
7451         * linespec.c (typep): Remove typedef.
7452         (find_methods, find_superclass_methods): Take a std::vector.
7453         (find_method): Use std::vector.
7454
7455 2018-04-05  Tom Tromey  <tom@tromey.com>
7456
7457         * utils.c (compare_strings): Remove.
7458         * utils.h (compare_strings): Remove.
7459         * objc-lang.h (find_imps): Update.
7460         * objc-lang.c (find_methods): Take a std::vector.
7461         (uniquify_strings, find_imps): Likewise.
7462         * linespec.c (find_methods): Take a std::vector.
7463         (decode_objc): Use std::vector.
7464         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7465         a std::vector.
7466         (find_method, find_function_symbols): Use std::vector.
7467
7468 2018-04-05  Tom Tromey  <tom@tromey.com>
7469
7470         * completer.c (completion_tracker::completion_tracker): Remove
7471         cast.
7472         (completion_tracker::discard_completions): Likewise.
7473         * breakpoint.c (ambiguous_names_p): Remove cast.
7474         * ada-lang.c (_initialize_ada_language): Remove cast.
7475         * utils.h (streq): Update.
7476         (streq_hash): Add new declaration.
7477         * utils.c (streq): Return bool.
7478         (streq_hash): New function.
7479
7480 2018-04-05  Tom Tromey  <tom@tromey.com>
7481
7482         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7483         Remove a string copy.
7484
7485 2018-04-05  Tom Tromey  <tom@tromey.com>
7486
7487         * linespec.c (filter_results): Use std::vector.
7488         (decode_line_2, decode_line_full): Update.
7489
7490 2018-04-05  Tom Tromey  <tom@tromey.com>
7491
7492         * linespec.c (canonical_to_fullform): Return std::string.
7493         (filter_results): Update.
7494         (struct decode_line_2_item): Add constructor.
7495         <fullform, displayform>: Now std::string.
7496         (decode_line_2_compare_items): Now a std::sort comparator.
7497         (decode_line_2): Update.
7498
7499 2018-04-05  Tom Tromey  <tom@tromey.com>
7500
7501         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7502         (unexpected_linespec_error): Update.
7503         (linespec_parse_basic, parse_linespec): Update.
7504
7505 2018-04-05  Tom Tromey  <tom@tromey.com>
7506
7507         * linespec.c (linespec_parse_basic): Reindent.
7508
7509 2018-04-05  Tom Tromey  <tom@tromey.com>
7510
7511         * minsyms.h (iterate_over_minimal_symbols): Update.
7512         * minsyms.c (iterate_over_minimal_symbols): Take a
7513         gdb::function_view.
7514         * linespec.c (struct collect_minsyms): Remove.
7515         (compare_msyms): Now a std::sort comparator.
7516         (add_minsym): Add parameters.
7517         (search_minsyms_for_name): Update.  Use std::vector.
7518
7519 2018-04-03  Tom Tromey  <tom@tromey.com>
7520
7521         * mipsread.c (read_alphacoff_dynamic_symtab): Use
7522         gdb::byte_vector.
7523
7524 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7525
7526         * MAINTAINERS (Write After Approval): Add Weimin Pan.
7527
7528 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
7529
7530         PR gdb/16959
7531         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
7532         printing static type.
7533
7534 2018-04-01  Tom Tromey  <tom@tromey.com>
7535
7536         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
7537         (rs6000_xfer_shared_libraries): Update.
7538
7539 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
7540
7541         * common/gdb_vecs.h (char_ptr): Remove.
7542         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
7543
7544 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
7545
7546         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
7547         with std::vector.
7548         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
7549
7550 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
7551
7552         * tracepoint.h (struct uploaded_tp): Initialize fields.
7553         <actions, step_actions, cmd_strings>: Change type to
7554         std::vector<char *>.
7555         * tracepoint.c (get_uploaded_tp): Allocate with new.
7556         (free_uploaded_tps): Free with delete.
7557         (parse_tracepoint_definition): Adjust to std::vector change.
7558         * breakpoint.c (read_uploaded_action): Likewise.
7559         (create_tracepoint_from_upload): Likewise.
7560         * ctf.c (ctf_write_uploaded_tp): Likewise.
7561         (SET_ARRAY_FIELD): Likewise.
7562         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
7563
7564 2018-03-30  Tom Tromey  <tom@tromey.com>
7565
7566         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
7567         std::unique_ptr.
7568         (svr4_keep_data_in_core): Update.
7569         (svr4_read_so_list): Update.
7570
7571 2018-03-30  Tom Tromey  <tom@tromey.com>
7572
7573         * windows-nat.c (handle_output_debug_string, handle_exception):
7574         Update.
7575         * target.h (target_read_string): Update.
7576         * target.c (target_read_string): Change "string" to
7577         unique_xmalloc_ptr.
7578         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
7579         Update.
7580         * solib-frv.c (frv_current_sos): Update.
7581         * solib-dsbt.c (dsbt_current_sos): Update.
7582         * solib-darwin.c (darwin_current_sos): Update.
7583         * linux-thread-db.c (inferior_has_bug): Update.
7584         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
7585         Update.  Remove alloca.
7586         * ada-lang.c (ada_main_name): Update.
7587
7588 2018-03-30  Tom Tromey  <tom@tromey.com>
7589
7590         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
7591         (struct dwo_file_deleter): New.
7592         (dwo_file_up): New typedef.
7593         (open_and_init_dwo_file): Use dwo_file_up.
7594         (free_dwo_file_cleanup): Remove.
7595
7596 2018-03-30  Tom Tromey  <tom@tromey.com>
7597
7598         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
7599         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
7600
7601 2018-03-30  Tom Tromey  <tom@tromey.com>
7602
7603         * dwarf2read.c (class free_cached_comp_units): New class.
7604         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
7605         (free_cached_comp_units): Remove function.
7606
7607 2018-03-30  Tom Tromey  <tom@tromey.com>
7608
7609         * utils.h (make_cleanup_unpush_target): Remove.
7610         * inf-ptrace.c (struct target_unpusher): New.
7611         (target_unpush_up) New typedef.
7612         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
7613         target_unpush_up.
7614         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
7615
7616 2018-03-27  Tom Tromey  <tom@tromey.com>
7617
7618         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
7619
7620 2018-03-27  Pedro Alves  <palves@redhat.com>
7621             Tom Tromey  <tom@tromey.com>
7622
7623         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
7624         destructor.  Now a class.
7625         (gdb_readline_wrapper_cleanup): Remove function.
7626         (gdb_readline_wrapper): Remove cleanups.
7627
7628 2018-03-27  Tom Tromey  <tom@tromey.com>
7629
7630         * typeprint.h (struct type_print_options) <local_typedefs,
7631         global_typedefs>: Remove "struct" keyword.
7632         (class typedef_hash_table): New class.
7633         (recursively_update_typedef_hash, add_template_parameters)
7634         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
7635         (find_typedef_in_hash): Don't declare.
7636         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
7637         (typedef_hash_table::recursively_update): Rename from
7638         recursively_update_typedef_hash.  Now a member.
7639         (typedef_hash_table::add_template_parameters): Rename from
7640         add_template_parameters.  Now a member.
7641         (typedef_hash_table::typedef_hash_table): Now a constructor;
7642         rename from create_typedef_hash.
7643         (typedef_hash_table::~typedef_hash_table): Now a destructor;
7644         rename from free_typedef_hash.
7645         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
7646         (do_free_global_table): Remove.
7647         (typedef_hash_table::typedef_hash_table): New constructor; renamed
7648         from copy_type_recursive.
7649         (create_global_typedef_table): Remove.
7650         (typedef_hash_table::find_global_typedef): Now a member of
7651         typedef_hash_table.
7652         (typedef_hash_table::find_typedef): Rename from
7653         find_typedef_in_hash; now a member.
7654         (whatis_exp): Update.
7655         * extension.h (struct ext_lang_type_printers): Add constructor and
7656         destructor.
7657         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
7658         declare.
7659         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
7660         Now a constructor; rename from start_ext_lang_type_printers.
7661         (ext_lang_type_printers): Now a destructor; rename from
7662         free_ext_lang_type_printers.
7663         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
7664         Update.
7665         (c_type_print_base_struct_union): Update.  Remove cleanups.
7666
7667 2018-03-27  Tom Tromey  <tom@tromey.com>
7668
7669         * dwarf-index-write.c: Include <cmath>.
7670
7671 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
7672
7673         * NEWS: Add entry describing new "set|show varsize-limit" command.
7674         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
7675         command.
7676         * printcmd.c (_initialize_printcmd): Add "set var" alias of
7677         "set variable".
7678
7679 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
7680
7681         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
7682         dwarf-index-write.c
7683         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
7684         * dwarf-index-common.c: New file.
7685         * dwarf-index-common.h: New file.
7686         * dwarf-index-write.c: New file.
7687         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
7688         (struct dwarf2_section_info): Move from here.
7689         (dwarf2_section_info_def): Likewise.
7690         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
7691         (offset_type): Likewise.
7692         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
7693         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
7694         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
7695         (byte_swap): Likewise.
7696         (MAYBE_SWAP): Likewise.
7697         (dwarf2_per_cu_ptr): Likewise.
7698         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
7699         (struct tu_stats): Likewise.
7700         (struct dwarf2_per_objfile): Likewise.
7701         (struct dwarf2_per_cu_data): Likewise.
7702         (struct signatured_type): Likewise.
7703         (sig_type_ptr): Likewise.
7704         (DEF_VEC_P (sig_type_ptr)): Likewise.
7705         (INDEX4_SUFFIX): Likewise.
7706         (INDEX5_SUFFIX): Likewise.
7707         (DEBUG_STR_SUFFIX): Likewise.
7708         (dwarf2_read_section): Make non-static.
7709         (mapped_index_string_hash): Move from here.
7710         (dwarf5_djb_hash): Likewise.
7711         (file_write): Likewise.
7712         (class data_buf): Likewise.
7713         (struct symtab_index_entry): Likewise.
7714         (struct mapped_symtab): Likewise.
7715         (find_slot): Likewise.
7716         (hash_expand): Likewise.
7717         (add_index_entry): Likewise.
7718         (uniquify_cu_indices): Likewise.
7719         (class c_str_view): Likewise.
7720         (class c_str_view_hasher): Likewise.
7721         (class vector_hasher): Likewise.
7722         (write_hash_table): Likewise.
7723         (psym_index_map): Likewise.
7724         (struct addrmap_index_data): Likewise.
7725         (add_address_entry): Likewise.
7726         (add_address_entry_worker): Likewise.
7727         (write_address_map): Likewise.
7728         (symbol_kind): Likewise.
7729         (write_psymbols): Likewise.
7730         (struct signatured_type_index_data): Likewise.
7731         (write_one_signatured_type): Likewise.
7732         (recursively_count_psymbols): Likewise.
7733         (recursively_write_psymbols): Likewise.
7734         (class debug_names): Likewise.
7735         (check_dwarf64_offsets): Likewise.
7736         (psyms_seen_size): Likewise.
7737         (write_gdbindex): Likewise.
7738         (write_debug_names): Likewise.
7739         (assert_file_size): Likewise.
7740         (write_psymtabs_to_index): Likewise.
7741         (save_gdb_index_command): Likewise.
7742         (_initialize_dwarf2_read): Don't register the "save gdb-index"
7743         command.
7744         * dwarf2read.h: New file.
7745
7746 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
7747
7748         PR gdb/22670
7749         * dwarf2read.c (dwarf2_physname): Do not return the demangled
7750         symbol name if the CU's language stores symbol names in linkage
7751         format.
7752         * language.h (struct language_defn)
7753         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
7754         all instances of this struct.
7755
7756 2018-03-26  Tom Tromey  <tom@tromey.com>
7757
7758         * stack.c (backtrace_command_1): Remove verbose code.
7759
7760 2018-03-26  Tom Tromey  <tom@tromey.com>
7761
7762         * python/py-framefilter.c (py_print_type): Don't catch
7763         exceptions.  Return void.
7764         (py_print_value): Likewise.
7765         (py_print_single_arg): Likewise.
7766         (enumerate_args): Don't catch exceptions.
7767         (py_print_args): Likewise.
7768         (py_print_frame): Likewise.
7769         (gdbpy_apply_frame_filter): Catch exceptions here.
7770
7771 2018-03-26  Tom Tromey  <tom@tromey.com>
7772
7773         * stack.c (_initialize_stack): Remove trailing newlines from help
7774         text.  Add "Usage" line to "backtrace" help.
7775
7776 2018-03-26  Tom Tromey  <tom@tromey.com>
7777
7778         PR python/16486:
7779         * python/py-framefilter.c (py_print_args): Call wrap_hint.
7780
7781 2018-03-26  Tom Tromey  <tom@tromey.com>
7782
7783         * python/py-framefilter.c (py_print_single_arg): Return
7784         EXT_LANG_BT_ERROR from catch.
7785
7786 2018-03-26  Tom Tromey  <tom@tromey.com>
7787
7788         PR backtrace/15584:
7789         * stack.c (backtrace_command_1): Move some code into no-filters
7790         "if".
7791
7792 2018-03-26  Tom Tromey  <tom@tromey.com>
7793
7794         * python/py-framefilter.c (throw_quit_or_print_exception): New
7795         function.
7796         (gdbpy_apply_frame_filter): Use it.
7797
7798 2018-03-26  Tom Tromey  <tom@tromey.com>
7799
7800         PR cli/17716:
7801         * python/py-framefilter.c (py_print_type, py_print_value)
7802         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7803         RETURN_MASK_ERROR.
7804
7805 2018-03-26  Tom Tromey  <tom@tromey.com>
7806
7807         * python/py-framefilter.c (enumerate_args): Use
7808         gdb::unique_xmalloc_ptr.
7809
7810 2018-03-26  Tom Tromey  <tom@tromey.com>
7811
7812         * python/py-framefilter.c (py_print_frame): Return
7813         EXT_LANG_BT_OK.
7814         (gdbpy_apply_frame_filter): Update comment.
7815         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7816         Remove.
7817         <EXT_LANG_BT_NO_FILTERS>: Change value.
7818
7819 2018-03-26  Tom Tromey  <tom@tromey.com>
7820
7821         PR backtrace/15582:
7822         * stack.c (backtrace_command): Parse "hide" argument.
7823         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7824         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7825         constant.
7826
7827 2018-03-26  Tom Tromey  <tom@tromey.com>
7828
7829         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7830         add "flags".
7831         (backtrace_command): Remove "fulltrace", add "flags".
7832
7833 2018-03-26  Tom Tromey  <tom@tromey.com>
7834
7835         * stack.c (backtrace_command): Rewrite command line parsing.
7836
7837 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
7838
7839         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7840
7841 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
7842
7843         * filename-seen-cache.h: Add include guard.
7844
7845 2018-03-26  Keith Seitz  <keiths@redhat.com>
7846
7847         * symfile.c (place_section): Remove "struct" from section_addr_info
7848         in comment.
7849         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7850         "struct" keyword from section_addr_info.
7851
7852 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
7853
7854         * regformats/regdef.h (reg): Add constructors.
7855
7856 2018-03-25  Pedro Alves  <palves@redhat.com>
7857
7858         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7859         if then/else bodies in var_func_name extraction.
7860
7861 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
7862
7863         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7864         lookup_minimal_symbol() to find symbol entry.
7865         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7866
7867 2018-03-23  Keith Seitz  <keiths@redhat.com>
7868
7869         PR c++/22968
7870         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7871         nested type definitions for C++, too.
7872
7873 2018-03-23  Tom Tromey  <tom@tromey.com>
7874
7875         * machoread.c (struct oso_el): Add a constructor.  Don't define as
7876         a typedef.
7877         (macho_register_oso): Remove.
7878         (macho_symtab_read): Take a std::vector.
7879         (oso_el_compare_name): Now a std::sort comparator.
7880         (macho_symfile_read_all_oso): Take a std::vector.
7881         (macho_symfile_read): Use std::vector.  Remove cleanups.
7882
7883 2018-03-22  Tom Tromey  <tom@tromey.com>
7884
7885         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7886         (record_full_goto_bookmark): Use std::string.
7887
7888 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7889
7890         PR tdep/18295
7891         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7892         a single mask.
7893
7894 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7895
7896         * rs6000-tdep.c (store_insn_p): New function.
7897         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7898         and cr_reg to their unshifted values. Use store_insn_p to
7899         match LR saves using either R1 or fdata->alloca_reg. Use
7900         store_insn_p to match CR saves. Set alloca_reg_offset
7901         when alloca_reg and framep are set. Remove lr_reg shift
7902         when assigning to fdata->lr_register.
7903
7904 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7905
7906         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7907         command line args instead of emitting a warning.
7908
7909 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
7910
7911         * tracepoint.h (struct static_tracepoint_marker): Initialize
7912         fields, define default constructor, move constructor and move
7913         assignment, disable the rest.
7914         <str_id, extra>: Make std::string.
7915         (release_static_tracepoint_marker): Remove.
7916         (free_current_marker): Remove.
7917         * tracepoint.c (free_current_marker): Remove.
7918         (parse_static_tracepoint_marker_definition): Adjust to
7919         std::string, use new hex2str overload.
7920         (release_static_tracepoint_marker): Remove.
7921         (print_one_static_tracepoint_marker): Get marker by reference
7922         and adjust to std::string.
7923         (info_static_tracepoint_markers_command): Adjust to std::vector
7924         changes
7925         * target.h (static_tracepoint_marker_p): Remove typedef.
7926         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7927         (struct target_ops) <to_static_tracepoint_marker_at>: Return
7928         bool.
7929         <to_static_tracepoint_markers_by_strid>: Return std::vector.
7930         * target-debug.h
7931         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7932         (target_debug_print_std_vector_static_tracepoint_marker): New.
7933         (target_debug_print_struct_static_tracepoint_marker_p): Rename
7934         to...
7935         (target_debug_print_static_tracepoint_marker_p): ... this.
7936         * target-delegates.c: Re-generate.
7937         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7938         Make std::string.
7939         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7940         (decode_static_tracepoint_spec): Adjust to std::vector.
7941         (tracepoint_print_one_detail): Adjust to std::string.
7942         (strace_marker_decode_location): Adjust to std::string.
7943         (update_static_tracepoint): Adjust to std::string, remove call
7944         to release_static_tracepoint_marker.
7945         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7946         Adjust to std::vector.
7947         * remote.c (remote_static_tracepoint_marker_at): Return bool.
7948         (remote_static_tracepoint_markers_by_strid): Adjust to
7949         std::vector.
7950         * common/rsp-low.h (hex2str): New overload with explicit count
7951         of bytes.
7952         * common/rsp-low.c (hex2str): New overload with explicit count
7953         of bytes.
7954         * unittests/rsp-low-selftests.c (test_hex2str): New function.
7955         (_initialize_rsp_low_selftests): Add test_hex2str test.
7956         * unittests/tracepoint-selftests.c
7957         (test_parse_static_tracepoint_marker_definition): Adjust to
7958         std::string.
7959
7960 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
7961
7962         * tracepoint.c (parse_static_tracepoint_marker_definition):
7963         Consider case where the definition is followed by more
7964         definitions.
7965         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7966         tracepoint-selftests.c.
7967         * unittests/tracepoint-selftests.c: New.
7968
7969 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7970
7971         * MAINTAINERS (Write After Approval): Add Pedro Franco de
7972         Carvalho.
7973
7974 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
7975
7976         * symtab.c (find_pc_sect_line): fixed indentation.
7977
7978 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
7979
7980         * symtab.c (find_pc_sect_line): now uses binary search.
7981
7982 2018-03-19  Tom Tromey  <tom@tromey.com>
7983
7984         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7985         "IDENT" production.
7986
7987 2018-03-19  Pedro Alves  <palves@redhat.com>
7988             Tom Tromey  <tom@tromey.com>
7989
7990         * unittests/observable-selftests.c: New file.
7991         * common/observable.h: New file.
7992         * observable.h: New file.
7993         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7994         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7995         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7996         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7997         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7998         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7999         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8000         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8001         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8002         python/py-breakpoint.c, python/py-finishbreakpoint.c,
8003         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8004         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8005         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8006         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8007         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8008         tui/tui-interp.c, valops.c: Update all users.
8009         * tui/tui-hooks.c (tui_bp_created_observer)
8010         (tui_bp_deleted_observer, tui_bp_modified_observer)
8011         (tui_inferior_exit_observer, tui_before_prompt_observer)
8012         (tui_normal_stop_observer, tui_register_changed_observer):
8013         Remove.
8014         (tui_observers_token): New global.
8015         (attach_or_detach, tui_attach_detach_observers): New functions.
8016         (tui_install_hooks, tui_remove_hooks): Use
8017         tui_attach_detach_observers.
8018         * record-btrace.c (record_btrace_thread_observer): Remove.
8019         (record_btrace_thread_observer_token): New global.
8020         * observer.sh: Remove.
8021         * observer.c: Rename to observable.c.
8022         * observable.c (namespace gdb_observers): Define new objects.
8023         (observer_debug): Move into gdb_observers namespace.
8024         (struct observer, struct observer_list, xalloc_observer_list_node)
8025         (xfree_observer_list_node, generic_observer_attach)
8026         (generic_observer_detach, generic_observer_notify): Remove.
8027         (_initialize_observer): Update.
8028         Don't include observer.inc.
8029         * Makefile.in (generated_files): Remove observer.h, observer.inc.
8030         (clean mostlyclean): Likewise.
8031         (observer.h, observer.inc): Remove targets.
8032         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8033         (COMMON_SFILES): Use observable.c, not observer.c.
8034         * .gitignore: Remove observer.h.
8035
8036 2018-03-18  Tom Tromey  <tom@tromey.com>
8037
8038         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8039         gdb::def_vector.
8040         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8041
8042 2018-03-17  Tom Tromey  <tom@tromey.com>
8043
8044         * auto-load.c (auto_load_objfile_script_1): Use std::string.
8045
8046 2018-03-17  Tom Tromey  <tom@tromey.com>
8047
8048         * target.c (class scoped_target_fd): New.
8049         (target_fileio_close_cleanup): Remove.
8050         (target_fileio_read_alloc_1): Use scoped_target_fd.
8051
8052 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
8053
8054         * silent-rules.mk: New.
8055         * Makefile.in: Include silent-rules.mk
8056         (srcdir, VPATH, top_srcdir): Move up.
8057         (COMPILE): Add ECHO_CXX.
8058         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8059         (init.c): Add ECHO_INIT_C.
8060         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8061         (version.c): Add ECHO_GEN.
8062         (printcmd.o): Add ECHO_CXX.
8063         (target-float.o): Add ECHO_CXX.
8064         (ada-exp.o): Add ECHO_CXX.
8065         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8066         (insight$(EXEEXT)): Add ECHO_CXXLD.
8067         * gnulib/configure.ac: Add AM_SILENT_RULES.
8068         * gnulib/aclocal.m4: Re-generate.
8069         * gnulib/configure: Re-generate.
8070         * gnulib/import/Makefile.in: Re-generate.
8071
8072 2018-03-16  Tom Tromey  <tom@tromey.com>
8073
8074         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8075         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8076         * utils.c (do_free_section_addr_info)
8077         (make_cleanup_free_section_addr_info): Remove.
8078         * symfile.h (struct other_sections): Add constructor.
8079         (struct section_addr_info): Remove.
8080         (section_addr_info): New typedef.
8081         (struct sym_fns) <sym_offsets>: Change type of parameter.
8082         (build_section_addr_info_from_objfile)
8083         (relative_addr_info_to_section_offsets, addr_info_make_relative)
8084         (default_symfile_offsets, symbol_file_add)
8085         (symbol_file_add_from_bfd)
8086         (build_section_addr_info_from_section_table): Update.
8087         (alloc_section_addr_info, free_section_addr_info): Don't declare.
8088         * symfile.c (alloc_section_addr_info): Remove.
8089         (build_section_addr_info_from_section_table): Change return type.
8090         Update.
8091         (build_section_addr_info_from_bfd)
8092         (build_section_addr_info_from_objfile): Likewise.
8093         (free_section_addr_info): Remove.
8094         (relative_addr_info_to_section_offsets): Change type of "addrs".
8095         (addrs_section_compar): Now a std::sort comparator.
8096         (addrs_section_sort): Change return type.
8097         (addr_info_make_relative): Change type of "addrs".  Update.
8098         (default_symfile_offsets, syms_from_objfile_1)
8099         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8100         (symbol_file_add_separate): Update.
8101         (symbol_file_add): Change type of "addrs".  Update.
8102         (add_symbol_file_command): Update.  Remove cleanups.
8103         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
8104         cleanups.
8105         * symfile-debug.c (debug_sym_offsets): Change type of "info".
8106         * solib.c (solib_read_symbols): Update.
8107         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
8108         * machoread.c (macho_symfile_offsets): Update.
8109         * jit.c (jit_bfd_try_read_symtab): Update.
8110
8111 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
8112
8113         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8114         unittests/utils-selftests.c.
8115         * unittests/utils-selftests.c: New file.
8116
8117 2018-03-14  Tom Tromey  <tom@tromey.com>
8118
8119         PR cli/14977:
8120         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8121         for NULL.
8122
8123 2018-03-14  Tom Tromey  <tom@tromey.com>
8124
8125         PR cli/19918:
8126         * printcmd.c (printf_pointer): Allow "-" in format.
8127
8128 2018-03-14  Tom Tromey  <tom@tromey.com>
8129
8130         * printcmd.c (_initialize_printcmd): Add usage to printf.
8131
8132 2018-03-14  Yao Qi  <qiyao@sourceware.org>
8133
8134         * MAINTAINERS: Update my email address.
8135
8136 2018-03-13  Tom Tromey  <tom@tromey.com>
8137
8138         * machoread.c (macho_check_dsym): Change filenamep to a
8139         std::string*.
8140         (macho_symfile_read): Update.
8141         * symfile.c (load_command): Use std::string.
8142
8143 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8144
8145         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8146         to error message string.
8147         (riscv_register_name): Use xsnprintf instead of sprintf.
8148         (riscv_insn::fetch_instruction): Use gdb_assert instead of
8149         internal_error.
8150         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8151         error.
8152         (riscv_push_dummy_call): Likewise.
8153
8154 2018-03-12  Tom Tromey  <tom@tromey.com>
8155
8156         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8157         Use gdb::byte_vector.
8158         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8159
8160 2018-03-12  Yao Qi  <yao.qi@linaro.org>
8161
8162         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8163         parameter type to readable_regcache.
8164         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8165         the declaration.
8166
8167 2018-03-11  Tom Tromey  <tom@tromey.com>
8168
8169         * dwarf2read.c (struct nextfield): Add initializers.
8170         (struct nextfnfield): Remove.
8171         (struct fnfieldlist): Add initializers.  Remove "length" and
8172         "head", use std::vector.
8173         (struct decl_field_list): Remove.
8174         (struct field_info): Add initializers.
8175         <fields, baseclasses>: Now std::vector.
8176         <nbaseclasses, nfnfields, typedef_field_list_count,
8177         nested_types_list_count>: Remove.
8178         (dwarf2_add_field, dwarf2_add_type_defn)
8179         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8180         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8181         (process_structure_scope): Update.
8182
8183 2018-03-11  Tom Tromey  <tom@tromey.com>
8184
8185         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8186         for use by std::sort.
8187         (build_type_psymtabs_1): Use std::vector.
8188
8189 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
8190
8191         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8192         and LIBMPFR in the printed configuration.
8193
8194 2018-03-08  Tom Tromey  <tom@tromey.com>
8195
8196         * source.c (get_filename_and_charpos): Use scoped_fd.
8197         * nto-procfs.c (procfs_open_1): Use scoped_fd.
8198         (procfs_pidlist): Likewise.
8199         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8200         (iterate_over_mappings): Likewise.
8201
8202 2018-03-08  Tom Tromey  <tom@tromey.com>
8203
8204         * infcall.c (struct call_return_meta_info)
8205         <stack_temporaries_enabled>: Remove.
8206         (get_call_return_value, call_function_by_hand_dummy): Update.
8207         * thread.c (disable_thread_stack_temporaries): Remove.
8208         (enable_thread_stack_temporaries): Remove.
8209         (thread_stack_temporaries_enabled_p): Return bool.
8210         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8211         (get_last_thread_stack_temporary): Update.
8212         * eval.c (evaluate_subexp): Update.
8213         * gdbthread.h (class enable_thread_stack_temporaries): Now a
8214         class, not a function.
8215         (value_ptr, value_vec): Remove typedefs.
8216         (class thread_info) <stack_temporaries_enabled>: Now bool.
8217         <stack_temporaries>: Now a std::vector.
8218         (thread_stack_temporaries_enabled_p)
8219         (value_in_thread_stack_temporaries): Return bool.
8220
8221 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
8222
8223         * remote.c (putpkt_binary): Fix omitted bytes reporting.
8224         (getpkt_or_notif_sane_1): Likewise.
8225
8226 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8227
8228         * build-id.c (build_id_to_debug_bfd): Use std::string.
8229
8230 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8231
8232         * build-id.c (find_separate_debug_file_by_buildid): Return
8233         std::string.
8234         * build-id.h (find_separate_debug_file_by_buildid): Return
8235         std::string.
8236         * coffread.c (coff_symfile_read): Adjust to std::string.
8237         * elfread.c (elf_symfile_read): Adjust to std::string.
8238         * symfile.c (separate_debug_file_exists): Change parameter to
8239         std::string.
8240         (find_separate_debug_file): Return std::string.
8241         (find_separate_debug_file_by_debuglink): Return std::string.
8242         * symfile.h (find_separate_debug_file_by_debuglink): Return
8243         std::string.
8244
8245 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
8246
8247         * common/xml-utils.c (xml_escape_text): Move code to...
8248         (xml_escape_text_append): ... this new function.
8249         * common/xml-utils.h (xml_escape_text_append): New declaration.
8250         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8251         New function.
8252         (_initialize_xml_utils): register test_xml_escape_text_append as
8253         a selftest.
8254
8255 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
8256
8257         * defs.h: Remove MAX_REGISTER_SIZE.
8258         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8259         asserts.
8260         * python/py-unwind.c (pyuw_sniffer): Likewise.
8261
8262 2018-03-07  Tom Tromey  <tom@tromey.com>
8263
8264         * linux-tdep.c (linux_info_proc): Update.
8265         * target.h (struct target_ops) <to_fileio_readlink>: Return
8266         optional<string>.
8267         (target_fileio_readlink): Return optional<string>.
8268         * remote.c (remote_hostio_readlink): Return optional<string>.
8269         * inf-child.c (inf_child_fileio_readlink): Return
8270         optional<string>.
8271         * target.c (target_fileio_readlink): Return optional<string>.
8272
8273 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
8274
8275         * regcache.c (cooked_read_test): Add riscv to the list of
8276         architectures that have a save_reggroup.
8277
8278 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8279
8280         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8281         value is not a dynamic class object.
8282
8283 2018-03-06  Tom Tromey  <tom@tromey.com>
8284
8285         * rust-exp.y: Formatting fixes.
8286
8287 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8288
8289         * riscv-tdep.c (riscv_register_name): Remove target description
8290         support.
8291         (riscv_gdbarch_init): Remove target description check.
8292
8293 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8294
8295         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8296         comment.
8297         * riscv-tdep.h: Likewise.
8298
8299 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8300
8301         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8302         (riscv_pseudo_register_write): Delete.
8303         (riscv_gdbarch_init): Remove all use of pseudo registers.
8304
8305 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8306
8307         * record-btrace.c (btrace_print_lines): Replace cleanup
8308         parameter with RAII equivalents.
8309         (btrace_insn_history): Replace cleanup with RAII equivalents.
8310         * ui-out.h (make_cleanup_ui_out_list_begin_end,
8311         make_cleanup_ui_out_tuple_begin_end): Remove.
8312         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8313         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8314         make_cleanup_ui_out_list_begin_end): Remove.
8315
8316 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8317
8318         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8319         parameter types to std::vector.  Use bool.
8320         (record_btrace_wait): Replace VEC(tp_t) with
8321         std::vector<thread_info *>.
8322         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8323
8324 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
8325
8326         * record-btrace.c (record_btrace_disable_callback): Remove.
8327         (struct scoped_btrace_disable): New.
8328         (record_btrace_open): Use scoped_btrace_disable.
8329
8330 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8331
8332         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8333         reading values from registers.
8334
8335 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8336
8337         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8338         where appropriate.
8339
8340 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8341
8342         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8343         change parameter type.  Use GDB's print functions, and use
8344         core_addr_to_string where appropriate.
8345         (riscv_push_dummy_call): Use core_addr_to_string where
8346         appropriate, update call to riscv_print_arg_location, and reindent
8347         a few lines.
8348         (riscv_return_value): Update call to riscv_print_arg_location.
8349
8350 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8351             Tim Newsome <tim@sifive.com>
8352             Albert Ou <a0u@eecs.berkeley.edu>
8353             Darius Rad <darius@bluespec.com>
8354
8355         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8356         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8357         (ALLDEPFILES): Add riscv-tdep.c
8358         * configure.tgt: Add riscv support.
8359         * riscv-tdep.c: New file.
8360         * riscv-tdep.h: New file.
8361         * NEWS: Mention new target.
8362         * MAINTAINERS: Add entry for riscv.
8363
8364 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
8365
8366         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8367         fields within aggregates.
8368
8369 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
8370
8371         * record-btrace.c (btrace_print_lines): Change type of flags to
8372         gdb_disassembly_flags.
8373
8374 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8375
8376         * fbsd-nat.c: Include "inf-ptrace.h".
8377         (USE_SIGTRAP_SIGINFO): Conditionally define.
8378         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8379         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8380         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8381         function.
8382         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8383         Likewise.
8384         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8385         Likewise.
8386         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8387         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8388         "supports_stopped_by_hw_breakpoint" target methods.
8389
8390 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8391
8392         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8393         * fbsd-nat.c (debug_fbsd_nat): New variable.
8394         (show_fbsd_nat_debug): New function.
8395         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8396         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8397
8398 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
8399
8400         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8401         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8402         prototype.
8403         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8404         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8405         method.
8406
8407 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8408
8409         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8410         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8411
8412 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8413
8414         * charset.c (struct charset_vector): New.
8415         (charsets): Change type to charset_vector.
8416         (find_charset_names): Adjust.
8417         (add_one): Adjust.
8418         (_initialize_charset): Adjust.
8419
8420 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8421
8422         * progspace.h (struct program_space) <deleted_solibs>: Change
8423         type to std::vector<std::string>.
8424         * progspace.c (clear_program_space_solib_cache): Adjust.
8425         * breakpoint.c (print_solib_event): Adjust.
8426         (check_status_catch_solib): Adjust.
8427         * solib.c (update_solib_list): Adjust.
8428         * ui-out.h (class ui_out) <field_string>: New overload.
8429         * ui-out.c (ui_out::field_string): New overload.
8430
8431 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8432
8433         * progspace.h (struct program_space): Add constructor and
8434         destructor, initialize fields.
8435         (add_program_space): Remove.
8436         * progspace.c (add_program_space): Rename to...
8437         (program_space::program_space): ... this.
8438         (release_program_space): Rename to...
8439         (program_space::~program_space): ... this.
8440         (delete_program_space): Use delete to delete program_space.
8441         (initialize_progspace): Use new to allocate program_space.
8442         * inferior.c (add_inferior_with_spaces): Likewise.
8443         (clone_inferior_command): Likewise.
8444         * infrun.c (follow_fork_inferior): Likewise.
8445         (handle_vfork_child_exec_or_exit): Likewise.
8446
8447 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
8448
8449         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8450         (delim_string_to_char_ptr_vec): Return std::vector of
8451         gdb::unique_xmalloc_ptr.
8452         (dirnames_to_char_ptr_vec_append): Take std::vector of
8453         gdb::unique_xmalloc_ptr.
8454         (dirnames_to_char_ptr_vec): Return std::vector of
8455         gdb::unique_xmalloc_ptr.
8456         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8457         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8458         (delim_string_to_char_ptr_vec): Return an std::vector of
8459         gdb::unique_xmalloc_ptr, adjust the code.
8460         (dirnames_to_char_ptr_vec_append): Take an std::vector of
8461         gdb::unique_xmalloc_ptr, adjust the code.
8462         (dirnames_to_char_ptr_vec): Return an std::vector of
8463         gdb::unique_xmalloc_ptr, adjust the code.
8464         * auto-load.c (auto_load_safe_path_vec): Change type to
8465         std::vector of gdb::unique_xmalloc_ptr.
8466         (auto_load_expand_dir_vars): Return an std::vector of
8467         gdb::unique_xmalloc_ptr, adjust the code.
8468         (auto_load_safe_path_vec_update): Adjust.
8469         (filename_is_in_auto_load_safe_path_vec): Adjust.
8470         (auto_load_objfile_script_1): Adjust.
8471         * build-id.c (build_id_to_debug_bfd): Adjust.
8472         * linux-thread-db.c (thread_db_load_search): Adjust.
8473         * source.c (add_path): Adjust.
8474         (openp): Adjust.
8475         * symfile.c (find_separate_debug_file): Adjust.
8476         * utils.c (do_free_char_ptr_vec): Remove.
8477         (make_cleanup_free_char_ptr_vec): Remove.
8478
8479 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
8480
8481         PR gdb/22907
8482         * common/pathstuff.c: Conditionally include "<windows.h>".
8483
8484 2018-03-01  Georg Sauthoff  <mail@georg.so>
8485
8486         PR gdb/22888
8487         * gcore.in: Quote variables and switch interpreter to bash.
8488
8489 2018-03-01  Tom Tromey  <tom@tromey.com>
8490
8491         * dwarf2read.c (alloc_discriminant_info): Fix default_index
8492         assertion.  Add assertion for discriminant_index.
8493         (quirk_rust_enum): Use correct base type name in univariant case.
8494
8495 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
8496
8497         * record.c (get_call_history_modifiers): Return a
8498         record_print_flags.
8499         (cmd_record_call_history): Adjust.
8500         * record-btrace.c (record_btrace_call_history): Adjust.
8501         (record_btrace_call_history_range): Adjust.
8502         (record_btrace_call_history_from): Adjust.
8503         * target-debug.h (target_debug_print_record_print_flags): New.
8504         * target-delegates.c: Re-generate.
8505         * target.c (target_call_history): Change flags type.
8506         (target_call_history_from): Likewise.
8507         (target_call_history_range): Likewise.
8508         * target.h (struct target_ops) <target_call_history>: Likewise.
8509         (target_call_history_from): Likewise.
8510         (target_call_history_range): Likewise.
8511
8512 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8513             Simon Marchi  <simon.marchi@polymtl.ca>
8514
8515         * common/common-utils.c: Include "sys/stat.h".
8516         (is_regular_file): Move here from "source.c"; change return
8517         type to "bool".
8518         * common/common-utils.h (is_regular_file): New prototype.
8519         * common/pathstuff.c (contains_dir_separator): New function.
8520         * common/pathstuff.h (contains_dir_separator): New prototype.
8521         * source.c: Don't include "sys/stat.h".
8522         (is_regular_file): Move to "common/common-utils.c".
8523
8524 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
8525
8526         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
8527         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
8528         * auto-load.c: Include "common/pathstuff.h".
8529         * common/common-def.h (current_directory): Move here.
8530         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
8531         function.
8532         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
8533         prototype.
8534         * common/pathstuff.c: New file.
8535         * common/pathstuff.h: New file.
8536         * compile/compile.c: Include "common/pathstuff.h".
8537         * defs.h (current_directory): Move to "common/common-defs.h".
8538         * dwarf2read.c: Include "common/pathstuff.h".
8539         * exec.c: Likewise.
8540         * guile/scm-safe-call.c: Likewise.
8541         * linux-thread-db.c: Likewise.
8542         * main.c: Likewise.
8543         * nto-tdep.c: Likewise.
8544         * objfiles.c: Likewise.
8545         * source.c: Likewise.
8546         * symtab.c: Likewise.
8547         * utils.c: Include "common/pathstuff.h".
8548         (gdb_realpath): Move to "common/pathstuff.c".
8549         (gdb_realpath_keepfile): Likewise.
8550         (gdb_abspath): Likewise.
8551         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
8552         (gdb_realpath_keepfile): Likewise.
8553         (gdb_abspath): Likewise.
8554
8555 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
8556
8557         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
8558         wildcard process pid for super_resume for kernels with a
8559         specific bug.
8560
8561 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
8562
8563         * compile/compile.c (get_args): Add additional comments
8564         explaining function.
8565
8566 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
8567             Tom Tromey  <tom@tromey.com>
8568
8569         * target.h (memory_write_request_s): Remove typedef.  Don't define
8570         VEC.
8571         (target_write_memory_blocks): Change argument to std::vector.
8572         (struct memory_write_request): Add constructor.
8573         * target-memory.c (compare_block_starting_address): Return bool.
8574         Change argument types.
8575         (claim_memory): Change arguments to use std::vector.
8576         (split_regular_and_flash_blocks, blocks_to_erase)
8577         (compute_garbled_blocks): Likewise.
8578         (cleanup_request_data, cleanup_write_requests_vector): Remove.
8579         (target_write_memory_blocks): Change argument to std::vector.
8580         * symfile.c (struct load_section_data): Add constructor and
8581         destructor.  Use std::vector for "requests".
8582         (struct load_progress_data): Add initializers.
8583         (load_section_callback): Update.  Use "new".
8584         (clear_memory_write_data): Remove.
8585         (generic_load): Update.
8586
8587 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
8588
8589         * arch/aarch64.h: Use common/tdesc.h.
8590
8591 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
8592
8593         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
8594         architecture with a 64-bit ABI.
8595
8596 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
8597
8598         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
8599         ahead of target description loading.
8600
8601 2018-02-26  Tom Tromey  <tom@tromey.com>
8602
8603         * stack.c (backtrace_command_1): Update.
8604         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
8605         of "flags".
8606         * python/py-framefilter.c (py_print_frame)
8607         (gdbpy_apply_frame_filter): Change type of "flags".
8608         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
8609         of "flags".
8610         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
8611         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
8612         * extension.h (enum frame_filter_flag): Rename from
8613         frame_filter_flags.
8614         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
8615         (apply_ext_lang_frame_filter): Change type of "flags".
8616         * extension.c (apply_ext_lang_frame_filter): Change type of
8617         "flags".
8618         * extension-priv.h (struct extension_language_ops)
8619         <apply_frame_filter>: Change type of "flags".
8620
8621 2018-02-26  Tom Tromey  <tom@tromey.com>
8622
8623         PR python/16497:
8624         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
8625         off-by-one in py_end computation.
8626         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
8627         PRINT_MORE_FRAMES.
8628         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
8629         constant.
8630
8631 2018-02-26  Tom Tromey  <tom@tromey.com>
8632
8633         * dwarf2read.c (struct variant_field): New.
8634         (struct nextfield) <variant>: New field.
8635         (dwarf2_add_field): Handle DW_TAG_variant_part.
8636         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
8637         discriminated union.
8638         (read_structure_type): Handle DW_TAG_variant_part.
8639         (handle_struct_member_die): New function, extracted from
8640         process_structure_scope.  Handle DW_TAG_variant.
8641         (process_structure_scope): Handle discriminated unions.  Call
8642         handle_struct_member_die.
8643
8644 2018-02-26  Tom Tromey  <tom@tromey.com>
8645
8646         * rust-lang.h (rust_last_path_segment): Declare.
8647         * rust-lang.c (rust_last_path_segment): Now public.  Change
8648         contract.
8649         (struct disr_info): Remove.
8650         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
8651         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
8652         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
8653         (rust_enum_p, rust_enum_variant): New function.
8654         (rust_underscore_fields): Remove "offset" parameter.
8655         (rust_print_enum): New function.
8656         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
8657         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
8658         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
8659         enums.
8660         (rust_internal_print_type): New function, from rust_print_type.
8661         Remove enum code.
8662         (rust_print_type): Call rust_internal_print_type.
8663         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
8664         Update enum handling.
8665         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
8666         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
8667         (rust_union_quirks): New functions.
8668         (process_full_comp_unit, process_full_type_unit): Call
8669         rust_union_quirks.
8670         (process_structure_scope): Update rust_unions if necessary.
8671
8672 2018-02-26  Tom Tromey  <tom@tromey.com>
8673
8674         * value.h (value_union_variant): Declare.
8675         * valops.c (value_union_variant): New function.
8676         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
8677         (struct discriminant_info): New.
8678         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
8679         enumerator.
8680         (struct main_type) <flag_discriminated_union>: New field.
8681
8682 2018-02-26  Tom Tromey  <tom@tromey.com>
8683
8684         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8685         unittests/unpack-selftests.c.
8686         * unittests/unpack-selftests.c: New file.
8687         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
8688
8689 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8690
8691         * dwarf2read.c (struct partial_die_info) <read>: New method.
8692         (read_partial_die): Remove the declaration.
8693         (load_partial_dies): Update.
8694         (partial_die_info::partial_die_info):
8695         (read_partial_die): Change it to partial_die_info::read.
8696
8697 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8698
8699         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
8700         (fixup_partial_die): Remove declaration.
8701         (scan_partial_symbols): Update.
8702         (partial_die_parent_scope): Likewise.
8703         (partial_die_full_name): Likewise.
8704         (fixup_partial_die): Change it to partial_die_info::fixup.
8705
8706 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8707
8708         * dwarf2read.c (read_partial_die): Update the declaration.
8709         (load_partial_dies): Caller update.
8710         (read_partial_die): Remove one argument abbrev_len.
8711
8712 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8713
8714         * dwarf2read.c (struct partial_die_info): Add ctor, delete
8715         assignment operator.
8716         (load_partial_dies): Use ctor and copy ctor.
8717         (read_partial_die): Update.
8718         (dwarf2_cu::find_partial_die): Use ctor.
8719
8720 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8721
8722         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
8723         (find_partial_die_in_comp_unit): Change it to
8724         dwarf2_cu::find_partial_die.
8725         (find_partial_die): Update.
8726
8727 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8728
8729         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
8730         is NULL.
8731
8732 2018-02-26  Yao Qi  <yao.qi@linaro.org>
8733
8734         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
8735
8736 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
8737
8738         * arch/amd64.h: Use common/tdesc.h.
8739         * arch/i386.c: Likewise.
8740         * arch/i386.h: Likewise.
8741         * arch/tic6x.c: Likewise.
8742         * arch/tdesc.h: Move file from here...
8743         * common/tdesc.h: ...to here.
8744         * features/aarch64-core.c: Regenerate.
8745         * features/aarch64-fpu.c: Regenerate.
8746         * features/i386/32bit-avx.c: Regenerate.
8747         * features/i386/32bit-avx512.c: Regenerate.
8748         * features/i386/32bit-core.c: Regenerate.
8749         * features/i386/32bit-linux.c: Regenerate.
8750         * features/i386/32bit-mpx.c: Regenerate.
8751         * features/i386/32bit-pkeys.c: Regenerate.
8752         * features/i386/32bit-sse.c: Regenerate.
8753         * features/i386/64bit-avx.c: Regenerate.
8754         * features/i386/64bit-avx512.c: Regenerate.
8755         * features/i386/64bit-core.c: Regenerate.
8756         * features/i386/64bit-linux.c: Regenerate.
8757         * features/i386/64bit-mpx.c: Regenerate.
8758         * features/i386/64bit-pkeys.c: Regenerate.
8759         * features/i386/64bit-segments.c: Regenerate.
8760         * features/i386/64bit-sse.c: Regenerate.
8761         * features/i386/x32-core.c: Regenerate.
8762         * features/tic6x-c6xp.c: Regenerate.
8763         * features/tic6x-core.c: Regenerate.
8764         * features/tic6x-gp.c: Regenerate.
8765         * target-descriptions.c: Use common/tdesc.h.
8766         * target-descriptions.h: Likewise.
8767
8768 2018-02-24  Tom Tromey  <tom@tromey.com>
8769
8770         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
8771         (try_thread_db_load_from_dir, thread_db_load_search): Use
8772         std::string.
8773         (info_auto_load_libthread_db_compare): Return bool.  Change
8774         argument types.
8775         (info_auto_load_libthread_db): Use std::vector, std::string.
8776         Remove cleanups.
8777
8778 2018-02-24  Tom Tromey  <tom@tromey.com>
8779
8780         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
8781         std::string.
8782         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
8783         std::string*.
8784         * gdbarch.c: Rebuild.
8785         * gdbarch.h: Rebuild.
8786         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
8787         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
8788         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
8789         std::string*.
8790
8791 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
8792
8793         * gdbtypes.h (sect_offset): Change type to uint64_t.
8794         (sect_offset_str): New function.
8795         * dwarf2read.c (create_addrmap_from_aranges): Use
8796         sect_offset_str.
8797         (error_check_comp_unit_head): Likewise.
8798         (create_debug_type_hash_table): Likewise.
8799         (read_cutu_die_from_dwo): Likewise.
8800         (init_cutu_and_read_dies): Likewise.
8801         (init_cutu_and_read_dies_no_follow): Likewise.
8802         (process_psymtab_comp_unit_reader): Likewise.
8803         (partial_die_parent_scope): Likewise.
8804         (peek_die_abbrev): Likewise.
8805         (process_queue): Likewise.
8806         (dwarf2_physname): Likewise.
8807         (read_namespace_alias): Likewise.
8808         (read_import_statement): Likewise.
8809         (create_dwo_cu_reader): Likewise.
8810         (create_cus_hash_table): Likewise.
8811         (lookup_dwo_cutu): Likewise.
8812         (inherit_abstract_dies): Likewise.
8813         (read_func_scope): Likewise.
8814         (read_call_site_scope): Likewise.
8815         (dwarf2_add_member_fn): Likewise.
8816         (read_common_block): Likewise.
8817         (read_module_type): Likewise.
8818         (read_typedef): Likewise.
8819         (read_subrange_type): Likewise.
8820         (load_partial_dies): Likewise.
8821         (read_partial_die): Likewise.
8822         (find_partial_die): Likewise.
8823         (read_str_index): Likewise.
8824         (dwarf2_string_attr): Likewise.
8825         (build_error_marker_type): Likewise.
8826         (lookup_die_type): Likewise.
8827         (dump_die_shallow): Likewise.
8828         (follow_die_ref): Likewise.
8829         (dwarf2_fetch_die_loc_sect_off): Likewise.
8830         (dwarf2_fetch_constant_bytes): Likewise.
8831         (follow_die_sig): Likewise.
8832         (get_signatured_type): Likewise.
8833         (get_DW_AT_signature_type): Likewise.
8834         (dwarf2_find_containing_comp_unit): Likewise.
8835         (set_die_type): Likewise.
8836
8837 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
8838
8839         * arch/aarch64.c: Include "common-defs.h".
8840         * arch/amd64.c: Likewise.
8841         * arch/i386.c: Likewise.
8842
8843 2018-02-21  Tom Tromey  <tom@tromey.com>
8844
8845         * value.h: (extract_field_op): Update.
8846         * eval.c (extract_field_op): Return a const char *.
8847         * expression.h (parse_expression_for_completion): Update.
8848         * completer.c (complete_expression): Update.
8849         (add_struct_fields): Make fieldname const.
8850         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8851         (mark_completion_tag, parse_exp_in_context_1): Update.
8852         (parse_expression_for_completion): Change "name" to
8853         unique_xmalloc_ptr*.
8854
8855 2018-02-21  Tom Tromey  <tom@tromey.com>
8856
8857         * infcall.c (call_function_by_hand_dummy): Use std::vector.
8858
8859 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8860
8861         * avr-tdep.c (avr_read_pc): Change parameter type to
8862         readable_regcache.
8863         * gdbarch.sh (read_pc): Likewise.
8864         * gdbarch.c: Re-generated.
8865         * gdbarch.h: Re-generated.
8866         * hppa-tdep.c (hppa_read_pc): Change parameter type to
8867         readable_regcache.
8868         * ia64-tdep.c (ia64_read_pc): Likewise.
8869         * mips-tdep.c (mips_read_pc): Likewise.
8870         * spu-tdep.c (spu_read_pc): Likewise.
8871
8872 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8873
8874         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8875         * regcache-dump.c: New file.
8876         * regcache.c: Move register_dump to regcache-dump.c.
8877         (maintenance_print_registers): Likewise.
8878         (maintenance_print_raw_registers): Likewise.
8879         (maintenance_print_cooked_registers): Likewise.
8880         (maintenance_print_register_groups): Likewise.
8881         (maintenance_print_remote_registers): Likewise.
8882         (_initialize_regcache): Likewise.
8883         * regcache.h (register_dump): Moved from regcache.c.
8884
8885 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8886
8887         * regcache.c (regcache::regcache): Update.
8888         (regcache::invalidate): Move it to detached_regcache::invalidate.
8889         (get_thread_arch_aspace_regcache): Update.
8890         (regcache::raw_update): Update.
8891         (regcache::cooked_read): Remove some code.
8892         (regcache::cooked_read_value): Likewise.
8893         (regcache::raw_write): Remove assert on m_readonly_p.
8894         (regcache::raw_supply_integer): Move it to
8895         detached_regcache::raw_supply_integer.
8896         (regcache::raw_supply_zeroed): Likewise.
8897         * regcache.h (detached_regcache) <raw_supply_integer>: New
8898         declaration.
8899         <raw_supply_zeroed, invalidate>: Likewise.
8900         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8901         <invalidate>: Likewise.
8902         <m_readonly_p>: Removed.
8903
8904 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8905
8906         * infcmd.c (get_return_value): Let stop_regs point to
8907         get_current_regcache.
8908         * regcache.c (regcache::regcache): Remove.
8909         (register_dump_reg_buffer): New class.
8910         (regcache_print): Adjust.
8911         * regcache.h (regcache): Remove constructors.
8912
8913 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8914
8915         * regcache.c (class register_dump): New class.
8916         (register_dump_regcache, register_dump_none): New class.
8917         (register_dump_remote, register_dump_groups): New class.
8918         (regcache_print): Update.
8919         * regcache.h (regcache_dump_what): Move it to regcache.c.
8920         (regcache) <dump>: Remove.
8921
8922 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8923
8924         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8925          reg_buffer_rw *.
8926         (jit_unwind_reg_set_impl): Call raw_supply.
8927         (jit_frame_sniffer): Use reg_buffer_rw.
8928         * record-full.c (record_full_core_regbuf): Change its type.
8929         (record_full_core_open_1): Use reg_buffer_rw.
8930         (record_full_close): Likewise.
8931         (record_full_core_fetch_registers): Use regcache->raw_supply.
8932         (record_full_core_store_registers): Likewise.
8933         * regcache.c (regcache::get_register_status): Move it to
8934         reg_buffer.
8935         (regcache_raw_set_cached_value): Remove.
8936         (regcache::raw_set_cached_value): Remove.
8937         (regcache::raw_write): Call raw_supply.
8938         (regcache::raw_supply): Move it to reg_buffer_rw.
8939         * regcache.h (regcache_raw_set_cached_value): Remove.
8940         (reg_buffer_rw): New class.
8941
8942 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8943
8944         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8945         readonly_detached_regcache.
8946         (dummy_frame_prev_register): Use regcache->cooked_read.
8947         * frame.c (frame_save_as_regcache): Change return type.
8948         (frame_pop): Update.
8949         * frame.h (frame_save_as_regcache): Update declaration.
8950         * inferior.h (get_infcall_suspend_state_regcache): Update
8951         declaration.
8952         * infrun.c (infcall_suspend_state) <registers>: use
8953         readonly_detached_regcache.
8954         (save_infcall_suspend_state): Don't use regcache_dup.
8955         (get_infcall_suspend_state_regcache): Change return type.
8956         * linux-fork.c (struct fork_info) <savedregs>: Change to
8957         readonly_detached_regcache.
8958         <pc>: New field.
8959         (fork_save_infrun_state): Don't use regcache_dup.
8960         (info_checkpoints_command): Adjust.
8961         * mi/mi-main.c (register_changed_p): Update declaration.
8962         (mi_cmd_data_list_changed_registers): Use
8963         readonly_detached_regcache.
8964         (register_changed_p): Change parameter type to
8965         readonly_detached_regcache.
8966         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8967         readonly_detached_regcache.
8968         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8969         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8970         New.
8971         (regcache::save): Move it to reg_buffer.
8972         (regcache::restore): Change parameter type.
8973         (regcache_dup): Remove.
8974         * regcache.h (reg_buffer) <save>: New method.
8975         (readonly_detached_regcache): New class.
8976         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8977         readonly_detached_regcache.
8978         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8979
8980 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8981
8982         * frame.c (frame_save_as_regcache): Use regcache method save.
8983         (frame_pop): Use regcache method restore.
8984         * infrun.c (restore_infcall_suspend_state): Likewise.
8985         * linux-fork.c (fork_load_infrun_state): Likewise.
8986         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8987         save.
8988         * regcache.c (regcache_save): Remove.
8989         (regcache::restore): More asserts.
8990         (regcache_cpy): Remove.
8991         * regcache.h (regcache_save): Remove the declaration.
8992         (regcache::restore): Move from private to public.
8993         Remove the friend declaration of regcache_cpy.
8994         (regcache_cpy): Remove declaration.
8995
8996 2018-02-21  Yao Qi  <yao.qi@linaro.org>
8997
8998         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8999         parameter type to 'readable_regcache *'.
9000         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9001         * arm-tdep.c (arm_neon_quad_read): Likewise.
9002         (arm_pseudo_read): Likewise.
9003         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9004         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9005         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9006         * gdbarch.c: Re-generated.
9007         * gdbarch.h: Re-generated.
9008         * gdbarch.sh (pseudo_register_read): Change parameter type to
9009         'readable_regcache *'.
9010         (pseudo_register_read_value): Likewise.
9011         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9012         (h8300_pseudo_register_read): Likewise.
9013         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9014         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9015         (i386_pseudo_register_read_into_value): Likewise.
9016         (i386_pseudo_register_read_value): Likewise.
9017         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9018         declaration.
9019         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9020         * m32c-tdep.c (m32c_raw_read): Likewise.
9021         (m32c_read_flg): Likewise.
9022         (m32c_banked_register): Likewise.
9023         (m32c_banked_read): Likewise.
9024         (m32c_sb_read): Likewise.
9025         (m32c_part_read): Likewise.
9026         (m32c_cat_read): Likewise.
9027         (m32c_r3r2r1r0_read): Likewise.
9028         (m32c_pseudo_register_read): Likewise.
9029         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9030         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9031         (mep_pseudo_cr64_read): Likewise.
9032         (mep_pseudo_register_read): Likewise.
9033         * mips-tdep.c (mips_pseudo_register_read): Likewise.
9034         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9035         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9036         * regcache.c (regcache::raw_read): Move it to readable_regcache.
9037         (regcache::cooked_read): Likewise.
9038         (regcache::cooked_read_value): Likewise.
9039         (regcache_cooked_read_signed):
9040         (regcache::cooked_read): Likewise.
9041         * regcache.h (readable_regcache): New class.
9042         (regcache): Inherit readable_regcache.  Move some methods to
9043         readable_regcache.
9044         * rl78-tdep.c (rl78_pseudo_register_read): Change
9045         parameter type to 'readable_regcache *'.
9046         * rs6000-tdep.c (do_regcache_raw_read): Remove.
9047         (e500_pseudo_register_read): Change parameter type to
9048         'readable_regcache *'.
9049         (dfp_pseudo_register_read): Likewise.
9050         (vsx_pseudo_register_read): Likewise.
9051         (efpr_pseudo_register_read): Likewise.
9052         * s390-tdep.c (s390_pseudo_register_read): Likewise.
9053         * sh-tdep.c (sh_pseudo_register_read): Likewise.
9054         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9055         (sh64_pseudo_register_read): Likewise.
9056         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9057         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9058         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9059         (spu_pseudo_register_read): Likewise.
9060         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9061         (xtensa_pseudo_register_read): Likewise.
9062
9063 2018-02-21  Yao Qi  <yao.qi@linaro.org>
9064
9065         * regcache.c (regcache::regcache): Call reg_buffer ctor.
9066         (regcache::arch): Move it to reg_buffer::arch.
9067         (regcache::register_buffer): Likewise.
9068         (regcache::assert_regnum): Likewise.
9069         (regcache::num_raw_registers): Likewise.
9070         * regcache.h (reg_buffer): New class.
9071         (regcache): Inherit reg_buffer.
9072
9073 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
9074
9075         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9076         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9077
9078 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
9079
9080         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9081
9082 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
9083
9084         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9085         (SFILES): Remove common/*.c files.
9086         (COMMON_OBS): Remove some *.o files built from common/*.c files.
9087         * common/common.host: Add common reference.
9088         * configure.ac: Likewise.
9089         * configure: Regenerate.
9090
9091 2018-02-16  Yao Qi  <yao.qi@linaro.org>
9092
9093         * block.c (block_namespace_info): Inherit allocate_on_obstack.
9094         (block_initialize_namespace): Use new.
9095         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9096         (dwarf2_free_objfile): Use delete.
9097         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9098         (copy_type_recursive): Use new.
9099         * gdb_obstack.h (allocate_on_obstack): New.
9100
9101 2018-02-15  Yao Qi  <yao.qi@linaro.org>
9102
9103         PR gdb/22849
9104         * inferior.c (exit_inferior_1): Reset inf->control.
9105
9106 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
9107
9108         * ada-lang.c (ada_to_fixed_value_create): Delete advance
9109         declaration.
9110
9111 2018-02-14  Pedro Alves  <palves@redhat.com>
9112
9113         * frame-unwind.c (frame_unwind_try_unwinder): Always call
9114         frame_cleanup_after_sniffer on exception.
9115
9116 2018-02-14  Tom Tromey  <tom@tromey.com>
9117
9118         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9119         const.
9120         (solib_bfd_open): Make pathname const.
9121         * solib.c (solib_bfd_open): Make pathname const.
9122         * solib-spu.c (spu_bfd_fopen): Make name const.
9123         (spu_bfd_open): Make pathname const.
9124         * solib-darwin.c (darwin_bfd_open): Make pathname const.
9125         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9126
9127 2018-02-14  Tom Tromey  <tom@tromey.com>
9128
9129         * symfile.c (symfile_bfd_open): Update.
9130         * source.h (openp, source_full_path_of, find_and_open_source):
9131         Change argument type to unique_xmalloc_ptr.
9132         * source.c (openp): Take a unique_xmalloc_ptr.
9133         (source_full_path_of, find_and_open_source): Likewise.
9134         (open_source_file, symtab_to_fullname): Update.
9135         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9136         unique_xmalloc_ptr.
9137         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9138         (exec_file_find): Update.
9139         * psymtab.c (psymtab_to_fullname): Update.
9140         * nto-tdep.h (nto_find_and_open_solib): Update.
9141         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9142         unique_xmalloc_ptr.
9143         * exec.c (exec_file_attach): Update.
9144         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9145         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9146
9147 2018-02-14  Tom Tromey  <tom@tromey.com>
9148
9149         * solib.c: Include source.h.
9150         * nto-tdep.c: Include source.h.
9151         * mi/mi-cmd-env.c: Include source.h.
9152         * infcmd.c: Include source.h.
9153         * exec.c: Include source.h.
9154         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9155         (add_path, directory_switch, source_path, init_source_path): Move
9156         declarations...
9157         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9158         (add_path, directory_switch, source_path, init_source_path):
9159         ...here.
9160
9161 2018-02-14  Tom Tromey  <tom@tromey.com>
9162
9163         * solist.h (exec_file_find, solib_find): Return
9164         unique_xmalloc_ptr.
9165         (solib_bfd_fopen): Take a const char *.
9166         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9167         (exec_file_find, solib_find): Likewise.
9168         (solib_bfd_fopen): Do not take ownership of "pathname".
9169         (solib_bfd_open): Use unique_xmalloc_ptr.
9170         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9171         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9172         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9173         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9174
9175 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
9176
9177         * ada-lang.c (name_match_type_from_name): Remove reference to
9178         ada_name_for_lookup in function's documentation.
9179         * ada-lang.h (ada_name_for_lookup): Delete declaration.
9180
9181 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9182
9183         * defs.h (enum openp_flags): New enum.
9184         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9185         Move to enum openp_flags.
9186         (openp_flags): New enum flags.
9187         (openp): Change parameter type to openp_flags.
9188         * source.c (openp): Change parameter type to openp_flags.
9189         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9190         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9191
9192 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
9193
9194         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9195         per-command.
9196
9197 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9198
9199         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9200         into...
9201         (class dwarf2_queue_guard): ...the destructor of this new class.
9202         (dw2_do_instantiate_symtab): Create instance of the new class
9203         dwarf2_queue_guard, remove cleanup.
9204
9205 2018-02-09  Tom Tromey  <tom@tromey.com>
9206
9207         * source.c (find_source_lines): Don't reference past the end of
9208         the vector.
9209
9210 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9211
9212         * remote.c (remote_btrace_maybe_reopen): Change error message.
9213         * btrace.c (btrace_enable): Likewise.
9214         (parse_xml_btrace): Likewise.
9215         (parse_xml_btrace_conf): Likewise.
9216
9217 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9218
9219         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9220         (linux_enable_pt, linux_enable_bts): Call
9221         diagnose_perf_event_open_fail.
9222
9223 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9224
9225         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9226         Remove parameter and change return type.  Update callers.  Move it.
9227         (linux_enable_bts, linux_enable_pt): Improve error message.
9228         (linux_enable_pt): Remove zero buffer size check.
9229         (linux_enable_btrace): Improve error messages.  Remove NULL return
9230         check.
9231
9232 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9233
9234         * btrace.c (btrace_enable): Remove target_supports_btrace call.
9235         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9236         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9237         (linux_supports_pt, linux_supports_btrace): Remove.
9238         (linux_enable_bts): Call cpu_supports_bts.
9239         * nat/linux-btrace.h (linux_supports_btrace): Remove.
9240         * remote.c (remote_supports_btrace): Remove.
9241         (init_remote_ops): Remove remote_supports_btrace.
9242         * target-delegates.c: Regenerated.
9243         * target.c (target_supports_btrace): Remove.
9244         * target.h (target_ops) <to_supports_btrace>: Remove
9245         (target_supports_btrace): Remove.
9246         * x86-linux-nat.c (x86_linux_create_target): Remove
9247         linux_supports_btrace.
9248
9249 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9250
9251         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9252         btrace failed.
9253         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9254         exception and use message in own exception.
9255
9256 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9257
9258         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9259         (perf_event_pt_event_type): Use gdb_file_up.
9260         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9261         scoped_fd, and scoped_mmap.
9262
9263 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9264
9265         * common/scoped_mmap.h: New.
9266         * unittests/scoped_mmap-selftest.c: New.
9267         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9268         unittests/scoped_mmap-selftest.c.
9269
9270 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9271
9272         * common/scoped_fd.h: New.
9273         * unittests/scoped_fd-selftest.c: New.
9274         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9275         unittests/scoped_fd-selftest.c.
9276
9277 2018-02-09  Tom Tromey  <tom@tromey.com>
9278
9279         * auto-load.c (auto_load_section_scripts): Use
9280         gdb::unique_xmalloc_ptr.
9281
9282 2018-02-09  Tom Tromey  <tom@tromey.com>
9283
9284         * auto-load.c (execute_script_contents): Use std::string.
9285
9286 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
9287
9288         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9289         Python function, rather than a new command.
9290
9291 2018-02-08  Tom Tromey  <tom@tromey.com>
9292
9293         * solib.c (solib_find_1): Use std::string.
9294         (solib_bfd_fopen): Use unique_xmalloc_ptr.
9295
9296 2018-02-08  Tom Tromey  <tom@tromey.com>
9297
9298         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9299
9300 2018-02-08  Tom Tromey  <tom@tromey.com>
9301
9302         * source.c (find_source_lines): Use gdb::def_vector.
9303
9304 2018-02-08  Tom Tromey  <tom@tromey.com>
9305
9306         * macrocmd.c (struct temporary_macro_definition): New.
9307         (macro_define_command): Use temporary_macro_definition.  Remove
9308         cleanups.
9309         (free_macro_definition_ptr): Remove.
9310
9311 2018-02-08  Tom Tromey  <tom@tromey.com>
9312
9313         * macroexp.c (maybe_expand): Use std::string.
9314
9315 2018-02-08  Tom Tromey  <tom@tromey.com>
9316
9317         * macroexp.c (struct macro_buffer): Add initializers for some
9318         members.
9319         (init_buffer, init_shared_buffer, free_buffer)
9320         (free_buffer_return_text): Remove.
9321         (macro_buffer): New constructors.
9322         (~macro_buffer): New destructor.
9323         (macro_buffer::set_shared): New method.
9324         (macro_buffer::resize_buffer, macro_buffer::appendc)
9325         (macro_buffer::appendmem): Now methods, not free functions.
9326         (set_token, append_tokens_without_splicing, stringify)
9327         (macro_stringify): Update.
9328         (gather_arguments): Change return type.  Remove argc_p argument,
9329         add args_ptr argument.  Use std::vector.
9330         (substitute_args): Remove argc argument.  Accept std::vector.
9331         (expand): Update.  Use std::vector.
9332         (scan, macro_expand, macro_expand_next): Update.
9333
9334 2018-02-08  Tom Tromey  <tom@tromey.com>
9335
9336         * symtab.c (default_collect_symbol_completion_matches_break_on):
9337         Use unique_xmalloc_ptr.
9338         * macroscope.h: (sal_macro_scope, user_macro_scope)
9339         (default_macro_scope): Return unique_xmalloc_ptr.
9340         * macroscope.c (sal_macro_scope, user_macro_scope)
9341         (default_macro_scope): Return unique_xmalloc_ptr.
9342         * macroexp.h (macro_expand, macro_expand_once): Return
9343         unique_xmalloc_ptr.
9344         * macroexp.c (macro_expand, macro_expand_once): Return
9345         unique_xmalloc_ptr.
9346         * macrocmd.c (macro_expand_command, macro_expand_once_command)
9347         (info_macro_command, info_macros_command): Use
9348         unique_xmalloc_ptr.
9349         * compile/compile-c-support.c (write_macro_definitions): Use
9350         unique_xmalloc_ptr.
9351         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9352
9353 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
9354
9355         * value.c (value_static_field): Assign field type instead of
9356         containing type when returning an optimized out value.
9357
9358 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9359
9360         * ft32-tdep.c (ft32_read_pc): Remove.
9361         (ft32_write_pc): Remove.
9362         (ft32_gdbarch_init): Update.
9363         * m32r-tdep.c (m32r_read_pc): Remove.
9364         (m32r_gdbarch_init): Update.
9365         * mep-tdep.c (mep_read_pc): Remove.
9366         (mep_gdbarch_init): Update.
9367         * microblaze-tdep.c (microblaze_write_pc): Remove.
9368         (microblaze_gdbarch_init): Update.
9369         * mn10300-tdep.c (mn10300_read_pc): Remove.
9370         (mn10300_write_pc): Remove.
9371         (mn10300_gdbarch_init): Update.
9372         * moxie-tdep.c (moxie_read_pc): Remove.
9373         (moxie_write_pc): Remove.
9374         (moxie_gdbarch_init): Update.
9375
9376 2018-02-06  Yao Qi  <yao.qi@linaro.org>
9377
9378         * expprint.c (print_subexp_standard): Handle
9379         OP_F77_UNDETERMINED_ARGLIST.
9380         (dump_subexp_body_standard): Likewise.
9381
9382 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
9383
9384         * target-descriptions.c (tdesc_element_visitor) Add empty
9385         implementations.
9386         (tdesc_type): Move make_gdb_type from here.
9387         (tdesc_type_builtin): Likewise.
9388         (tdesc_type_vector): Likewise.
9389         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9390         (make_gdb_type_struct): Move from tdesc_type_with_fields.
9391         (make_gdb_type_union): Likewise.
9392         (make_gdb_type_flags): Likewise.
9393         (make_gdb_type_enum): Likewise.
9394         (make_gdb_type): New function.
9395         (tdesc_register_type): Use static make_gdb_type.
9396
9397 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
9398
9399         * infcmd.c (default_print_one_register_info): Align natural-format
9400         column values consistently one under another.
9401         (pad_to_column): New function.
9402
9403 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
9404
9405         * dwarf2read.c (dwarf2_physname): Move commment.
9406
9407 2018-02-01  Leszek Swirski  <leszeks@google.com>
9408
9409         * varobj.c (varobj_formatted_print_options): Allow recursive
9410         pretty printing if pretty printing is enabled.
9411
9412 2018-02-01  Leszek Swirski  <leszeks@google.com>
9413
9414         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9415         names after a structop as a filename.
9416
9417 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9418
9419         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9420         (arm_record_coproc_data_proc): Likewise.
9421
9422 2018-02-01  Yao Qi  <yao.qi@linaro.org>
9423
9424         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9425
9426 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
9427
9428         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9429         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9430
9431 2018-01-31  Pedro Alves  <palves@redhat.com>
9432
9433         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9434         * inflow.c (child_terminal_save_inferior): Wrap reference to
9435         tcgetpgrp in HAVE_TERMIOS_H.
9436         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9437         _WIN32.
9438         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9439         always iterate over all inferiors.
9440         (gdbsim_cntrl_c): Adjust.
9441         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9442
9443 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9444
9445         * gdbtypes.c (lookup_array_range_type): Make sure the array's
9446         index type is objfile-owned if the element type is as well.
9447
9448 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
9449
9450         GDB 8.1 released.
9451
9452 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9453
9454         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9455         "features/s390x-linux64.c".
9456         (_initialize_s390_linux_tdep): Remove initialization of tdescs
9457         s390_linux32 and s390x_linux64.
9458         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9459         default tdesc.
9460         * s390-tdep.c: Include "features/s390-linux32.c" and
9461         "features/s390x-linux64.c".
9462         (s390_tdesc_valid): Add check for tdesc_has_registers.
9463         (s390_gdbarch_init): Make sure there is always a valid tdesc.
9464         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9465         tdesc_s390x_linux64.
9466         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9467         tdesc_s390x_linux64 to...
9468         * s390-tdep.h: ...here.
9469
9470 2018-01-30  Pedro Alves  <palves@redhat.com>
9471
9472         PR gdb/13211
9473         * config.in, configure: Regenerate.
9474         * configure.ac: Check for getpgid.
9475         * go32-nat.c (go32_pass_ctrlc): New.
9476         (go32_target): Install it.
9477         * inf-child.c (inf_child_target): Install
9478         child_terminal_save_inferior, child_pass_ctrlc and
9479         child_interrupt.
9480         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9481         (inf_ptrace_target): No longer install it.
9482         * infcmd.c (interrupt_target_1): Adjust.
9483         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9484         (child_interrupt): Declare.
9485         (inferior::terminal_state): New.
9486         * inflow.c (struct terminal_info): Update comments.
9487         (inferior_process_group): Delete.
9488         (terminal_is_ours): Delete.
9489         (gdb_tty_state): New.
9490         (child_terminal_init): Adjust.
9491         (is_gdb_terminal, sharing_input_terminal_1)
9492         (sharing_input_terminal): New functions.
9493         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
9494         Set the process's actual process group in the foreground if
9495         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
9496         mark terminal as the inferior's if not sharing GDB's terminal.
9497         Don't check attach_flag.
9498         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9499         pass down a target_terminal_state.
9500         (child_terminal_save_inferior): New, factored out from ...
9501         (child_terminal_ours_1): ... this.  Handle
9502         target_terminal_state::is_ours_for_output.
9503         (child_interrupt, child_pass_ctrlc): New.
9504         (inflow_inferior_exit): Clear the inferior's terminal_state.
9505         (copy_terminal_info): Copy the inferior's terminal state.
9506         (_initialize_inflow): Remove reference to terminal_is_ours.
9507         * inflow.h (inferior_process_group): Delete.
9508         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9509         * procfs.c (procfs_target): Don't install procfs_interrupt.
9510         (procfs_interrupt): Delete.
9511         * remote.c (remote_serial_quit_handler): Adjust.
9512         (remote_interrupt): Remove ptid parameter.  Adjust.
9513         * target-delegates.c: Regenerate.
9514         * target.c: Include "terminal.h".
9515         (target_terminal::terminal_state): Rename to ...
9516         (target_terminal::m_terminal_state): ... this.
9517         (target_terminal::init): Adjust.
9518         (target_terminal::inferior): Adjust to per-inferior
9519         terminal_state.
9520         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
9521         (target_terminal::ours, target_terminal::ours_for_output): Use
9522         target_terminal_is_ours_kind.
9523         (target_interrupt): Remove ptid parameter.  Adjust.
9524         (default_target_pass_ctrlc): Adjust.
9525         * target.h (target_ops::to_terminal_save_inferior): New field.
9526         (target_ops::to_interrupt): Remove ptid_t parameter.
9527         (target_interrupt): Remove ptid_t parameter.  Update comment.
9528         (target_pass_ctrlc): Update comment.
9529         * target/target.h (target_terminal_state): New scoped enum,
9530         factored out of ...
9531         (target_terminal::terminal_state): ... here.
9532         (target_terminal::inferior): Update comments.
9533         (target_terminal::restore_inferior): New.
9534         (target_terminal::is_inferior, target_terminal::is_ours)
9535         (target_terminal::is_ours_for_output): Adjust.
9536         (target_terminal::scoped_restore_terminal_state): Adjust to
9537         rename, and call restore_inferior() instead of inferior().
9538         (target_terminal::scoped_restore_terminal_state::m_state): Change
9539         type.
9540         (target_terminal::terminal_state): Rename to ...
9541         (target_terminal::m_terminal_state): ... this and change type.
9542
9543 2018-01-30  Pedro Alves  <palves@redhat.com>
9544
9545         * linux-nat.c (wait_for_signal): New function.
9546         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
9547         directly.
9548         (async_terminal_is_ours)
9549         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
9550         (linux_nat_add_target): Don't override
9551         to_terminal_inferior/to_terminal_ours.
9552
9553 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
9554
9555         * remote.c (remote_follow_fork): Don't call "detach_inferior".
9556
9557 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
9558
9559         * dwarf2read.c (free_dwo_files): Add forward-declaration.
9560         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
9561         dwarf2_per_objfile_free here.
9562         (dwarf2_per_objfile_free): Remove.
9563         (_initialize_dwarf2_read): Don't register
9564         dwarf2_per_objfile_free as a registry cleanup.
9565
9566 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
9567
9568         Avoid compilation errors in MinGW native builds
9569
9570         The error is triggered by including python-internal.h, and the
9571         error message is:
9572
9573              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
9574                       from build-gnulib/import/math.h:27,
9575                       from d:/usr/Python26/include/pyport.h:235,
9576                       from d:/usr/Python26/include/Python.h:58,
9577                       from python/python-internal.h:94,
9578                       from python/py-arch.c:24:
9579              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
9580         using ::hypot;
9581                 ^~~~~
9582
9583         This happens because Python headers define 'hypot' to expand t
9584         '_hypot' in the Windows builds.
9585         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
9586         'hypoth'.  This avoids a compilation error.
9587
9588 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9589
9590         * MAINTAINERS (Write After Approval): Fix ordering.
9591
9592 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
9593
9594         * MAINTAINERS (Write After Approval): Add Alan Hayward.
9595
9596 2018-01-26  Alan Modra  <amodra@gmail.com>
9597
9598         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
9599         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
9600         Remove nop.  Make const.  Comment.
9601         (powerpc32_plt_stub_so_2): New.
9602         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
9603         Correct count.  Update uses.
9604         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
9605         Move common code reading PLT entry word.  Correct
9606         powerpc32_plt_stub PLT address calculation.
9607         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
9608         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
9609         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
9610         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
9611         (ppc64_standard_linkage8): Likewise.
9612         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
9613         Correct insns description.
9614         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
9615
9616 2018-01-24  Pedro Alves  <palves@redhat.com>
9617
9618         GCC PR libstdc++/83906
9619         * gdbtypes.c (operator==(const dynamic_prop &,
9620         const dynamic_prop &)): New.
9621         (operator==(const range_bounds &, const range_bounds &)): New.
9622         (check_types_equal): Use them instead of memcmp.
9623         * gdbtypes.h (operator==(const dynamic_prop &,
9624         const dynamic_prop &)): Declare.
9625         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
9626         (operator==(const range_bounds &, const range_bounds &)): Declare.
9627         (operator!=(const range_bounds &, const range_bounds &)): Declare.
9628
9629 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9630
9631         * s390-linux-tdep.c (s390_record_address_mask)
9632         (s390_record_calc_disp_common, s390_record_calc_disp)
9633         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9634         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9635         (s390_process_record): Move to s390-tdep.c.
9636         (s390_linux_init_abi_any): Adjust.
9637         * s390-tdep.c (s390_record_address_mask)
9638         (s390_record_calc_disp_common, s390_record_calc_disp)
9639         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
9640         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
9641         (s390_process_record): Moved from s390-linux-tdep.c
9642         (s390_gdbarch_init): Adjust.
9643
9644 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9645
9646         * s390-linux-nat.c (s390-tdep.h): New include.
9647         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
9648         (HFILES_NO_SRCDIR): Add s390-tdep.h.
9649         (ALLDEPFILES): Add s390-tdep.c.
9650         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
9651         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
9652         * s390-tdep.h: ...this.  New file.
9653         * s390-linux-tdep.c (s390-tdep.h): New include.
9654         (_initialize_s390_tdep): Rename to...
9655         (_initialize_s390_linux_tdep): ...this and adjust.
9656         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
9657         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
9658         s390-tdep.h.
9659         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
9660         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
9661         (s390_is_partial_instruction, s390_software_single_step)
9662         (is_non_branch_ril, s390_displaced_step_copy_insn)
9663         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
9664         (s390_prologue_data, s390_addr, s390_store, s390_load)
9665         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
9666         (s390_register_call_saved, s390_guess_tracepoint_registers)
9667         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
9668         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
9669         (s390_pseudo_register_name, s390_pseudo_register_type)
9670         (s390_pseudo_register_read, s390_pseudo_register_write)
9671         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
9672         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
9673         (s390_addr_bits_remove, s390_address_class_type_flags)
9674         (s390_address_class_type_flags_to_name)
9675         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
9676         (s390_function_arg_float, s390_function_arg_vector)
9677         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
9678         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
9679         (s390_frame_align, s390_register_return_value, s390_return_value)
9680         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
9681         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
9682         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
9683         (s390_trad_frame_prev_register, s390_unwind_cache)
9684         (s390_prologue_frame_unwind_cache)
9685         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
9686         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
9687         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
9688         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
9689         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
9690         (s390_frame_base_address, s390_local_base_address)
9691         (s390_frame_base, s390_gcc_target_options)
9692         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
9693         (s390_validate_reg_range, s390_tdesc_valid)
9694         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
9695         * s390-tdep.c: ...this.  New file.
9696
9697 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9698
9699         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
9700         (s390_process_record, s390_gdbarch_tdep_alloc)
9701         (s390_linux_init_abi_any): Use/set new hook.
9702
9703 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9704
9705         * s390-linux-tdep.c (osabi.h): New include.
9706         (s390_linux_init_abi_31, s390_linux_init_abi_64)
9707         (s390_linux_init_abi_any): New functions.
9708         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
9709
9710 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9711
9712         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
9713         tdesc_has_registers check
9714
9715 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9716
9717         * s390-linux-tdep.c (s390_tdesc_valid): New function.
9718         (s390_validate_reg_range): New macro.
9719         (s390_gdbarch_init): Adjust.
9720
9721 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9722
9723         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
9724         (s390_gdbarch_tdep_alloc): Adjust.
9725         (s390_gdbarch_init): Adjust.
9726
9727 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9728
9729         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
9730         <have_tdb>: Change type to bool.
9731         (s390_gdbarch_tdep_alloc): Adjust.
9732         (s390_gdbarch_init): Adjust.
9733
9734 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9735
9736         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
9737         (gdbarch_tdep) <have_upper, have_vx>: New fields.
9738         (s390_gdbarch_tdep_alloc): New function.
9739         (s390_gdbarch_init): Allocate tdep at start and use its fields
9740         instead of separate variables.
9741
9742 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9743
9744         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
9745         when looking for cached gdbarch and add comment for remaining.
9746
9747 2018-01-22  Pedro Alves  <palves@redhat.com>
9748             Sergio Durigan Junior  <sergiodj@redhat.com>
9749
9750         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
9751         case.
9752
9753 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
9754
9755         * MAINTAINERS: Update my company e-mail address.
9756
9757 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9758
9759         * regcache.c (cooked_write_test): New function.
9760         (_initialize_regcache): Register the test.
9761
9762 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9763
9764         * ia64-tdep.c (ia64_pseudo_register_read): Call
9765         regcache->cooked_read instead of regcache_cooked_read_unsigned.
9766         * m32c-tdep.c (m32c_cat_read): Likewise.
9767         (m32c_r3r2r1r0_read): Likewise.
9768         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9769         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9770
9771 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9772
9773         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
9774         method raw_read instead of regcache_raw_read.
9775         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9776         * arm-tdep.c (arm_neon_quad_read): Likewise.
9777         * avr-tdep.c (avr_pseudo_register_read): Likewise.
9778         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9779         * frv-tdep.c (frv_pseudo_register_read): Likewise.
9780         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
9781         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9782         (i386_pseudo_register_read_into_value): Likewise.
9783         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9784         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9785         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9786         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
9787         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
9788         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
9789         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9790         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
9791         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
9792
9793 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9794
9795         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
9796         * configure.tgt: Remove target mt.
9797         * mt-tdep.c: Remove.
9798         * regcache.c (cooked_read_test): Remove the check for mt.
9799
9800 2018-01-22  Yao Qi  <yao.qi@linaro.org>
9801
9802         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9803         instead of gdbarch_pseudo_register_read_value.
9804
9805 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
9806
9807         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9808         language is Ada.
9809
9810 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
9811
9812         * linespec.c (create_sals_line_offset): Remove code that preserved
9813         the symtab_and_line's line number.
9814
9815 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9816
9817         * varobj.c (varobj_create): Don't set valid_block when creating a
9818         floating varobj.
9819
9820 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9821
9822         * varobj.c (varobj_create): Remove out of date comment.
9823
9824 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9825
9826         PR mi/20395
9827         * ada-exp.y (write_var_from_sym): Pass extra parameter when
9828         updating innermost block.
9829         * parse.c (innermost_block_tracker::update): Take extra type
9830         parameter, and check types match before updating innermost block.
9831         (write_dollar_variable): Update innermost block for registers.
9832         * parser-defs.h (enum innermost_block_tracker_type): New enum.
9833         (innermost_block_tracker::innermost_block_tracker): Initialise
9834         m_types member.
9835         (innermost_block_tracker::reset): Take type parameter.
9836         (innermost_block_tracker::update): Take type parameter, and pass
9837         type through as needed.
9838         (innermost_block_tracker::m_types): New member.
9839         * varobj.c (varobj_create): Pass type when reseting innermost
9840         block.
9841
9842 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9843
9844         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9845         * ada-lang.c (resolve_subexp): Likewise.
9846         * breakpoint.c (set_breakpoint_condition) Likewise.
9847         (watch_command_1) Likewise.
9848         * c-exp.y (variable): Likewise.
9849         * d-exp.y (PrimaryExpression): Likewise.
9850         * f-exp.y (variable): Likewise.
9851         * go-exp.y (variable): Likewise.
9852         * m2-exp.y (variable): Likewise.
9853         * objfiles.c (objfile::~objfile): Likewise.
9854         * p-exp.y (variable): Likewise.
9855         * parse.c (innermost_block): Change type.
9856         * parser-defs.h (class innermost_block_tracker): New.
9857         (innermost_block): Change to innermost_block_tracker.
9858         * printcmd.c (display_command): Switch to innermost_block API.
9859         (do_one_display): Likewise.
9860         * rust-exp.y (do_one_display): Likewise.
9861         * symfile.c (clear_symtab_users): Likewise.
9862         * varobj.c (varobj_create): Switch to innermost_block API, replace
9863         use of innermost_block with block stored on varobj object.
9864
9865 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
9866
9867         * expression.h (innermost_block): Remove declaration.
9868         * varobj.c: Add 'parser-defs.h' include.
9869
9870 2018-01-19  Tom Tromey  <tom@tromey.com>
9871
9872         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9873         symbols in the static and global blocks.
9874
9875 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
9876
9877         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9878         gdb_ptrace.h, and move including gdb_wait.h ...
9879         * nat/linux-ptrace.h: ... to here.
9880
9881 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
9882
9883         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9884         inf_ptrace_detach_success.
9885         (inf_ptrace_detach_success): Add inferior parameter, use it
9886         instead of inferior_ptid, pass it to detach_inferior.
9887         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9888         parameter.
9889         * inferior.c (detach_inferior): Add overload that takes an
9890         inferior object.
9891         * inferior.h (detach_inferior): Likewise.
9892         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9893         use inferior_ptid, adjust call to inf_ptrace_detach_success.
9894         * linux-thread-db.c (thread_db_detach): Use inf parameter.
9895
9896 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
9897
9898         * target.h (struct target_ops) <to_detach>: Add inferior
9899         parameter.
9900         (target_detach): Likewise.
9901         * target.c (dispose_inferior): Pass inferior down.
9902         (target_detach): Pass inferior down.  Assert that it is equal to
9903         the current inferior.
9904         * aix-thread.c (aix_thread_detach): Pass inferior down.
9905         * corefile.c (core_file_command): Pass current_inferior() down.
9906         * corelow.c (core_detach): Add inferior parameter.
9907         * darwin-nat.c (darwin_detach): Likewise.
9908         * gnu-nat.c (gnu_detach): Likewise.
9909         * inf-ptrace.c (inf_ptrace_detach): Likewise.
9910         * infcmd.c (detach_command): Pass current_inferior() down to
9911         target_detach.
9912         * infrun.c (follow_fork_inferior): Pass parent_inf to
9913         target_detach.
9914         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9915         target_detach.
9916         * linux-nat.c (linux_nat_detach): Add inferior parameter.
9917         * linux-thread-db.c (thread_db_detach): Likewise.
9918         * nto-procfs.c (procfs_detach): Likewise.
9919         * procfs.c (procfs_detach): Likewise.
9920         * record.c (record_detach): Likewise.
9921         * record.h (struct inferior): Forward-declare.
9922         (record_detach): Add inferior parameter.
9923         * remote-sim.c (gdbsim_detach): Likewise.
9924         * remote.c (remote_detach_1): Likewise.
9925         (remote_detach): Likewise.
9926         (extended_remote_detach): Likewise.
9927         * sol-thread.c (sol_thread_detach): Likewise.
9928         * target-debug.h (target_debug_print_inferior_p): New macro.
9929         * target-delegates.c: Re-generate.
9930         * top.c (kill_or_detach): Pass inferior down to target_detach.
9931         * windows-nat.c (windows_detach): Add inferior parameter.
9932
9933 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
9934
9935         * target.h (struct target_ops) <to_detach>: Remove args
9936         parameter.
9937         (target_detach): Likewise.
9938         * target.c (dispose_inferior): Adjust.
9939         (target_detach): Remove args parameter, adjust.
9940         * aix-thread.c (aix_thread_detach): Adjust.
9941         * corefile.c (core_file_command): Adjust.
9942         * corelow.c (core_detach): Adjust.
9943         * darwin-nat.c (darwin_detach): Adjust.
9944         * gnu-nat.c (gnu_detach): Adjust.
9945         * inf-ptrace.c (inf_ptrace_detach): Adjust.
9946         * infcmd.c (detach_command): Adjust
9947         * infrun.c (follow_fork_inferior): Adjust.
9948         (handle_vfork_child_exec_or_exit): Adjust.
9949         * linux-fork.c (linux_fork_detach): Remove args parameter.
9950         * linux-fork.h (linux_fork_detach): Likewise.
9951         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9952         * linux-thread-db.c (thread_db_detach): Likewise.
9953         * nto-procfs.c (procfs_detach): Likewise.
9954         * procfs.c (procfs_detach): Likewise.
9955         (do_detach): Remove signo parameter.
9956         * record.c (record_detach): Remove args parameter.
9957         * record.h (record_detach): Likewise.
9958         * remote-sim.c (gdbsim_detach): Likewise.
9959         * remote.c (remote_detach_1): Likewise.
9960         (remote_detach): Likewise.
9961         (extended_remote_detach): Likewise.
9962         * sol-thread.c (sol_thread_detach): Likewise.
9963         * target-delegates.c: Re-generate.
9964         * top.c (struct qt_args) <args>: Remove field.
9965         (kill_or_detach): Don't pass args.
9966         (quit_force): Don't set args.
9967         * windows-nat.c (windows_detach): Remove args parameter.
9968
9969 2018-01-19  Yao Qi  <yao.qi@linaro.org>
9970
9971         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9972         (arm_linux_init_abi): Install it.
9973
9974 2018-01-19  Yao Qi  <yao.qi@linaro.org>
9975
9976         * osabi.c (gdb_osabi_names): Extend the regexp for
9977         arm-linux-gnueabihf.
9978
9979 2018-01-18  Yao Qi  <yao.qi@linaro.org>
9980
9981         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9982         m_abbrevs.
9983         (abbrev_table::add_abbrev): Update.
9984         (abbrev_table::lookup_abbrev): Update.
9985
9986 2018-01-18  Yao Qi  <yao.qi@linaro.org>
9987
9988         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9989
9990 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
9991
9992         * compile/compile.c (compile_to_object): Convert "triplet_rx"
9993         to "std::string".
9994
9995 2018-01-17  Tom Tromey  <tom@tromey.com>
9996
9997         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
9998
9999 2018-01-17  Tom Tromey  <tom@tromey.com>
10000
10001         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10002         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10003         (create_array_type_with_stride): Update.
10004         * dwarf2read.c (set_die_type): Update.
10005
10006 2018-01-17  Tom Tromey  <tom@tromey.com>
10007
10008         * dwarf2read.c (delayed_method_info): Remove typedef.
10009         (dwarf2_cu::method_info): Now a std::vector.
10010         (add_to_method_list): Update.
10011         (free_delayed_list): Remove.
10012         (compute_delayed_physnames): Update.
10013         (process_full_comp_unit, process_full_type_unit): Clear the method
10014         list.  Remove cleanups.
10015         (psymtab_include_file_name): Add name_holder parameter.  Use
10016         unique_xmalloc_ptr.
10017         (dwarf_decode_lines): Update.
10018
10019 2018-01-17  Tom Tromey  <tom@tromey.com>
10020             Simon Marchi  <simon.marchi@ericsson.com>
10021
10022         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10023         (dwarf2_per_objfile::free_cached_comp_units)
10024         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10025         (init_cutu_and_read_dies_no_follow): Update.
10026         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10027         (dwarf2_cu::~dwarf2_cu): New.
10028         (free_heap_comp_unit, free_stack_comp_unit): Remove.
10029         (age_cached_comp_units, free_one_cached_comp_unit): Update.
10030
10031 2018-01-17  Tom Tromey  <tom@tromey.com>
10032             Simon Marchi  <simon.marchi@ericsson.com>
10033
10034         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10035         (struct die_reader_specs) <abbrev_table>: New member.
10036         (struct abbrev_table): Add constructor.
10037         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10038         <abbrev_obstack>: Now an auto_obstack.
10039         (abbrev_table_up): New typedef.
10040         (init_cu_die_reader): Add abbrev_table parameter.
10041         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10042         Add result_dwo_abbrev_table.
10043         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10044         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10045         Update.
10046         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10047         parameter.
10048         (skip_children): Update.
10049         (abbrev_table::alloc_abbrev): Rename from
10050         abbrev_table_alloc_abbrev.
10051         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10052         (abbrev_table::lookup_abbrev): Rename from
10053         abbrev_table_lookup_abbrev.
10054         (abbrev_table_read_table): Return abbrev_table_up.
10055         (abbrev_table_free, abbrev_table_free_cleanup)
10056         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10057         (load_partial_dies): Update.
10058
10059 2018-01-17  Tom Tromey  <tom@tromey.com>
10060
10061         * dwarf2read.c (dwarf2_compute_name): Update comment.
10062         (read_func_scope, read_variable): Update.
10063         (new_symbol): Remove.
10064         (new_symbol_full): Rename to new_symbol.
10065
10066 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
10067
10068         PR gdb/16577
10069         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10070         a warning instead of throwing an error, set section size to 0 and return
10071         NULL.
10072         * gdb_bfd.h (gdb_bfd_map_section): Update description.
10073
10074 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10075
10076         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10077         std::string.
10078         (linux_ptrace_attach_fail_reason_string): Likewise.
10079         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10080         Likewise.
10081         (linux_ptrace_attach_fail_reason_string): Likewise.
10082         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10083
10084 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
10085
10086         * linux-nat.c (linux_nat_attach): Remove xstrdup.
10087
10088 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
10089
10090         PR gdb/21559
10091         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10092         checking for fs_base/gs_base fields in struct user_regs_struct.
10093         * configure: Regenerate.
10094
10095 2018-01-17  Yao Qi  <yao.qi@linaro.org>
10096
10097         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10098         function.
10099         (aarch64_linux_init_abi): Install it to gdbarch hook
10100         gcc_target_options.
10101
10102 2018-01-15  Pedro Alves  <palves@redhat.com>
10103
10104         * common/signals-state-save-restore.c
10105         (save_original_signals_state): Fix typos.
10106
10107 2017-01-12  Tom Tromey  <tom@tromey.com>
10108             Sergio Durigan Junior  <sergiodj@redhat.com>
10109
10110         * Makefile.in (install-only): Install gdb-add-index.
10111
10112 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
10113
10114         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10115
10116 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10117
10118         * infrun.c (keep_going_pass_signal): Clear step-over info when
10119         insert_breakpoints fails.
10120
10121 2018-01-11  Pedro Alves  <palves@redhat.com>
10122
10123         PR gdb/22583
10124         * infrun.c (resume): Rename to ...
10125         (resume_1): ... this.
10126         (resume): Reimplement as wrapper around resume_1.
10127
10128 2018-01-11  Pedro Alves  <palves@redhat.com>
10129
10130         PR remote/22597
10131         * remote.c (remote_parse_stop_reply): Default to the last-set
10132         general thread instead of to 'magic_null_ptid'.
10133
10134 2018-01-10  Pedro Alves  <palves@redhat.com>
10135
10136         * language.h (language_get_symbol_name_matcher): Rename ...
10137         (get_symbol_name_matcher): ... this.
10138         * language.c (language_get_symbol_name_matcher): Ditto.
10139         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10140         callers adjusted.
10141
10142 2018-01-10  Pedro Alves  <palves@redhat.com>
10143
10144         PR gdb/22670
10145         * dwarf2read.c
10146         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10147         Adjust to use language_get_symbol_name_matcher instead of
10148         language_defn::la_get_symbol_name_matcher.
10149         * language.c (language_get_symbol_name_matcher): If in Ada mode
10150         and the lookup name is a verbatim match, return Ada's matcher.
10151         * language.h (language_get_symbol_name_matcher): Adjust comment.
10152         (ada_lookup_name_info::verbatim_p):: New method.
10153
10154 2018-01-10  Pedro Alves  <palves@redhat.com>
10155
10156         PR gdb/22670
10157         * ada-lang.c (ada_collect_symbol_completion_matches): If the
10158         minsym's language is language_auto or language_cplus, pass down
10159         language_ada instead.
10160         * symtab.c (compare_symbol_name): Don't frob symbol language here.
10161
10162 2018-01-10  Pedro Alves  <palves@redhat.com>
10163
10164         PR gdb/22670
10165         * minsyms.c (linkage_name_str): New function.
10166         (iterate_over_minimal_symbols): Use it.
10167
10168 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10169
10170         * NEWS: Document that 'info proc' now works on FreeBSD.
10171
10172 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10173
10174         * configure.ac: Check for kinfo_getfile in libutil.
10175         * configure: Regenerate.
10176         * config.in: Regenerate.
10177         * fbsd-nat.c: Include "fbsd-tdep.h".
10178         (fbsd_fetch_cmdline): New.
10179         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10180         rather than calling error.
10181         (fbsd_info_proc): New.
10182         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10183         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10184         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10185
10186 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10187
10188         * fbsd-nat.c (struct free_deleter): Remove.
10189         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10190
10191 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10192
10193         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10194         NULL for an empty pathname.
10195
10196 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
10197
10198         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10199         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10200         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10201         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10202         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10203         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10204         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10205         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10206         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10207         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10208         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10209         (fbsd_core_fetch_timeval, fbsd_print_sigset)
10210         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10211         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
10212         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10213
10214 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
10215
10216         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10217         (gnu_xfer_auxv): New function.
10218         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10219         TARGET_OBJECT_AUXV.
10220
10221 2018-01-08  Yao Qi  <yao.qi@linaro.org>
10222             Simon Marchi  <simon.marchi@ericsson.com>
10223
10224         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10225         common/selftest.c.
10226         (COMMON_OBS): Remove selftest.o.
10227         * configure.ac: Append selftest-arch.c and common/selftest.c to
10228         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
10229         * configure: Re-generated.
10230         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10231         GDB_SELF_TEST.
10232         (maintenance_info_selftests): Likewise.
10233
10234 2018-01-08  Xavier Roirand  <roirand@adacore.com>
10235
10236         * ada-valprint.c (val_print_packed_array_elements): Use
10237         proper number of elements when printing an array indexed
10238         by an enumeration type.
10239
10240 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10241
10242         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10243         (dw2_get_file_names_reader): Adjust.
10244         (lookup_dwo_signatured_type): Adjust.
10245         (lookup_dwp_signatured_type): Adjust.
10246         (lookup_signatured_type): Adjust.
10247         (create_type_unit_group): Adjust.
10248         (get_type_unit_group): Adjust.
10249         (process_psymtab_comp_unit_reader): Adjust.
10250         (build_type_psymtabs_reader): Adjust.
10251         (scan_partial_symbols): Adjust.
10252         (add_partial_symbol): Adjust.
10253         (add_partial_subprogram): Adjust.
10254         (peek_die_abbrev): Adjust.
10255         (fixup_go_packaging): Adjust.
10256         (process_imported_unit_die): Adjust.
10257         (dwarf2_compute_name): Adjust.
10258         (dwarf2_physname): Adjust.
10259         (read_import_statement): Adjust.
10260         (handle_DW_AT_stmt_list): Adjust.
10261         (read_file_scope): Adjust.
10262         (read_func_scope): Adjust.
10263         (read_lexical_block_scope): Adjust.
10264         (read_call_site_scope): Adjust.
10265         (read_variable): Adjust.
10266         (dwarf2_rnglists_process): Adjust.
10267         (dwarf2_ranges_process): Adjust.
10268         (dwarf2_ranges_read): Adjust.
10269         (dwarf2_get_pc_bounds): Adjust.
10270         (dwarf2_record_block_ranges): Adjust.
10271         (dwarf2_add_field): Adjust.
10272         (dwarf2_add_member_fn): Adjust.
10273         (read_structure_type): Adjust.
10274         (process_structure_scope): Adjust.
10275         (read_enumeration_type): Adjust.
10276         (read_array_type): Adjust.
10277         (mark_common_block_symbol_computed): Adjust.
10278         (read_common_block): Adjust.
10279         (read_namespace_type): Adjust.
10280         (read_namespace): Adjust.
10281         (read_module_type): Adjust.
10282         (read_tag_pointer_type): Adjust.
10283         (read_tag_ptr_to_member_type): Adjust.
10284         (read_tag_string_type): Adjust.
10285         (read_subroutine_type): Adjust.
10286         (read_typedef): Adjust.
10287         (read_base_type): Adjust.
10288         (attr_to_dynamic_prop): Adjust.
10289         (read_subrange_type): Adjust.
10290         (read_unspecified_type): Adjust.
10291         (dwarf2_read_abbrevs): Adjust.
10292         (load_partial_dies): Adjust.
10293         (read_partial_die): Adjust.
10294         (find_partial_die): Adjust.
10295         (guess_partial_die_structure_name): Adjust.
10296         (fixup_partial_die): Adjust.
10297         (read_attribute_value): Adjust.
10298         (read_addr_index): Adjust.
10299         (read_addr_index_from_leb128): Adjust.
10300         (read_str_index): Adjust.
10301         (dwarf2_string_attr): Adjust.
10302         (get_debug_line_section): Adjust.
10303         (dwarf_decode_line_header): Adjust.
10304         (lnp_state_machine::check_line_address): Adjust.
10305         (dwarf_decode_lines_1): Adjust.
10306         (dwarf_decode_lines): Adjust.
10307         (dwarf2_start_symtab): Adjust.
10308         (var_decode_location): Adjust.
10309         (new_symbol_full): Adjust.
10310         (dwarf2_const_value_data): Adjust.
10311         (dwarf2_const_value_attr): Adjust.
10312         (dwarf2_const_value): Adjust.
10313         (die_type): Adjust.
10314         (die_containing_type): Adjust.
10315         (build_error_marker_type): Adjust.
10316         (lookup_die_type): Adjust.
10317         (guess_full_die_structure_name): Adjust.
10318         (anonymous_struct_prefix): Adjust.
10319         (determine_prefix): Adjust.
10320         (dwarf2_name): Adjust.
10321         (follow_die_ref_or_sig): Adjust.
10322         (follow_die_offset): Adjust.
10323         (follow_die_ref): Adjust.
10324         (follow_die_sig_1): Adjust.
10325         (follow_die_sig): Adjust.
10326         (get_signatured_type): Adjust.
10327         (get_DW_AT_signature_type): Adjust.
10328         (decode_locdesc): Adjust.
10329         (dwarf_decode_macros): Adjust.
10330         (cu_debug_loc_section): Adjust.
10331         (fill_in_loclist_baton): Adjust.
10332         (dwarf2_symbol_mark_computed): Adjust.
10333         (init_one_comp_unit): Don't assign
10334         dwarf2_cu::dwarf2_per_objfile.
10335         (set_die_type): Adjust.
10336
10337 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10338
10339         * dwarf2read.c (struct mapped_debug_names): Add constructor.
10340         <dwarf2_per_objfile>: New field.
10341         (dwarf2_per_objfile): Remove global.
10342         (get_dwarf2_per_objfile): New function.
10343         (set_dwarf2_per_objfile): New function.
10344         (dwarf2_build_psymtabs_hard): Change objfile parameter to
10345         dwarf2_per_objfile.
10346         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10347         (read_abbrev_offset): Likewise.
10348         (read_indirect_string): Likewise.
10349         (read_indirect_line_string): Likewise.
10350         (read_indirect_string_at_offset): Likewise.
10351         (read_indirect_string_from_dwz): Likewise.
10352         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10353         dwarf2_per_objfile.
10354         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10355         (create_all_comp_units): Change objfile parameter to
10356         dwarf2_per_objfile.
10357         (create_all_type_units): Likewise.
10358         (process_queue): Add dwarf2_per_objfile parameter.
10359         (read_and_check_comp_unit_head): Likewise.
10360         (lookup_dwo_unit_in_dwp): Likewise.
10361         (get_dwp_file): Likewise.
10362         (process_cu_includes): Likewise.
10363         (struct free_dwo_file_cleanup_data): New struct.
10364         (dwarf2_has_info): Use get_dwarf2_per_objfile and
10365         set_dwarf2_per_objfile.
10366         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10367         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10368         context, adjust calls.
10369         (dw2_instantiate_symtab): Likewise.
10370         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10371         (dw2_get_cu): Likewise.
10372         (create_cu_from_index_list): Change objfile parameter to
10373         dwarf2_per_objfile.
10374         (create_cus_from_index_list): Get dwarf2_per_objfile from
10375         context, adjust calls.
10376         (create_cus_from_index): Likewise.
10377         (create_signatured_type_table_from_index): Change objfile
10378         parameter to dwarf2_per_objfile.
10379         (create_signatured_type_table_from_debug_names): Change objfile
10380         parameter to dwarf2_per_objfile.
10381         (create_addrmap_from_index): Likewise.
10382         (create_addrmap_from_aranges): Likewise.
10383         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10384         (dw2_setup): Remove.
10385         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10386         context.
10387         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10388         get_dwarf2_per_objfile.
10389         (dw2_forget_cached_source_info): Likewise.
10390         (dw2_map_symtabs_matching_filename): Likewise.
10391         (struct dw2_symtab_iterator) <index>: Remove.
10392         <dwarf2_per_objfile>: New field.
10393         (dw2_symtab_iter_init): Replace index parameter with
10394         dwarf2_per_objfile.
10395         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10396         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10397         (dw2_print_stats): Likewise.
10398         (dw2_dump): Likewise.
10399         (dw2_expand_symtabs_for_function): Likewise.
10400         (dw2_expand_all_symtabs): Likewise.
10401         (dw2_expand_symtabs_with_fullname): Likewise.
10402         (dw2_expand_marked_cus): Replace index and objfile parameters
10403         with dwarf2_per_objfile.
10404         (dw_expand_symtabs_matching_file_matcher): Add
10405         dwarf2_per_objfile parameter and adjust calls.
10406         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10407         adjust calls.
10408         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10409         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10410         adjust calls.
10411         (create_cus_from_debug_names_list): Replace objfile parameter
10412         with dwarf2_per_objfile and adjust calls.
10413         (create_cus_from_debug_names): Likewise.
10414         (dwarf2_read_debug_names): Likewise.
10415         (mapped_debug_names::namei_to_name): Adjust call.
10416         (dw2_debug_names_iterator::next): Likewise.
10417         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10418         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10419         (dw2_debug_names_dump): Likewise.
10420         (dw2_debug_names_expand_symtabs_for_function): Likewise.
10421         (dw2_debug_names_expand_symtabs_matching): Likewise.
10422         (dwarf2_initialize_objfile): Likewise.
10423         (dwarf2_build_psymtabs): Likewise.
10424         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10425         this_cu.
10426         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10427         (read_and_check_comp_unit_head): Likewise.
10428         (read_abbrev_offset): Likewise.
10429         (create_debug_type_hash_table): Likewise.
10430         (create_debug_types_hash_table): Likewise.
10431         (create_all_type_units): Replace objfile parameter with
10432         dwarf2_per_objfile.
10433         (add_type_unit): Add dwarf2_per_objfile parameter.
10434         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10435         with dwarf2_per_objfile.
10436         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10437         (lookup_dwp_signatured_type): Likewise.
10438         (lookup_signatured_type): Likewise.
10439         (read_cutu_die_from_dwo): Likewise.
10440         (init_tu_and_read_dwo_dies): Likewise.
10441         (init_cutu_and_read_dies): Likewise.
10442         (init_cutu_and_read_dies_no_follow): Likewise.
10443         (allocate_type_unit_groups_table): Add objfile parameter.
10444         (create_type_unit_group): Use dwarf2_per_objfile from cu.
10445         (get_type_unit_group): Likewise.
10446         (process_psymtab_comp_unit): Update call.
10447         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10448         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10449         (print_tu_stats): Likewise.
10450         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10451         in void* parameter.
10452         (build_type_psymtabs): Change objfile parameter to
10453         dwarf2_per_objfile.
10454         (process_skeletonless_type_unit): Use dwarf2_per_objfile
10455         passed in void* parameter.
10456         (process_skeletonless_type_units): Change objfile parameter to
10457         dwarf2_per_objfile.
10458         (set_partial_user): Likewise.
10459         (dwarf2_build_psymtabs_hard): Likewise.
10460         (read_comp_units_from_section): Likewise.
10461         (create_all_comp_units): Likewise.
10462         (scan_partial_symbols): Update calls.
10463         (add_partial_symbol): Likewise.
10464         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10465         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10466         (process_queue): Add dwarf2_per_objfile parameter.
10467         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10468         (compute_compunit_symtab_includes): Likewise.
10469         (process_cu_includes): Add dwarf2_per_objfile parameter.
10470         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10471         (process_full_type_unit): Likewise.
10472         (process_imported_unit_die): Update call.
10473         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10474         (read_file_scope): Likewise.
10475         (allocate_dwo_file_hash_table): Add objfile parameter.
10476         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10477         (create_cus_hash_table): Likewise.
10478         (create_dwp_hash_table): Likewise.
10479         (create_dwo_unit_in_dwp_v1): Likewise.
10480         (create_dwp_v2_section): Likewise.
10481         (create_dwo_unit_in_dwp_v2): Likewise.
10482         (lookup_dwo_unit_in_dwp): Likewise.
10483         (try_open_dwop_file): Likewise.
10484         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10485         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10486         cleanup to include a reference to dwarf2_per_objfile.
10487         (open_dwp_file): Add dwarf2_per_objfile parameter.
10488         (open_and_init_dwp_file): Likewise.
10489         (get_dwp_file): Likewise.
10490         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10491         (queue_and_load_all_dwo_tus): Update call.
10492         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10493         data.
10494         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10495         (dwarf2_ranges_process): Likewise.
10496         (dwarf2_get_pc_bounds): Likewise.
10497         (mark_common_block_symbol_computed): Likewise.
10498         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10499         (dwarf2_read_abbrevs): Update call.
10500         (read_partial_die): Use dwarf2_per_objfile from cu.
10501         (find_partial_die): Likewise.
10502         (fixup_partial_die): Likewise.
10503         (read_attribute_value): Likewise.
10504         (read_indirect_string_at_offset_from): Add objfile parameter.
10505         (read_indirect_string_at_offset): Add dwarf2_per_objfile
10506         parameter.
10507         (read_indirect_string_from_dwz): Add objfile parameter.
10508         (read_indirect_string): Add objfile parameter.
10509         (read_addr_index_1): Add dwarf2_per_objfile parameter.
10510         (read_addr_index): Use dwarf2_per_objfile from cu.
10511         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10512         call dw2_setup.
10513         (read_str_index): Use dwarf2_per_objfile from cu.
10514         (get_debug_line_section): Likewise.
10515         (read_formatted_entries): Add dwarf2_per_objfile parameter.
10516         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10517         (new_symbol_full): Use dwarf2_per_objfile from cu.
10518         (build_error_marker_type): Likewise.
10519         (lookup_die_type): Likewise.
10520         (determine_prefix): Likewise.
10521         (follow_die_offset): Likewise.
10522         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
10523         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
10524         (dwarf2_fetch_die_type_sect_off): Likewise.
10525         (dwarf2_get_die_type): Likewise.
10526         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
10527         (get_signatured_type): Likewise.
10528         (get_DW_AT_signature_type): Likewise.
10529         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
10530         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
10531         (cu_debug_loc_section): Likewise.
10532         (fill_in_loclist_baton): Likewise.
10533         (dwarf2_symbol_mark_computed): Likewise.
10534         (dwarf2_find_containing_comp_unit): Change objfile parameter to
10535         dwarf2_per_objfile.
10536         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
10537         parameter.
10538         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10539         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
10540         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
10541         (set_die_type): Use dwarf2_free_objfile from cu.
10542         (get_die_type_at_offset): Likewise.
10543         (dwarf2_per_objfile_free): Don't assign global variable.
10544         (debug_names) <constructor>: Add dwarf2_per_objfile
10545         parameter, update m_debugstrlookup construction.
10546         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
10547         parameter.
10548         <m_dwarf2_per_objfile>: New field.
10549         <lookup>: Use m_dwarf2_per_objfile.
10550         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
10551         (psyms_seen_size): Likewise.
10552         (write_gdbindex): Replace objfile parameter with
10553         dwarf2_per_objfile.
10554         (write_debug_names): Likewise.
10555         (write_psymtabs_to_index): Likewise.
10556         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
10557         calls.
10558
10559 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10560
10561         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
10562         <dwarf2_per_objfile>: New field.
10563         (struct dwarf2_per_cu_data) <objfile>: Remove.
10564         <dwarf2_per_objfile>: New field.
10565         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
10566         of objfile.
10567         (create_signatured_type_table_from_index): Likewise.
10568         (create_debug_type_hash_table): Likewise.
10569         (fill_in_sig_entry_from_dwo_entry): Likewise.
10570         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
10571         (create_type_unit_group): Assign dwarf2_per_objfile instead of
10572         objfile.
10573         (create_partial_symtab): Access objfile through
10574         dwarf2_per_objfile.
10575         (process_psymtab_comp_unit_reader): Likewise.
10576         (read_comp_units_from_section): Likewise.
10577         (scan_partial_symbols): Likewise.
10578         (add_partial_symbol): Likewise.
10579         (add_partial_subprogram): Likewise.
10580         (peek_die_abbrev): Likewise.
10581         (fixup_go_packaging): Likewise.
10582         (process_full_comp_unit): Likewise.
10583         (process_full_type_unit): Likewise.
10584         (process_imported_unit_die): Likewise.
10585         (dwarf2_compute_name): Likewise.
10586         (dwarf2_physname): Likewise.
10587         (read_import_statement): Likewise.
10588         (create_cus_hash_table): Assign dwarf2_physname instead of
10589         objfile.
10590         (read_func_scope): Access objfile through dwarf2_per_objfile.
10591         (read_lexical_block_scope): Likewise.
10592         (read_call_site_scope): Likewise.
10593         (read_variable): Likewise.
10594         (dwarf2_rnglists_process): Likewise.
10595         (dwarf2_ranges_process): Likewise.
10596         (dwarf2_ranges_read): Likewise.
10597         (dwarf2_record_block_ranges): Likewise.
10598         (dwarf2_add_field): Likewise.
10599         (dwarf2_add_member_fn): Likewise.
10600         (read_structure_type): Likewise.
10601         (process_structure_scope): Likewise.
10602         (read_enumeration_type): Likewise.
10603         (read_array_type): Likewise.
10604         (read_common_block): Likewise.
10605         (read_namespace_type): Likewise.
10606         (read_namespace): Likewise.
10607         (read_module_type): Likewise.
10608         (read_tag_pointer_type): Likewise.
10609         (read_tag_ptr_to_member_type): Likewise.
10610         (read_tag_string_type): Likewise.
10611         (read_subroutine_type): Likewise.
10612         (read_typedef): Likewise.
10613         (read_base_type): Likewise.
10614         (attr_to_dynamic_prop): Likewise.
10615         (read_subrange_type): Likewise.
10616         (read_unspecified_type): Likewise.
10617         (load_partial_dies): Likewise.
10618         (read_partial_die): Likewise.
10619         (find_partial_die): Likewise.
10620         (guess_partial_die_structure_name): Likewise.
10621         (fixup_partial_die): Likewise.
10622         (read_attribute_value): Likewise.
10623         (read_addr_index_from_leb128): Likewise.
10624         (dwarf2_read_addr_index): Likewise.
10625         (dwarf2_string_attr): Likewise.
10626         (lnp_state_machine::check_line_address): Likewise.
10627         (dwarf_decode_lines_1): Likewise.
10628         (dwarf_decode_lines): Likewise.
10629         (dwarf2_start_symtab): Likewise.
10630         (var_decode_location): Likewise.
10631         (new_symbol_full): Likewise.
10632         (dwarf2_const_value_data): Likewise.
10633         (dwarf2_const_value_attr): Likewise.
10634         (dwarf2_const_value): Likewise.
10635         (die_type): Likewise.
10636         (die_containing_type): Likewise.
10637         (lookup_die_type): Likewise.
10638         (guess_full_die_structure_name): Likewise.
10639         (anonymous_struct_prefix): Likewise.
10640         (dwarf2_name): Likewise.
10641         (follow_die_ref_or_sig): Likewise.
10642         (follow_die_offset): Likewise.
10643         (follow_die_ref): Likewise.
10644         (dwarf2_fetch_die_loc_sect_off): Likewise.
10645         (dwarf2_fetch_constant_bytes): Likewise.
10646         (dwarf2_fetch_die_type_sect_off): Likewise.
10647         (dwarf2_get_die_type): Likewise.
10648         (follow_die_sig): Likewise.
10649         (decode_locdesc): Likewise.
10650         (dwarf2_per_cu_objfile): Likewise.
10651         (dwarf2_per_cu_text_offset): Likewise.
10652         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
10653         objfile.
10654         (set_die_type): Access objfile through
10655         dwarf2_per_objfile.
10656
10657 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
10658
10659         * valprint.c (converted_character_d): Remove typedef.
10660         (DEF_VEC_O (converted_character_d)): Remove.
10661         (count_next_character): Use std::vector.
10662         (print_converted_chars_to_obstack): Likewise.
10663         (generic_printstr): Likewise.
10664
10665 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10666
10667         * xml-support.h (struct gdb_xml_value): Add constructor.
10668         <value>: Change type to unique_xmalloc_ptr.
10669         (gdb_xml_value_s): Remove typedef.
10670         (DEF_VEC_O (gdb_xml_value_s)): Remove.
10671         (gdb_xml_element_start_handler): Change parameter type to
10672         std::vector.
10673         (xml_find_attribute): Likewise.
10674         * xml-support.c (xml_find_attribute): Change parameter type to
10675         std::vector and adjust.
10676         (gdb_xml_values_cleanup): Remove.
10677         (gdb_xml_parser::start_element): Adjust to std::vector.
10678         (xinclude_start_include): Change paraeter type to std::vector
10679         and adjust.
10680         * btrace.c (check_xml_btrace_version): Likewise.
10681         (parse_xml_btrace_block): Likewise.
10682         (parse_xml_btrace_pt_config_cpu): Likewise.
10683         (parse_xml_btrace_pt): Likewise.
10684         (parse_xml_btrace_conf_bts): Likewise.
10685         (parse_xml_btrace_conf_pt): Likewise.
10686         * memory-map.c (memory_map_start_memory): Likewise.
10687         (memory_map_start_property): Likewise.
10688         * osdata.c (osdata_start_osdata): Likewise.
10689         (osdata_start_item): Likewise.
10690         (osdata_start_column): Likewise.
10691         * remote.c (start_thread): Likewise.
10692         * solib-aix.c (library_list_start_library): Likewise.
10693         (library_list_start_list): Likewise.
10694         * solib-svr4.c (library_list_start_library): Likewise.
10695         (svr4_library_list_start_list): Likewise.
10696         * solib-target.c (library_list_start_segment): Likewise.
10697         (library_list_start_section): Likewise.
10698         (library_list_start_library): Likewise.
10699         (library_list_start_list): Likewise.
10700         * tracepoint.c (traceframe_info_start_memory): Likewise.
10701         (traceframe_info_start_tvar): Likewise.
10702         * xml-syscall.c (syscall_start_syscall): Likewise.
10703         * xml-tdesc.c (tdesc_start_target): Likewise.
10704         (tdesc_start_feature): Likewise.
10705         (tdesc_start_reg): Likewise.
10706         (tdesc_start_union): Likewise.
10707         (tdesc_start_struct): Likewise.
10708         (tdesc_start_flags): Likewise.
10709         (tdesc_start_enum): Likewise.
10710         (tdesc_start_field): Likewise.
10711         (tdesc_start_enum_value): Likewise.
10712         (tdesc_start_vector): Likewise.
10713
10714 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10715
10716         * extension.h (struct xmethod_worker) <clone>: Remove.
10717         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
10718         Remove.
10719         (python_xmethod_worker::clone): Remove.
10720         * valops.c (find_overload_match): Use std::move instead of
10721         clone.
10722
10723 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
10724
10725         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
10726         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
10727         <free_xmethod_worker_data>: Remove.
10728         <get_matching_xmethod_workers>: Chance VEC to std::vector.
10729         <get_xmethod_arg_types>: Remove.
10730         <get_xmethod_result_type>: Remove.
10731         <invoke_xmethod>: Remove.
10732         * extension.c (new_xmethod_worker): Remove.
10733         (clone_xmethod_worker): Remove.
10734         (get_matching_xmethod_workers): Return void, pass std::vector by
10735         pointer.
10736         (get_xmethod_arg_types): Rename to...
10737         (xmethod_worker::get_arg_types): ... this, and adjust.
10738         (get_xmethod_result_type): Rename to...
10739         (xmethod_worker::get_result_type): ... this, and adjust.
10740         (invoke_xmethod): Remove.
10741         (free_xmethod_worker): Remove.
10742         (free_xmethod_worker_vec): Remove.
10743         * extension.h (enum ext_lang_rc): Move here from
10744         extension-priv.h.
10745         (struct xmethod_worker): Add constructor and destructor.
10746         <data>: Remove.
10747         <value>: Remove.
10748         <invoke, clone, do_get_result_type, do_get_arg_types>: New
10749         virtual pure methods.
10750         <get_arg_types, get_result_type>: New methods.
10751         (xmethod_worker_ptr): Remove typedef.
10752         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
10753         (xmethod_worker_vec): Remove typedef.
10754         (xmethod_worker_up): New typedef.
10755         (invoke_xmethod): Remove.
10756         (clone_xmethod_worker): Remove.
10757         (free_xmethod_worker): Remove.
10758         (free_xmethod_worker_vec): Remove.
10759         (get_xmethod_arg_types): Remove.
10760         (get_xmethod_result_type): Remove.
10761         * valops.c (find_method_list): Use std::vector, don't use
10762         intermediate vector.
10763         (value_find_oload_method_list): Use std::vector.
10764         (find_overload_match): Use std::vector.
10765         (find_oload_champ): Use std::vector.
10766         * value.c (value_free): Use operator delete.
10767         (value_of_xmethod): Rename to...
10768         (value_from_xmethod): ... this.  Don't assign
10769         xmethod_worker::value, take rvalue-reference.
10770         (result_type_of_xmethod): Adjust.
10771         (call_xmethod): Adjust.
10772         * value.h: Include extension.h.
10773         (struct xmethod_worker): Don't forward-declare.
10774         (value_of_xmethod): Rename to...
10775         (value_from_xmethod): ... this, take rvalue-reference.
10776         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
10777         (struct python_xmethod_worker): ... this, add constructor and
10778         destructor.
10779         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
10780         (gdbpy_free_xmethod_worker_data): Rename to...
10781         (python_xmethod_worker::~python_xmethod_worker): ... this and
10782         adjust.
10783         (gdbpy_clone_xmethod_worker_data): Rename to...
10784         (python_xmethod_worker::clone): ... this and adjust.
10785         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
10786         temporary vector.
10787         (gdbpy_get_xmethod_arg_types): Rename to...
10788         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
10789         (gdbpy_get_xmethod_result_type): Rename to...
10790         (python_xmethod_worker::do_get_result_type): ... this and
10791         adjust.
10792         (gdbpy_invoke_xmethod): Rename to...
10793         (python_xmethod_worker::invoke): ... this and adjust.
10794         (new_python_xmethod_worker): Rename to...
10795         (python_xmethod_worker::python_xmethod_worker): ... this and
10796         adjust.
10797         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10798         Remove.
10799         (gdbpy_free_xmethod_worker_data): Remove.
10800         (gdbpy_get_matching_xmethod_workers): Use std::vector.
10801         (gdbpy_get_xmethod_arg_types): Remove.
10802         (gdbpy_get_xmethod_result_type): Remove.
10803         (gdbpy_invoke_xmethod): Remove.
10804         * python/python.c (python_extension_ops): Remove obsolete
10805         callbacks.
10806
10807 2018-01-05  Pedro Alves  <palves@redhat.com>
10808
10809         PR gdb/18653
10810         * common/signals-state-save-restore.c
10811         (save_original_signals_state): New parameter 'quiet'.  Warn if we
10812         find a custom handler preinstalled, instead of internal erroring.
10813         But only warn if !quiet.
10814         * common/signals-state-save-restore.h
10815         (save_original_signals_state): New parameter 'quiet'.
10816         * main.c (captured_main_1): Move save_original_signals_state call
10817         after option handling, and pass QUIET.
10818
10819 2018-01-05  Pedro Alves  <palves@redhat.com>
10820
10821         * spu-tdep.c (spu_catch_start): Pass
10822         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10823
10824 2018-01-05  Pedro Alves  <palves@redhat.com>
10825
10826         PR gdb/22670
10827         * ada-lang.c (literal_symbol_name_matcher): New function.
10828         (ada_get_symbol_name_matcher): Use it for
10829         symbol_name_match_type::SEARCH_NAME.
10830         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
10831         it down instead of assuming symbol_name_match_type::FULL.
10832         * block.h (block_lookup_symbol): New parameter 'match_type'.
10833         * c-valprint.c (print_unpacked_pointer): Use
10834         lookup_symbol_search_name instead of lookup_symbol.
10835         * compile/compile-object-load.c (get_out_value_type): Pass down
10836         symbol_name_match_type::SEARCH_NAME.
10837         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10838         symbol_name_match_type::FULL.
10839         * cp-support.c (cp_get_symbol_name_matcher): Handle
10840         symbol_name_match_type::SEARCH_NAME.
10841         * infrun.c (insert_exception_resume_breakpoint): Use
10842         lookup_symbol_search_name.
10843         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10844         * psymtab.c (maintenance_check_psymtabs): Use
10845         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10846         * stack.c (print_frame_args): Use lookup_symbol_search_name and
10847         SYMBOL_SEARCH_NAME.
10848         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10849         if symbol_name_match_type::SEARCH_NAME.
10850         (lookup_symbol_in_language): Pass down
10851         symbol_name_match_type::FULL.
10852         (lookup_symbol_search_name): New.
10853         (lookup_language_this): Pass down
10854         symbol_name_match_type::SEARCH_NAME.
10855         (lookup_symbol_aux, lookup_local_symbol): New parameter
10856         'match_type'.  Pass it down.
10857         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10858         (lookup_symbol_search_name): New declaration.
10859         (lookup_symbol_in_block): New 'match_type' parameter.
10860
10861 2018-01-05  Pedro Alves  <palves@redhat.com>
10862
10863         PR gdb/22670
10864         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10865         ada_lookup_symbol.
10866         (ada_lookup_symbol): Reimplement in terms of
10867         ada_lookup_symbol_list, bits factored out from
10868         ada_lookup_encoded_symbol.
10869
10870 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
10871
10872         * ada-exp.y (write_object_renaming): When subscripting an array
10873         using a symbol as the index, pass the block in call to
10874         ada_lookup_encoded_symbol when looking that symbol up.
10875
10876 2018-01-05  Jerome Guitton  <guitton@adacore.com>
10877
10878         * ada-lang.c (ada_array_length): Use ada_index_type instead of
10879         TYPE_INDEX_TYPE.
10880
10881 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
10882
10883         * ada-lang.c (ada_to_fixed_value_create): Add handling of
10884         the case where VALUE_LVAL (val0) is not lval_memory.
10885
10886 2018-01-05  Xavier Roirand  <roirand@adacore.com>
10887
10888         * ada-valprint.c (print_optional_low_bound): Handle
10889         character-indexed array printing like boolean-indexed array
10890         printing.
10891
10892 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
10893
10894         * NEWS: Create a new section for the next release branch.
10895         Rename the section of the current branch, now that it has
10896         been cut.
10897
10898 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
10899
10900         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10901         * version.in: Bump version to 8.1.50.DATE-git.
10902
10903 2018-01-03  Xavier Roirand  <roirand@adacore.com>
10904
10905         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10906         Add field.
10907         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10908         Add field.
10909         (default_exception_support_info) <catch_handlers_sym>: Add field.
10910         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10911         (ada_exception_name_addr_1): Add "catch handlers" handling.
10912         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10913         Update all callers.
10914         (create_excep_cond_exprs) <ex>: Add parameter.
10915         (re_set_exception): Update create_excep_cond_exprs call.
10916         (print_it_exception, print_one_exception, print_mention_exception)
10917         (print_recreate_exception): Add "catch handler" handling.
10918         (allocate_location_catch_handlers, re_set_catch_handlers)
10919         (check_status_catch_handlers, print_it_catch_handlers)
10920         (print_one_catch_handlers, print_mention_catch_handlers)
10921         (print_recreate_catch_handlers): New function.
10922         (catch_handlers_breakpoint_ops): New variable.
10923         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10924         Add parameter.  Add "catch handler" handling.
10925         (ada_exception_sym_name, ada_exception_breakpoint_ops):
10926         Add "catch handler" handling.
10927         (ada_exception_catchpoint_cond_string): Add "catch handler"
10928         handling.
10929         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10930         call.
10931         (catch_ada_handlers_command): New function.
10932         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10933         operations structure.
10934         (_initialize_ada_language): Add "catch handlers" command entry.
10935         * NEWS: Document "catch handlers" feature.
10936
10937 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
10938
10939         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10940         account when creating the array type of the slice.
10941         (ada_value_slice): Likewise.
10942
10943 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
10944
10945         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10946         New enum value.
10947         (create_array_type_with_stride): Add byte_stride_prop parameter.
10948         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10949         New parameter.  Update all callers in this file.
10950         (array_type_has_dynamic_stride): New function.
10951         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10952         of arrays with dynamic byte strides.
10953         * dwarf2read.c (read_array_type): Add support for dynamic
10954         DW_AT_byte_stride attributes.
10955
10956 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
10957
10958         * dwarf2read.c (read_unspecified_type): Treat
10959         DW_TAG_enumeration_type DIEs from Ada units as stubs.
10960
10961 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10962
10963         Update copyright year range in all GDB files.
10964
10965 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10966
10967         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10968         and gdb/testsuite/gdb.base/step-line.c.
10969
10970 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10971
10972         * copyright.py (main): Dump the contents of
10973         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10974         even if BY_HAND is empty.
10975
10976 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10977
10978         * top.c (print_gdb_version): Update Copyright year in version
10979         message.
10980
10981 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
10982
10983         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10984
10985 For older changes see ChangeLog-2017.
10986 \f
10987 Local Variables:
10988 mode: change-log
10989 left-margin: 8
10990 fill-column: 74
10991 version-control: never
10992 coding: utf-8
10993 End: