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