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