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