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