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