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